diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index c69e0895..8cecc939 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -28,19 +28,19 @@ }, { "ImportPath": "github.com/mesos/mesos-go/detector", - "Rev": "65cb9ffec50a76f4ed9fe4808405b66b3bb7010d" + "Rev": "a417dbaf942a87bf08f9dc9c5c8f7ec60176cf14" }, { "ImportPath": "github.com/mesos/mesos-go/mesosproto", - "Rev": "65cb9ffec50a76f4ed9fe4808405b66b3bb7010d" + "Rev": "a417dbaf942a87bf08f9dc9c5c8f7ec60176cf14" }, { "ImportPath": "github.com/mesos/mesos-go/mesosutil", - "Rev": "65cb9ffec50a76f4ed9fe4808405b66b3bb7010d" + "Rev": "a417dbaf942a87bf08f9dc9c5c8f7ec60176cf14" }, { "ImportPath": "github.com/mesos/mesos-go/upid", - "Rev": "65cb9ffec50a76f4ed9fe4808405b66b3bb7010d" + "Rev": "a417dbaf942a87bf08f9dc9c5c8f7ec60176cf14" }, { "ImportPath": "github.com/miekg/dns", diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client.go deleted file mode 100644 index 3e42c2d7..00000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client.go +++ /dev/null @@ -1,444 +0,0 @@ -package zoo - -import ( - "errors" - "fmt" - "sync" - "sync/atomic" - "time" - - log "github.com/golang/glog" - "github.com/samuel/go-zookeeper/zk" -) - -const ( - defaultSessionTimeout = 60 * time.Second - defaultReconnectTimeout = 5 * time.Second - currentPath = "." - defaultRewatchDelay = 200 * time.Millisecond -) - -type stateType int32 - -const ( - disconnectedState stateType = iota - connectionRequestedState - connectionAttemptState - connectedState -) - -func (s stateType) String() string { - switch s { - case disconnectedState: - return "DISCONNECTED" - case connectionRequestedState: - return "REQUESTED" - case connectionAttemptState: - return "ATTEMPT" - case connectedState: - return "CONNECTED" - default: - panic(fmt.Sprintf("unrecognized state: %d", int32(s))) - } -} - -type Client struct { - conn Connector - defaultFactory Factory - factory Factory // must never be nil, use setFactory to update - state stateType - reconnCount uint64 - reconnDelay time.Duration - rootPath string - errorHandler ErrorHandler // must never be nil - connectOnce sync.Once - stopOnce sync.Once - shouldStop chan struct{} // signal chan - shouldReconn chan struct{} // message chan - connLock sync.Mutex - hasConnected chan struct{} // message chan - rewatchDelay time.Duration -} - -func newClient(hosts []string, path string) (*Client, error) { - zkc := &Client{ - reconnDelay: defaultReconnectTimeout, - rewatchDelay: defaultRewatchDelay, - rootPath: path, - shouldStop: make(chan struct{}), - shouldReconn: make(chan struct{}, 1), - hasConnected: make(chan struct{}, 1), - errorHandler: ErrorHandler(func(*Client, error) {}), - defaultFactory: asFactory(func() (Connector, <-chan zk.Event, error) { - return zk.Connect(hosts, defaultSessionTimeout) - }), - } - zkc.setFactory(zkc.defaultFactory) - // TODO(vlad): validate URIs - return zkc, nil -} - -func (zkc *Client) setFactory(f Factory) { - if f == nil { - f = zkc.defaultFactory - } - zkc.factory = asFactory(func() (c Connector, ch <-chan zk.Event, err error) { - select { - case <-zkc.shouldStop: - err = errors.New("client stopping") - default: - zkc.connLock.Lock() - defer zkc.connLock.Unlock() - if zkc.conn != nil { - zkc.conn.Close() - } - c, ch, err = f.create() - zkc.conn = c - } - return - }) -} - -// return true only if the client's state was changed from `from` to `to` -func (zkc *Client) stateChange(from, to stateType) (result bool) { - defer func() { - log.V(3).Infof("stateChange: from=%v to=%v result=%v", from, to, result) - }() - result = atomic.CompareAndSwapInt32((*int32)(&zkc.state), int32(from), int32(to)) - return -} - -// connect to zookeeper, blocks on the initial call to doConnect() -func (zkc *Client) connect() { - select { - case <-zkc.shouldStop: - return - default: - zkc.connectOnce.Do(func() { - if zkc.stateChange(disconnectedState, connectionRequestedState) { - if err := zkc.doConnect(); err != nil { - log.Error(err) - zkc.errorHandler(zkc, err) - } - } - go func() { - for { - select { - case <-zkc.shouldStop: - zkc.connLock.Lock() - defer zkc.connLock.Unlock() - if zkc.conn != nil { - zkc.conn.Close() - } - return - case <-zkc.shouldReconn: - if err := zkc.reconnect(); err != nil { - log.Error(err) - zkc.errorHandler(zkc, err) - } - } - } - }() - }) - } - return -} - -// attempt to reconnect to zookeeper. will ignore attempts to reconnect -// if not disconnected. if reconnection is attempted then this func will block -// for at least reconnDelay before actually attempting to connect to zookeeper. -func (zkc *Client) reconnect() error { - if !zkc.stateChange(disconnectedState, connectionRequestedState) { - log.V(4).Infoln("Ignoring reconnect, currently connected/connecting.") - return nil - } - - defer func() { zkc.reconnCount++ }() - - log.V(4).Infoln("Delaying reconnection for ", zkc.reconnDelay) - <-time.After(zkc.reconnDelay) - - return zkc.doConnect() -} - -func (zkc *Client) doConnect() error { - if !zkc.stateChange(connectionRequestedState, connectionAttemptState) { - log.V(4).Infoln("aborting doConnect, connection attempt already in progress or else disconnected") - return nil - } - - // if we're not connected by the time we return then we failed. - defer func() { - zkc.stateChange(connectionAttemptState, disconnectedState) - }() - - // create Connector instance - conn, sessionEvents, err := zkc.factory.create() - if err != nil { - // once the factory stops producing connectors, it's time to stop - zkc.stop() - return err - } - - zkc.connLock.Lock() - zkc.conn = conn - zkc.connLock.Unlock() - - log.V(4).Infof("Created connection object of type %T\n", conn) - connected := make(chan struct{}) - sessionExpired := make(chan struct{}) - go func() { - defer close(sessionExpired) - zkc.monitorSession(sessionEvents, connected) - }() - - // wait for connected confirmation - select { - case <-connected: - if !zkc.stateChange(connectionAttemptState, connectedState) { - log.V(4).Infoln("failed to transition to connected state") - // we could be: - // - disconnected ... reconnect() will try to connect again, otherwise; - // - connected ... another goroutine already established a connection - // - connectionRequested ... another goroutine is already trying to connect - zkc.requestReconnect() - } - log.Infoln("zookeeper client connected") - case <-sessionExpired: - // connection was disconnected before it was ever really 'connected' - if !zkc.stateChange(connectionAttemptState, disconnectedState) { - //programming error - panic("failed to transition from connection-attempt to disconnected state") - } - zkc.requestReconnect() - case <-zkc.shouldStop: - // noop - } - return nil -} - -// signal for reconnect unless we're shutting down -func (zkc *Client) requestReconnect() { - select { - case <-zkc.shouldStop: - // abort reconnect request, client is shutting down - default: - select { - case zkc.shouldReconn <- struct{}{}: - // reconnect request successful - default: - // reconnect chan is full: reconnect has already - // been requested. move on. - } - } -} - -// monitor a zookeeper session event channel, closes the 'connected' channel once -// a zookeeper connection has been established. errors are forwarded to the client's -// errorHandler. the closing of the sessionEvents chan triggers a call to client.onDisconnected. -// this func blocks until either the client's shouldStop or sessionEvents chan are closed. -func (zkc *Client) monitorSession(sessionEvents <-chan zk.Event, connected chan struct{}) { - firstConnected := true - for { - select { - case <-zkc.shouldStop: - return - case e, ok := <-sessionEvents: - if !ok { - // once sessionEvents is closed, the embedded ZK client will - // no longer attempt to reconnect. - zkc.onDisconnected() - return - } else if e.Err != nil { - log.Errorf("received state error: %s", e.Err.Error()) - zkc.errorHandler(zkc, e.Err) - } - switch e.State { - case zk.StateConnecting: - log.Infoln("connecting to zookeeper..") - - case zk.StateConnected: - log.V(2).Infoln("received StateConnected") - if firstConnected { - close(connected) // signal session listener - firstConnected = false - } - // let any listeners know about the change - select { - case <-zkc.shouldStop: // noop - case zkc.hasConnected <- struct{}{}: // noop - default: // message buf full, this becomes a non-blocking noop - } - - case zk.StateDisconnected: - log.Infoln("zookeeper client disconnected") - - case zk.StateExpired: - log.Infoln("zookeeper client session expired") - } - } - } -} - -// watch the child nodes for changes, at the specified path. -// callers that specify a path of `currentPath` will watch the currently set rootPath, -// otherwise the watchedPath is calculated as rootPath+path. -// this func spawns a go routine to actually do the watching, and so returns immediately. -// in the absense of errors a signalling channel is returned that will close -// upon the termination of the watch (e.g. due to disconnection). -func (zkc *Client) watchChildren(path string, watcher ChildWatcher) (<-chan struct{}, error) { - watchPath := zkc.rootPath - if path != "" && path != currentPath { - watchPath = watchPath + path - } - - log.V(2).Infoln("Watching children for path", watchPath) - watchEnded := make(chan struct{}) - go func() { - defer close(watchEnded) - zkc._watchChildren(watchPath, watcher) - }() - return watchEnded, nil -} - -// continuation of watchChildren. blocks until either underlying zk connector terminates, or else this -// client is shut down. continuously renews child watches. -func (zkc *Client) _watchChildren(watchPath string, watcher ChildWatcher) { - watcher(zkc, watchPath) // prime the listener - var zkevents <-chan zk.Event - var err error - first := true - for { - // we really only expect this to happen when zk session has expired, - // give the connection a little time to re-establish itself - for { - //TODO(jdef) it would be better if we could listen for broadcast Connection/Disconnection events, - //emitted whenever the embedded client cycles (read: when the connection state of this client changes). - //As it currently stands, if the embedded client cycles fast enough, we may actually not notice it here - //and keep on watching like nothing bad happened. - if !zkc.isConnected() { - log.Warningf("no longer connected to server, exiting child watch") - return - } - if first { - first = false - } else { - select { - case <-zkc.shouldStop: - return - case <-time.After(zkc.rewatchDelay): - } - } - _, _, zkevents, err = zkc.conn.ChildrenW(watchPath) - if err == nil { - log.V(2).Infoln("rewatching children for path", watchPath) - break - } - log.V(1).Infof("unable to watch children for path %s: %s", watchPath, err.Error()) - zkc.errorHandler(zkc, err) - } - // zkevents is (at most) a one-trick channel - // (a) a child event happens (no error) - // (b) the embedded client is shutting down (zk.ErrClosing) - // (c) the zk session expires (zk.ErrSessionExpired) - select { - case <-zkc.shouldStop: - return - case e, ok := <-zkevents: - if !ok { - log.Warningf("expected a single zk event before channel close") - break // the select - } - switch e.Type { - //TODO(jdef) should we not also watch for EventNode{Created,Deleted,DataChanged}? - case zk.EventNodeChildrenChanged: - log.V(2).Infoln("Handling: zk.EventNodeChildrenChanged") - watcher(zkc, e.Path) - continue - default: - if e.Err != nil { - zkc.errorHandler(zkc, e.Err) - if e.Type == zk.EventNotWatching && e.State == zk.StateDisconnected { - if e.Err == zk.ErrClosing { - log.V(1).Infof("watch invalidated, embedded client terminating") - return - } - log.V(1).Infof("watch invalidated, attempting to watch again: %v", e.Err) - } else { - log.Warningf("received error while watching path %s: %s", watchPath, e.Err.Error()) - } - } - } - } - } -} - -func (zkc *Client) onDisconnected() { - if st := zkc.getState(); st == connectedState && zkc.stateChange(st, disconnectedState) { - log.Infoln("disconnected from the server, reconnecting...") - zkc.requestReconnect() - return - } -} - -// return a channel that gets an empty struct every time a connection happens -func (zkc *Client) connections() <-chan struct{} { - return zkc.hasConnected -} - -func (zkc *Client) getState() stateType { - return stateType(atomic.LoadInt32((*int32)(&zkc.state))) -} - -// convenience function -func (zkc *Client) isConnected() bool { - return zkc.getState() == connectedState -} - -// convenience function -func (zkc *Client) isConnecting() bool { - state := zkc.getState() - return state == connectionRequestedState || state == connectionAttemptState -} - -// convenience function -func (zkc *Client) isDisconnected() bool { - return zkc.getState() == disconnectedState -} - -func (zkc *Client) list(path string) ([]string, error) { - if !zkc.isConnected() { - return nil, errors.New("Unable to list children, client not connected.") - } - - children, _, err := zkc.conn.Children(path) - if err != nil { - return nil, err - } - - return children, nil -} - -func (zkc *Client) data(path string) ([]byte, error) { - if !zkc.isConnected() { - return nil, errors.New("Unable to retrieve node data, client not connected.") - } - - data, _, err := zkc.conn.Get(path) - if err != nil { - return nil, err - } - - return data, nil -} - -func (zkc *Client) stop() { - zkc.stopOnce.Do(func() { - close(zkc.shouldStop) - }) -} - -// when this channel is closed the client is either stopping, or has stopped -func (zkc *Client) stopped() <-chan struct{} { - return zkc.shouldStop -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client2.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client2.go new file mode 100644 index 00000000..0b65b663 --- /dev/null +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client2.go @@ -0,0 +1,88 @@ +package zoo + +import ( + "sync" + "time" + + "github.com/samuel/go-zookeeper/zk" +) + +const ( + defaultSessionTimeout = 60 * time.Second + currentPath = "." +) + +var zkSessionTimeout = defaultSessionTimeout + +type client2 struct { + *zk.Conn + path string + done chan struct{} // signal chan, closes when the underlying connection terminates + stopOnce sync.Once +} + +func connect2(hosts []string, path string) (*client2, error) { + c, ev, err := zk.Connect(hosts, zkSessionTimeout) + if err != nil { + return nil, err + } + done := make(chan struct{}) + go func() { + // close the 'done' chan when the zk event chan closes (signals termination of zk connection) + defer close(done) + for { + if _, ok := <-ev; !ok { + return + } + } + }() + return &client2{ + Conn: c, + path: path, + done: done, + }, nil +} + +func (c *client2) stopped() <-chan struct{} { + return c.done +} + +func (c *client2) stop() { + c.stopOnce.Do(c.Close) +} + +func (c *client2) data(path string) (data []byte, err error) { + data, _, err = c.Get(path) + return +} + +func (c *client2) watchChildren(path string) (string, <-chan []string, <-chan error) { + errCh := make(chan error, 1) + snap := make(chan []string) + + watchPath := c.path + if path != "" && path != currentPath { + watchPath = watchPath + path + } + go func() { + defer close(errCh) + for { + children, _, ev, err := c.ChildrenW(watchPath) + if err != nil { + errCh <- err + return + } + select { + case snap <- children: + case <-c.done: + return + } + e := <-ev // wait for the next watch-related event + if e.Err != nil { + errCh <- err + return + } + } + }() + return watchPath, snap, errCh +} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client_test.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client_test.go deleted file mode 100644 index 1ebca734..00000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/client_test.go +++ /dev/null @@ -1,342 +0,0 @@ -package zoo - -import ( - "errors" - "fmt" - "os" - "strings" - "sync/atomic" - "testing" - "time" - - "github.com/gogo/protobuf/proto" - log "github.com/golang/glog" - util "github.com/mesos/mesos-go/mesosutil" - "github.com/samuel/go-zookeeper/zk" - "github.com/stretchr/testify/assert" -) - -var test_zk_hosts = []string{"localhost:2181"} - -const ( - test_zk_path = "/test" -) - -func TestClientNew(t *testing.T) { - path := "/mesos" - chEvent := make(chan zk.Event) - connector := makeMockConnector(path, chEvent) - - c, err := newClient(test_zk_hosts, path) - assert.NoError(t, err) - assert.NotNil(t, c) - assert.False(t, c.isConnected()) - c.conn = connector - -} - -// This test requires zookeeper to be running. -// You must also set env variable ZK_HOSTS to point to zk hosts. -// The zk package does not offer a way to mock its connection function. -func TestClientConnectIntegration(t *testing.T) { - if os.Getenv("ZK_HOSTS") == "" { - t.Skip("Skipping zk-server connection test: missing env ZK_HOSTS.") - } - hosts := strings.Split(os.Getenv("ZK_HOSTS"), ",") - c, err := newClient(hosts, "/mesos") - assert.NoError(t, err) - c.errorHandler = ErrorHandler(func(c *Client, e error) { - err = e - }) - c.connect() - assert.NoError(t, err) - - c.connect() - assert.NoError(t, err) - assert.True(t, c.isConnected()) -} - -func TestClientConnect(t *testing.T) { - c, err := makeClient() - assert.NoError(t, err) - assert.False(t, c.isConnected()) - c.connect() - assert.True(t, c.isConnected()) - assert.False(t, c.isConnecting()) -} - -func TestClient_FlappingConnection(t *testing.T) { - c, err := newClient(test_zk_hosts, test_zk_path) - c.reconnDelay = 10 * time.Millisecond // we don't want this test to take forever - defer c.stop() - - assert.NoError(t, err) - - attempts := 0 - c.setFactory(asFactory(func() (Connector, <-chan zk.Event, error) { - log.V(2).Infof("**** Using zk.Conn adapter ****") - ch0 := make(chan zk.Event, 10) // session chan - ch1 := make(chan zk.Event) // watch chan - go func() { - if attempts > 1 { - t.Fatalf("only one connector instance is expected") - } - attempts++ - for i := 0; i < 4; i++ { - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnecting, - Path: test_zk_path, - } - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnected, - Path: test_zk_path, - } - time.Sleep(200 * time.Millisecond) - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateDisconnected, - Path: test_zk_path, - } - } - }() - connector := makeMockConnector(test_zk_path, ch1) - return connector, ch0, nil - })) - - go c.connect() - time.Sleep(2 * time.Second) - assert.True(t, c.isConnected()) - assert.Equal(t, 1, attempts) -} - -func TestClientWatchChildren(t *testing.T) { - c, err := makeClient() - assert.NoError(t, err) - c.errorHandler = ErrorHandler(func(c *Client, e error) { - err = e - }) - c.connect() - assert.NoError(t, err) - wCh := make(chan struct{}, 1) - childrenWatcher := ChildWatcher(func(zkc *Client, path string) { - log.V(4).Infoln("Path", path, "changed!") - children, err := c.list(path) - assert.NoError(t, err) - assert.Equal(t, 3, len(children)) - assert.Equal(t, "info_0", children[0]) - assert.Equal(t, "info_5", children[1]) - assert.Equal(t, "info_10", children[2]) - wCh <- struct{}{} - }) - - _, err = c.watchChildren(currentPath, childrenWatcher) - assert.NoError(t, err) - - select { - case <-wCh: - case <-time.After(time.Millisecond * 700): - panic("Waited too long...") - } -} - -func TestClientWatchErrors(t *testing.T) { - path := "/test" - ch := make(chan zk.Event, 1) - ch <- zk.Event{ - Type: zk.EventNotWatching, - Err: errors.New("Event Error"), - } - - c, err := makeClient() - c.state = connectedState - - assert.NoError(t, err) - c.conn = makeMockConnector(path, (<-chan zk.Event)(ch)) - wCh := make(chan struct{}, 1) - c.errorHandler = ErrorHandler(func(zkc *Client, err error) { - assert.Error(t, err) - wCh <- struct{}{} - }) - - c.watchChildren(currentPath, ChildWatcher(func(*Client, string) {})) - - select { - case <-wCh: - case <-time.After(time.Millisecond * 700): - t.Fatalf("timed out waiting for error message") - } - -} - -func TestWatchChildren_flappy(t *testing.T) { - c, err := newClient(test_zk_hosts, test_zk_path) - c.reconnDelay = 10 * time.Millisecond // we don't want this test to take forever - - assert.NoError(t, err) - - attempts := 0 - conn := NewMockConnector() - defer func() { - if !t.Failed() { - conn.AssertExpectations(t) - } - }() - defer func() { - // stop client and give it time to shut down the connector - c.stop() - time.Sleep(100 * time.Millisecond) - }() - c.setFactory(asFactory(func() (Connector, <-chan zk.Event, error) { - log.V(2).Infof("**** Using zk.Conn adapter ****") - ch0 := make(chan zk.Event, 10) // session chan - ch1 := make(chan zk.Event) // watch chan - go func() { - if attempts > 1 { - t.Fatalf("only one connector instance is expected") - } - attempts++ - for i := 0; i < 4; i++ { - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnecting, - Path: test_zk_path, - } - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnected, - Path: test_zk_path, - } - time.Sleep(200 * time.Millisecond) - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateDisconnected, - Path: test_zk_path, - } - } - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnecting, - Path: test_zk_path, - } - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnected, - Path: test_zk_path, - } - ch1 <- zk.Event{ - Type: zk.EventNodeChildrenChanged, - Path: test_zk_path, - } - }() - simulatedErr := errors.New("simulated watch error") - conn.On("ChildrenW", test_zk_path).Return(nil, nil, nil, simulatedErr).Times(4) - conn.On("ChildrenW", test_zk_path).Return([]string{test_zk_path}, &zk.Stat{}, (<-chan zk.Event)(ch1), nil) - conn.On("Close").Return(nil) - return conn, ch0, nil - })) - - go c.connect() - var watchChildrenCount uint64 - watcherFunc := ChildWatcher(func(zkc *Client, path string) { - log.V(1).Infof("ChildWatcher invoked %d", atomic.LoadUint64(&watchChildrenCount)) - }) - startTime := time.Now() - endTime := startTime.Add(2 * time.Second) -watcherLoop: - for time.Now().Before(endTime) { - log.V(1).Infof("entered watcherLoop") - select { - case <-c.connections(): - log.V(1).Infof("invoking watchChildren") - if _, err := c.watchChildren(currentPath, watcherFunc); err == nil { - // watching children succeeded!! - t.Logf("child watch success") - atomic.AddUint64(&watchChildrenCount, 1) - } else { - // setting the watch failed - t.Logf("setting child watch failed: %v", err) - continue watcherLoop - } - case <-c.stopped(): - t.Logf("detected client termination") - break watcherLoop - case <-time.After(endTime.Sub(time.Now())): - } - } - - wantChildrenCount := atomic.LoadUint64(&watchChildrenCount) - assert.Equal(t, uint64(5), wantChildrenCount, "expected watchChildrenCount = 5 instead of %d, should be reinvoked upon initial ChildrenW failures", wantChildrenCount) -} - -func makeClient() (*Client, error) { - ch0 := make(chan zk.Event, 2) - ch1 := make(chan zk.Event, 1) - - ch0 <- zk.Event{ - State: zk.StateConnected, - Path: test_zk_path, - } - ch1 <- zk.Event{ - Type: zk.EventNodeChildrenChanged, - Path: test_zk_path, - } - go func() { - time.Sleep(1 * time.Second) - ch0 <- zk.Event{ - State: zk.StateDisconnected, - } - close(ch0) - close(ch1) - }() - - c, err := newClient(test_zk_hosts, test_zk_path) - if err != nil { - return nil, err - } - - // only allow a single connection - first := true - c.setFactory(asFactory(func() (Connector, <-chan zk.Event, error) { - if !first { - return nil, nil, errors.New("only a single connection attempt allowed for mock connector") - } else { - first = false - } - log.V(2).Infof("**** Using zk.Conn adapter ****") - connector := makeMockConnector(test_zk_path, ch1) - return connector, ch0, nil - })) - - return c, nil -} - -func makeMockConnector(path string, chEvent <-chan zk.Event) *MockConnector { - log.V(2).Infoln("Making Connector mock.") - conn := NewMockConnector() - conn.On("Close").Return(nil) - conn.On("ChildrenW", path).Return([]string{path}, &zk.Stat{}, chEvent, nil) - conn.On("Children", path).Return([]string{"info_0", "info_5", "info_10"}, &zk.Stat{}, nil) - conn.On("Get", fmt.Sprintf("%s/info_0", path)).Return(makeTestMasterInfo(), &zk.Stat{}, nil) - - return conn -} - -func newTestMasterInfo(id int) []byte { - miPb := util.NewMasterInfo(fmt.Sprintf("master(%d)@localhost:5050", id), 123456789, 400) - data, err := proto.Marshal(miPb) - if err != nil { - panic(err) - } - return data -} - -func makeTestMasterInfo() []byte { - miPb := util.NewMasterInfo("master@localhost:5050", 123456789, 400) - data, err := proto.Marshal(miPb) - if err != nil { - panic(err) - } - return data -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect.go index 48eee4b4..aca08fe4 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect.go @@ -19,6 +19,7 @@ package zoo import ( + "encoding/json" "fmt" "math" "net/url" @@ -37,25 +38,37 @@ import ( const ( // prefix for nodes listed at the ZK URL path nodePrefix = "info_" + nodeJSONPrefix = "json.info_" defaultMinDetectorCyclePeriod = 1 * time.Second ) // reasonable default for a noop change listener var ignoreChanged = detector.OnMasterChanged(func(*mesos.MasterInfo) {}) +type zkInterface interface { + stopped() <-chan struct{} + stop() + data(string) ([]byte, error) + watchChildren(string) (string, <-chan []string, <-chan error) +} + +type infoCodec func(path, node string) (*mesos.MasterInfo, error) + // Detector uses ZooKeeper to detect new leading master. type MasterDetector struct { - client *Client + client zkInterface leaderNode string - // for one-time zk client initiation - bootstrap sync.Once + bootstrapLock sync.RWMutex // guard against concurrent invocations of bootstrapFunc + bootstrapFunc func() error // for one-time zk client initiation // latch: only install, at most, one ignoreChanged listener; see MasterDetector.Detect ignoreInstalled int32 // detection should not signal master change listeners more frequently than this minDetectorCyclePeriod time.Duration + done chan struct{} + cancel func() } // Internal constructor function @@ -66,17 +79,20 @@ func NewMasterDetector(zkurls string) (*MasterDetector, error) { return nil, err } - client, err := newClient(zkHosts, zkPath) - if err != nil { - return nil, err - } - detector := &MasterDetector{ - client: client, minDetectorCyclePeriod: defaultMinDetectorCyclePeriod, + done: make(chan struct{}), + cancel: func() {}, } - log.V(2).Infoln("Created new detector, watching ", zkHosts, zkPath) + detector.bootstrapFunc = func() (err error) { + if detector.client == nil { + detector.client, err = connect2(zkHosts, zkPath) + } + return + } + + log.V(2).Infoln("Created new detector to watch", zkHosts, zkPath) return detector, nil } @@ -94,42 +110,35 @@ func parseZk(zkurls string) ([]string, string, error) { // returns a chan that, when closed, indicates termination of the detector func (md *MasterDetector) Done() <-chan struct{} { - return md.client.stopped() + return md.done } func (md *MasterDetector) Cancel() { - md.client.stop() + md.bootstrapLock.RLock() + defer md.bootstrapLock.RUnlock() + md.cancel() } -//TODO(jdef) execute async because we don't want to stall our client's event loop? if so -//then we also probably want serial event delivery (aka. delivery via a chan) but then we -//have to deal with chan buffer sizes .. ugh. This is probably the least painful for now. -func (md *MasterDetector) childrenChanged(zkc *Client, path string, obs detector.MasterChanged) { - log.V(2).Infof("fetching children at path '%v'", path) - list, err := zkc.list(path) - if err != nil { - log.Warning(err) - return - } - +func (md *MasterDetector) childrenChanged(path string, list []string, obs detector.MasterChanged) { md.notifyMasterChanged(path, list, obs) md.notifyAllMasters(path, list, obs) } func (md *MasterDetector) notifyMasterChanged(path string, list []string, obs detector.MasterChanged) { - topNode := selectTopNode(list) + // mesos v0.24 writes JSON only, v0.23 writes json and protobuf, v0.22 and prior only write protobuf + topNode, codec := md.selectTopNode(list) if md.leaderNode == topNode { log.V(2).Infof("ignoring children-changed event, leader has not changed: %v", path) return } - log.V(2).Infof("changing leader node from %s -> %s", md.leaderNode, topNode) + log.V(2).Infof("changing leader node from %q -> %q", md.leaderNode, topNode) md.leaderNode = topNode var masterInfo *mesos.MasterInfo if md.leaderNode != "" { var err error - if masterInfo, err = md.pullMasterInfo(path, topNode); err != nil { + if masterInfo, err = codec(path, topNode); err != nil { log.Errorln(err.Error()) } } @@ -156,7 +165,21 @@ func (md *MasterDetector) pullMasterInfo(path, node string) (*mesos.MasterInfo, masterInfo := &mesos.MasterInfo{} err = proto.Unmarshal(data, masterInfo) if err != nil { - return nil, fmt.Errorf("failed to unmarshall MasterInfo data from zookeeper: %v", err) + return nil, fmt.Errorf("failed to unmarshal protobuf MasterInfo data from zookeeper: %v", err) + } + return masterInfo, nil +} + +func (md *MasterDetector) pullMasterJsonInfo(path, node string) (*mesos.MasterInfo, error) { + data, err := md.client.data(fmt.Sprintf("%s/%s", path, node)) + if err != nil { + return nil, fmt.Errorf("failed to retrieve leader data: %v", err) + } + + masterInfo := &mesos.MasterInfo{} + err = json.Unmarshal(data, masterInfo) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal json MasterInfo data from zookeeper: %v", err) } return masterInfo, nil } @@ -167,18 +190,52 @@ func (md *MasterDetector) notifyAllMasters(path string, list []string, obs detec // not interested in entire master list return } - masters := []*mesos.MasterInfo{} - for _, node := range list { - info, err := md.pullMasterInfo(path, node) + + // mesos v0.24 writes JSON only, v0.23 writes json and protobuf, v0.22 and prior only write protobuf + masters := map[string]*mesos.MasterInfo{} + tryStore := func(node string, codec infoCodec) { + info, err := codec(path, node) if err != nil { log.Errorln(err.Error()) } else { - masters = append(masters, info) + masters[info.GetId()] = info } } + for _, node := range list { + // compare https://github.com/apache/mesos/blob/0.23.0/src/master/detector.cpp#L437 + if strings.HasPrefix(node, nodePrefix) { + tryStore(node, md.pullMasterInfo) + } else if strings.HasPrefix(node, nodeJSONPrefix) { + tryStore(node, md.pullMasterJsonInfo) + } else { + continue + } + } + masterList := make([]*mesos.MasterInfo, 0, len(masters)) + for _, v := range masters { + masterList = append(masterList, v) + } - log.V(2).Infof("notifying of master membership change: %+v", masters) - logPanic(func() { all.UpdatedMasters(masters) }) + log.V(2).Infof("notifying of master membership change: %+v", masterList) + logPanic(func() { all.UpdatedMasters(masterList) }) +} + +func (md *MasterDetector) callBootstrap() (e error) { + log.V(2).Infoln("invoking detector boostrap") + md.bootstrapLock.Lock() + defer md.bootstrapLock.Unlock() + + clientConfigured := md.client != nil + if e = md.bootstrapFunc(); e == nil && !clientConfigured && md.client != nil { + // chain the lifetime of this detector to that of the newly created client impl + client := md.client + md.cancel = client.stop + go func() { + defer close(md.done) + <-client.stopped() + }() + } + return } // the first call to Detect will kickstart a connection to zookeeper. a nil change listener may @@ -187,70 +244,111 @@ func (md *MasterDetector) notifyAllMasters(path string, list []string, obs detec // once, and each time the spec'd listener will be added to the list of those receiving notifications. func (md *MasterDetector) Detect(f detector.MasterChanged) (err error) { // kickstart zk client connectivity - md.bootstrap.Do(func() { go md.client.connect() }) + if err := md.callBootstrap(); err != nil { + log.V(3).Infoln("failed to execute bootstrap function", err.Error()) + return err + } if f == nil { // only ever install, at most, one ignoreChanged listener. multiple instances of it // just consume resources and generate misleading log messages. if !atomic.CompareAndSwapInt32(&md.ignoreInstalled, 0, 1) { + log.V(3).Infoln("ignoreChanged listener already installed") return } f = ignoreChanged } + log.V(3).Infoln("spawning detect()") go md.detect(f) return nil } func (md *MasterDetector) detect(f detector.MasterChanged) { + log.V(3).Infoln("detecting children at", currentPath) detectLoop: for { - started := time.Now() select { case <-md.Done(): return - case <-md.client.connections(): - // we let the golang runtime manage our listener list for us, in form of goroutines that - // callback to the master change notification listen func's - if watchEnded, err := md.client.watchChildren(currentPath, ChildWatcher(func(zkc *Client, path string) { - md.childrenChanged(zkc, path, f) - })); err == nil { - log.V(2).Infoln("detector listener installed") + default: + } + log.V(3).Infoln("watching children at", currentPath) + path, childrenCh, errCh := md.client.watchChildren(currentPath) + rewatch := false + for { + started := time.Now() + select { + case children := <-childrenCh: + md.childrenChanged(path, children, f) + case err, ok := <-errCh: + // check for a tie first (required for predictability (tests)); the downside of + // doing this is that a listener might get two callbacks back-to-back ("new leader", + // followed by "no leader"). select { - case <-watchEnded: + case children := <-childrenCh: + md.childrenChanged(path, children, f) + default: + } + if ok { + log.V(1).Infoln("child watch ended with error, master lost; error was:", err.Error()) + } else { + // detector shutdown likely... + log.V(1).Infoln("child watch ended, master lost") + } + select { + case <-md.Done(): + return + default: if md.leaderNode != "" { - log.V(1).Infof("child watch ended, signaling master lost") + log.V(2).Infof("changing leader node from %q -> \"\"", md.leaderNode) md.leaderNode = "" f.OnMasterChanged(nil) } - case <-md.client.stopped(): + } + rewatch = true + } + // rate-limit master changes + if elapsed := time.Now().Sub(started); elapsed > 0 { + log.V(2).Infoln("resting before next detection cycle") + select { + case <-md.Done(): return + case <-time.After(md.minDetectorCyclePeriod - elapsed): // noop } - } else { - log.V(1).Infof("child watch ended with error: %v", err) + } + if rewatch { continue detectLoop } } - // rate-limit master changes - if elapsed := time.Now().Sub(started); elapsed > 0 { - log.V(2).Infoln("resting before next detection cycle") - select { - case <-md.Done(): - return - case <-time.After(md.minDetectorCyclePeriod - elapsed): // noop - } + } +} + +func (md *MasterDetector) selectTopNode(list []string) (topNode string, codec infoCodec) { + // mesos v0.24 writes JSON only, v0.23 writes json and protobuf, v0.22 and prior only write protobuf + topNode = selectTopNodePrefix(list, nodeJSONPrefix) + codec = md.pullMasterJsonInfo + if topNode == "" { + topNode = selectTopNodePrefix(list, nodePrefix) + codec = md.pullMasterInfo + + if topNode != "" { + log.Warningf("Leading master is using a Protobuf binary format when registering "+ + "with Zookeeper (%s): this will be deprecated as of Mesos 0.24 (see MESOS-2340).", + topNode) } } + return } -func selectTopNode(list []string) (node string) { +func selectTopNodePrefix(list []string, pre string) (node string) { var leaderSeq uint64 = math.MaxUint64 for _, v := range list { - if !strings.HasPrefix(v, nodePrefix) { + if !strings.HasPrefix(v, pre) { continue // only care about participants } - seqStr := strings.TrimPrefix(v, nodePrefix) + seqStr := strings.TrimPrefix(v, pre) seq, err := strconv.ParseUint(seqStr, 10, 64) if err != nil { log.Warningf("unexpected zk node format '%s': %v", seqStr, err) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect_test.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect_test.go index de1ce976..863e7caa 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect_test.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/detect_test.go @@ -1,9 +1,7 @@ package zoo import ( - "errors" "fmt" - "sort" "sync" "testing" "time" @@ -12,14 +10,16 @@ import ( log "github.com/golang/glog" "github.com/mesos/mesos-go/detector" mesos "github.com/mesos/mesos-go/mesosproto" + util "github.com/mesos/mesos-go/mesosutil" "github.com/samuel/go-zookeeper/zk" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) const ( - zkurl = "zk://127.0.0.1:2181/mesos" - zkurl_bad = "zk://127.0.0.1:2181" + zkurl = "zk://127.0.0.1:2181/mesos" + zkurl_bad = "zk://127.0.0.1:2181" + test_zk_path = "/test" ) func TestParseZk_single(t *testing.T) { @@ -43,361 +43,299 @@ func TestParseZk_multiIP(t *testing.T) { assert.Equal(t, "/mesos", path) } -func TestMasterDetectorStart(t *testing.T) { - c, err := makeClient() - assert.False(t, c.isConnected()) - md, err := NewMasterDetector(zkurl) - defer md.Cancel() - assert.NoError(t, err) - c.errorHandler = ErrorHandler(func(c *Client, e error) { - err = e - }) - md.client = c // override zk.Conn with our own. - md.client.connect() - assert.NoError(t, err) - assert.True(t, c.isConnected()) +type mockZkClient struct { + mock.Mock } -func TestMasterDetectorChildrenChanged(t *testing.T) { - wCh := make(chan struct{}, 1) +func (m *mockZkClient) stopped() (a <-chan struct{}) { + args := m.Called() + if x := args.Get(0); x != nil { + a = x.(<-chan struct{}) + } + return +} - c, err := makeClient() - assert.NoError(t, err) - assert.False(t, c.isConnected()) +func (m *mockZkClient) stop() { + m.Called() +} + +func (m *mockZkClient) data(path string) (a []byte, b error) { + args := m.Called(path) + if x := args.Get(0); x != nil { + a = x.([]byte) + } + b = args.Error(1) + return +} +func (m *mockZkClient) watchChildren(path string) (a string, b <-chan []string, c <-chan error) { + args := m.Called(path) + a = args.String(0) + if x := args.Get(1); x != nil { + b = x.(<-chan []string) + } + if x := args.Get(2); x != nil { + c = x.(<-chan error) + } + return +} + +// newMockZkClient returns a mocked implementation of zkInterface that implements expectations +// for stop() and stopped(); multiple calls to stop() are safe. +func newMockZkClient(initialChildren ...string) (mocked *mockZkClient, snaps chan []string, errs chan error) { + var doneOnce sync.Once + done := make(chan struct{}) + + mocked = &mockZkClient{} + mocked.On("stop").Return().Run(func(_ mock.Arguments) { doneOnce.Do(func() { close(done) }) }) + mocked.On("stopped").Return((<-chan struct{})(done)) + + if initialChildren != nil { + errs = make(chan error) // this is purposefully unbuffered (some tests depend on this) + snaps = make(chan []string, 1) + snaps <- initialChildren[:] + mocked.On("watchChildren", currentPath).Return( + test_zk_path, (<-chan []string)(snaps), (<-chan error)(errs)).Run( + func(_ mock.Arguments) { log.V(1).Infoln("watchChildren invoked") }) + } + return +} + +func newTestMasterInfo(id int) []byte { + miPb := util.NewMasterInfo(fmt.Sprintf("master(%d)@localhost:5050", id), 123456789, 400) + data, err := proto.Marshal(miPb) + if err != nil { + panic(err) + } + return data +} + +func TestMasterDetectorChildrenChanged(t *testing.T) { md, err := NewMasterDetector(zkurl) defer md.Cancel() assert.NoError(t, err) - // override zk.Conn with our own. - c.errorHandler = ErrorHandler(func(c *Client, e error) { - err = e - }) - md.client = c - md.client.connect() - assert.NoError(t, err) - assert.True(t, c.isConnected()) + + path := test_zk_path + snapDetected := make(chan struct{}) + md.bootstrapFunc = func() error { + if md.client != nil { + return nil + } + log.V(1).Infoln("bootstrapping detector") + defer log.V(1).Infoln("bootstrapping detector ..finished") + + mocked, _, errs := newMockZkClient("info_0", "info_5", "info_10") + md.client = mocked + md.minDetectorCyclePeriod = 10 * time.Millisecond // we don't have all day! + + mocked.On("data", fmt.Sprintf("%s/info_0", path)).Return(newTestMasterInfo(0), nil) + + // wait for the first child snapshot to be processed before signaling end-of-watch + // (which is signalled by closing errs). + go func() { + defer close(errs) + select { + case <-snapDetected: + case <-md.Done(): + t.Errorf("detector died before child snapshot") + } + }() + return nil + } called := 0 - md.Detect(detector.OnMasterChanged(func(master *mesos.MasterInfo) { + lostMaster := make(chan struct{}) + const expectedLeader = "master(0)@localhost:5050" + err = md.Detect(detector.OnMasterChanged(func(master *mesos.MasterInfo) { //expect 2 calls in sequence: the first setting a master //and the second clearing it switch called++; called { case 1: + defer close(snapDetected) assert.NotNil(t, master) - assert.Equal(t, master.GetId(), "master@localhost:5050") - wCh <- struct{}{} + assert.Equal(t, expectedLeader, master.GetId()) case 2: + md.Cancel() + defer close(lostMaster) assert.Nil(t, master) - wCh <- struct{}{} default: - t.Fatalf("unexpected notification call attempt %d", called) + t.Errorf("unexpected notification call attempt %d", called) } })) + assert.NoError(t, err) + + fatalOn(t, 10*time.Second, lostMaster, "Waited too long for lost master") - startWait := time.Now() select { - case <-wCh: - case <-time.After(time.Second * 3): - panic("Waited too long...") + case <-md.Done(): + assert.Equal(t, 2, called, "expected 2 detection callbacks instead of %d", called) + case <-time.After(time.Second * 10): + panic("Waited too long for detector shutdown...") } - - // wait for the disconnect event, should be triggered - // 1s after the connected event - waited := time.Now().Sub(startWait) - time.Sleep((2 * time.Second) - waited) - assert.False(t, c.isConnected()) } -// single connector instance, session does not expire, but it's internal connection to zk is flappy -func TestMasterDetectFlappingConnectionState(t *testing.T) { - c, err := newClient(test_zk_hosts, test_zk_path) +// single connector instance, it's internal connection to zk is flappy +func TestMasterDetectorFlappyConnectionState(t *testing.T) { + md, err := NewMasterDetector(zkurl) + defer md.Cancel() assert.NoError(t, err) - initialChildren := []string{"info_005", "info_010", "info_022"} - connector := NewMockConnector() - connector.On("Close").Return(nil) - connector.On("Children", test_zk_path).Return(initialChildren, &zk.Stat{}, nil) - + const ITERATIONS = 3 var wg sync.WaitGroup - wg.Add(2) // async flapping, master change detection + wg.Add(1 + ITERATIONS) // +1 for the initial snapshot that's sent for the first watch + path := test_zk_path - first := true - c.setFactory(asFactory(func() (Connector, <-chan zk.Event, error) { - if !first { - t.Fatalf("only one connector instance expected") - return nil, nil, errors.New("ran out of connectors") - } else { - first = false + md.bootstrapFunc = func() error { + if md.client != nil { + return nil } - sessionEvents := make(chan zk.Event, 10) - watchEvents := make(chan zk.Event, 10) + log.V(1).Infoln("bootstrapping detector") + defer log.V(1).Infoln("bootstrapping detector ..finished") - connector.On("Get", fmt.Sprintf("%s/info_005", test_zk_path)).Return(newTestMasterInfo(1), &zk.Stat{}, nil).Once() - connector.On("ChildrenW", test_zk_path).Return([]string{test_zk_path}, &zk.Stat{}, (<-chan zk.Event)(watchEvents), nil) + children := []string{"info_0", "info_5", "info_10"} + mocked, snaps, errs := newMockZkClient(children...) + md.client = mocked + md.minDetectorCyclePeriod = 10 * time.Millisecond // we don't have all day! + + mocked.On("data", fmt.Sprintf("%s/info_0", path)).Return(newTestMasterInfo(0), nil) + + // the first snapshot will be sent immediately and the detector will be awaiting en event. + // cycle through some connected/disconnected events but maintain the same snapshot go func() { - defer wg.Done() - time.Sleep(100 * time.Millisecond) - for attempt := 0; attempt < 5; attempt++ { - sessionEvents <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnected, - } - time.Sleep(500 * time.Millisecond) - sessionEvents <- zk.Event{ - Type: zk.EventSession, - State: zk.StateDisconnected, - } - } - sessionEvents <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnected, + defer close(errs) + for attempt := 0; attempt < ITERATIONS; attempt++ { + // send an error, should cause the detector to re-issue a watch + errs <- zk.ErrSessionExpired + // the detection loop issues another watch, so send it a snapshot.. + // send another snapshot + snaps <- children } }() - return connector, sessionEvents, nil - })) - c.reconnDelay = 0 // there should be no reconnect, but just in case don't drag the test out - - md, err := NewMasterDetector(zkurl) - defer md.Cancel() - assert.NoError(t, err) - - c.errorHandler = ErrorHandler(func(c *Client, e error) { - t.Logf("zk client error: %v", e) - }) - md.client = c - - startTime := time.Now() - detected := false - md.Detect(detector.OnMasterChanged(func(master *mesos.MasterInfo) { - if detected { - t.Fatalf("already detected master, was not expecting another change: %v", master) - } else { - detected = true - assert.NotNil(t, master, fmt.Sprintf("on-master-changed %v", detected)) - t.Logf("Leader change detected at %v: '%+v'", time.Now().Sub(startTime), master) - wg.Done() - } - })) - - completed := make(chan struct{}) - go func() { - defer close(completed) - wg.Wait() - }() - - select { - case <-completed: // expected - case <-time.After(3 * time.Second): - t.Fatalf("failed to detect master change") + return nil } -} - -func TestMasterDetectFlappingConnector(t *testing.T) { - c, err := newClient(test_zk_hosts, test_zk_path) - assert.NoError(t, err) - - initialChildren := []string{"info_005", "info_010", "info_022"} - connector := NewMockConnector() - connector.On("Close").Return(nil) - connector.On("Children", test_zk_path).Return(initialChildren, &zk.Stat{}, nil) - - // timing - // t=0 t=400ms t=800ms t=1200ms t=1600ms t=2000ms t=2400ms - // |--=--=--=--|--=--=--=--|--=--=--=--|--=--=--=--|--=--=--=--|--=--=--=--|--=--=--=--|--=--=--=-- - // c1 d1 c3 d3 c5 d5 d6 ... - // c2 d2 c4 d4 c6 c7 ... - // M M' M M' M M' - attempt := 0 - c.setFactory(asFactory(func() (Connector, <-chan zk.Event, error) { - attempt++ - sessionEvents := make(chan zk.Event, 5) - watchEvents := make(chan zk.Event, 5) - - sessionEvents <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnected, - } - connector.On("Get", fmt.Sprintf("%s/info_005", test_zk_path)).Return(newTestMasterInfo(attempt), &zk.Stat{}, nil).Once() - connector.On("ChildrenW", test_zk_path).Return([]string{test_zk_path}, &zk.Stat{}, (<-chan zk.Event)(watchEvents), nil) - go func(attempt int) { - defer close(sessionEvents) - defer close(watchEvents) - time.Sleep(400 * time.Millisecond) - // this is the order in which the embedded zk implementation does it - sessionEvents <- zk.Event{ - Type: zk.EventSession, - State: zk.StateDisconnected, - } - connector.On("ChildrenW", test_zk_path).Return(nil, nil, nil, zk.ErrSessionExpired).Once() - watchEvents <- zk.Event{ - Type: zk.EventNotWatching, - State: zk.StateDisconnected, - Path: test_zk_path, - Err: zk.ErrSessionExpired, + called := 0 + lostMaster := make(chan struct{}) + const EXPECTED_CALLS = (ITERATIONS * 2) + 2 // +1 for initial snapshot, +1 for final lost-leader (close(errs)) + err = md.Detect(detector.OnMasterChanged(func(master *mesos.MasterInfo) { + called++ + log.V(3).Infof("detector invoked: called %d", called) + switch { + case called < EXPECTED_CALLS: + if master != nil { + wg.Done() + assert.Equal(t, master.GetId(), "master(0)@localhost:5050") } - }(attempt) - return connector, sessionEvents, nil - })) - c.reconnDelay = 100 * time.Millisecond - c.rewatchDelay = c.reconnDelay / 2 - - md, err := NewMasterDetector(zkurl) - md.minDetectorCyclePeriod = 600 * time.Millisecond - - defer md.Cancel() - assert.NoError(t, err) - - c.errorHandler = ErrorHandler(func(c *Client, e error) { - t.Logf("zk client error: %v", e) - }) - md.client = c - - var wg sync.WaitGroup - wg.Add(6) // 3 x (connected, disconnected) - detected := 0 - startTime := time.Now() - md.Detect(detector.OnMasterChanged(func(master *mesos.MasterInfo) { - if detected > 5 { - // ignore - return - } - if (detected & 1) == 0 { - assert.NotNil(t, master, fmt.Sprintf("on-master-changed-%d", detected)) - } else { - assert.Nil(t, master, fmt.Sprintf("on-master-changed-%d", detected)) + case called == EXPECTED_CALLS: + md.Cancel() + defer close(lostMaster) + assert.Nil(t, master) + default: + t.Errorf("unexpected notification call attempt %d", called) } - t.Logf("Leader change detected at %v: '%+v'", time.Now().Sub(startTime), master) - detected++ - wg.Done() })) + assert.NoError(t, err) - completed := make(chan struct{}) - go func() { - defer close(completed) - wg.Wait() - }() + fatalAfter(t, 10*time.Second, wg.Wait, "Waited too long for new-master alerts") + fatalOn(t, 3*time.Second, lostMaster, "Waited too long for lost master") select { - case <-completed: // expected - case <-time.After(3 * time.Second): - t.Fatalf("failed to detect flapping master changes") + case <-md.Done(): + assert.Equal(t, EXPECTED_CALLS, called, "expected %d detection callbacks instead of %d", EXPECTED_CALLS, called) + case <-time.After(time.Second * 10): + panic("Waited too long for detector shutdown...") } } -func TestMasterDetectMultiple(t *testing.T) { - ch0 := make(chan zk.Event, 5) - ch1 := make(chan zk.Event, 5) - - ch0 <- zk.Event{ - Type: zk.EventSession, - State: zk.StateConnected, - } - - c, err := newClient(test_zk_hosts, test_zk_path) - assert.NoError(t, err) - - initialChildren := []string{"info_005", "info_010", "info_022"} - connector := NewMockConnector() - connector.On("Close").Return(nil) - connector.On("Children", test_zk_path).Return(initialChildren, &zk.Stat{}, nil).Once() - connector.On("ChildrenW", test_zk_path).Return([]string{test_zk_path}, &zk.Stat{}, (<-chan zk.Event)(ch1), nil) - - first := true - c.setFactory(asFactory(func() (Connector, <-chan zk.Event, error) { - log.V(2).Infof("**** Using zk.Conn adapter ****") - if !first { - return nil, nil, errors.New("only 1 connector allowed") - } else { - first = false - } - return connector, ch0, nil - })) - +func TestMasterDetector_multipleLeadershipChanges(t *testing.T) { md, err := NewMasterDetector(zkurl) defer md.Cancel() assert.NoError(t, err) - c.errorHandler = ErrorHandler(func(c *Client, e error) { - err = e - }) - md.client = c - - // **** Test 4 consecutive ChildrenChangedEvents ****** - // setup event changes - sequences := [][]string{ + leadershipChanges := [][]string{ {"info_014", "info_010", "info_005"}, {"info_005", "info_004", "info_022"}, {}, // indicates no master {"info_017", "info_099", "info_200"}, } + ITERATIONS := len(leadershipChanges) + + // +1 for initial snapshot, +1 for final lost-leader (close(errs)) + EXPECTED_CALLS := (ITERATIONS + 2) + var wg sync.WaitGroup - startTime := time.Now() - detected := 0 - md.Detect(detector.OnMasterChanged(func(master *mesos.MasterInfo) { - if detected == 2 { - assert.Nil(t, master, fmt.Sprintf("on-master-changed-%d", detected)) - } else { - assert.NotNil(t, master, fmt.Sprintf("on-master-changed-%d", detected)) + wg.Add(ITERATIONS) // +1 for the initial snapshot that's sent for the first watch, -1 because set 3 is empty + path := test_zk_path + + md.bootstrapFunc = func() error { + if md.client != nil { + return nil } - t.Logf("Leader change detected at %v: '%+v'", time.Now().Sub(startTime), master) - detected++ - wg.Done() - })) + log.V(1).Infoln("bootstrapping detector") + defer log.V(1).Infoln("bootstrapping detector ..finished") - // 3 leadership changes + disconnect (leader change to '') - wg.Add(4) + children := []string{"info_0", "info_5", "info_10"} + mocked, snaps, errs := newMockZkClient(children...) + md.client = mocked + md.minDetectorCyclePeriod = 10 * time.Millisecond // we don't have all day! - go func() { - for i := range sequences { - sorted := make([]string, len(sequences[i])) - copy(sorted, sequences[i]) - sort.Strings(sorted) - t.Logf("testing master change sequence %d, path '%v'", i, test_zk_path) - connector.On("Children", test_zk_path).Return(sequences[i], &zk.Stat{}, nil).Once() - if len(sequences[i]) > 0 { - connector.On("Get", fmt.Sprintf("%s/%s", test_zk_path, sorted[0])).Return(newTestMasterInfo(i), &zk.Stat{}, nil).Once() + mocked.On("data", fmt.Sprintf("%s/info_0", path)).Return(newTestMasterInfo(0), nil) + mocked.On("data", fmt.Sprintf("%s/info_005", path)).Return(newTestMasterInfo(5), nil) + mocked.On("data", fmt.Sprintf("%s/info_004", path)).Return(newTestMasterInfo(4), nil) + mocked.On("data", fmt.Sprintf("%s/info_017", path)).Return(newTestMasterInfo(17), nil) + + // the first snapshot will be sent immediately and the detector will be awaiting en event. + // cycle through some connected/disconnected events but maintain the same snapshot + go func() { + defer close(errs) + for attempt := 0; attempt < ITERATIONS; attempt++ { + snaps <- leadershipChanges[attempt] } - ch1 <- zk.Event{ - Type: zk.EventNodeChildrenChanged, - Path: test_zk_path, + }() + return nil + } + + called := 0 + lostMaster := make(chan struct{}) + expectedLeaders := []int{0, 5, 4, 17} + leaderIdx := 0 + err = md.Detect(detector.OnMasterChanged(func(master *mesos.MasterInfo) { + called++ + log.V(3).Infof("detector invoked: called %d", called) + switch { + case called < EXPECTED_CALLS: + if master != nil { + expectedLeader := fmt.Sprintf("master(%d)@localhost:5050", expectedLeaders[leaderIdx]) + assert.Equal(t, expectedLeader, master.GetId()) + leaderIdx++ + wg.Done() } - time.Sleep(100 * time.Millisecond) // give async routines time to catch up - } - time.Sleep(1 * time.Second) // give async routines time to catch up - t.Logf("disconnecting...") - ch0 <- zk.Event{ - State: zk.StateDisconnected, + case called == EXPECTED_CALLS: + md.Cancel() + defer close(lostMaster) + assert.Nil(t, master) + default: + t.Errorf("unexpected notification call attempt %d", called) } - //TODO(jdef) does order of close matter here? probably, meaking client code is weak - close(ch0) - time.Sleep(500 * time.Millisecond) // give async routines time to catch up - close(ch1) - }() - completed := make(chan struct{}) - go func() { - defer close(completed) - wg.Wait() - }() + })) + assert.NoError(t, err) - defer func() { - if r := recover(); r != nil { - t.Fatal(r) - } - }() + fatalAfter(t, 10*time.Second, wg.Wait, "Waited too long for new-master alerts") + fatalOn(t, 3*time.Second, lostMaster, "Waited too long for lost master") select { - case <-time.After(2 * time.Second): - panic("timed out waiting for master changes to propagate") - case <-completed: + case <-md.Done(): + assert.Equal(t, EXPECTED_CALLS, called, "expected %d detection callbacks instead of %d", EXPECTED_CALLS, called) + case <-time.After(time.Second * 10): + panic("Waited too long for detector shutdown...") } } func TestMasterDetect_selectTopNode_none(t *testing.T) { assert := assert.New(t) nodeList := []string{} - node := selectTopNode(nodeList) + node := selectTopNodePrefix(nodeList, "foo") assert.Equal("", node) } @@ -410,10 +348,25 @@ func TestMasterDetect_selectTopNode_0000x(t *testing.T) { "info_0000000061", "info_0000000008", } - node := selectTopNode(nodeList) + node := selectTopNodePrefix(nodeList, nodePrefix) assert.Equal("info_0000000008", node) } +func TestMasterDetect_selectTopNode_mixJson(t *testing.T) { + assert := assert.New(t) + nodeList := []string{ + nodePrefix + "0000000046", + nodePrefix + "0000000032", + nodeJSONPrefix + "0000000046", + nodeJSONPrefix + "0000000032", + } + node := selectTopNodePrefix(nodeList, nodeJSONPrefix) + assert.Equal(nodeJSONPrefix+"0000000032", node) + + node = selectTopNodePrefix(nodeList, nodePrefix) + assert.Equal(nodePrefix+"0000000032", node) +} + func TestMasterDetect_selectTopNode_mixedEntries(t *testing.T) { assert := assert.New(t) nodeList := []string{ @@ -424,7 +377,7 @@ func TestMasterDetect_selectTopNode_mixedEntries(t *testing.T) { "log_replicas_fdgwsdfgsdf", "bar", } - node := selectTopNode(nodeList) + node := selectTopNodePrefix(nodeList, nodePrefix) assert.Equal("info_0000000032", node) } @@ -451,15 +404,25 @@ func afterFunc(f func()) <-chan struct{} { } func fatalAfter(t *testing.T, d time.Duration, f func(), msg string, args ...interface{}) { - ch := afterFunc(f) + fatalOn(t, d, afterFunc(f), msg, args...) +} + +func fatalOn(t *testing.T, d time.Duration, ch <-chan struct{}, msg string, args ...interface{}) { select { case <-ch: return case <-time.After(d): - t.Fatalf(msg, args...) + // check for a tie + select { + case <-ch: + return + default: + t.Fatalf(msg, args...) + } } } +/* TODO(jdef) refactor this to work with the new zkInterface func TestNotifyAllMasters(t *testing.T) { c, err := newClient(test_zk_hosts, test_zk_path) assert.NoError(t, err) @@ -482,7 +445,7 @@ func TestNotifyAllMasters(t *testing.T) { assert.NoError(t, err) c.errorHandler = ErrorHandler(func(c *Client, e error) { - t.Fatalf("unexpected error: %v", e) + t.Errorf("unexpected error: %v", e) }) md.client = c @@ -562,3 +525,4 @@ func TestNotifyAllMasters(t *testing.T) { connector.On("Close").Return(nil) } +*/ diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/mocked_detect.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/mocked_detect.go deleted file mode 100644 index d887b6dc..00000000 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/mocked_detect.go +++ /dev/null @@ -1,88 +0,0 @@ -package zoo - -import ( - "errors" - "fmt" - "net/url" - - "github.com/gogo/protobuf/proto" - log "github.com/golang/glog" - util "github.com/mesos/mesos-go/mesosutil" - "github.com/samuel/go-zookeeper/zk" -) - -type MockMasterDetector struct { - *MasterDetector - zkPath string - conCh chan zk.Event - sesCh chan zk.Event -} - -func NewMockMasterDetector(zkurls string) (*MockMasterDetector, error) { - log.V(4).Infoln("Creating mock zk master detector") - md, err := NewMasterDetector(zkurls) - if err != nil { - return nil, err - } - - u, _ := url.Parse(zkurls) - m := &MockMasterDetector{ - MasterDetector: md, - zkPath: u.Path, - conCh: make(chan zk.Event, 5), - sesCh: make(chan zk.Event, 5), - } - - path := m.zkPath - connector := NewMockConnector() - connector.On("Children", path).Return([]string{"info_0", "info_5", "info_10"}, &zk.Stat{}, nil) - connector.On("Get", fmt.Sprintf("%s/info_0", path)).Return(m.makeMasterInfo(), &zk.Stat{}, nil) - connector.On("Close").Return(nil) - connector.On("ChildrenW", m.zkPath).Return([]string{m.zkPath}, &zk.Stat{}, (<-chan zk.Event)(m.sesCh), nil) - - first := true - m.client.setFactory(asFactory(func() (Connector, <-chan zk.Event, error) { - if !first { - return nil, nil, errors.New("only 1 connector allowed") - } else { - first = false - } - return connector, m.conCh, nil - })) - - return m, nil -} - -func (m *MockMasterDetector) Start() { - m.client.connect() -} - -func (m *MockMasterDetector) ScheduleConnEvent(s zk.State) { - log.V(4).Infof("Scheduling zk connection event with state: %v\n", s) - go func() { - m.conCh <- zk.Event{ - State: s, - Path: m.zkPath, - } - }() -} - -func (m *MockMasterDetector) ScheduleSessEvent(t zk.EventType) { - log.V(4).Infof("Scheduling zk session event with state: %v\n", t) - go func() { - m.sesCh <- zk.Event{ - Type: t, - Path: m.zkPath, - } - }() -} - -func (m *MockMasterDetector) makeMasterInfo() []byte { - miPb := util.NewMasterInfo("master", 123456789, 400) - miPb.Pid = proto.String("master@127.0.0.1:5050") - data, err := proto.Marshal(miPb) - if err != nil { - panic(err) - } - return data -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/types.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/types.go index 81161404..9b24b51b 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/types.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/detector/zoo/types.go @@ -14,12 +14,6 @@ type Connector interface { Get(string) ([]byte, *zk.Stat, error) } -// interface for handling watcher event when zk.EventNodeChildrenChanged. -type ChildWatcher func(*Client, string) - -// interface for handling errors (session and watch related). -type ErrorHandler func(*Client, error) - //Factory is an adapter to trap the creation of zk.Conn instances //since the official zk API does not expose an interface for zk.Conn. type Factory interface { diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.pb.go new file mode 100644 index 00000000..76bd7b3a --- /dev/null +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.pb.go @@ -0,0 +1,255 @@ +// Code generated by protoc-gen-gogo. +// source: authentication.proto +// DO NOT EDIT! + +/* + Package mesosproto is a generated protocol buffer package. + + It is generated from these files: + authentication.proto + containerizer.proto + internal.proto + log.proto + mesos.proto + messages.proto + registry.proto + scheduler.proto + state.proto + + It has these top-level messages: + AuthenticateMessage + AuthenticationMechanismsMessage + AuthenticationStartMessage + AuthenticationStepMessage + AuthenticationCompletedMessage + AuthenticationFailedMessage + AuthenticationErrorMessage + Launch + Update + Wait + Destroy + Usage + Termination + Containers + InternalMasterChangeDetected + InternalTryAuthentication + InternalAuthenticationResult + Promise + Action + Metadata + Record + PromiseRequest + PromiseResponse + WriteRequest + WriteResponse + LearnedMessage + RecoverRequest + RecoverResponse + FrameworkID + OfferID + SlaveID + TaskID + ExecutorID + ContainerID + FrameworkInfo + HealthCheck + CommandInfo + ExecutorInfo + MasterInfo + SlaveInfo + Value + Attribute + Resource + TrafficControlStatistics + ResourceStatistics + ResourceUsage + PerfStatistics + Request + Offer + TaskInfo + TaskStatus + Filters + Environment + Parameter + Parameters + Credential + Credentials + ACL + ACLs + RateLimit + RateLimits + Volume + ContainerInfo + Labels + Label + Port + Ports + DiscoveryInfo + Task + StatusUpdate + StatusUpdateRecord + SubmitSchedulerRequest + SubmitSchedulerResponse + ExecutorToFrameworkMessage + FrameworkToExecutorMessage + RegisterFrameworkMessage + ReregisterFrameworkMessage + FrameworkRegisteredMessage + FrameworkReregisteredMessage + UnregisterFrameworkMessage + DeactivateFrameworkMessage + ResourceRequestMessage + ResourceOffersMessage + LaunchTasksMessage + RescindResourceOfferMessage + ReviveOffersMessage + RunTaskMessage + KillTaskMessage + StatusUpdateMessage + StatusUpdateAcknowledgementMessage + LostSlaveMessage + ReconcileTasksMessage + FrameworkErrorMessage + RegisterSlaveMessage + ReregisterSlaveMessage + SlaveRegisteredMessage + SlaveReregisteredMessage + UnregisterSlaveMessage + MasterSlaveConnection + PingSlaveMessage + PongSlaveMessage + ShutdownFrameworkMessage + ShutdownExecutorMessage + UpdateFrameworkMessage + CheckpointResourcesMessage + UpdateSlaveMessage + RegisterExecutorMessage + ExecutorRegisteredMessage + ExecutorReregisteredMessage + ExitedExecutorMessage + ReconnectExecutorMessage + ReregisterExecutorMessage + ShutdownMessage + Archive + TaskHealthStatus + HookExecuted + Registry + Event + Call + Entry + Operation +*/ +package mesosproto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type AuthenticateMessage struct { + Pid *string `protobuf:"bytes,1,req,name=pid" json:"pid,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticateMessage) Reset() { *m = AuthenticateMessage{} } +func (m *AuthenticateMessage) String() string { return proto.CompactTextString(m) } +func (*AuthenticateMessage) ProtoMessage() {} + +func (m *AuthenticateMessage) GetPid() string { + if m != nil && m.Pid != nil { + return *m.Pid + } + return "" +} + +type AuthenticationMechanismsMessage struct { + Mechanisms []string `protobuf:"bytes,1,rep,name=mechanisms" json:"mechanisms,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticationMechanismsMessage) Reset() { *m = AuthenticationMechanismsMessage{} } +func (m *AuthenticationMechanismsMessage) String() string { return proto.CompactTextString(m) } +func (*AuthenticationMechanismsMessage) ProtoMessage() {} + +func (m *AuthenticationMechanismsMessage) GetMechanisms() []string { + if m != nil { + return m.Mechanisms + } + return nil +} + +type AuthenticationStartMessage struct { + Mechanism *string `protobuf:"bytes,1,req,name=mechanism" json:"mechanism,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticationStartMessage) Reset() { *m = AuthenticationStartMessage{} } +func (m *AuthenticationStartMessage) String() string { return proto.CompactTextString(m) } +func (*AuthenticationStartMessage) ProtoMessage() {} + +func (m *AuthenticationStartMessage) GetMechanism() string { + if m != nil && m.Mechanism != nil { + return *m.Mechanism + } + return "" +} + +func (m *AuthenticationStartMessage) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type AuthenticationStepMessage struct { + Data []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticationStepMessage) Reset() { *m = AuthenticationStepMessage{} } +func (m *AuthenticationStepMessage) String() string { return proto.CompactTextString(m) } +func (*AuthenticationStepMessage) ProtoMessage() {} + +func (m *AuthenticationStepMessage) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type AuthenticationCompletedMessage struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticationCompletedMessage) Reset() { *m = AuthenticationCompletedMessage{} } +func (m *AuthenticationCompletedMessage) String() string { return proto.CompactTextString(m) } +func (*AuthenticationCompletedMessage) ProtoMessage() {} + +type AuthenticationFailedMessage struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticationFailedMessage) Reset() { *m = AuthenticationFailedMessage{} } +func (m *AuthenticationFailedMessage) String() string { return proto.CompactTextString(m) } +func (*AuthenticationFailedMessage) ProtoMessage() {} + +type AuthenticationErrorMessage struct { + Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticationErrorMessage) Reset() { *m = AuthenticationErrorMessage{} } +func (m *AuthenticationErrorMessage) String() string { return proto.CompactTextString(m) } +func (*AuthenticationErrorMessage) ProtoMessage() {} + +func (m *AuthenticationErrorMessage) GetError() string { + if m != nil && m.Error != nil { + return *m.Error + } + return "" +} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.proto new file mode 100644 index 00000000..d8e42569 --- /dev/null +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/authentication.proto @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package mesosproto; + +import "mesos.proto"; + + +message AuthenticateMessage { + required string pid = 1; // PID that needs to be authenticated. +} + + +message AuthenticationMechanismsMessage { + repeated string mechanisms = 1; // List of available SASL mechanisms. +} + + +message AuthenticationStartMessage { + required string mechanism = 1; + optional bytes data = 2; +} + + +message AuthenticationStepMessage { + required bytes data = 1; +} + + +message AuthenticationCompletedMessage {} + + +message AuthenticationFailedMessage {} + + +message AuthenticationErrorMessage { + optional string error = 1; +} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.pb.go index 2e1e7921..da62428f 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.pb.go @@ -2,37 +2,17 @@ // source: containerizer.proto // DO NOT EDIT! -/* - Package mesosproto is a generated protocol buffer package. - - It is generated from these files: - containerizer.proto - internal.proto - log.proto - mesos.proto - messages.proto - registry.proto - scheduler.proto - state.proto - - It has these top-level messages: - Launch - Update - Wait - Destroy - Usage - Termination - Containers -*/ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf // * @@ -200,6 +180,8 @@ func (m *Usage) GetContainerId() *ContainerID { type Termination struct { // A container may be killed if it exceeds its resources; this will // be indicated by killed=true and described by the message string. + // TODO(jaybuff): As part of MESOS-2035 we should remove killed and + // replace it with a TaskStatus::Reason. Killed *bool `protobuf:"varint,1,req,name=killed" json:"killed,omitempty"` Message *string `protobuf:"bytes,2,req,name=message" json:"message,omitempty"` // Exit status of the process. @@ -250,6 +232,3 @@ func (m *Containers) GetContainers() []*ContainerID { } return nil } - -func init() { -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.proto index 79eda531..878060cc 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.proto +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/containerizer.proto @@ -82,6 +82,8 @@ message Usage { message Termination { // A container may be killed if it exceeds its resources; this will // be indicated by killed=true and described by the message string. + // TODO(jaybuff): As part of MESOS-2035 we should remove killed and + // replace it with a TaskStatus::Reason. required bool killed = 1; required string message = 2; diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/internal.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/internal.pb.go index c794dd35..8988e899 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/internal.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/internal.pb.go @@ -5,12 +5,14 @@ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf // For use with detector callbacks @@ -73,6 +75,3 @@ func (m *InternalAuthenticationResult) GetPid() string { } return "" } - -func init() { -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.pb.go index 06db2ecc..2b62f81d 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/log.pb.go @@ -5,30 +5,24 @@ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" -import io1 "io" -import fmt4 "fmt" -import github_com_gogo_protobuf_proto2 "github.com/gogo/protobuf/proto" +import bytes "bytes" -import fmt5 "fmt" -import strings2 "strings" -import reflect2 "reflect" +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" -import fmt6 "fmt" -import strings3 "strings" -import github_com_gogo_protobuf_proto3 "github.com/gogo/protobuf/proto" -import sort1 "sort" -import strconv1 "strconv" -import reflect3 "reflect" - -import fmt7 "fmt" -import bytes1 "bytes" +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf type Action_Type int32 @@ -614,2104 +608,1540 @@ func init() { proto.RegisterEnum("mesosproto.Metadata_Status", Metadata_Status_name, Metadata_Status_value) proto.RegisterEnum("mesosproto.Record_Type", Record_Type_name, Record_Type_value) } -func (m *Promise) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy +func (this *Promise) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } + return fmt.Errorf("that == nil && this != nil") } - return nil -} -func (m *Action) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + + that1, ok := that.(*Promise) + if !ok { + return fmt.Errorf("that is not of type *Promise") + } + if that1 == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - case 2: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Promised", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Promised = &v - case 3: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Performed", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Performed = &v - case 4: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Learned", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Learned = &b - case 5: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Action_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Action_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 6: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Nop", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Nop == nil { - m.Nop = &Action_Nop{} - } - if err := m.Nop.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 7: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Append", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Append == nil { - m.Append = &Action_Append{} - } - if err := m.Append.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 8: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Truncate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Truncate == nil { - m.Truncate = &Action_Truncate{} - } - if err := m.Truncate.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that is type *Promise but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Promisebut is not nil && this == nil") + } + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) } + } else if this.Proposal != nil { + return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") + } else if that1.Proposal != nil { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Action_Nop) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Promise) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Promise) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil -} -func (m *Action_Append) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Bytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - m.Bytes = append([]byte{}, data[index:postIndex]...) - index = postIndex - case 2: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Cksum", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - m.Cksum = append([]byte{}, data[index:postIndex]...) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return false } + } else if this.Proposal != nil { + return false + } else if that1.Proposal != nil { + return false } - return nil + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *Action_Truncate) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Action) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.To = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Action) + if !ok { + return fmt.Errorf("that is not of type *Action") + } + if that1 == nil { + if this == nil { + return nil } + return fmt.Errorf("that is type *Action but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Actionbut is not nil && this == nil") } - return nil -} -func (m *Metadata) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var v Metadata_Status - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Metadata_Status(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Status = &v - case 2: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Promised", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Promised = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.Position != nil { + return fmt.Errorf("this.Position == nil && that.Position != nil") + } else if that1.Position != nil { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) + } + if this.Promised != nil && that1.Promised != nil { + if *this.Promised != *that1.Promised { + return fmt.Errorf("Promised this(%v) Not Equal that(%v)", *this.Promised, *that1.Promised) + } + } else if this.Promised != nil { + return fmt.Errorf("this.Promised == nil && that.Promised != nil") + } else if that1.Promised != nil { + return fmt.Errorf("Promised this(%v) Not Equal that(%v)", this.Promised, that1.Promised) + } + if this.Performed != nil && that1.Performed != nil { + if *this.Performed != *that1.Performed { + return fmt.Errorf("Performed this(%v) Not Equal that(%v)", *this.Performed, *that1.Performed) + } + } else if this.Performed != nil { + return fmt.Errorf("this.Performed == nil && that.Performed != nil") + } else if that1.Performed != nil { + return fmt.Errorf("Performed this(%v) Not Equal that(%v)", this.Performed, that1.Performed) + } + if this.Learned != nil && that1.Learned != nil { + if *this.Learned != *that1.Learned { + return fmt.Errorf("Learned this(%v) Not Equal that(%v)", *this.Learned, *that1.Learned) + } + } else if this.Learned != nil { + return fmt.Errorf("this.Learned == nil && that.Learned != nil") + } else if that1.Learned != nil { + return fmt.Errorf("Learned this(%v) Not Equal that(%v)", this.Learned, that1.Learned) + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Nop.Equal(that1.Nop) { + return fmt.Errorf("Nop this(%v) Not Equal that(%v)", this.Nop, that1.Nop) + } + if !this.Append.Equal(that1.Append) { + return fmt.Errorf("Append this(%v) Not Equal that(%v)", this.Append, that1.Append) + } + if !this.Truncate.Equal(that1.Truncate) { + return fmt.Errorf("Truncate this(%v) Not Equal that(%v)", this.Truncate, that1.Truncate) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Record) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Action) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Record_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Record_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 2: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Promise", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Promise == nil { - m.Promise = &Promise{} - } - if err := m.Promise.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 3: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &Action{} - } - if err := m.Action.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Action) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil -} -func (m *PromiseRequest) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return false } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - case 2: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.Position != nil { + return false + } else if that1.Position != nil { + return false + } + if this.Promised != nil && that1.Promised != nil { + if *this.Promised != *that1.Promised { + return false } + } else if this.Promised != nil { + return false + } else if that1.Promised != nil { + return false } - return nil + if this.Performed != nil && that1.Performed != nil { + if *this.Performed != *that1.Performed { + return false + } + } else if this.Performed != nil { + return false + } else if that1.Performed != nil { + return false + } + if this.Learned != nil && that1.Learned != nil { + if *this.Learned != *that1.Learned { + return false + } + } else if this.Learned != nil { + return false + } else if that1.Learned != nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Nop.Equal(that1.Nop) { + return false + } + if !this.Append.Equal(that1.Append) { + return false + } + if !this.Truncate.Equal(that1.Truncate) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *PromiseResponse) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Action_Nop) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Okay", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Okay = &b - case 2: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - case 4: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - case 3: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &Action{} - } - if err := m.Action.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Action_Nop) + if !ok { + return fmt.Errorf("that is not of type *Action_Nop") + } + if that1 == nil { + if this == nil { + return nil } + return fmt.Errorf("that is type *Action_Nop but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Action_Nopbut is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *WriteRequest) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Action_Nop) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - case 2: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - case 3: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Learned", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Learned = &b - case 4: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Action_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Action_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 5: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Nop", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Nop == nil { - m.Nop = &Action_Nop{} - } - if err := m.Nop.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 6: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Append", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Append == nil { - m.Append = &Action_Append{} - } - if err := m.Append.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 7: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Truncate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Truncate == nil { - m.Truncate = &Action_Truncate{} - } - if err := m.Truncate.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Action_Nop) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Action_Append) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Action_Append) + if !ok { + return fmt.Errorf("that is not of type *Action_Append") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Action_Append but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Action_Appendbut is not nil && this == nil") + } + if !bytes.Equal(this.Bytes, that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.Cksum, that1.Cksum) { + return fmt.Errorf("Cksum this(%v) Not Equal that(%v)", this.Cksum, that1.Cksum) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Action_Append) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Action_Append) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !bytes.Equal(this.Bytes, that1.Bytes) { + return false + } + if !bytes.Equal(this.Cksum, that1.Cksum) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Action_Truncate) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Action_Truncate) + if !ok { + return fmt.Errorf("that is not of type *Action_Truncate") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Action_Truncate but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Action_Truncatebut is not nil && this == nil") + } + if this.To != nil && that1.To != nil { + if *this.To != *that1.To { + return fmt.Errorf("To this(%v) Not Equal that(%v)", *this.To, *that1.To) + } + } else if this.To != nil { + return fmt.Errorf("this.To == nil && that.To != nil") + } else if that1.To != nil { + return fmt.Errorf("To this(%v) Not Equal that(%v)", this.To, that1.To) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Action_Truncate) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Action_Truncate) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.To != nil && that1.To != nil { + if *this.To != *that1.To { + return false + } + } else if this.To != nil { + return false + } else if that1.To != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Metadata) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Metadata) + if !ok { + return fmt.Errorf("that is not of type *Metadata") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Metadata but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Metadatabut is not nil && this == nil") + } + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) + } + } else if this.Status != nil { + return fmt.Errorf("this.Status == nil && that.Status != nil") + } else if that1.Status != nil { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) + } + if this.Promised != nil && that1.Promised != nil { + if *this.Promised != *that1.Promised { + return fmt.Errorf("Promised this(%v) Not Equal that(%v)", *this.Promised, *that1.Promised) + } + } else if this.Promised != nil { + return fmt.Errorf("this.Promised == nil && that.Promised != nil") + } else if that1.Promised != nil { + return fmt.Errorf("Promised this(%v) Not Equal that(%v)", this.Promised, that1.Promised) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Metadata) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Metadata) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { + return false + } + } else if this.Status != nil { + return false + } else if that1.Status != nil { + return false + } + if this.Promised != nil && that1.Promised != nil { + if *this.Promised != *that1.Promised { + return false } + } else if this.Promised != nil { + return false + } else if that1.Promised != nil { + return false } - return nil + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *WriteResponse) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Record) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Okay", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Okay = &b - case 2: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Proposal = &v - case 3: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Record) + if !ok { + return fmt.Errorf("that is not of type *Record") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Record but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Recordbut is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Promise.Equal(that1.Promise) { + return fmt.Errorf("Promise this(%v) Not Equal that(%v)", this.Promise, that1.Promise) + } + if !this.Action.Equal(that1.Action) { + return fmt.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) + } + if !this.Metadata.Equal(that1.Metadata) { + return fmt.Errorf("Metadata this(%v) Not Equal that(%v)", this.Metadata, that1.Metadata) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *LearnedMessage) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Record) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt4.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io1.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &Action{} - } - if err := m.Action.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Record) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Promise.Equal(that1.Promise) { + return false + } + if !this.Action.Equal(that1.Action) { + return false + } + if !this.Metadata.Equal(that1.Metadata) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *PromiseRequest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*PromiseRequest) + if !ok { + return fmt.Errorf("that is not of type *PromiseRequest") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *PromiseRequest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *PromiseRequestbut is not nil && this == nil") + } + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) + } + } else if this.Proposal != nil { + return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") + } else if that1.Proposal != nil { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) + } + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) + } + } else if this.Position != nil { + return fmt.Errorf("this.Position == nil && that.Position != nil") + } else if that1.Position != nil { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *RecoverRequest) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *PromiseRequest) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*PromiseRequest) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return false + } + } else if this.Proposal != nil { + return false + } else if that1.Proposal != nil { + return false + } + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return false + } + } else if this.Position != nil { + return false + } else if that1.Position != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *PromiseResponse) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*PromiseResponse) + if !ok { + return fmt.Errorf("that is not of type *PromiseResponse") + } + if that1 == nil { + if this == nil { + return nil } + return fmt.Errorf("that is type *PromiseResponse but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *PromiseResponsebut is not nil && this == nil") } - return nil -} -func (m *RecoverResponse) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.Okay != nil && that1.Okay != nil { + if *this.Okay != *that1.Okay { + return fmt.Errorf("Okay this(%v) Not Equal that(%v)", *this.Okay, *that1.Okay) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var v Metadata_Status - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Metadata_Status(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Status = &v - case 2: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field Begin", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Begin = &v - case 3: - if wireType != 0 { - return fmt4.Errorf("proto: wrong wireType = %d for field End", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io1.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.End = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto2.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io1.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.Okay != nil { + return fmt.Errorf("this.Okay == nil && that.Okay != nil") + } else if that1.Okay != nil { + return fmt.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) + } + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) } + } else if this.Proposal != nil { + return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") + } else if that1.Proposal != nil { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) } - return nil -} -func (this *Promise) String() string { - if this == nil { - return "nil" + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) + } + } else if this.Position != nil { + return fmt.Errorf("this.Position == nil && that.Position != nil") + } else if that1.Position != nil { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) } - s := strings2.Join([]string{`&Promise{`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Action) String() string { - if this == nil { - return "nil" + if !this.Action.Equal(that1.Action) { + return fmt.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) } - s := strings2.Join([]string{`&Action{`, - `Position:` + valueToStringLog(this.Position) + `,`, - `Promised:` + valueToStringLog(this.Promised) + `,`, - `Performed:` + valueToStringLog(this.Performed) + `,`, - `Learned:` + valueToStringLog(this.Learned) + `,`, - `Type:` + valueToStringLog(this.Type) + `,`, - `Nop:` + strings2.Replace(fmt5.Sprintf("%v", this.Nop), "Action_Nop", "Action_Nop", 1) + `,`, - `Append:` + strings2.Replace(fmt5.Sprintf("%v", this.Append), "Action_Append", "Action_Append", 1) + `,`, - `Truncate:` + strings2.Replace(fmt5.Sprintf("%v", this.Truncate), "Action_Truncate", "Action_Truncate", 1) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Action_Nop) String() string { - if this == nil { - return "nil" + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } - s := strings2.Join([]string{`&Action_Nop{`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + return nil } -func (this *Action_Append) String() string { - if this == nil { - return "nil" +func (this *PromiseResponse) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false } - s := strings2.Join([]string{`&Action_Append{`, - `Bytes:` + valueToStringLog(this.Bytes) + `,`, - `Cksum:` + valueToStringLog(this.Cksum) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Action_Truncate) String() string { - if this == nil { - return "nil" + + that1, ok := that.(*PromiseResponse) + if !ok { + return false } - s := strings2.Join([]string{`&Action_Truncate{`, - `To:` + valueToStringLog(this.To) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Metadata) String() string { - if this == nil { - return "nil" + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - s := strings2.Join([]string{`&Metadata{`, - `Status:` + valueToStringLog(this.Status) + `,`, - `Promised:` + valueToStringLog(this.Promised) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Record) String() string { - if this == nil { - return "nil" + if this.Okay != nil && that1.Okay != nil { + if *this.Okay != *that1.Okay { + return false + } + } else if this.Okay != nil { + return false + } else if that1.Okay != nil { + return false } - s := strings2.Join([]string{`&Record{`, - `Type:` + valueToStringLog(this.Type) + `,`, - `Promise:` + strings2.Replace(fmt5.Sprintf("%v", this.Promise), "Promise", "Promise", 1) + `,`, - `Action:` + strings2.Replace(fmt5.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, - `Metadata:` + strings2.Replace(fmt5.Sprintf("%v", this.Metadata), "Metadata", "Metadata", 1) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *PromiseRequest) String() string { - if this == nil { - return "nil" + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return false + } + } else if this.Proposal != nil { + return false + } else if that1.Proposal != nil { + return false } - s := strings2.Join([]string{`&PromiseRequest{`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *PromiseResponse) String() string { - if this == nil { - return "nil" + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return false + } + } else if this.Position != nil { + return false + } else if that1.Position != nil { + return false } - s := strings2.Join([]string{`&PromiseResponse{`, - `Okay:` + valueToStringLog(this.Okay) + `,`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `Action:` + strings2.Replace(fmt5.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *WriteRequest) String() string { - if this == nil { - return "nil" + if !this.Action.Equal(that1.Action) { + return false } - s := strings2.Join([]string{`&WriteRequest{`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `Learned:` + valueToStringLog(this.Learned) + `,`, - `Type:` + valueToStringLog(this.Type) + `,`, - `Nop:` + strings2.Replace(fmt5.Sprintf("%v", this.Nop), "Action_Nop", "Action_Nop", 1) + `,`, - `Append:` + strings2.Replace(fmt5.Sprintf("%v", this.Append), "Action_Append", "Action_Append", 1) + `,`, - `Truncate:` + strings2.Replace(fmt5.Sprintf("%v", this.Truncate), "Action_Truncate", "Action_Truncate", 1) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *WriteResponse) String() string { - if this == nil { - return "nil" + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - s := strings2.Join([]string{`&WriteResponse{`, - `Okay:` + valueToStringLog(this.Okay) + `,`, - `Proposal:` + valueToStringLog(this.Proposal) + `,`, - `Position:` + valueToStringLog(this.Position) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + return true } -func (this *LearnedMessage) String() string { - if this == nil { - return "nil" +func (this *WriteRequest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") } - s := strings2.Join([]string{`&LearnedMessage{`, - `Action:` + strings2.Replace(fmt5.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *RecoverRequest) String() string { - if this == nil { - return "nil" + + that1, ok := that.(*WriteRequest) + if !ok { + return fmt.Errorf("that is not of type *WriteRequest") } - s := strings2.Join([]string{`&RecoverRequest{`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *RecoverResponse) String() string { - if this == nil { - return "nil" + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *WriteRequest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *WriteRequestbut is not nil && this == nil") } - s := strings2.Join([]string{`&RecoverResponse{`, - `Status:` + valueToStringLog(this.Status) + `,`, - `Begin:` + valueToStringLog(this.Begin) + `,`, - `End:` + valueToStringLog(this.End) + `,`, - `XXX_unrecognized:` + fmt5.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringLog(v interface{}) string { - rv := reflect2.ValueOf(v) - if rv.IsNil() { - return "nil" + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) + } + } else if this.Proposal != nil { + return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") + } else if that1.Proposal != nil { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) } - pv := reflect2.Indirect(rv).Interface() - return fmt5.Sprintf("*%v", pv) -} -func (m *Promise) Size() (n int) { - var l int - _ = l - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) + } + } else if this.Position != nil { + return fmt.Errorf("this.Position == nil && that.Position != nil") + } else if that1.Position != nil { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Learned != nil && that1.Learned != nil { + if *this.Learned != *that1.Learned { + return fmt.Errorf("Learned this(%v) Not Equal that(%v)", *this.Learned, *that1.Learned) + } + } else if this.Learned != nil { + return fmt.Errorf("this.Learned == nil && that.Learned != nil") + } else if that1.Learned != nil { + return fmt.Errorf("Learned this(%v) Not Equal that(%v)", this.Learned, that1.Learned) } - return n + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Nop.Equal(that1.Nop) { + return fmt.Errorf("Nop this(%v) Not Equal that(%v)", this.Nop, that1.Nop) + } + if !this.Append.Equal(that1.Append) { + return fmt.Errorf("Append this(%v) Not Equal that(%v)", this.Append, that1.Append) + } + if !this.Truncate.Equal(that1.Truncate) { + return fmt.Errorf("Truncate this(%v) Not Equal that(%v)", this.Truncate, that1.Truncate) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil } +func (this *WriteRequest) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } -func (m *Action) Size() (n int) { - var l int - _ = l - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) + that1, ok := that.(*WriteRequest) + if !ok { + return false } - if m.Promised != nil { - n += 1 + sovLog(uint64(*m.Promised)) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - if m.Performed != nil { - n += 1 + sovLog(uint64(*m.Performed)) + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return false + } + } else if this.Proposal != nil { + return false + } else if that1.Proposal != nil { + return false } - if m.Learned != nil { - n += 2 + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return false + } + } else if this.Position != nil { + return false + } else if that1.Position != nil { + return false } - if m.Type != nil { - n += 1 + sovLog(uint64(*m.Type)) + if this.Learned != nil && that1.Learned != nil { + if *this.Learned != *that1.Learned { + return false + } + } else if this.Learned != nil { + return false + } else if that1.Learned != nil { + return false } - if m.Nop != nil { - l = m.Nop.Size() - n += 1 + l + sovLog(uint64(l)) + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false } - if m.Append != nil { - l = m.Append.Size() - n += 1 + l + sovLog(uint64(l)) + if !this.Nop.Equal(that1.Nop) { + return false } - if m.Truncate != nil { - l = m.Truncate.Size() - n += 1 + l + sovLog(uint64(l)) + if !this.Append.Equal(that1.Append) { + return false } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !this.Truncate.Equal(that1.Truncate) { + return false } - return n + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } +func (this *WriteResponse) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } -func (m *Action_Nop) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + that1, ok := that.(*WriteResponse) + if !ok { + return fmt.Errorf("that is not of type *WriteResponse") } - return n + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *WriteResponse but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *WriteResponsebut is not nil && this == nil") + } + if this.Okay != nil && that1.Okay != nil { + if *this.Okay != *that1.Okay { + return fmt.Errorf("Okay this(%v) Not Equal that(%v)", *this.Okay, *that1.Okay) + } + } else if this.Okay != nil { + return fmt.Errorf("this.Okay == nil && that.Okay != nil") + } else if that1.Okay != nil { + return fmt.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) + } + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) + } + } else if this.Proposal != nil { + return fmt.Errorf("this.Proposal == nil && that.Proposal != nil") + } else if that1.Proposal != nil { + return fmt.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) + } + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) + } + } else if this.Position != nil { + return fmt.Errorf("this.Position == nil && that.Position != nil") + } else if that1.Position != nil { + return fmt.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil } +func (this *WriteResponse) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } -func (m *Action_Append) Size() (n int) { - var l int - _ = l - if m.Bytes != nil { - l = len(m.Bytes) - n += 1 + l + sovLog(uint64(l)) + that1, ok := that.(*WriteResponse) + if !ok { + return false } - if m.Cksum != nil { - l = len(m.Cksum) - n += 1 + l + sovLog(uint64(l)) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Okay != nil && that1.Okay != nil { + if *this.Okay != *that1.Okay { + return false + } + } else if this.Okay != nil { + return false + } else if that1.Okay != nil { + return false + } + if this.Proposal != nil && that1.Proposal != nil { + if *this.Proposal != *that1.Proposal { + return false + } + } else if this.Proposal != nil { + return false + } else if that1.Proposal != nil { + return false + } + if this.Position != nil && that1.Position != nil { + if *this.Position != *that1.Position { + return false + } + } else if this.Position != nil { + return false + } else if that1.Position != nil { + return false } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - return n + return true } +func (this *LearnedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } -func (m *Action_Truncate) Size() (n int) { - var l int - _ = l - if m.To != nil { - n += 1 + sovLog(uint64(*m.To)) + that1, ok := that.(*LearnedMessage) + if !ok { + return fmt.Errorf("that is not of type *LearnedMessage") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *LearnedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *LearnedMessagebut is not nil && this == nil") } - return n + if !this.Action.Equal(that1.Action) { + return fmt.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil } +func (this *LearnedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } -func (m *Metadata) Size() (n int) { - var l int - _ = l - if m.Status != nil { - n += 1 + sovLog(uint64(*m.Status)) + that1, ok := that.(*LearnedMessage) + if !ok { + return false } - if m.Promised != nil { - n += 1 + sovLog(uint64(*m.Promised)) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !this.Action.Equal(that1.Action) { + return false } - return n -} - -func (m *Record) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovLog(uint64(*m.Type)) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - if m.Promise != nil { - l = m.Promise.Size() - n += 1 + l + sovLog(uint64(l)) + return true +} +func (this *RecoverRequest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") } - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovLog(uint64(l)) + + that1, ok := that.(*RecoverRequest) + if !ok { + return fmt.Errorf("that is not of type *RecoverRequest") } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovLog(uint64(l)) + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RecoverRequest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RecoverRequestbut is not nil && this == nil") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } - return n + return nil } +func (this *RecoverRequest) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } -func (m *PromiseRequest) Size() (n int) { - var l int - _ = l - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) + that1, ok := that.(*RecoverRequest) + if !ok { + return false } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - return n + return true } +func (this *RecoverResponse) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } -func (m *PromiseResponse) Size() (n int) { - var l int - _ = l - if m.Okay != nil { - n += 2 + that1, ok := that.(*RecoverResponse) + if !ok { + return fmt.Errorf("that is not of type *RecoverResponse") } - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RecoverResponse but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RecoverResponsebut is not nil && this == nil") } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) + } + } else if this.Status != nil { + return fmt.Errorf("this.Status == nil && that.Status != nil") + } else if that1.Status != nil { + return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) } - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovLog(uint64(l)) + if this.Begin != nil && that1.Begin != nil { + if *this.Begin != *that1.Begin { + return fmt.Errorf("Begin this(%v) Not Equal that(%v)", *this.Begin, *that1.Begin) + } + } else if this.Begin != nil { + return fmt.Errorf("this.Begin == nil && that.Begin != nil") + } else if that1.Begin != nil { + return fmt.Errorf("Begin this(%v) Not Equal that(%v)", this.Begin, that1.Begin) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.End != nil && that1.End != nil { + if *this.End != *that1.End { + return fmt.Errorf("End this(%v) Not Equal that(%v)", *this.End, *that1.End) + } + } else if this.End != nil { + return fmt.Errorf("this.End == nil && that.End != nil") + } else if that1.End != nil { + return fmt.Errorf("End this(%v) Not Equal that(%v)", this.End, that1.End) } - return n -} - -func (m *WriteRequest) Size() (n int) { - var l int - _ = l - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) + return nil +} +func (this *RecoverResponse) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false } - if m.Learned != nil { - n += 2 + + that1, ok := that.(*RecoverResponse) + if !ok { + return false } - if m.Type != nil { - n += 1 + sovLog(uint64(*m.Type)) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - if m.Nop != nil { - l = m.Nop.Size() - n += 1 + l + sovLog(uint64(l)) + if this.Status != nil && that1.Status != nil { + if *this.Status != *that1.Status { + return false + } + } else if this.Status != nil { + return false + } else if that1.Status != nil { + return false } - if m.Append != nil { - l = m.Append.Size() - n += 1 + l + sovLog(uint64(l)) + if this.Begin != nil && that1.Begin != nil { + if *this.Begin != *that1.Begin { + return false + } + } else if this.Begin != nil { + return false + } else if that1.Begin != nil { + return false } - if m.Truncate != nil { - l = m.Truncate.Size() - n += 1 + l + sovLog(uint64(l)) + if this.End != nil && that1.End != nil { + if *this.End != *that1.End { + return false + } + } else if this.End != nil { + return false + } else if that1.End != nil { + return false } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - return n + return true } - -func (m *WriteResponse) Size() (n int) { - var l int - _ = l - if m.Okay != nil { - n += 2 - } - if m.Proposal != nil { - n += 1 + sovLog(uint64(*m.Proposal)) +func (this *Promise) GoString() string { + if this == nil { + return "nil" } - if m.Position != nil { - n += 1 + sovLog(uint64(*m.Position)) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Promise{") + if this.Proposal != nil { + s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *LearnedMessage) Size() (n int) { - var l int - _ = l - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovLog(uint64(l)) +func (this *Action) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 12) + s = append(s, "&mesosproto.Action{") + if this.Position != nil { + s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") } - return n -} - -func (m *RecoverRequest) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Promised != nil { + s = append(s, "Promised: "+valueToGoStringLog(this.Promised, "uint64")+",\n") } - return n -} - -func (m *RecoverResponse) Size() (n int) { - var l int - _ = l - if m.Status != nil { - n += 1 + sovLog(uint64(*m.Status)) + if this.Performed != nil { + s = append(s, "Performed: "+valueToGoStringLog(this.Performed, "uint64")+",\n") } - if m.Begin != nil { - n += 1 + sovLog(uint64(*m.Begin)) + if this.Learned != nil { + s = append(s, "Learned: "+valueToGoStringLog(this.Learned, "bool")+",\n") } - if m.End != nil { - n += 1 + sovLog(uint64(*m.End)) + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.Action_Type")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Nop != nil { + s = append(s, "Nop: "+fmt.Sprintf("%#v", this.Nop)+",\n") } - return n -} - -func sovLog(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } + if this.Append != nil { + s = append(s, "Append: "+fmt.Sprintf("%#v", this.Append)+",\n") } - return n -} -func sozLog(x uint64) (n int) { - return sovLog(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if this.Truncate != nil { + s = append(s, "Truncate: "+fmt.Sprintf("%#v", this.Truncate)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func NewPopulatedPromise(r randyLog, easy bool) *Promise { - this := &Promise{} - v1 := uint64(r.Uint32()) - this.Proposal = &v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 2) +func (this *Action_Nop) GoString() string { + if this == nil { + return "nil" } - return this + s := make([]string, 0, 4) + s = append(s, "&mesosproto.Action_Nop{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func NewPopulatedAction(r randyLog, easy bool) *Action { - this := &Action{} - v2 := uint64(r.Uint32()) - this.Position = &v2 - v3 := uint64(r.Uint32()) - this.Promised = &v3 - if r.Intn(10) != 0 { - v4 := uint64(r.Uint32()) - this.Performed = &v4 +func (this *Action_Append) GoString() string { + if this == nil { + return "nil" } - if r.Intn(10) != 0 { - v5 := bool(r.Intn(2) == 0) - this.Learned = &v5 + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Action_Append{") + if this.Bytes != nil { + s = append(s, "Bytes: "+valueToGoStringLog(this.Bytes, "byte")+",\n") } - if r.Intn(10) != 0 { - v6 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) - this.Type = &v6 + if this.Cksum != nil { + s = append(s, "Cksum: "+valueToGoStringLog(this.Cksum, "byte")+",\n") } - if r.Intn(10) != 0 { - this.Nop = NewPopulatedAction_Nop(r, easy) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if r.Intn(10) != 0 { - this.Append = NewPopulatedAction_Append(r, easy) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Action_Truncate) GoString() string { + if this == nil { + return "nil" } - if r.Intn(10) != 0 { - this.Truncate = NewPopulatedAction_Truncate(r, easy) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Action_Truncate{") + if this.To != nil { + s = append(s, "To: "+valueToGoStringLog(this.To, "uint64")+",\n") } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 9) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return this + s = append(s, "}") + return strings.Join(s, "") } - -func NewPopulatedAction_Nop(r randyLog, easy bool) *Action_Nop { - this := &Action_Nop{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 1) +func (this *Metadata) GoString() string { + if this == nil { + return "nil" } - return this -} - -func NewPopulatedAction_Append(r randyLog, easy bool) *Action_Append { - this := &Action_Append{} - v7 := r.Intn(100) - this.Bytes = make([]byte, v7) - for i := 0; i < v7; i++ { - this.Bytes[i] = byte(r.Intn(256)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Metadata{") + if this.Status != nil { + s = append(s, "Status: "+valueToGoStringLog(this.Status, "mesosproto.Metadata_Status")+",\n") } - if r.Intn(10) != 0 { - v8 := r.Intn(100) - this.Cksum = make([]byte, v8) - for i := 0; i < v8; i++ { - this.Cksum[i] = byte(r.Intn(256)) - } + if this.Promised != nil { + s = append(s, "Promised: "+valueToGoStringLog(this.Promised, "uint64")+",\n") } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 3) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return this + s = append(s, "}") + return strings.Join(s, "") } - -func NewPopulatedAction_Truncate(r randyLog, easy bool) *Action_Truncate { - this := &Action_Truncate{} - v9 := uint64(r.Uint32()) - this.To = &v9 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 2) +func (this *Record) GoString() string { + if this == nil { + return "nil" } - return this -} - -func NewPopulatedMetadata(r randyLog, easy bool) *Metadata { - this := &Metadata{} - v10 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) - this.Status = &v10 - v11 := uint64(r.Uint32()) - this.Promised = &v11 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 3) + s := make([]string, 0, 8) + s = append(s, "&mesosproto.Record{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.Record_Type")+",\n") } - return this -} - -func NewPopulatedRecord(r randyLog, easy bool) *Record { - this := &Record{} - v12 := Record_Type([]int32{1, 2, 3}[r.Intn(3)]) - this.Type = &v12 - if r.Intn(10) != 0 { - this.Promise = NewPopulatedPromise(r, easy) + if this.Promise != nil { + s = append(s, "Promise: "+fmt.Sprintf("%#v", this.Promise)+",\n") } - if r.Intn(10) != 0 { - this.Action = NewPopulatedAction(r, easy) + if this.Action != nil { + s = append(s, "Action: "+fmt.Sprintf("%#v", this.Action)+",\n") } - if r.Intn(10) != 0 { - this.Metadata = NewPopulatedMetadata(r, easy) + if this.Metadata != nil { + s = append(s, "Metadata: "+fmt.Sprintf("%#v", this.Metadata)+",\n") } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 5) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return this + s = append(s, "}") + return strings.Join(s, "") } - -func NewPopulatedPromiseRequest(r randyLog, easy bool) *PromiseRequest { - this := &PromiseRequest{} - v13 := uint64(r.Uint32()) - this.Proposal = &v13 - if r.Intn(10) != 0 { - v14 := uint64(r.Uint32()) - this.Position = &v14 +func (this *PromiseRequest) GoString() string { + if this == nil { + return "nil" } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 3) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.PromiseRequest{") + if this.Proposal != nil { + s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") } - return this + if this.Position != nil { + s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func NewPopulatedPromiseResponse(r randyLog, easy bool) *PromiseResponse { - this := &PromiseResponse{} - v15 := bool(r.Intn(2) == 0) - this.Okay = &v15 - v16 := uint64(r.Uint32()) - this.Proposal = &v16 - if r.Intn(10) != 0 { - v17 := uint64(r.Uint32()) - this.Position = &v17 +func (this *PromiseResponse) GoString() string { + if this == nil { + return "nil" } - if r.Intn(10) != 0 { - this.Action = NewPopulatedAction(r, easy) + s := make([]string, 0, 8) + s = append(s, "&mesosproto.PromiseResponse{") + if this.Okay != nil { + s = append(s, "Okay: "+valueToGoStringLog(this.Okay, "bool")+",\n") } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 5) + if this.Proposal != nil { + s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") } - return this + if this.Position != nil { + s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") + } + if this.Action != nil { + s = append(s, "Action: "+fmt.Sprintf("%#v", this.Action)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func NewPopulatedWriteRequest(r randyLog, easy bool) *WriteRequest { - this := &WriteRequest{} - v18 := uint64(r.Uint32()) - this.Proposal = &v18 - v19 := uint64(r.Uint32()) - this.Position = &v19 - if r.Intn(10) != 0 { - v20 := bool(r.Intn(2) == 0) - this.Learned = &v20 +func (this *WriteRequest) GoString() string { + if this == nil { + return "nil" } - v21 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) - this.Type = &v21 - if r.Intn(10) != 0 { - this.Nop = NewPopulatedAction_Nop(r, easy) + s := make([]string, 0, 11) + s = append(s, "&mesosproto.WriteRequest{") + if this.Proposal != nil { + s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") } - if r.Intn(10) != 0 { - this.Append = NewPopulatedAction_Append(r, easy) + if this.Position != nil { + s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") } - if r.Intn(10) != 0 { - this.Truncate = NewPopulatedAction_Truncate(r, easy) + if this.Learned != nil { + s = append(s, "Learned: "+valueToGoStringLog(this.Learned, "bool")+",\n") } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 8) + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringLog(this.Type, "mesosproto.Action_Type")+",\n") } - return this -} - -func NewPopulatedWriteResponse(r randyLog, easy bool) *WriteResponse { - this := &WriteResponse{} - v22 := bool(r.Intn(2) == 0) - this.Okay = &v22 - v23 := uint64(r.Uint32()) - this.Proposal = &v23 - v24 := uint64(r.Uint32()) - this.Position = &v24 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 4) + if this.Nop != nil { + s = append(s, "Nop: "+fmt.Sprintf("%#v", this.Nop)+",\n") } - return this -} - -func NewPopulatedLearnedMessage(r randyLog, easy bool) *LearnedMessage { - this := &LearnedMessage{} - this.Action = NewPopulatedAction(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 2) + if this.Append != nil { + s = append(s, "Append: "+fmt.Sprintf("%#v", this.Append)+",\n") } - return this -} - -func NewPopulatedRecoverRequest(r randyLog, easy bool) *RecoverRequest { - this := &RecoverRequest{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 1) + if this.Truncate != nil { + s = append(s, "Truncate: "+fmt.Sprintf("%#v", this.Truncate)+",\n") } - return this + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func NewPopulatedRecoverResponse(r randyLog, easy bool) *RecoverResponse { - this := &RecoverResponse{} - v25 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) - this.Status = &v25 - if r.Intn(10) != 0 { - v26 := uint64(r.Uint32()) - this.Begin = &v26 +func (this *WriteResponse) GoString() string { + if this == nil { + return "nil" } - if r.Intn(10) != 0 { - v27 := uint64(r.Uint32()) - this.End = &v27 + s := make([]string, 0, 7) + s = append(s, "&mesosproto.WriteResponse{") + if this.Okay != nil { + s = append(s, "Okay: "+valueToGoStringLog(this.Okay, "bool")+",\n") } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedLog(r, 4) + if this.Proposal != nil { + s = append(s, "Proposal: "+valueToGoStringLog(this.Proposal, "uint64")+",\n") } - return this -} - -type randyLog interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int + if this.Position != nil { + s = append(s, "Position: "+valueToGoStringLog(this.Position, "uint64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func randUTF8RuneLog(r randyLog) rune { - res := rune(r.Uint32() % 1112064) - if 55296 <= res { - res += 2047 +func (this *LearnedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.LearnedMessage{") + if this.Action != nil { + s = append(s, "Action: "+fmt.Sprintf("%#v", this.Action)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return res + s = append(s, "}") + return strings.Join(s, "") } -func randStringLog(r randyLog) string { - v28 := r.Intn(100) - tmps := make([]rune, v28) - for i := 0; i < v28; i++ { - tmps[i] = randUTF8RuneLog(r) +func (this *RecoverRequest) GoString() string { + if this == nil { + return "nil" } - return string(tmps) + s := make([]string, 0, 4) + s = append(s, "&mesosproto.RecoverRequest{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func randUnrecognizedLog(r randyLog, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldLog(data, r, fieldNumber, wire) +func (this *RecoverResponse) GoString() string { + if this == nil { + return "nil" } - return data + s := make([]string, 0, 7) + s = append(s, "&mesosproto.RecoverResponse{") + if this.Status != nil { + s = append(s, "Status: "+valueToGoStringLog(this.Status, "mesosproto.Metadata_Status")+",\n") + } + if this.Begin != nil { + s = append(s, "Begin: "+valueToGoStringLog(this.Begin, "uint64")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringLog(this.End, "uint64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func randFieldLog(data []byte, r randyLog, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateLog(data, uint64(key)) - v29 := r.Int63() - if r.Intn(2) == 0 { - v29 *= -1 - } - data = encodeVarintPopulateLog(data, uint64(v29)) - case 1: - data = encodeVarintPopulateLog(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateLog(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateLog(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateLog(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) +func valueToGoStringLog(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" } - return data + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) } -func encodeVarintPopulateLog(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 +func extensionToGoStringLog(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" } - data = append(data, uint8(v)) - return data + s := "map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "}" + return s } func (m *Promise) Marshal() (data []byte, err error) { size := m.Size() @@ -2723,12 +2153,14 @@ func (m *Promise) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Promise) MarshalTo(data []byte) (n int, err error) { +func (m *Promise) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Proposal != nil { + if m.Proposal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.Proposal)) @@ -2749,17 +2181,21 @@ func (m *Action) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Action) MarshalTo(data []byte) (n int, err error) { +func (m *Action) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Position != nil { + if m.Position == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.Position)) } - if m.Promised != nil { + if m.Promised == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") + } else { data[i] = 0x10 i++ i = encodeVarintLog(data, i, uint64(*m.Promised)) @@ -2830,7 +2266,7 @@ func (m *Action_Nop) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Action_Nop) MarshalTo(data []byte) (n int, err error) { +func (m *Action_Nop) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -2851,12 +2287,14 @@ func (m *Action_Append) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Action_Append) MarshalTo(data []byte) (n int, err error) { +func (m *Action_Append) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Bytes != nil { + if m.Bytes == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("bytes") + } else { data[i] = 0xa i++ i = encodeVarintLog(data, i, uint64(len(m.Bytes))) @@ -2884,12 +2322,14 @@ func (m *Action_Truncate) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Action_Truncate) MarshalTo(data []byte) (n int, err error) { +func (m *Action_Truncate) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.To != nil { + if m.To == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("to") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.To)) @@ -2910,17 +2350,21 @@ func (m *Metadata) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Metadata) MarshalTo(data []byte) (n int, err error) { +func (m *Metadata) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Status != nil { + if m.Status == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.Status)) } - if m.Promised != nil { + if m.Promised == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") + } else { data[i] = 0x10 i++ i = encodeVarintLog(data, i, uint64(*m.Promised)) @@ -2941,12 +2385,14 @@ func (m *Record) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Record) MarshalTo(data []byte) (n int, err error) { +func (m *Record) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Type != nil { + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.Type)) @@ -2997,12 +2443,14 @@ func (m *PromiseRequest) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PromiseRequest) MarshalTo(data []byte) (n int, err error) { +func (m *PromiseRequest) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Proposal != nil { + if m.Proposal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.Proposal)) @@ -3028,12 +2476,14 @@ func (m *PromiseResponse) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PromiseResponse) MarshalTo(data []byte) (n int, err error) { +func (m *PromiseResponse) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Okay != nil { + if m.Okay == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("okay") + } else { data[i] = 0x8 i++ if *m.Okay { @@ -3043,16 +2493,13 @@ func (m *PromiseResponse) MarshalTo(data []byte) (n int, err error) { } i++ } - if m.Proposal != nil { + if m.Proposal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") + } else { data[i] = 0x10 i++ i = encodeVarintLog(data, i, uint64(*m.Proposal)) } - if m.Position != nil { - data[i] = 0x20 - i++ - i = encodeVarintLog(data, i, uint64(*m.Position)) - } if m.Action != nil { data[i] = 0x1a i++ @@ -3063,6 +2510,11 @@ func (m *PromiseResponse) MarshalTo(data []byte) (n int, err error) { } i += n7 } + if m.Position != nil { + data[i] = 0x20 + i++ + i = encodeVarintLog(data, i, uint64(*m.Position)) + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } @@ -3079,17 +2531,21 @@ func (m *WriteRequest) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *WriteRequest) MarshalTo(data []byte) (n int, err error) { +func (m *WriteRequest) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Proposal != nil { + if m.Proposal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.Proposal)) } - if m.Position != nil { + if m.Position == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") + } else { data[i] = 0x10 i++ i = encodeVarintLog(data, i, uint64(*m.Position)) @@ -3104,7 +2560,9 @@ func (m *WriteRequest) MarshalTo(data []byte) (n int, err error) { } i++ } - if m.Type != nil { + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { data[i] = 0x20 i++ i = encodeVarintLog(data, i, uint64(*m.Type)) @@ -3155,12 +2613,14 @@ func (m *WriteResponse) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *WriteResponse) MarshalTo(data []byte) (n int, err error) { +func (m *WriteResponse) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Okay != nil { + if m.Okay == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("okay") + } else { data[i] = 0x8 i++ if *m.Okay { @@ -3170,12 +2630,16 @@ func (m *WriteResponse) MarshalTo(data []byte) (n int, err error) { } i++ } - if m.Proposal != nil { + if m.Proposal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") + } else { data[i] = 0x10 i++ i = encodeVarintLog(data, i, uint64(*m.Proposal)) } - if m.Position != nil { + if m.Position == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") + } else { data[i] = 0x18 i++ i = encodeVarintLog(data, i, uint64(*m.Position)) @@ -3196,12 +2660,14 @@ func (m *LearnedMessage) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *LearnedMessage) MarshalTo(data []byte) (n int, err error) { +func (m *LearnedMessage) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Action != nil { + if m.Action == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("action") + } else { data[i] = 0xa i++ i = encodeVarintLog(data, i, uint64(m.Action.Size())) @@ -3227,7 +2693,7 @@ func (m *RecoverRequest) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *RecoverRequest) MarshalTo(data []byte) (n int, err error) { +func (m *RecoverRequest) MarshalTo(data []byte) (int, error) { var i int _ = i var l int @@ -3248,12 +2714,14 @@ func (m *RecoverResponse) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *RecoverResponse) MarshalTo(data []byte) (n int, err error) { +func (m *RecoverResponse) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Status != nil { + if m.Status == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } else { data[i] = 0x8 i++ i = encodeVarintLog(data, i, uint64(*m.Status)) @@ -3301,1406 +2769,2378 @@ func encodeVarintLog(data []byte, offset int, v uint64) int { data[offset] = uint8(v) return offset + 1 } -func (this *Promise) GoString() string { - if this == nil { - return "nil" +func NewPopulatedPromise(r randyLog, easy bool) *Promise { + this := &Promise{} + v1 := uint64(uint64(r.Uint32())) + this.Proposal = &v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 2) } - s := strings3.Join([]string{`&mesosproto.Promise{` + - `Proposal:` + valueToGoStringLog(this.Proposal, "uint64"), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *Action) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedAction(r randyLog, easy bool) *Action { + this := &Action{} + v2 := uint64(uint64(r.Uint32())) + this.Position = &v2 + v3 := uint64(uint64(r.Uint32())) + this.Promised = &v3 + if r.Intn(10) != 0 { + v4 := uint64(uint64(r.Uint32())) + this.Performed = &v4 } - s := strings3.Join([]string{`&mesosproto.Action{` + - `Position:` + valueToGoStringLog(this.Position, "uint64"), - `Promised:` + valueToGoStringLog(this.Promised, "uint64"), - `Performed:` + valueToGoStringLog(this.Performed, "uint64"), - `Learned:` + valueToGoStringLog(this.Learned, "bool"), - `Type:` + valueToGoStringLog(this.Type, "mesosproto.Action_Type"), - `Nop:` + fmt6.Sprintf("%#v", this.Nop), - `Append:` + fmt6.Sprintf("%#v", this.Append), - `Truncate:` + fmt6.Sprintf("%#v", this.Truncate), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + if r.Intn(10) != 0 { + v5 := bool(bool(r.Intn(2) == 0)) + this.Learned = &v5 + } + if r.Intn(10) != 0 { + v6 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) + this.Type = &v6 + } + if r.Intn(10) != 0 { + this.Nop = NewPopulatedAction_Nop(r, easy) + } + if r.Intn(10) != 0 { + this.Append = NewPopulatedAction_Append(r, easy) + } + if r.Intn(10) != 0 { + this.Truncate = NewPopulatedAction_Truncate(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 9) + } + return this } -func (this *Action_Nop) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedAction_Nop(r randyLog, easy bool) *Action_Nop { + this := &Action_Nop{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 1) } - s := strings3.Join([]string{`&mesosproto.Action_Nop{` + - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *Action_Append) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedAction_Append(r randyLog, easy bool) *Action_Append { + this := &Action_Append{} + v7 := r.Intn(100) + this.Bytes = make([]byte, v7) + for i := 0; i < v7; i++ { + this.Bytes[i] = byte(r.Intn(256)) } - s := strings3.Join([]string{`&mesosproto.Action_Append{` + - `Bytes:` + valueToGoStringLog(this.Bytes, "byte"), - `Cksum:` + valueToGoStringLog(this.Cksum, "byte"), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + if r.Intn(10) != 0 { + v8 := r.Intn(100) + this.Cksum = make([]byte, v8) + for i := 0; i < v8; i++ { + this.Cksum[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 3) + } + return this } -func (this *Action_Truncate) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedAction_Truncate(r randyLog, easy bool) *Action_Truncate { + this := &Action_Truncate{} + v9 := uint64(uint64(r.Uint32())) + this.To = &v9 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 2) } - s := strings3.Join([]string{`&mesosproto.Action_Truncate{` + - `To:` + valueToGoStringLog(this.To, "uint64"), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *Metadata) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedMetadata(r randyLog, easy bool) *Metadata { + this := &Metadata{} + v10 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) + this.Status = &v10 + v11 := uint64(uint64(r.Uint32())) + this.Promised = &v11 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 3) } - s := strings3.Join([]string{`&mesosproto.Metadata{` + - `Status:` + valueToGoStringLog(this.Status, "mesosproto.Metadata_Status"), - `Promised:` + valueToGoStringLog(this.Promised, "uint64"), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *Record) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedRecord(r randyLog, easy bool) *Record { + this := &Record{} + v12 := Record_Type([]int32{1, 2, 3}[r.Intn(3)]) + this.Type = &v12 + if r.Intn(10) != 0 { + this.Promise = NewPopulatedPromise(r, easy) } - s := strings3.Join([]string{`&mesosproto.Record{` + - `Type:` + valueToGoStringLog(this.Type, "mesosproto.Record_Type"), - `Promise:` + fmt6.Sprintf("%#v", this.Promise), - `Action:` + fmt6.Sprintf("%#v", this.Action), - `Metadata:` + fmt6.Sprintf("%#v", this.Metadata), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + if r.Intn(10) != 0 { + this.Action = NewPopulatedAction(r, easy) + } + if r.Intn(10) != 0 { + this.Metadata = NewPopulatedMetadata(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 5) + } + return this } -func (this *PromiseRequest) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedPromiseRequest(r randyLog, easy bool) *PromiseRequest { + this := &PromiseRequest{} + v13 := uint64(uint64(r.Uint32())) + this.Proposal = &v13 + if r.Intn(10) != 0 { + v14 := uint64(uint64(r.Uint32())) + this.Position = &v14 } - s := strings3.Join([]string{`&mesosproto.PromiseRequest{` + - `Proposal:` + valueToGoStringLog(this.Proposal, "uint64"), - `Position:` + valueToGoStringLog(this.Position, "uint64"), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 3) + } + return this } -func (this *PromiseResponse) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedPromiseResponse(r randyLog, easy bool) *PromiseResponse { + this := &PromiseResponse{} + v15 := bool(bool(r.Intn(2) == 0)) + this.Okay = &v15 + v16 := uint64(uint64(r.Uint32())) + this.Proposal = &v16 + if r.Intn(10) != 0 { + this.Action = NewPopulatedAction(r, easy) + } + if r.Intn(10) != 0 { + v17 := uint64(uint64(r.Uint32())) + this.Position = &v17 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 5) } - s := strings3.Join([]string{`&mesosproto.PromiseResponse{` + - `Okay:` + valueToGoStringLog(this.Okay, "bool"), - `Proposal:` + valueToGoStringLog(this.Proposal, "uint64"), - `Position:` + valueToGoStringLog(this.Position, "uint64"), - `Action:` + fmt6.Sprintf("%#v", this.Action), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *WriteRequest) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedWriteRequest(r randyLog, easy bool) *WriteRequest { + this := &WriteRequest{} + v18 := uint64(uint64(r.Uint32())) + this.Proposal = &v18 + v19 := uint64(uint64(r.Uint32())) + this.Position = &v19 + if r.Intn(10) != 0 { + v20 := bool(bool(r.Intn(2) == 0)) + this.Learned = &v20 } - s := strings3.Join([]string{`&mesosproto.WriteRequest{` + - `Proposal:` + valueToGoStringLog(this.Proposal, "uint64"), - `Position:` + valueToGoStringLog(this.Position, "uint64"), - `Learned:` + valueToGoStringLog(this.Learned, "bool"), - `Type:` + valueToGoStringLog(this.Type, "mesosproto.Action_Type"), - `Nop:` + fmt6.Sprintf("%#v", this.Nop), - `Append:` + fmt6.Sprintf("%#v", this.Append), - `Truncate:` + fmt6.Sprintf("%#v", this.Truncate), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *WriteResponse) GoString() string { - if this == nil { - return "nil" + v21 := Action_Type([]int32{1, 2, 3}[r.Intn(3)]) + this.Type = &v21 + if r.Intn(10) != 0 { + this.Nop = NewPopulatedAction_Nop(r, easy) } - s := strings3.Join([]string{`&mesosproto.WriteResponse{` + - `Okay:` + valueToGoStringLog(this.Okay, "bool"), - `Proposal:` + valueToGoStringLog(this.Proposal, "uint64"), - `Position:` + valueToGoStringLog(this.Position, "uint64"), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *LearnedMessage) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + this.Append = NewPopulatedAction_Append(r, easy) } - s := strings3.Join([]string{`&mesosproto.LearnedMessage{` + - `Action:` + fmt6.Sprintf("%#v", this.Action), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + if r.Intn(10) != 0 { + this.Truncate = NewPopulatedAction_Truncate(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 8) + } + return this } -func (this *RecoverRequest) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedWriteResponse(r randyLog, easy bool) *WriteResponse { + this := &WriteResponse{} + v22 := bool(bool(r.Intn(2) == 0)) + this.Okay = &v22 + v23 := uint64(uint64(r.Uint32())) + this.Proposal = &v23 + v24 := uint64(uint64(r.Uint32())) + this.Position = &v24 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 4) } - s := strings3.Join([]string{`&mesosproto.RecoverRequest{` + - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *RecoverResponse) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedLearnedMessage(r randyLog, easy bool) *LearnedMessage { + this := &LearnedMessage{} + this.Action = NewPopulatedAction(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 2) } - s := strings3.Join([]string{`&mesosproto.RecoverResponse{` + - `Status:` + valueToGoStringLog(this.Status, "mesosproto.Metadata_Status"), - `Begin:` + valueToGoStringLog(this.Begin, "uint64"), - `End:` + valueToGoStringLog(this.End, "uint64"), - `XXX_unrecognized:` + fmt6.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func valueToGoStringLog(v interface{}, typ string) string { - rv := reflect3.ValueOf(v) - if rv.IsNil() { - return "nil" + +func NewPopulatedRecoverRequest(r randyLog, easy bool) *RecoverRequest { + this := &RecoverRequest{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 1) } - pv := reflect3.Indirect(rv).Interface() - return fmt6.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + return this } -func extensionToGoStringLog(e map[int32]github_com_gogo_protobuf_proto3.Extension) string { - if e == nil { - return "nil" + +func NewPopulatedRecoverResponse(r randyLog, easy bool) *RecoverResponse { + this := &RecoverResponse{} + v25 := Metadata_Status([]int32{1, 2, 3, 4}[r.Intn(4)]) + this.Status = &v25 + if r.Intn(10) != 0 { + v26 := uint64(uint64(r.Uint32())) + this.Begin = &v26 } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) + if r.Intn(10) != 0 { + v27 := uint64(uint64(r.Uint32())) + this.End = &v27 } - sort1.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv1.Itoa(k)+": "+e[int32(k)].GoString()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedLog(r, 4) } - s += strings3.Join(ss, ",") + "}" - return s + return this } -func (this *Promise) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Promise) - if !ok { - return fmt7.Errorf("that is not of type *Promise") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *Promise but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *Promisebut is not nil && this == nil") - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) - } - } else if this.Proposal != nil { - return fmt7.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) +type randyLog interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneLog(r randyLog) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + return rune(ru + 61) +} +func randStringLog(r randyLog) string { + v28 := r.Intn(100) + tmps := make([]rune, v28) + for i := 0; i < v28; i++ { + tmps[i] = randUTF8RuneLog(r) } - return nil + return string(tmps) } -func (this *Promise) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func randUnrecognizedLog(r randyLog, maxFieldNumber int) (data []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 } - return false - } - - that1, ok := that.(*Promise) - if !ok { - return false + fieldNumber := maxFieldNumber + r.Intn(100) + data = randFieldLog(data, r, fieldNumber, wire) } - if that1 == nil { - if this == nil { - return true + return data +} +func randFieldLog(data []byte, r randyLog, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateLog(data, uint64(key)) + v29 := r.Int63() + if r.Intn(2) == 0 { + v29 *= -1 } - return false - } else if this == nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false + data = encodeVarintPopulateLog(data, uint64(v29)) + case 1: + data = encodeVarintPopulateLog(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + data = encodeVarintPopulateLog(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateLog(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + default: + data = encodeVarintPopulateLog(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) } - return true + return data } -func (this *Action) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") +func encodeVarintPopulateLog(data []byte, v uint64) []byte { + for v >= 1<<7 { + data = append(data, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 } - - that1, ok := that.(*Action) - if !ok { - return fmt7.Errorf("that is not of type *Action") + data = append(data, uint8(v)) + return data +} +func (m *Promise) Size() (n int) { + var l int + _ = l + if m.Proposal != nil { + n += 1 + sovLog(uint64(*m.Proposal)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *Action but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *Actionbut is not nil && this == nil") + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt7.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) + return n +} + +func (m *Action) Size() (n int) { + var l int + _ = l + if m.Position != nil { + n += 1 + sovLog(uint64(*m.Position)) } - if this.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return fmt7.Errorf("Promised this(%v) Not Equal that(%v)", *this.Promised, *that1.Promised) - } - } else if this.Promised != nil { - return fmt7.Errorf("this.Promised == nil && that.Promised != nil") - } else if that1.Promised != nil { - return fmt7.Errorf("Promised this(%v) Not Equal that(%v)", this.Promised, that1.Promised) + if m.Promised != nil { + n += 1 + sovLog(uint64(*m.Promised)) } - if this.Performed != nil && that1.Performed != nil { - if *this.Performed != *that1.Performed { - return fmt7.Errorf("Performed this(%v) Not Equal that(%v)", *this.Performed, *that1.Performed) - } - } else if this.Performed != nil { - return fmt7.Errorf("this.Performed == nil && that.Performed != nil") - } else if that1.Performed != nil { - return fmt7.Errorf("Performed this(%v) Not Equal that(%v)", this.Performed, that1.Performed) + if m.Performed != nil { + n += 1 + sovLog(uint64(*m.Performed)) } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return fmt7.Errorf("Learned this(%v) Not Equal that(%v)", *this.Learned, *that1.Learned) - } - } else if this.Learned != nil { - return fmt7.Errorf("this.Learned == nil && that.Learned != nil") - } else if that1.Learned != nil { - return fmt7.Errorf("Learned this(%v) Not Equal that(%v)", this.Learned, that1.Learned) + if m.Learned != nil { + n += 2 } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt7.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) - } - } else if this.Type != nil { - return fmt7.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt7.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + if m.Type != nil { + n += 1 + sovLog(uint64(*m.Type)) } - if !this.Nop.Equal(that1.Nop) { - return fmt7.Errorf("Nop this(%v) Not Equal that(%v)", this.Nop, that1.Nop) + if m.Nop != nil { + l = m.Nop.Size() + n += 1 + l + sovLog(uint64(l)) } - if !this.Append.Equal(that1.Append) { - return fmt7.Errorf("Append this(%v) Not Equal that(%v)", this.Append, that1.Append) + if m.Append != nil { + l = m.Append.Size() + n += 1 + l + sovLog(uint64(l)) } - if !this.Truncate.Equal(that1.Truncate) { - return fmt7.Errorf("Truncate this(%v) Not Equal that(%v)", this.Truncate, that1.Truncate) + if m.Truncate != nil { + l = m.Truncate.Size() + n += 1 + l + sovLog(uint64(l)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *Action) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*Action) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false +func (m *Action_Nop) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return false - } - } else if this.Promised != nil { - return false - } else if that1.Promised != nil { - return false + return n +} + +func (m *Action_Append) Size() (n int) { + var l int + _ = l + if m.Bytes != nil { + l = len(m.Bytes) + n += 1 + l + sovLog(uint64(l)) } - if this.Performed != nil && that1.Performed != nil { - if *this.Performed != *that1.Performed { - return false - } - } else if this.Performed != nil { - return false - } else if that1.Performed != nil { - return false + if m.Cksum != nil { + l = len(m.Cksum) + n += 1 + l + sovLog(uint64(l)) } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return false - } - } else if this.Learned != nil { - return false - } else if that1.Learned != nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false - } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false + return n +} + +func (m *Action_Truncate) Size() (n int) { + var l int + _ = l + if m.To != nil { + n += 1 + sovLog(uint64(*m.To)) } - if !this.Nop.Equal(that1.Nop) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Append.Equal(that1.Append) { - return false + return n +} + +func (m *Metadata) Size() (n int) { + var l int + _ = l + if m.Status != nil { + n += 1 + sovLog(uint64(*m.Status)) } - if !this.Truncate.Equal(that1.Truncate) { - return false + if m.Promised != nil { + n += 1 + sovLog(uint64(*m.Promised)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Action_Nop) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Action_Nop) - if !ok { - return fmt7.Errorf("that is not of type *Action_Nop") +func (m *Record) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovLog(uint64(*m.Type)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *Action_Nop but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *Action_Nopbut is not nil && this == nil") + if m.Promise != nil { + l = m.Promise.Size() + n += 1 + l + sovLog(uint64(l)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.Action != nil { + l = m.Action.Size() + n += 1 + l + sovLog(uint64(l)) } - return nil -} -func (this *Action_Nop) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovLog(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*Action_Nop) - if !ok { - return false +func (m *PromiseRequest) Size() (n int) { + var l int + _ = l + if m.Proposal != nil { + n += 1 + sovLog(uint64(*m.Proposal)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Position != nil { + n += 1 + sovLog(uint64(*m.Position)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Action_Append) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Action_Append) - if !ok { - return fmt7.Errorf("that is not of type *Action_Append") +func (m *PromiseResponse) Size() (n int) { + var l int + _ = l + if m.Okay != nil { + n += 2 } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *Action_Append but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *Action_Appendbut is not nil && this == nil") + if m.Proposal != nil { + n += 1 + sovLog(uint64(*m.Proposal)) } - if !bytes1.Equal(this.Bytes, that1.Bytes) { - return fmt7.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + if m.Action != nil { + l = m.Action.Size() + n += 1 + l + sovLog(uint64(l)) } - if !bytes1.Equal(this.Cksum, that1.Cksum) { - return fmt7.Errorf("Cksum this(%v) Not Equal that(%v)", this.Cksum, that1.Cksum) + if m.Position != nil { + n += 1 + sovLog(uint64(*m.Position)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *Action_Append) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*Action_Append) - if !ok { - return false +func (m *WriteRequest) Size() (n int) { + var l int + _ = l + if m.Proposal != nil { + n += 1 + sovLog(uint64(*m.Proposal)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Position != nil { + n += 1 + sovLog(uint64(*m.Position)) } - if !bytes1.Equal(this.Bytes, that1.Bytes) { - return false + if m.Learned != nil { + n += 2 } - if !bytes1.Equal(this.Cksum, that1.Cksum) { - return false + if m.Type != nil { + n += 1 + sovLog(uint64(*m.Type)) + } + if m.Nop != nil { + l = m.Nop.Size() + n += 1 + l + sovLog(uint64(l)) + } + if m.Append != nil { + l = m.Append.Size() + n += 1 + l + sovLog(uint64(l)) + } + if m.Truncate != nil { + l = m.Truncate.Size() + n += 1 + l + sovLog(uint64(l)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Action_Truncate) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Action_Truncate) - if !ok { - return fmt7.Errorf("that is not of type *Action_Truncate") +func (m *WriteResponse) Size() (n int) { + var l int + _ = l + if m.Okay != nil { + n += 2 } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *Action_Truncate but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *Action_Truncatebut is not nil && this == nil") + if m.Proposal != nil { + n += 1 + sovLog(uint64(*m.Proposal)) } - if this.To != nil && that1.To != nil { - if *this.To != *that1.To { - return fmt7.Errorf("To this(%v) Not Equal that(%v)", *this.To, *that1.To) - } - } else if this.To != nil { - return fmt7.Errorf("this.To == nil && that.To != nil") - } else if that1.To != nil { - return fmt7.Errorf("To this(%v) Not Equal that(%v)", this.To, that1.To) + if m.Position != nil { + n += 1 + sovLog(uint64(*m.Position)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *Action_Truncate) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + +func (m *LearnedMessage) Size() (n int) { + var l int + _ = l + if m.Action != nil { + l = m.Action.Size() + n += 1 + l + sovLog(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*Action_Truncate) - if !ok { - return false +func (m *RecoverRequest) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + return n +} + +func (m *RecoverResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + n += 1 + sovLog(uint64(*m.Status)) } - if this.To != nil && that1.To != nil { - if *this.To != *that1.To { - return false - } - } else if this.To != nil { - return false - } else if that1.To != nil { - return false + if m.Begin != nil { + n += 1 + sovLog(uint64(*m.Begin)) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.End != nil { + n += 1 + sovLog(uint64(*m.End)) } - return true + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n } -func (this *Metadata) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + +func sovLog(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break } - return fmt7.Errorf("that == nil && this != nil") } - - that1, ok := that.(*Metadata) - if !ok { - return fmt7.Errorf("that is not of type *Metadata") + return n +} +func sozLog(x uint64) (n int) { + return sovLog(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Promise) String() string { + if this == nil { + return "nil" } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *Metadata but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *Metadatabut is not nil && this == nil") + s := strings.Join([]string{`&Promise{`, + `Proposal:` + valueToStringLog(this.Proposal) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Action) String() string { + if this == nil { + return "nil" } - if this.Status != nil && that1.Status != nil { - if *this.Status != *that1.Status { - return fmt7.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) - } - } else if this.Status != nil { - return fmt7.Errorf("this.Status == nil && that.Status != nil") - } else if that1.Status != nil { - return fmt7.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) + s := strings.Join([]string{`&Action{`, + `Position:` + valueToStringLog(this.Position) + `,`, + `Promised:` + valueToStringLog(this.Promised) + `,`, + `Performed:` + valueToStringLog(this.Performed) + `,`, + `Learned:` + valueToStringLog(this.Learned) + `,`, + `Type:` + valueToStringLog(this.Type) + `,`, + `Nop:` + strings.Replace(fmt.Sprintf("%v", this.Nop), "Action_Nop", "Action_Nop", 1) + `,`, + `Append:` + strings.Replace(fmt.Sprintf("%v", this.Append), "Action_Append", "Action_Append", 1) + `,`, + `Truncate:` + strings.Replace(fmt.Sprintf("%v", this.Truncate), "Action_Truncate", "Action_Truncate", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Action_Nop) String() string { + if this == nil { + return "nil" } - if this.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return fmt7.Errorf("Promised this(%v) Not Equal that(%v)", *this.Promised, *that1.Promised) - } - } else if this.Promised != nil { - return fmt7.Errorf("this.Promised == nil && that.Promised != nil") - } else if that1.Promised != nil { - return fmt7.Errorf("Promised this(%v) Not Equal that(%v)", this.Promised, that1.Promised) + s := strings.Join([]string{`&Action_Nop{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Action_Append) String() string { + if this == nil { + return "nil" } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + s := strings.Join([]string{`&Action_Append{`, + `Bytes:` + valueToStringLog(this.Bytes) + `,`, + `Cksum:` + valueToStringLog(this.Cksum) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Action_Truncate) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&Action_Truncate{`, + `To:` + valueToStringLog(this.To) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s } -func (this *Metadata) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false +func (this *Metadata) String() string { + if this == nil { + return "nil" } - - that1, ok := that.(*Metadata) - if !ok { - return false + s := strings.Join([]string{`&Metadata{`, + `Status:` + valueToStringLog(this.Status) + `,`, + `Promised:` + valueToStringLog(this.Promised) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Record) String() string { + if this == nil { + return "nil" } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + s := strings.Join([]string{`&Record{`, + `Type:` + valueToStringLog(this.Type) + `,`, + `Promise:` + strings.Replace(fmt.Sprintf("%v", this.Promise), "Promise", "Promise", 1) + `,`, + `Action:` + strings.Replace(fmt.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "Metadata", "Metadata", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *PromiseRequest) String() string { + if this == nil { + return "nil" } - if this.Status != nil && that1.Status != nil { - if *this.Status != *that1.Status { - return false - } - } else if this.Status != nil { - return false - } else if that1.Status != nil { - return false + s := strings.Join([]string{`&PromiseRequest{`, + `Proposal:` + valueToStringLog(this.Proposal) + `,`, + `Position:` + valueToStringLog(this.Position) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *PromiseResponse) String() string { + if this == nil { + return "nil" } - if this.Promised != nil && that1.Promised != nil { - if *this.Promised != *that1.Promised { - return false - } - } else if this.Promised != nil { - return false - } else if that1.Promised != nil { - return false + s := strings.Join([]string{`&PromiseResponse{`, + `Okay:` + valueToStringLog(this.Okay) + `,`, + `Proposal:` + valueToStringLog(this.Proposal) + `,`, + `Action:` + strings.Replace(fmt.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, + `Position:` + valueToStringLog(this.Position) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *WriteRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WriteRequest{`, + `Proposal:` + valueToStringLog(this.Proposal) + `,`, + `Position:` + valueToStringLog(this.Position) + `,`, + `Learned:` + valueToStringLog(this.Learned) + `,`, + `Type:` + valueToStringLog(this.Type) + `,`, + `Nop:` + strings.Replace(fmt.Sprintf("%v", this.Nop), "Action_Nop", "Action_Nop", 1) + `,`, + `Append:` + strings.Replace(fmt.Sprintf("%v", this.Append), "Action_Append", "Action_Append", 1) + `,`, + `Truncate:` + strings.Replace(fmt.Sprintf("%v", this.Truncate), "Action_Truncate", "Action_Truncate", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *WriteResponse) String() string { + if this == nil { + return "nil" } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + s := strings.Join([]string{`&WriteResponse{`, + `Okay:` + valueToStringLog(this.Okay) + `,`, + `Proposal:` + valueToStringLog(this.Proposal) + `,`, + `Position:` + valueToStringLog(this.Position) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *LearnedMessage) String() string { + if this == nil { + return "nil" } - return true + s := strings.Join([]string{`&LearnedMessage{`, + `Action:` + strings.Replace(fmt.Sprintf("%v", this.Action), "Action", "Action", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s } -func (this *Record) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") +func (this *RecoverRequest) String() string { + if this == nil { + return "nil" } - - that1, ok := that.(*Record) - if !ok { - return fmt7.Errorf("that is not of type *Record") + s := strings.Join([]string{`&RecoverRequest{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *RecoverResponse) String() string { + if this == nil { + return "nil" } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *Record but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *Recordbut is not nil && this == nil") + s := strings.Join([]string{`&RecoverResponse{`, + `Status:` + valueToStringLog(this.Status) + `,`, + `Begin:` + valueToStringLog(this.Begin) + `,`, + `End:` + valueToStringLog(this.End) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringLog(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt7.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Promise) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Proposal = &v + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Type != nil { - return fmt7.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt7.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) - } - if !this.Promise.Equal(that1.Promise) { - return fmt7.Errorf("Promise this(%v) Not Equal that(%v)", this.Promise, that1.Promise) - } - if !this.Action.Equal(that1.Action) { - return fmt7.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) - } - if !this.Metadata.Equal(that1.Metadata) { - return fmt7.Errorf("Metadata this(%v) Not Equal that(%v)", this.Metadata, that1.Metadata) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } + return nil } -func (this *Record) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Record) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true +func (m *Action) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Position = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Promised", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Promised = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Performed", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Performed = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Learned", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Learned = &b + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Action_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Action_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nop", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nop == nil { + m.Nop = &Action_Nop{} + } + if err := m.Nop.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Append", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Append == nil { + m.Append = &Action_Append{} + } + if err := m.Append.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Truncate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Truncate == nil { + m.Truncate = &Action_Truncate{} + } + if err := m.Truncate.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false - } - if !this.Promise.Equal(that1.Promise) { - return false - } - if !this.Action.Equal(that1.Action) { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") } - return true -} -func (this *PromiseRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") } - that1, ok := that.(*PromiseRequest) - if !ok { - return fmt7.Errorf("that is not of type *PromiseRequest") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *PromiseRequest but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *PromiseRequestbut is not nil && this == nil") - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) - } - } else if this.Proposal != nil { - return fmt7.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt7.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *PromiseRequest) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*PromiseRequest) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false +func (m *Action_Nop) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *PromiseResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + switch fieldNum { + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt7.Errorf("that == nil && this != nil") } - that1, ok := that.(*PromiseResponse) - if !ok { - return fmt7.Errorf("that is not of type *PromiseResponse") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *PromiseResponse but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *PromiseResponsebut is not nil && this == nil") - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return fmt7.Errorf("Okay this(%v) Not Equal that(%v)", *this.Okay, *that1.Okay) - } - } else if this.Okay != nil { - return fmt7.Errorf("this.Okay == nil && that.Okay != nil") - } else if that1.Okay != nil { - return fmt7.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) - } - } else if this.Proposal != nil { - return fmt7.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt7.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - if !this.Action.Equal(that1.Action) { - return fmt7.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *PromiseResponse) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*PromiseResponse) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return false - } - } else if this.Okay != nil { - return false - } else if that1.Okay != nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false - } - if !this.Action.Equal(that1.Action) { - return false - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *WriteRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*WriteRequest) - if !ok { - return fmt7.Errorf("that is not of type *WriteRequest") - } - if that1 == nil { - if this == nil { - return nil +func (m *Action_Append) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt7.Errorf("that is type *WriteRequest but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *WriteRequestbut is not nil && this == nil") - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bytes = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cksum", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cksum = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Proposal != nil { - return fmt7.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt7.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("bytes") } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return fmt7.Errorf("Learned this(%v) Not Equal that(%v)", *this.Learned, *that1.Learned) + + return nil +} +func (m *Action_Truncate) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Learned != nil { - return fmt7.Errorf("this.Learned == nil && that.Learned != nil") - } else if that1.Learned != nil { - return fmt7.Errorf("Learned this(%v) Not Equal that(%v)", this.Learned, that1.Learned) - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt7.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.To = &v + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Type != nil { - return fmt7.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt7.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } - if !this.Nop.Equal(that1.Nop) { - return fmt7.Errorf("Nop this(%v) Not Equal that(%v)", this.Nop, that1.Nop) - } - if !this.Append.Equal(that1.Append) { - return fmt7.Errorf("Append this(%v) Not Equal that(%v)", this.Append, that1.Append) - } - if !this.Truncate.Equal(that1.Truncate) { - return fmt7.Errorf("Truncate this(%v) Not Equal that(%v)", this.Truncate, that1.Truncate) - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("to") } + return nil } -func (this *WriteRequest) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *Metadata) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } - - that1, ok := that.(*WriteRequest) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v Metadata_Status + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Metadata_Status(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Promised", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Promised = &v + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false - } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false - } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("promised") } - if this.Learned != nil && that1.Learned != nil { - if *this.Learned != *that1.Learned { - return false + + return nil +} +func (m *Record) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Learned != nil { - return false - } else if that1.Learned != nil { - return false - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Record_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Record_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Promise", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Promise == nil { + m.Promise = &Promise{} + } + if err := m.Promise.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Action == nil { + m.Action = &Action{} + } + if err := m.Action.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false - } - if !this.Nop.Equal(that1.Nop) { - return false - } - if !this.Append.Equal(that1.Append) { - return false - } - if !this.Truncate.Equal(that1.Truncate) { - return false } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *WriteResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - that1, ok := that.(*WriteResponse) - if !ok { - return fmt7.Errorf("that is not of type *WriteResponse") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *WriteResponse but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *WriteResponsebut is not nil && this == nil") - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return fmt7.Errorf("Okay this(%v) Not Equal that(%v)", *this.Okay, *that1.Okay) - } - } else if this.Okay != nil { - return fmt7.Errorf("this.Okay == nil && that.Okay != nil") - } else if that1.Okay != nil { - return fmt7.Errorf("Okay this(%v) Not Equal that(%v)", this.Okay, that1.Okay) - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", *this.Proposal, *that1.Proposal) - } - } else if this.Proposal != nil { - return fmt7.Errorf("this.Proposal == nil && that.Proposal != nil") - } else if that1.Proposal != nil { - return fmt7.Errorf("Proposal this(%v) Not Equal that(%v)", this.Proposal, that1.Proposal) - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", *this.Position, *that1.Position) - } - } else if this.Position != nil { - return fmt7.Errorf("this.Position == nil && that.Position != nil") - } else if that1.Position != nil { - return fmt7.Errorf("Position this(%v) Not Equal that(%v)", this.Position, that1.Position) - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *WriteResponse) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*WriteResponse) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Okay != nil && that1.Okay != nil { - if *this.Okay != *that1.Okay { - return false - } - } else if this.Okay != nil { - return false - } else if that1.Okay != nil { - return false - } - if this.Proposal != nil && that1.Proposal != nil { - if *this.Proposal != *that1.Proposal { - return false +func (m *PromiseRequest) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Proposal != nil { - return false - } else if that1.Proposal != nil { - return false - } - if this.Position != nil && that1.Position != nil { - if *this.Position != *that1.Position { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Proposal = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Position = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Position != nil { - return false - } else if that1.Position != nil { - return false } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } - return true + + return nil } -func (this *LearnedMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *PromiseResponse) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt7.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*LearnedMessage) - if !ok { - return fmt7.Errorf("that is not of type *LearnedMessage") - } - if that1 == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Okay", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Okay = &b + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Proposal = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Action == nil { + m.Action = &Action{} + } + if err := m.Action.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Position = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt7.Errorf("that is type *LearnedMessage but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *LearnedMessagebut is not nil && this == nil") } - if !this.Action.Equal(that1.Action) { - return fmt7.Errorf("Action this(%v) Not Equal that(%v)", this.Action, that1.Action) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("okay") } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } + return nil } -func (this *LearnedMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *WriteRequest) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } - - that1, ok := that.(*LearnedMessage) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Proposal = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Position = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Learned", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Learned = &b + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Action_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Action_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000004) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nop", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nop == nil { + m.Nop = &Action_Nop{} + } + if err := m.Nop.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Append", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Append == nil { + m.Append = &Action_Append{} + } + if err := m.Append.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Truncate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Truncate == nil { + m.Truncate = &Action_Truncate{} + } + if err := m.Truncate.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if !this.Action.Equal(that1.Action) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") } - return true -} -func (this *RecoverRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - that1, ok := that.(*RecoverRequest) - if !ok { - return fmt7.Errorf("that is not of type *RecoverRequest") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *RecoverRequest but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *RecoverRequestbut is not nil && this == nil") - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *RecoverRequest) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*RecoverRequest) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true +func (m *WriteResponse) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RecoverResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Okay", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Okay = &b + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Proposal = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Position = &v + hasFields[0] |= uint64(0x00000004) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt7.Errorf("that == nil && this != nil") } - - that1, ok := that.(*RecoverResponse) - if !ok { - return fmt7.Errorf("that is not of type *RecoverResponse") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("okay") } - if that1 == nil { - if this == nil { - return nil - } - return fmt7.Errorf("that is type *RecoverResponse but is nil && this != nil") - } else if this == nil { - return fmt7.Errorf("that is type *RecoverResponsebut is not nil && this == nil") + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("proposal") } - if this.Status != nil && that1.Status != nil { - if *this.Status != *that1.Status { - return fmt7.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) - } - } else if this.Status != nil { - return fmt7.Errorf("this.Status == nil && that.Status != nil") - } else if that1.Status != nil { - return fmt7.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("position") } - if this.Begin != nil && that1.Begin != nil { - if *this.Begin != *that1.Begin { - return fmt7.Errorf("Begin this(%v) Not Equal that(%v)", *this.Begin, *that1.Begin) + + return nil +} +func (m *LearnedMessage) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Begin != nil { - return fmt7.Errorf("this.Begin == nil && that.Begin != nil") - } else if that1.Begin != nil { - return fmt7.Errorf("Begin this(%v) Not Equal that(%v)", this.Begin, that1.Begin) - } - if this.End != nil && that1.End != nil { - if *this.End != *that1.End { - return fmt7.Errorf("End this(%v) Not Equal that(%v)", *this.End, *that1.End) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLog + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Action == nil { + m.Action = &Action{} + } + if err := m.Action.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.End != nil { - return fmt7.Errorf("this.End == nil && that.End != nil") - } else if that1.End != nil { - return fmt7.Errorf("End this(%v) Not Equal that(%v)", this.End, that1.End) } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt7.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("action") } + return nil } -func (this *RecoverResponse) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *RecoverRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + switch fieldNum { + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false } - that1, ok := that.(*RecoverResponse) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + return nil +} +func (m *RecoverResponse) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if this.Status != nil && that1.Status != nil { - if *this.Status != *that1.Status { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v Metadata_Status + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Metadata_Status(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Begin = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.End = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipLog(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLog + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Status != nil { - return false - } else if that1.Status != nil { - return false } - if this.Begin != nil && that1.Begin != nil { - if *this.Begin != *that1.Begin { - return false - } - } else if this.Begin != nil { - return false - } else if that1.Begin != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") } - if this.End != nil && that1.End != nil { - if *this.End != *that1.End { - return false + + return nil +} +func skipLog(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthLog + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipLog(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - } else if this.End != nil { - return false - } else if that1.End != nil { - return false - } - if !bytes1.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false } - return true + panic("unreachable") } + +var ( + ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling") +) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/logpb_test.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/logpb_test.go index 0511bd3d..20e6005e 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/logpb_test.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/logpb_test.go @@ -4,60 +4,60 @@ package mesosproto -import testing7 "testing" -import math_rand7 "math/rand" -import time7 "time" -import github_com_gogo_protobuf_proto4 "github.com/gogo/protobuf/proto" -import testing8 "testing" -import math_rand8 "math/rand" -import time8 "time" -import encoding_json1 "encoding/json" -import testing9 "testing" -import math_rand9 "math/rand" -import time9 "time" -import github_com_gogo_protobuf_proto5 "github.com/gogo/protobuf/proto" -import math_rand10 "math/rand" -import time10 "time" -import testing10 "testing" -import fmt2 "fmt" -import math_rand11 "math/rand" -import time11 "time" -import testing11 "testing" -import github_com_gogo_protobuf_proto6 "github.com/gogo/protobuf/proto" -import math_rand12 "math/rand" -import time12 "time" -import testing12 "testing" -import fmt3 "fmt" -import go_parser1 "go/parser" -import math_rand13 "math/rand" -import time13 "time" -import testing13 "testing" -import github_com_gogo_protobuf_proto7 "github.com/gogo/protobuf/proto" - -func TestPromiseProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" + +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestPromiseProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromise(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Promise{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestPromiseMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestPromiseMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromise(popr, false) size := p.Size() data := make([]byte, size) @@ -66,25 +66,25 @@ func TestPromiseMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Promise{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkPromiseProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkPromiseProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Promise, 10000) for i := 0; i < 10000; i++ { @@ -92,7 +92,7 @@ func BenchmarkPromiseProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -101,12 +101,12 @@ func BenchmarkPromiseProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPromiseProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkPromiseProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedPromise(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPromise(popr, false)) if err != nil { panic(err) } @@ -116,37 +116,50 @@ func BenchmarkPromiseProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestActionProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestActionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestActionMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestActionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction(popr, false) size := p.Size() data := make([]byte, size) @@ -155,25 +168,25 @@ func TestActionMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkActionProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkActionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action, 10000) for i := 0; i < 10000; i++ { @@ -181,7 +194,7 @@ func BenchmarkActionProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -190,12 +203,12 @@ func BenchmarkActionProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkActionProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkActionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedAction(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAction(popr, false)) if err != nil { panic(err) } @@ -205,37 +218,50 @@ func BenchmarkActionProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestAction_NopProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestAction_NopProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Nop(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Nop{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestAction_NopMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestAction_NopMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Nop(popr, false) size := p.Size() data := make([]byte, size) @@ -244,25 +270,25 @@ func TestAction_NopMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Nop{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkAction_NopProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkAction_NopProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action_Nop, 10000) for i := 0; i < 10000; i++ { @@ -270,7 +296,7 @@ func BenchmarkAction_NopProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -279,12 +305,12 @@ func BenchmarkAction_NopProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAction_NopProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkAction_NopProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedAction_Nop(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAction_Nop(popr, false)) if err != nil { panic(err) } @@ -294,37 +320,50 @@ func BenchmarkAction_NopProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestAction_AppendProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestAction_AppendProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Append(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Append{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestAction_AppendMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestAction_AppendMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Append(popr, false) size := p.Size() data := make([]byte, size) @@ -333,25 +372,25 @@ func TestAction_AppendMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Append{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkAction_AppendProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkAction_AppendProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action_Append, 10000) for i := 0; i < 10000; i++ { @@ -359,7 +398,7 @@ func BenchmarkAction_AppendProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -368,12 +407,12 @@ func BenchmarkAction_AppendProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAction_AppendProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkAction_AppendProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedAction_Append(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAction_Append(popr, false)) if err != nil { panic(err) } @@ -383,37 +422,50 @@ func BenchmarkAction_AppendProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestAction_TruncateProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestAction_TruncateProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Truncate(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Truncate{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestAction_TruncateMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestAction_TruncateMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Truncate(popr, false) size := p.Size() data := make([]byte, size) @@ -422,25 +474,25 @@ func TestAction_TruncateMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Truncate{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkAction_TruncateProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkAction_TruncateProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action_Truncate, 10000) for i := 0; i < 10000; i++ { @@ -448,7 +500,7 @@ func BenchmarkAction_TruncateProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -457,12 +509,12 @@ func BenchmarkAction_TruncateProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAction_TruncateProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkAction_TruncateProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedAction_Truncate(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAction_Truncate(popr, false)) if err != nil { panic(err) } @@ -472,37 +524,50 @@ func BenchmarkAction_TruncateProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestMetadataProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestMetadataProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMetadata(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Metadata{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestMetadataMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestMetadataMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMetadata(popr, false) size := p.Size() data := make([]byte, size) @@ -511,25 +576,25 @@ func TestMetadataMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Metadata{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkMetadataProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkMetadataProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Metadata, 10000) for i := 0; i < 10000; i++ { @@ -537,7 +602,7 @@ func BenchmarkMetadataProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -546,12 +611,12 @@ func BenchmarkMetadataProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkMetadataProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkMetadataProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedMetadata(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMetadata(popr, false)) if err != nil { panic(err) } @@ -561,37 +626,50 @@ func BenchmarkMetadataProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestRecordProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestRecordProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecord(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Record{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestRecordMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestRecordMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecord(popr, false) size := p.Size() data := make([]byte, size) @@ -600,25 +678,25 @@ func TestRecordMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Record{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRecordProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkRecordProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Record, 10000) for i := 0; i < 10000; i++ { @@ -626,7 +704,7 @@ func BenchmarkRecordProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -635,12 +713,12 @@ func BenchmarkRecordProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRecordProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkRecordProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedRecord(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRecord(popr, false)) if err != nil { panic(err) } @@ -650,37 +728,50 @@ func BenchmarkRecordProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestPromiseRequestProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestPromiseRequestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseRequest(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PromiseRequest{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestPromiseRequestMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestPromiseRequestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseRequest(popr, false) size := p.Size() data := make([]byte, size) @@ -689,25 +780,25 @@ func TestPromiseRequestMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PromiseRequest{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkPromiseRequestProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkPromiseRequestProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*PromiseRequest, 10000) for i := 0; i < 10000; i++ { @@ -715,7 +806,7 @@ func BenchmarkPromiseRequestProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -724,12 +815,12 @@ func BenchmarkPromiseRequestProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPromiseRequestProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkPromiseRequestProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedPromiseRequest(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPromiseRequest(popr, false)) if err != nil { panic(err) } @@ -739,37 +830,50 @@ func BenchmarkPromiseRequestProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestPromiseResponseProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestPromiseResponseProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseResponse(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PromiseResponse{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestPromiseResponseMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestPromiseResponseMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseResponse(popr, false) size := p.Size() data := make([]byte, size) @@ -778,25 +882,25 @@ func TestPromiseResponseMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PromiseResponse{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkPromiseResponseProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkPromiseResponseProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*PromiseResponse, 10000) for i := 0; i < 10000; i++ { @@ -804,7 +908,7 @@ func BenchmarkPromiseResponseProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -813,12 +917,12 @@ func BenchmarkPromiseResponseProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPromiseResponseProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkPromiseResponseProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedPromiseResponse(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPromiseResponse(popr, false)) if err != nil { panic(err) } @@ -828,37 +932,50 @@ func BenchmarkPromiseResponseProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestWriteRequestProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestWriteRequestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteRequest(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &WriteRequest{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestWriteRequestMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestWriteRequestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteRequest(popr, false) size := p.Size() data := make([]byte, size) @@ -867,25 +984,25 @@ func TestWriteRequestMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &WriteRequest{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkWriteRequestProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkWriteRequestProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*WriteRequest, 10000) for i := 0; i < 10000; i++ { @@ -893,7 +1010,7 @@ func BenchmarkWriteRequestProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -902,12 +1019,12 @@ func BenchmarkWriteRequestProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkWriteRequestProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkWriteRequestProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedWriteRequest(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWriteRequest(popr, false)) if err != nil { panic(err) } @@ -917,37 +1034,50 @@ func BenchmarkWriteRequestProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestWriteResponseProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestWriteResponseProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteResponse(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &WriteResponse{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestWriteResponseMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestWriteResponseMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteResponse(popr, false) size := p.Size() data := make([]byte, size) @@ -956,25 +1086,25 @@ func TestWriteResponseMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &WriteResponse{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkWriteResponseProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkWriteResponseProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*WriteResponse, 10000) for i := 0; i < 10000; i++ { @@ -982,7 +1112,7 @@ func BenchmarkWriteResponseProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -991,12 +1121,12 @@ func BenchmarkWriteResponseProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkWriteResponseProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkWriteResponseProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedWriteResponse(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWriteResponse(popr, false)) if err != nil { panic(err) } @@ -1006,37 +1136,50 @@ func BenchmarkWriteResponseProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestLearnedMessageProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestLearnedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedLearnedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &LearnedMessage{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestLearnedMessageMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestLearnedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedLearnedMessage(popr, false) size := p.Size() data := make([]byte, size) @@ -1045,25 +1188,25 @@ func TestLearnedMessageMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &LearnedMessage{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkLearnedMessageProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkLearnedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*LearnedMessage, 10000) for i := 0; i < 10000; i++ { @@ -1071,7 +1214,7 @@ func BenchmarkLearnedMessageProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -1080,12 +1223,12 @@ func BenchmarkLearnedMessageProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkLearnedMessageProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkLearnedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedLearnedMessage(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLearnedMessage(popr, false)) if err != nil { panic(err) } @@ -1095,37 +1238,50 @@ func BenchmarkLearnedMessageProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestRecoverRequestProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestRecoverRequestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverRequest(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RecoverRequest{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestRecoverRequestMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestRecoverRequestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverRequest(popr, false) size := p.Size() data := make([]byte, size) @@ -1134,25 +1290,25 @@ func TestRecoverRequestMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RecoverRequest{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRecoverRequestProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkRecoverRequestProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*RecoverRequest, 10000) for i := 0; i < 10000; i++ { @@ -1160,7 +1316,7 @@ func BenchmarkRecoverRequestProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -1169,12 +1325,12 @@ func BenchmarkRecoverRequestProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRecoverRequestProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkRecoverRequestProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedRecoverRequest(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRecoverRequest(popr, false)) if err != nil { panic(err) } @@ -1184,37 +1340,50 @@ func BenchmarkRecoverRequestProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestRecoverResponseProto(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestRecoverResponseProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverResponse(popr, false) - data, err := github_com_gogo_protobuf_proto4.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RecoverResponse{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestRecoverResponseMarshalTo(t *testing7.T) { - popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) +func TestRecoverResponseMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverResponse(popr, false) size := p.Size() data := make([]byte, size) @@ -1223,25 +1392,25 @@ func TestRecoverResponseMarshalTo(t *testing7.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RecoverResponse{} - if err := github_com_gogo_protobuf_proto4.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRecoverResponseProtoMarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkRecoverResponseProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*RecoverResponse, 10000) for i := 0; i < 10000; i++ { @@ -1249,7 +1418,7 @@ func BenchmarkRecoverResponseProtoMarshal(b *testing7.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -1258,12 +1427,12 @@ func BenchmarkRecoverResponseProtoMarshal(b *testing7.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRecoverResponseProtoUnmarshal(b *testing7.B) { - popr := math_rand7.New(math_rand7.NewSource(616)) +func BenchmarkRecoverResponseProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto4.Marshal(NewPopulatedRecoverResponse(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRecoverResponse(popr, false)) if err != nil { panic(err) } @@ -1273,876 +1442,1199 @@ func BenchmarkRecoverResponseProtoUnmarshal(b *testing7.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto4.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestPromiseJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestPromiseJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromise(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Promise{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestActionJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestActionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestAction_NopJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestAction_NopJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Nop(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Nop{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestAction_AppendJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestAction_AppendJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Append(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Append{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestAction_TruncateJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestAction_TruncateJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Truncate(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Action_Truncate{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestMetadataJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestMetadataJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMetadata(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Metadata{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestRecordJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestRecordJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecord(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Record{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestPromiseRequestJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestPromiseRequestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseRequest(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PromiseRequest{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestPromiseResponseJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestPromiseResponseJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseResponse(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &PromiseResponse{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestWriteRequestJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestWriteRequestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteRequest(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &WriteRequest{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestWriteResponseJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestWriteResponseJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteResponse(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &WriteResponse{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestLearnedMessageJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestLearnedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedLearnedMessage(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &LearnedMessage{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestRecoverRequestJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestRecoverRequestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverRequest(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RecoverRequest{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestRecoverResponseJSON(t *testing8.T) { - popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) +func TestRecoverResponseJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverResponse(popr, true) - jsondata, err := encoding_json1.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &RecoverResponse{} - err = encoding_json1.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestPromiseProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestPromiseProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromise(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Promise{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestPromiseProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestPromiseProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromise(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Promise{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestActionProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestActionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Action{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestActionProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestActionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Action{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAction_NopProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestAction_NopProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Nop(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Action_Nop{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAction_NopProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestAction_NopProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Nop(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Action_Nop{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAction_AppendProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestAction_AppendProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Append(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Action_Append{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAction_AppendProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestAction_AppendProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Append(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Action_Append{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAction_TruncateProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestAction_TruncateProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Truncate(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Action_Truncate{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestAction_TruncateProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestAction_TruncateProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Truncate(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Action_Truncate{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestMetadataProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestMetadataProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMetadata(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Metadata{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestMetadataProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestMetadataProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMetadata(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Metadata{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRecordProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestRecordProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecord(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Record{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRecordProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestRecordProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecord(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Record{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestPromiseRequestProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestPromiseRequestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseRequest(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &PromiseRequest{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestPromiseRequestProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestPromiseRequestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseRequest(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &PromiseRequest{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestPromiseResponseProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestPromiseResponseProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseResponse(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &PromiseResponse{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestPromiseResponseProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestPromiseResponseProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseResponse(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &PromiseResponse{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestWriteRequestProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestWriteRequestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteRequest(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &WriteRequest{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestWriteRequestProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestWriteRequestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteRequest(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &WriteRequest{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestWriteResponseProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestWriteResponseProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteResponse(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &WriteResponse{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestWriteResponseProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestWriteResponseProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteResponse(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &WriteResponse{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestLearnedMessageProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestLearnedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedLearnedMessage(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &LearnedMessage{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestLearnedMessageProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestLearnedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedLearnedMessage(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &LearnedMessage{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRecoverRequestProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestRecoverRequestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverRequest(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RecoverRequest{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRecoverRequestProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestRecoverRequestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverRequest(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RecoverRequest{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRecoverResponseProtoText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestRecoverResponseProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverResponse(popr, true) - data := github_com_gogo_protobuf_proto5.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &RecoverResponse{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRecoverResponseProtoCompactText(t *testing9.T) { - popr := math_rand9.New(math_rand9.NewSource(time9.Now().UnixNano())) +func TestRecoverResponseProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverResponse(popr, true) - data := github_com_gogo_protobuf_proto5.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &RecoverResponse{} - if err := github_com_gogo_protobuf_proto5.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestPromiseStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestPromiseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromise(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Promise{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestActionStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestActionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAction_NopStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestAction_NopVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Nop(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action_Nop{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAction_AppendStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestAction_AppendVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Append(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action_Append{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAction_TruncateStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestAction_TruncateVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Truncate(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Action_Truncate{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestMetadataStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestMetadataVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMetadata(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Metadata{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRecordStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestRecordVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecord(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Record{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPromiseRequestStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestPromiseRequestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseRequest(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &PromiseRequest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPromiseResponseStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestPromiseResponseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseResponse(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &PromiseResponse{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestWriteRequestStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestWriteRequestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteRequest(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &WriteRequest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestWriteResponseStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestWriteResponseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteResponse(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) } -} -func TestLearnedMessageStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) + msg := &WriteResponse{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLearnedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLearnedMessage(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &LearnedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRecoverRequestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRecoverRequest(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RecoverRequest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRecoverResponseVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRecoverResponse(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RecoverResponse{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestPromiseGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPromise(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRecoverRequestStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestActionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAction_NopGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction_Nop(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAction_AppendGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction_Append(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAction_TruncateGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAction_Truncate(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMetadataGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMetadata(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRecordGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRecord(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPromiseRequestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPromiseRequest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPromiseResponseGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPromiseResponse(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWriteRequestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWriteRequest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWriteResponseGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWriteResponse(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLearnedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLearnedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRecoverRequestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverRequest(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestRecoverResponseStringer(t *testing10.T) { - popr := math_rand10.New(math_rand10.NewSource(time10.Now().UnixNano())) +func TestRecoverResponseGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverResponse(popr, false) - s1 := p.String() - s2 := fmt2.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestPromiseSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestPromiseSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromise(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkPromiseSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkPromiseSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Promise, 1000) for i := 0; i < 1000; i++ { @@ -2155,29 +2647,30 @@ func BenchmarkPromiseSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestActionSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestActionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkActionSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkActionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action, 1000) for i := 0; i < 1000; i++ { @@ -2190,29 +2683,30 @@ func BenchmarkActionSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestAction_NopSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestAction_NopSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Nop(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkAction_NopSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkAction_NopSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action_Nop, 1000) for i := 0; i < 1000; i++ { @@ -2225,29 +2719,30 @@ func BenchmarkAction_NopSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestAction_AppendSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestAction_AppendSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Append(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkAction_AppendSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkAction_AppendSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action_Append, 1000) for i := 0; i < 1000; i++ { @@ -2260,29 +2755,30 @@ func BenchmarkAction_AppendSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestAction_TruncateSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestAction_TruncateSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAction_Truncate(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkAction_TruncateSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkAction_TruncateSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Action_Truncate, 1000) for i := 0; i < 1000; i++ { @@ -2295,29 +2791,30 @@ func BenchmarkAction_TruncateSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestMetadataSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestMetadataSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMetadata(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkMetadataSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkMetadataSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Metadata, 1000) for i := 0; i < 1000; i++ { @@ -2330,29 +2827,30 @@ func BenchmarkMetadataSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestRecordSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestRecordSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecord(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkRecordSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkRecordSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Record, 1000) for i := 0; i < 1000; i++ { @@ -2365,29 +2863,30 @@ func BenchmarkRecordSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestPromiseRequestSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestPromiseRequestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseRequest(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkPromiseRequestSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkPromiseRequestSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*PromiseRequest, 1000) for i := 0; i < 1000; i++ { @@ -2400,29 +2899,30 @@ func BenchmarkPromiseRequestSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestPromiseResponseSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestPromiseResponseSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedPromiseResponse(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkPromiseResponseSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkPromiseResponseSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*PromiseResponse, 1000) for i := 0; i < 1000; i++ { @@ -2435,29 +2935,30 @@ func BenchmarkPromiseResponseSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestWriteRequestSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestWriteRequestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteRequest(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkWriteRequestSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkWriteRequestSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*WriteRequest, 1000) for i := 0; i < 1000; i++ { @@ -2470,29 +2971,30 @@ func BenchmarkWriteRequestSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestWriteResponseSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestWriteResponseSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedWriteResponse(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkWriteResponseSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkWriteResponseSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*WriteResponse, 1000) for i := 0; i < 1000; i++ { @@ -2505,29 +3007,30 @@ func BenchmarkWriteResponseSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestLearnedMessageSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestLearnedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedLearnedMessage(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkLearnedMessageSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkLearnedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*LearnedMessage, 1000) for i := 0; i < 1000; i++ { @@ -2540,29 +3043,30 @@ func BenchmarkLearnedMessageSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestRecoverRequestSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestRecoverRequestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverRequest(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkRecoverRequestSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkRecoverRequestSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*RecoverRequest, 1000) for i := 0; i < 1000; i++ { @@ -2575,29 +3079,30 @@ func BenchmarkRecoverRequestSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestRecoverResponseSize(t *testing11.T) { - popr := math_rand11.New(math_rand11.NewSource(time11.Now().UnixNano())) +func TestRecoverResponseSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedRecoverResponse(popr, true) - size2 := github_com_gogo_protobuf_proto6.Size(p) - data, err := github_com_gogo_protobuf_proto6.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto6.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkRecoverResponseSize(b *testing11.B) { - popr := math_rand11.New(math_rand11.NewSource(616)) +func BenchmarkRecoverResponseSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*RecoverResponse, 1000) for i := 0; i < 1000; i++ { @@ -2610,396 +3115,130 @@ func BenchmarkRecoverResponseSize(b *testing11.B) { b.SetBytes(int64(total / b.N)) } -func TestPromiseGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestPromiseStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromise(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestActionGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestActionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAction_NopGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestAction_NopStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Nop(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAction_AppendGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestAction_AppendStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Append(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestAction_TruncateGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestAction_TruncateStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedAction_Truncate(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestMetadataGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestMetadataStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMetadata(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRecordGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestRecordStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecord(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPromiseRequestGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestPromiseRequestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseRequest(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestPromiseResponseGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestPromiseResponseStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedPromiseResponse(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestWriteRequestGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestWriteRequestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteRequest(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestWriteResponseGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestWriteResponseStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedWriteResponse(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestLearnedMessageGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestLearnedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedLearnedMessage(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRecoverRequestGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestRecoverRequestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverRequest(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRecoverResponseGoString(t *testing12.T) { - popr := math_rand12.New(math_rand12.NewSource(time12.Now().UnixNano())) +func TestRecoverResponseStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRecoverResponse(popr, false) - s1 := p.GoString() - s2 := fmt3.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser1.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestPromiseVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedPromise(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &Promise{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestActionVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedAction(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAction_NopVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedAction_Nop(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action_Nop{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAction_AppendVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedAction_Append(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action_Append{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAction_TruncateVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedAction_Truncate(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &Action_Truncate{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMetadataVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedMetadata(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &Metadata{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRecordVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedRecord(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &Record{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPromiseRequestVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedPromiseRequest(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &PromiseRequest{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPromiseResponseVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedPromiseResponse(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &PromiseResponse{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWriteRequestVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedWriteRequest(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &WriteRequest{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestWriteResponseVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedWriteResponse(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &WriteResponse{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestLearnedMessageVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedLearnedMessage(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &LearnedMessage{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRecoverRequestVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedRecoverRequest(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &RecoverRequest{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRecoverResponseVerboseEqual(t *testing13.T) { - popr := math_rand13.New(math_rand13.NewSource(time13.Now().UnixNano())) - p := NewPopulatedRecoverResponse(popr, false) - data, err := github_com_gogo_protobuf_proto7.Marshal(p) - if err != nil { - panic(err) - } - msg := &RecoverResponse{} - if err := github_com_gogo_protobuf_proto7.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("String want %v got %v", s1, s2) } } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.pb.go index a39d1cc6..007d24d3 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.pb.go @@ -5,33 +5,24 @@ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" -import io "io" -import math1 "math" -import fmt "fmt" -import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import bytes "bytes" -import fmt1 "fmt" import strings "strings" -import reflect "reflect" - -import math2 "math" - -import fmt2 "fmt" -import strings1 "strings" -import github_com_gogo_protobuf_proto1 "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" import sort "sort" import strconv "strconv" -import reflect1 "reflect" +import reflect "reflect" -import fmt3 "fmt" -import bytes "bytes" +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf // * @@ -92,9 +83,7 @@ const ( TaskState_TASK_FAILED TaskState = 3 TaskState_TASK_KILLED TaskState = 4 TaskState_TASK_LOST TaskState = 5 - // TASK_ERROR is currently unused but will be introduced in 0.22.0. - // TODO(dhamon): Start using TASK_ERROR. - TaskState_TASK_ERROR TaskState = 7 + TaskState_TASK_ERROR TaskState = 7 ) var TaskState_name = map[int32]string{ @@ -135,6 +124,39 @@ func (x *TaskState) UnmarshalJSON(data []byte) error { return nil } +type FrameworkInfo_Capability_Type int32 + +const ( + // Receive offers with revocable resources. See 'Resource' + // message for details. + // TODO(vinod): This is currently a no-op. + FrameworkInfo_Capability_REVOCABLE_RESOURCES FrameworkInfo_Capability_Type = 1 +) + +var FrameworkInfo_Capability_Type_name = map[int32]string{ + 1: "REVOCABLE_RESOURCES", +} +var FrameworkInfo_Capability_Type_value = map[string]int32{ + "REVOCABLE_RESOURCES": 1, +} + +func (x FrameworkInfo_Capability_Type) Enum() *FrameworkInfo_Capability_Type { + p := new(FrameworkInfo_Capability_Type) + *p = x + return p +} +func (x FrameworkInfo_Capability_Type) String() string { + return proto.EnumName(FrameworkInfo_Capability_Type_name, int32(x)) +} +func (x *FrameworkInfo_Capability_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FrameworkInfo_Capability_Type_value, data, "FrameworkInfo_Capability_Type") + if err != nil { + return err + } + *x = FrameworkInfo_Capability_Type(value) + return nil +} + type Value_Type int32 const ( @@ -174,7 +196,49 @@ func (x *Value_Type) UnmarshalJSON(data []byte) error { return nil } -// * Describes the source of the task status update. +type Offer_Operation_Type int32 + +const ( + Offer_Operation_LAUNCH Offer_Operation_Type = 1 + Offer_Operation_RESERVE Offer_Operation_Type = 2 + Offer_Operation_UNRESERVE Offer_Operation_Type = 3 + Offer_Operation_CREATE Offer_Operation_Type = 4 + Offer_Operation_DESTROY Offer_Operation_Type = 5 +) + +var Offer_Operation_Type_name = map[int32]string{ + 1: "LAUNCH", + 2: "RESERVE", + 3: "UNRESERVE", + 4: "CREATE", + 5: "DESTROY", +} +var Offer_Operation_Type_value = map[string]int32{ + "LAUNCH": 1, + "RESERVE": 2, + "UNRESERVE": 3, + "CREATE": 4, + "DESTROY": 5, +} + +func (x Offer_Operation_Type) Enum() *Offer_Operation_Type { + p := new(Offer_Operation_Type) + *p = x + return p +} +func (x Offer_Operation_Type) String() string { + return proto.EnumName(Offer_Operation_Type_name, int32(x)) +} +func (x *Offer_Operation_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Offer_Operation_Type_value, data, "Offer_Operation_Type") + if err != nil { + return err + } + *x = Offer_Operation_Type(value) + return nil +} + +// Describes the source of the task status update. type TaskStatus_Source int32 const ( @@ -211,11 +275,15 @@ func (x *TaskStatus_Source) UnmarshalJSON(data []byte) error { return nil } -// * Detailed reason for the task status update. +// Detailed reason for the task status update. +// +// TODO(bmahler): Differentiate between slave removal reasons +// (e.g. unhealthy vs. unregistered for maintenance). type TaskStatus_Reason int32 const ( TaskStatus_REASON_COMMAND_EXECUTOR_FAILED TaskStatus_Reason = 0 + TaskStatus_REASON_EXECUTOR_PREEMPTED TaskStatus_Reason = 17 TaskStatus_REASON_EXECUTOR_TERMINATED TaskStatus_Reason = 1 TaskStatus_REASON_EXECUTOR_UNREGISTERED TaskStatus_Reason = 2 TaskStatus_REASON_FRAMEWORK_REMOVED TaskStatus_Reason = 3 @@ -225,6 +293,7 @@ const ( TaskStatus_REASON_MASTER_DISCONNECTED TaskStatus_Reason = 7 TaskStatus_REASON_MEMORY_LIMIT TaskStatus_Reason = 8 TaskStatus_REASON_RECONCILIATION TaskStatus_Reason = 9 + TaskStatus_REASON_RESOURCES_UNKNOWN TaskStatus_Reason = 18 TaskStatus_REASON_SLAVE_DISCONNECTED TaskStatus_Reason = 10 TaskStatus_REASON_SLAVE_REMOVED TaskStatus_Reason = 11 TaskStatus_REASON_SLAVE_RESTARTED TaskStatus_Reason = 12 @@ -236,6 +305,7 @@ const ( var TaskStatus_Reason_name = map[int32]string{ 0: "REASON_COMMAND_EXECUTOR_FAILED", + 17: "REASON_EXECUTOR_PREEMPTED", 1: "REASON_EXECUTOR_TERMINATED", 2: "REASON_EXECUTOR_UNREGISTERED", 3: "REASON_FRAMEWORK_REMOVED", @@ -245,6 +315,7 @@ var TaskStatus_Reason_name = map[int32]string{ 7: "REASON_MASTER_DISCONNECTED", 8: "REASON_MEMORY_LIMIT", 9: "REASON_RECONCILIATION", + 18: "REASON_RESOURCES_UNKNOWN", 10: "REASON_SLAVE_DISCONNECTED", 11: "REASON_SLAVE_REMOVED", 12: "REASON_SLAVE_RESTARTED", @@ -255,6 +326,7 @@ var TaskStatus_Reason_name = map[int32]string{ } var TaskStatus_Reason_value = map[string]int32{ "REASON_COMMAND_EXECUTOR_FAILED": 0, + "REASON_EXECUTOR_PREEMPTED": 17, "REASON_EXECUTOR_TERMINATED": 1, "REASON_EXECUTOR_UNREGISTERED": 2, "REASON_FRAMEWORK_REMOVED": 3, @@ -264,6 +336,7 @@ var TaskStatus_Reason_value = map[string]int32{ "REASON_MASTER_DISCONNECTED": 7, "REASON_MEMORY_LIMIT": 8, "REASON_RECONCILIATION": 9, + "REASON_RESOURCES_UNKNOWN": 18, "REASON_SLAVE_DISCONNECTED": 10, "REASON_SLAVE_REMOVED": 11, "REASON_SLAVE_RESTARTED": 12, @@ -430,6 +503,42 @@ func (x *ContainerInfo_DockerInfo_Network) UnmarshalJSON(data []byte) error { return nil } +type DiscoveryInfo_Visibility int32 + +const ( + DiscoveryInfo_FRAMEWORK DiscoveryInfo_Visibility = 0 + DiscoveryInfo_CLUSTER DiscoveryInfo_Visibility = 1 + DiscoveryInfo_EXTERNAL DiscoveryInfo_Visibility = 2 +) + +var DiscoveryInfo_Visibility_name = map[int32]string{ + 0: "FRAMEWORK", + 1: "CLUSTER", + 2: "EXTERNAL", +} +var DiscoveryInfo_Visibility_value = map[string]int32{ + "FRAMEWORK": 0, + "CLUSTER": 1, + "EXTERNAL": 2, +} + +func (x DiscoveryInfo_Visibility) Enum() *DiscoveryInfo_Visibility { + p := new(DiscoveryInfo_Visibility) + *p = x + return p +} +func (x DiscoveryInfo_Visibility) String() string { + return proto.EnumName(DiscoveryInfo_Visibility_name, int32(x)) +} +func (x *DiscoveryInfo_Visibility) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(DiscoveryInfo_Visibility_value, data, "DiscoveryInfo_Visibility") + if err != nil { + return err + } + *x = DiscoveryInfo_Visibility(value) + return nil +} + // * // A unique ID assigned to a framework. A framework can reuse this ID // in order to do failover (see MesosSchedulerDriver). @@ -544,41 +653,51 @@ func (m *ContainerID) GetValue() string { } // * -// Describes a framework. The user field is used to determine the -// Unix user that an executor/task should be launched as. If the user -// field is set to an empty string Mesos will automagically set it -// to the current user. Note that the ID is only available after a -// framework has registered, however, it is included here in order to -// facilitate scheduler failover (i.e., if it is set then the -// MesosSchedulerDriver expects the scheduler is performing failover). -// The amount of time that the master will wait for the scheduler to -// failover before removing the framework is specified by -// failover_timeout. If checkpoint is set, framework pid, executor -// pids and status updates are checkpointed to disk by the slaves. -// Checkpointing allows a restarted slave to reconnect with old -// executors and recover status updates, at the cost of disk I/O. -// The role field is used to group frameworks for allocation -// decisions, depending on the allocation policy being used. -// If the hostname field is set to an empty string Mesos will -// automagically set it to the current hostname. -// The principal field should match the credential the framework uses -// in authentication. This field is used for framework API rate -// exporting and limiting and should be set even if authentication is -// not enabled if these features are desired. -// The webui_url field allows a framework to advertise its web UI, so -// that the Mesos web UI can link to it. It is expected to be a full -// URL, for example http://my-scheduler.example.com:8080/. +// Describes a framework. type FrameworkInfo struct { - User *string `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Id *FrameworkID `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"` - FailoverTimeout *float64 `protobuf:"fixed64,4,opt,name=failover_timeout,def=0" json:"failover_timeout,omitempty"` - Checkpoint *bool `protobuf:"varint,5,opt,name=checkpoint,def=0" json:"checkpoint,omitempty"` - Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` - Hostname *string `protobuf:"bytes,7,opt,name=hostname" json:"hostname,omitempty"` - Principal *string `protobuf:"bytes,8,opt,name=principal" json:"principal,omitempty"` - WebuiUrl *string `protobuf:"bytes,9,opt,name=webui_url" json:"webui_url,omitempty"` - XXX_unrecognized []byte `json:"-"` + // Used to determine the Unix user that an executor or task should + // be launched as. If the user field is set to an empty string Mesos + // will automagically set it to the current user. + User *string `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` + // Name of the framework that shows up in the Mesos Web UI. + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + // Note that 'id' is only available after a framework has + // registered, however, it is included here in order to facilitate + // scheduler failover (i.e., if it is set then the + // MesosSchedulerDriver expects the scheduler is performing + // failover). + Id *FrameworkID `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"` + // The amount of time that the master will wait for the scheduler to + // failover before it tears down the framework by killing all its + // tasks/executors. This should be non-zero if a framework expects + // to reconnect after a failover and not lose its tasks/executors. + FailoverTimeout *float64 `protobuf:"fixed64,4,opt,name=failover_timeout,def=0" json:"failover_timeout,omitempty"` + // If set, framework pid, executor pids and status updates are + // checkpointed to disk by the slaves. Checkpointing allows a + // restarted slave to reconnect with old executors and recover + // status updates, at the cost of disk I/O. + Checkpoint *bool `protobuf:"varint,5,opt,name=checkpoint,def=0" json:"checkpoint,omitempty"` + // Used to group frameworks for allocation decisions, depending on + // the allocation policy being used. + Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` + // Used to indicate the current host from which the scheduler is + // registered in the Mesos Web UI. If set to an empty string Mesos + // will automagically set it to the current hostname. + Hostname *string `protobuf:"bytes,7,opt,name=hostname" json:"hostname,omitempty"` + // This field should match the credential's principal the framework + // uses for authentication. This field is used for framework API + // rate limiting and dynamic reservations. It should be set even + // if authentication is not enabled if these features are desired. + Principal *string `protobuf:"bytes,8,opt,name=principal" json:"principal,omitempty"` + // This field allows a framework to advertise its web UI, so that + // the Mesos web UI can link to it. It is expected to be a full URL, + // for example http://my-scheduler.example.com:8080/. + WebuiUrl *string `protobuf:"bytes,9,opt,name=webui_url" json:"webui_url,omitempty"` + // This field allows a framework to advertise its set of + // capabilities (e.g., ability to receive offers for revocable + // resources). + Capabilities []*FrameworkInfo_Capability `protobuf:"bytes,10,rep,name=capabilities" json:"capabilities,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *FrameworkInfo) Reset() { *m = FrameworkInfo{} } @@ -651,12 +770,35 @@ func (m *FrameworkInfo) GetWebuiUrl() string { return "" } +func (m *FrameworkInfo) GetCapabilities() []*FrameworkInfo_Capability { + if m != nil { + return m.Capabilities + } + return nil +} + +type FrameworkInfo_Capability struct { + Type *FrameworkInfo_Capability_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.FrameworkInfo_Capability_Type" json:"type,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FrameworkInfo_Capability) Reset() { *m = FrameworkInfo_Capability{} } +func (*FrameworkInfo_Capability) ProtoMessage() {} + +func (m *FrameworkInfo_Capability) GetType() FrameworkInfo_Capability_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return FrameworkInfo_Capability_REVOCABLE_RESOURCES +} + // * // Describes a health check for a task or executor (or any arbitrary // process/command). A "strategy" is picked by specifying one of the -// optional fields, currently only 'http' and 'command' are -// supported. Specifying more than one strategy is an error. +// optional fields; currently only 'command' is supported. +// Specifying more than one strategy is an error. type HealthCheck struct { + // HTTP health check - not yet recommended for use, see MESOS-2533. Http *HealthCheck_HTTP `protobuf:"bytes,1,opt,name=http" json:"http,omitempty"` // Amount of time to wait until starting the health checks. DelaySeconds *float64 `protobuf:"fixed64,2,opt,name=delay_seconds,def=15" json:"delay_seconds,omitempty"` @@ -731,7 +873,8 @@ func (m *HealthCheck) GetCommand() *CommandInfo { return nil } -// Describes an HTTP health check. +// Describes an HTTP health check. This is not fully implemented and not +// recommended for use - see MESOS-2533. type HealthCheck_HTTP struct { // Port to send the HTTP request. Port *uint32 `protobuf:"varint,1,req,name=port" json:"port,omitempty"` @@ -862,10 +1005,25 @@ func (m *CommandInfo) GetUser() string { } type CommandInfo_URI struct { - Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - Executable *bool `protobuf:"varint,2,opt,name=executable" json:"executable,omitempty"` - Extract *bool `protobuf:"varint,3,opt,name=extract,def=1" json:"extract,omitempty"` - XXX_unrecognized []byte `json:"-"` + Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` + Executable *bool `protobuf:"varint,2,opt,name=executable" json:"executable,omitempty"` + // In case the fetched file is recognized as an archive, extract + // its contents into the sandbox. Note that a cached archive is + // not copied from the cache to the sandbox in case extraction + // originates from an archive in the cache. + Extract *bool `protobuf:"varint,3,opt,name=extract,def=1" json:"extract,omitempty"` + // If this field is "true", the fetcher cache will be used. If not, + // fetching bypasses the cache and downloads directly into the + // sandbox directory, no matter whether a suitable cache file is + // available or not. The former directs the fetcher to download to + // the file cache, then copy from there to the sandbox. Subsequent + // fetch attempts with the same URI will omit downloading and copy + // from the cache as long as the file is resident there. Cache files + // may get evicted at any time, which then leads to renewed + // downloading. See also "docs/fetcher.md" and + // "docs/fetcher-cache-internals.md". + Cache *bool `protobuf:"varint,4,opt,name=cache" json:"cache,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *CommandInfo_URI) Reset() { *m = CommandInfo_URI{} } @@ -894,6 +1052,13 @@ func (m *CommandInfo_URI) GetExtract() bool { return Default_CommandInfo_URI_Extract } +func (m *CommandInfo_URI) GetCache() bool { + if m != nil && m.Cache != nil { + return *m.Cache + } + return false +} + // Describes a container. // Not all containerizers currently implement ContainerInfo, so it // is possible that a launched task will fail due to supplying this @@ -947,9 +1112,14 @@ type ExecutorInfo struct { // NOTE: Source is exposed alongside the resource usage of the // executor via JSON on the slave. This allows users to import // usage information into a time series database for monitoring. - Source *string `protobuf:"bytes,10,opt,name=source" json:"source,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` + Source *string `protobuf:"bytes,10,opt,name=source" json:"source,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data" json:"data,omitempty"` + // Service discovery information for the executor. It is not + // interpreted or acted upon by Mesos. It is up to a service + // discovery system to use this information as needed and to handle + // executors without service discovery information. + Discovery *DiscoveryInfo `protobuf:"bytes,12,opt,name=discovery" json:"discovery,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ExecutorInfo) Reset() { *m = ExecutorInfo{} } @@ -1011,6 +1181,13 @@ func (m *ExecutorInfo) GetData() []byte { return nil } +func (m *ExecutorInfo) GetDiscovery() *DiscoveryInfo { + if m != nil { + return m.Discovery + } + return nil +} + // * // Describes a master. This will probably have more fields in the // future which might be used, for example, to link a framework webui @@ -1021,6 +1198,7 @@ type MasterInfo struct { Port *uint32 `protobuf:"varint,3,req,name=port,def=5050" json:"port,omitempty"` Pid *string `protobuf:"bytes,4,opt,name=pid" json:"pid,omitempty"` Hostname *string `protobuf:"bytes,5,opt,name=hostname" json:"hostname,omitempty"` + Version *string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -1064,6 +1242,13 @@ func (m *MasterInfo) GetHostname() string { return "" } +func (m *MasterInfo) GetVersion() string { + if m != nil && m.Version != nil { + return *m.Version + } + return "" +} + // * // Describes a slave. Note that the 'id' field is only available after // a slave is registered with the master, and is made available here @@ -1071,13 +1256,15 @@ func (m *MasterInfo) GetHostname() string { // checkpointing its own information and potentially frameworks' // information (if a framework has checkpointing enabled). type SlaveInfo struct { - Hostname *string `protobuf:"bytes,1,req,name=hostname" json:"hostname,omitempty"` - Port *int32 `protobuf:"varint,8,opt,name=port,def=5051" json:"port,omitempty"` - Resources []*Resource `protobuf:"bytes,3,rep,name=resources" json:"resources,omitempty"` - Attributes []*Attribute `protobuf:"bytes,5,rep,name=attributes" json:"attributes,omitempty"` - Id *SlaveID `protobuf:"bytes,6,opt,name=id" json:"id,omitempty"` - Checkpoint *bool `protobuf:"varint,7,opt,name=checkpoint,def=0" json:"checkpoint,omitempty"` - XXX_unrecognized []byte `json:"-"` + Hostname *string `protobuf:"bytes,1,req,name=hostname" json:"hostname,omitempty"` + Port *int32 `protobuf:"varint,8,opt,name=port,def=5051" json:"port,omitempty"` + Resources []*Resource `protobuf:"bytes,3,rep,name=resources" json:"resources,omitempty"` + Attributes []*Attribute `protobuf:"bytes,5,rep,name=attributes" json:"attributes,omitempty"` + Id *SlaveID `protobuf:"bytes,6,opt,name=id" json:"id,omitempty"` + // TODO(joerg84): Remove checkpoint field as with 0.22.0 + // slave checkpointing is enabled for all slaves (MESOS-2317). + Checkpoint *bool `protobuf:"varint,7,opt,name=checkpoint,def=0" json:"checkpoint,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *SlaveInfo) Reset() { *m = SlaveInfo{} } @@ -1329,13 +1516,25 @@ func (m *Attribute) GetText() *Value_Text { // TODO(benh): Add better support for "expected" resources (e.g., // cpus, memory, disk, network). type Resource struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Type *Value_Type `protobuf:"varint,2,req,name=type,enum=mesosproto.Value_Type" json:"type,omitempty"` - Scalar *Value_Scalar `protobuf:"bytes,3,opt,name=scalar" json:"scalar,omitempty"` - Ranges *Value_Ranges `protobuf:"bytes,4,opt,name=ranges" json:"ranges,omitempty"` - Set *Value_Set `protobuf:"bytes,5,opt,name=set" json:"set,omitempty"` - Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` - XXX_unrecognized []byte `json:"-"` + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Type *Value_Type `protobuf:"varint,2,req,name=type,enum=mesosproto.Value_Type" json:"type,omitempty"` + Scalar *Value_Scalar `protobuf:"bytes,3,opt,name=scalar" json:"scalar,omitempty"` + Ranges *Value_Ranges `protobuf:"bytes,4,opt,name=ranges" json:"ranges,omitempty"` + Set *Value_Set `protobuf:"bytes,5,opt,name=set" json:"set,omitempty"` + Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` + // If this is set, this resource was dynamically reserved by an + // operator or a framework. Otherwise, this resource is either unreserved + // or statically reserved by an operator via the --resources flag. + Reservation *Resource_ReservationInfo `protobuf:"bytes,8,opt,name=reservation" json:"reservation,omitempty"` + Disk *Resource_DiskInfo `protobuf:"bytes,7,opt,name=disk" json:"disk,omitempty"` + // If this is set, the resources are revocable, i.e., any tasks or + // executors launched using these resources could get preempted or + // throttled at any time. This could be used by frameworks to run + // best effort tasks that do not need strict uptime or performance + // guarantees. Note that if this is set, 'disk' or 'reservation' + // cannot be set. + Revocable *Resource_RevocableInfo `protobuf:"bytes,9,opt,name=revocable" json:"revocable,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Resource) Reset() { *m = Resource{} } @@ -1385,10 +1584,232 @@ func (m *Resource) GetRole() string { return Default_Resource_Role } +func (m *Resource) GetReservation() *Resource_ReservationInfo { + if m != nil { + return m.Reservation + } + return nil +} + +func (m *Resource) GetDisk() *Resource_DiskInfo { + if m != nil { + return m.Disk + } + return nil +} + +func (m *Resource) GetRevocable() *Resource_RevocableInfo { + if m != nil { + return m.Revocable + } + return nil +} + +type Resource_ReservationInfo struct { + // This field indicates the principal of the operator or framework + // that reserved this resource. It is used in conjunction with the + // "unreserve" ACL to determine whether the entity attempting to + // unreserve this resource is permitted to do so. + // NOTE: This field should match the FrameworkInfo.principal of + // the framework that reserved this resource. + Principal *string `protobuf:"bytes,1,req,name=principal" json:"principal,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Resource_ReservationInfo) Reset() { *m = Resource_ReservationInfo{} } +func (*Resource_ReservationInfo) ProtoMessage() {} + +func (m *Resource_ReservationInfo) GetPrincipal() string { + if m != nil && m.Principal != nil { + return *m.Principal + } + return "" +} + +type Resource_DiskInfo struct { + Persistence *Resource_DiskInfo_Persistence `protobuf:"bytes,1,opt,name=persistence" json:"persistence,omitempty"` + // Describes how this disk resource will be mounted in the + // container. If not set, the disk resource will be used as the + // sandbox. Otherwise, it will be mounted according to the + // 'container_path' inside 'volume'. The 'host_path' inside + // 'volume' is ignored. + // NOTE: If 'volume' is set but 'persistence' is not set, the + // volume will be automatically garbage collected after + // task/executor terminates. Currently, if 'persistence' is set, + // 'volume' must be set. + Volume *Volume `protobuf:"bytes,2,opt,name=volume" json:"volume,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Resource_DiskInfo) Reset() { *m = Resource_DiskInfo{} } +func (*Resource_DiskInfo) ProtoMessage() {} + +func (m *Resource_DiskInfo) GetPersistence() *Resource_DiskInfo_Persistence { + if m != nil { + return m.Persistence + } + return nil +} + +func (m *Resource_DiskInfo) GetVolume() *Volume { + if m != nil { + return m.Volume + } + return nil +} + +// Describes a persistent disk volume. +// A persistent disk volume will not be automatically garbage +// collected if the task/executor/slave terminates, but is +// re-offered to the framework(s) belonging to the 'role'. +// A framework can set the ID (if it is not set yet) to express +// the intention to create a new persistent disk volume from a +// regular disk resource. To reuse a previously created volume, a +// framework can launch a task/executor when it receives an offer +// with a persistent volume, i.e., ID is set. +// NOTE: Currently, we do not allow a persistent disk volume +// without a reservation (i.e., 'role' should not be '*'). +type Resource_DiskInfo_Persistence struct { + // A unique ID for the persistent disk volume. + // NOTE: The ID needs to be unique per role on each slave. + Id *string `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Resource_DiskInfo_Persistence) Reset() { *m = Resource_DiskInfo_Persistence{} } +func (*Resource_DiskInfo_Persistence) ProtoMessage() {} + +func (m *Resource_DiskInfo_Persistence) GetId() string { + if m != nil && m.Id != nil { + return *m.Id + } + return "" +} + +type Resource_RevocableInfo struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Resource_RevocableInfo) Reset() { *m = Resource_RevocableInfo{} } +func (*Resource_RevocableInfo) ProtoMessage() {} + +// * +// When the network bandwidth caps are enabled and the container +// is over its limit, outbound packets may be either delayed or +// dropped completely either because it exceeds the maximum bandwidth +// allocation for a single container (the cap) or because the combined +// network traffic of multiple containers on the host exceeds the +// transmit capacity of the host (the share). We can report the +// following statistics for each of these conditions exported directly +// from the Linux Traffic Control Queueing Discipline. // +// id : name of the limiter, e.g. 'tx_bw_cap' +// backlog : number of packets currently delayed +// bytes : total bytes seen +// drops : number of packets dropped in total +// overlimits : number of packets which exceeded allocation +// packets : total packets seen +// qlen : number of packets currently queued +// rate_bps : throughput in bytes/sec +// rate_pps : throughput in packets/sec +// requeues : number of times a packet has been delayed due to +// locking or device contention issues +// +// More information on the operation of Linux Traffic Control can be +// found at http://www.lartc.org/lartc.html. +type TrafficControlStatistics struct { + Id *string `protobuf:"bytes,1,req,name=id" json:"id,omitempty"` + Backlog *uint64 `protobuf:"varint,2,opt,name=backlog" json:"backlog,omitempty"` + Bytes *uint64 `protobuf:"varint,3,opt,name=bytes" json:"bytes,omitempty"` + Drops *uint64 `protobuf:"varint,4,opt,name=drops" json:"drops,omitempty"` + Overlimits *uint64 `protobuf:"varint,5,opt,name=overlimits" json:"overlimits,omitempty"` + Packets *uint64 `protobuf:"varint,6,opt,name=packets" json:"packets,omitempty"` + Qlen *uint64 `protobuf:"varint,7,opt,name=qlen" json:"qlen,omitempty"` + Ratebps *uint64 `protobuf:"varint,8,opt,name=ratebps" json:"ratebps,omitempty"` + Ratepps *uint64 `protobuf:"varint,9,opt,name=ratepps" json:"ratepps,omitempty"` + Requeues *uint64 `protobuf:"varint,10,opt,name=requeues" json:"requeues,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TrafficControlStatistics) Reset() { *m = TrafficControlStatistics{} } +func (*TrafficControlStatistics) ProtoMessage() {} + +func (m *TrafficControlStatistics) GetId() string { + if m != nil && m.Id != nil { + return *m.Id + } + return "" +} + +func (m *TrafficControlStatistics) GetBacklog() uint64 { + if m != nil && m.Backlog != nil { + return *m.Backlog + } + return 0 +} + +func (m *TrafficControlStatistics) GetBytes() uint64 { + if m != nil && m.Bytes != nil { + return *m.Bytes + } + return 0 +} + +func (m *TrafficControlStatistics) GetDrops() uint64 { + if m != nil && m.Drops != nil { + return *m.Drops + } + return 0 +} + +func (m *TrafficControlStatistics) GetOverlimits() uint64 { + if m != nil && m.Overlimits != nil { + return *m.Overlimits + } + return 0 +} + +func (m *TrafficControlStatistics) GetPackets() uint64 { + if m != nil && m.Packets != nil { + return *m.Packets + } + return 0 +} + +func (m *TrafficControlStatistics) GetQlen() uint64 { + if m != nil && m.Qlen != nil { + return *m.Qlen + } + return 0 +} + +func (m *TrafficControlStatistics) GetRatebps() uint64 { + if m != nil && m.Ratebps != nil { + return *m.Ratebps + } + return 0 +} + +func (m *TrafficControlStatistics) GetRatepps() uint64 { + if m != nil && m.Ratepps != nil { + return *m.Ratepps + } + return 0 +} + +func (m *TrafficControlStatistics) GetRequeues() uint64 { + if m != nil && m.Requeues != nil { + return *m.Requeues + } + return 0 +} + +// * // A snapshot of resource usage statistics. type ResourceStatistics struct { Timestamp *float64 `protobuf:"fixed64,1,req,name=timestamp" json:"timestamp,omitempty"` + Processes *uint32 `protobuf:"varint,30,opt,name=processes" json:"processes,omitempty"` + Threads *uint32 `protobuf:"varint,31,opt,name=threads" json:"threads,omitempty"` // CPU Usage Information: // Total CPU time spent in user mode, and kernel mode. CpusUserTimeSecs *float64 `protobuf:"fixed64,2,opt,name=cpus_user_time_secs" json:"cpus_user_time_secs,omitempty"` @@ -1399,14 +1820,42 @@ type ResourceStatistics struct { CpusNrPeriods *uint32 `protobuf:"varint,7,opt,name=cpus_nr_periods" json:"cpus_nr_periods,omitempty"` CpusNrThrottled *uint32 `protobuf:"varint,8,opt,name=cpus_nr_throttled" json:"cpus_nr_throttled,omitempty"` CpusThrottledTimeSecs *float64 `protobuf:"fixed64,9,opt,name=cpus_throttled_time_secs" json:"cpus_throttled_time_secs,omitempty"` - // Memory Usage Information: - MemRssBytes *uint64 `protobuf:"varint,5,opt,name=mem_rss_bytes" json:"mem_rss_bytes,omitempty"` - // Amount of memory resources allocated. + // mem_total_bytes was added in 0.23.0 to represent the total memory + // of a process in RAM (as opposed to in Swap). This was previously + // reported as mem_rss_bytes, which was also changed in 0.23.0 to + // represent only the anonymous memory usage, to keep in sync with + // Linux kernel's (arguably erroneous) use of terminology. + MemTotalBytes *uint64 `protobuf:"varint,36,opt,name=mem_total_bytes" json:"mem_total_bytes,omitempty"` + // Total memory + swap usage. This is set if swap is enabled. + MemTotalMemswBytes *uint64 `protobuf:"varint,37,opt,name=mem_total_memsw_bytes" json:"mem_total_memsw_bytes,omitempty"` + // Hard memory limit for a container. MemLimitBytes *uint64 `protobuf:"varint,6,opt,name=mem_limit_bytes" json:"mem_limit_bytes,omitempty"` - // Broken out memory usage information (files, anonymous, and mmaped files) - MemFileBytes *uint64 `protobuf:"varint,10,opt,name=mem_file_bytes" json:"mem_file_bytes,omitempty"` - MemAnonBytes *uint64 `protobuf:"varint,11,opt,name=mem_anon_bytes" json:"mem_anon_bytes,omitempty"` + // Soft memory limit for a container. + MemSoftLimitBytes *uint64 `protobuf:"varint,38,opt,name=mem_soft_limit_bytes" json:"mem_soft_limit_bytes,omitempty"` + // TODO(chzhcn) mem_file_bytes and mem_anon_bytes are deprecated in + // 0.23.0 and will be removed in 0.24.0. + MemFileBytes *uint64 `protobuf:"varint,10,opt,name=mem_file_bytes" json:"mem_file_bytes,omitempty"` + MemAnonBytes *uint64 `protobuf:"varint,11,opt,name=mem_anon_bytes" json:"mem_anon_bytes,omitempty"` + // mem_cache_bytes is added in 0.23.0 to represent page cache usage. + MemCacheBytes *uint64 `protobuf:"varint,39,opt,name=mem_cache_bytes" json:"mem_cache_bytes,omitempty"` + // Since 0.23.0, mem_rss_bytes is changed to represent only + // anonymous memory usage. Note that neither its requiredness, type, + // name nor numeric tag has been changed. + MemRssBytes *uint64 `protobuf:"varint,5,opt,name=mem_rss_bytes" json:"mem_rss_bytes,omitempty"` MemMappedFileBytes *uint64 `protobuf:"varint,12,opt,name=mem_mapped_file_bytes" json:"mem_mapped_file_bytes,omitempty"` + // This is only set if swap is enabled. + MemSwapBytes *uint64 `protobuf:"varint,40,opt,name=mem_swap_bytes" json:"mem_swap_bytes,omitempty"` + // Number of occurrences of different levels of memory pressure + // events reported by memory cgroup. Pressure listening (re)starts + // with these values set to 0 when slave (re)starts. See + // https://www.kernel.org/doc/Documentation/cgroups/memory.txt for + // more details. + MemLowPressureCounter *uint64 `protobuf:"varint,32,opt,name=mem_low_pressure_counter" json:"mem_low_pressure_counter,omitempty"` + MemMediumPressureCounter *uint64 `protobuf:"varint,33,opt,name=mem_medium_pressure_counter" json:"mem_medium_pressure_counter,omitempty"` + MemCriticalPressureCounter *uint64 `protobuf:"varint,34,opt,name=mem_critical_pressure_counter" json:"mem_critical_pressure_counter,omitempty"` + // Disk Usage Information for executor working directory. + DiskLimitBytes *uint64 `protobuf:"varint,26,opt,name=disk_limit_bytes" json:"disk_limit_bytes,omitempty"` + DiskUsedBytes *uint64 `protobuf:"varint,27,opt,name=disk_used_bytes" json:"disk_used_bytes,omitempty"` // Perf statistics. Perf *PerfStatistics `protobuf:"bytes,13,opt,name=perf" json:"perf,omitempty"` // Network Usage Information: @@ -1420,11 +1869,17 @@ type ResourceStatistics struct { NetTxDropped *uint64 `protobuf:"varint,21,opt,name=net_tx_dropped" json:"net_tx_dropped,omitempty"` // The kernel keeps track of RTT (round-trip time) for its TCP // sockets. RTT is a way to tell the latency of a container. - NetTcpRttMicrosecsP50 *float64 `protobuf:"fixed64,22,opt,name=net_tcp_rtt_microsecs_p50" json:"net_tcp_rtt_microsecs_p50,omitempty"` - NetTcpRttMicrosecsP90 *float64 `protobuf:"fixed64,23,opt,name=net_tcp_rtt_microsecs_p90" json:"net_tcp_rtt_microsecs_p90,omitempty"` - NetTcpRttMicrosecsP95 *float64 `protobuf:"fixed64,24,opt,name=net_tcp_rtt_microsecs_p95" json:"net_tcp_rtt_microsecs_p95,omitempty"` - NetTcpRttMicrosecsP99 *float64 `protobuf:"fixed64,25,opt,name=net_tcp_rtt_microsecs_p99" json:"net_tcp_rtt_microsecs_p99,omitempty"` - XXX_unrecognized []byte `json:"-"` + NetTcpRttMicrosecsP50 *float64 `protobuf:"fixed64,22,opt,name=net_tcp_rtt_microsecs_p50" json:"net_tcp_rtt_microsecs_p50,omitempty"` + NetTcpRttMicrosecsP90 *float64 `protobuf:"fixed64,23,opt,name=net_tcp_rtt_microsecs_p90" json:"net_tcp_rtt_microsecs_p90,omitempty"` + NetTcpRttMicrosecsP95 *float64 `protobuf:"fixed64,24,opt,name=net_tcp_rtt_microsecs_p95" json:"net_tcp_rtt_microsecs_p95,omitempty"` + NetTcpRttMicrosecsP99 *float64 `protobuf:"fixed64,25,opt,name=net_tcp_rtt_microsecs_p99" json:"net_tcp_rtt_microsecs_p99,omitempty"` + NetTcpActiveConnections *float64 `protobuf:"fixed64,28,opt,name=net_tcp_active_connections" json:"net_tcp_active_connections,omitempty"` + NetTcpTimeWaitConnections *float64 `protobuf:"fixed64,29,opt,name=net_tcp_time_wait_connections" json:"net_tcp_time_wait_connections,omitempty"` + // Network traffic flowing into or out of a container can be delayed + // or dropped due to congestion or policy inside and outside the + // container. + NetTrafficControlStatistics []*TrafficControlStatistics `protobuf:"bytes,35,rep,name=net_traffic_control_statistics" json:"net_traffic_control_statistics,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ResourceStatistics) Reset() { *m = ResourceStatistics{} } @@ -1437,6 +1892,20 @@ func (m *ResourceStatistics) GetTimestamp() float64 { return 0 } +func (m *ResourceStatistics) GetProcesses() uint32 { + if m != nil && m.Processes != nil { + return *m.Processes + } + return 0 +} + +func (m *ResourceStatistics) GetThreads() uint32 { + if m != nil && m.Threads != nil { + return *m.Threads + } + return 0 +} + func (m *ResourceStatistics) GetCpusUserTimeSecs() float64 { if m != nil && m.CpusUserTimeSecs != nil { return *m.CpusUserTimeSecs @@ -1479,9 +1948,16 @@ func (m *ResourceStatistics) GetCpusThrottledTimeSecs() float64 { return 0 } -func (m *ResourceStatistics) GetMemRssBytes() uint64 { - if m != nil && m.MemRssBytes != nil { - return *m.MemRssBytes +func (m *ResourceStatistics) GetMemTotalBytes() uint64 { + if m != nil && m.MemTotalBytes != nil { + return *m.MemTotalBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemTotalMemswBytes() uint64 { + if m != nil && m.MemTotalMemswBytes != nil { + return *m.MemTotalMemswBytes } return 0 } @@ -1493,6 +1969,13 @@ func (m *ResourceStatistics) GetMemLimitBytes() uint64 { return 0 } +func (m *ResourceStatistics) GetMemSoftLimitBytes() uint64 { + if m != nil && m.MemSoftLimitBytes != nil { + return *m.MemSoftLimitBytes + } + return 0 +} + func (m *ResourceStatistics) GetMemFileBytes() uint64 { if m != nil && m.MemFileBytes != nil { return *m.MemFileBytes @@ -1507,6 +1990,20 @@ func (m *ResourceStatistics) GetMemAnonBytes() uint64 { return 0 } +func (m *ResourceStatistics) GetMemCacheBytes() uint64 { + if m != nil && m.MemCacheBytes != nil { + return *m.MemCacheBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemRssBytes() uint64 { + if m != nil && m.MemRssBytes != nil { + return *m.MemRssBytes + } + return 0 +} + func (m *ResourceStatistics) GetMemMappedFileBytes() uint64 { if m != nil && m.MemMappedFileBytes != nil { return *m.MemMappedFileBytes @@ -1514,37 +2011,79 @@ func (m *ResourceStatistics) GetMemMappedFileBytes() uint64 { return 0 } -func (m *ResourceStatistics) GetPerf() *PerfStatistics { - if m != nil { - return m.Perf +func (m *ResourceStatistics) GetMemSwapBytes() uint64 { + if m != nil && m.MemSwapBytes != nil { + return *m.MemSwapBytes } - return nil + return 0 } -func (m *ResourceStatistics) GetNetRxPackets() uint64 { - if m != nil && m.NetRxPackets != nil { - return *m.NetRxPackets +func (m *ResourceStatistics) GetMemLowPressureCounter() uint64 { + if m != nil && m.MemLowPressureCounter != nil { + return *m.MemLowPressureCounter } return 0 } -func (m *ResourceStatistics) GetNetRxBytes() uint64 { - if m != nil && m.NetRxBytes != nil { - return *m.NetRxBytes +func (m *ResourceStatistics) GetMemMediumPressureCounter() uint64 { + if m != nil && m.MemMediumPressureCounter != nil { + return *m.MemMediumPressureCounter } return 0 } -func (m *ResourceStatistics) GetNetRxErrors() uint64 { - if m != nil && m.NetRxErrors != nil { - return *m.NetRxErrors +func (m *ResourceStatistics) GetMemCriticalPressureCounter() uint64 { + if m != nil && m.MemCriticalPressureCounter != nil { + return *m.MemCriticalPressureCounter } return 0 } -func (m *ResourceStatistics) GetNetRxDropped() uint64 { - if m != nil && m.NetRxDropped != nil { - return *m.NetRxDropped +func (m *ResourceStatistics) GetDiskLimitBytes() uint64 { + if m != nil && m.DiskLimitBytes != nil { + return *m.DiskLimitBytes + } + return 0 +} + +func (m *ResourceStatistics) GetDiskUsedBytes() uint64 { + if m != nil && m.DiskUsedBytes != nil { + return *m.DiskUsedBytes + } + return 0 +} + +func (m *ResourceStatistics) GetPerf() *PerfStatistics { + if m != nil { + return m.Perf + } + return nil +} + +func (m *ResourceStatistics) GetNetRxPackets() uint64 { + if m != nil && m.NetRxPackets != nil { + return *m.NetRxPackets + } + return 0 +} + +func (m *ResourceStatistics) GetNetRxBytes() uint64 { + if m != nil && m.NetRxBytes != nil { + return *m.NetRxBytes + } + return 0 +} + +func (m *ResourceStatistics) GetNetRxErrors() uint64 { + if m != nil && m.NetRxErrors != nil { + return *m.NetRxErrors + } + return 0 +} + +func (m *ResourceStatistics) GetNetRxDropped() uint64 { + if m != nil && m.NetRxDropped != nil { + return *m.NetRxDropped } return 0 } @@ -1605,63 +2144,73 @@ func (m *ResourceStatistics) GetNetTcpRttMicrosecsP99() float64 { return 0 } +func (m *ResourceStatistics) GetNetTcpActiveConnections() float64 { + if m != nil && m.NetTcpActiveConnections != nil { + return *m.NetTcpActiveConnections + } + return 0 +} + +func (m *ResourceStatistics) GetNetTcpTimeWaitConnections() float64 { + if m != nil && m.NetTcpTimeWaitConnections != nil { + return *m.NetTcpTimeWaitConnections + } + return 0 +} + +func (m *ResourceStatistics) GetNetTrafficControlStatistics() []*TrafficControlStatistics { + if m != nil { + return m.NetTrafficControlStatistics + } + return nil +} + // * -// Describes a snapshot of the resource usage for an executor. -// -// TODO(bmahler): Note that we want to be sending this information -// to the master, and subsequently to the relevant scheduler. So -// this proto is designed to be easy for the scheduler to use, this -// is why we provide the slave id, executor info / task info. +// Describes a snapshot of the resource usage for executors. type ResourceUsage struct { - SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` - FrameworkId *FrameworkID `protobuf:"bytes,2,req,name=framework_id" json:"framework_id,omitempty"` - ExecutorId *ExecutorID `protobuf:"bytes,3,opt,name=executor_id" json:"executor_id,omitempty"` - ExecutorName *string `protobuf:"bytes,4,opt,name=executor_name" json:"executor_name,omitempty"` - TaskId *TaskID `protobuf:"bytes,5,opt,name=task_id" json:"task_id,omitempty"` - // If missing, the isolation module cannot provide resource usage. - Statistics *ResourceStatistics `protobuf:"bytes,6,opt,name=statistics" json:"statistics,omitempty"` - XXX_unrecognized []byte `json:"-"` + Executors []*ResourceUsage_Executor `protobuf:"bytes,1,rep,name=executors" json:"executors,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ResourceUsage) Reset() { *m = ResourceUsage{} } func (*ResourceUsage) ProtoMessage() {} -func (m *ResourceUsage) GetSlaveId() *SlaveID { +func (m *ResourceUsage) GetExecutors() []*ResourceUsage_Executor { if m != nil { - return m.SlaveId + return m.Executors } return nil } -func (m *ResourceUsage) GetFrameworkId() *FrameworkID { - if m != nil { - return m.FrameworkId - } - return nil +type ResourceUsage_Executor struct { + ExecutorInfo *ExecutorInfo `protobuf:"bytes,1,req,name=executor_info" json:"executor_info,omitempty"` + // This includes resources used by the executor itself + // as well as its active tasks. + Allocated []*Resource `protobuf:"bytes,2,rep,name=allocated" json:"allocated,omitempty"` + // Current resource usage. If absent, the containerizer + // cannot provide resource usage. + Statistics *ResourceStatistics `protobuf:"bytes,3,opt,name=statistics" json:"statistics,omitempty"` + XXX_unrecognized []byte `json:"-"` } -func (m *ResourceUsage) GetExecutorId() *ExecutorID { +func (m *ResourceUsage_Executor) Reset() { *m = ResourceUsage_Executor{} } +func (*ResourceUsage_Executor) ProtoMessage() {} + +func (m *ResourceUsage_Executor) GetExecutorInfo() *ExecutorInfo { if m != nil { - return m.ExecutorId + return m.ExecutorInfo } return nil } -func (m *ResourceUsage) GetExecutorName() string { - if m != nil && m.ExecutorName != nil { - return *m.ExecutorName - } - return "" -} - -func (m *ResourceUsage) GetTaskId() *TaskID { +func (m *ResourceUsage_Executor) GetAllocated() []*Resource { if m != nil { - return m.TaskId + return m.Allocated } return nil } -func (m *ResourceUsage) GetStatistics() *ResourceStatistics { +func (m *ResourceUsage_Executor) GetStatistics() *ResourceStatistics { if m != nil { return m.Statistics } @@ -2118,6 +2667,8 @@ func (m *PerfStatistics) GetNodePrefetchMisses() uint64 { // to proactively influence the allocator. If 'slave_id' is provided // then this request is assumed to only apply to resources on that // slave. +// +// TODO(vinod): Remove this once the old driver is removed. type Request struct { SlaveId *SlaveID `protobuf:"bytes,1,opt,name=slave_id" json:"slave_id,omitempty"` Resources []*Resource `protobuf:"bytes,2,rep,name=resources" json:"resources,omitempty"` @@ -2207,6 +2758,137 @@ func (m *Offer) GetExecutorIds() []*ExecutorID { return nil } +// Defines an operation that can be performed against offers. +type Offer_Operation struct { + Type *Offer_Operation_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Offer_Operation_Type" json:"type,omitempty"` + Launch *Offer_Operation_Launch `protobuf:"bytes,2,opt,name=launch" json:"launch,omitempty"` + Reserve *Offer_Operation_Reserve `protobuf:"bytes,3,opt,name=reserve" json:"reserve,omitempty"` + Unreserve *Offer_Operation_Unreserve `protobuf:"bytes,4,opt,name=unreserve" json:"unreserve,omitempty"` + Create *Offer_Operation_Create `protobuf:"bytes,5,opt,name=create" json:"create,omitempty"` + Destroy *Offer_Operation_Destroy `protobuf:"bytes,6,opt,name=destroy" json:"destroy,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Offer_Operation) Reset() { *m = Offer_Operation{} } +func (*Offer_Operation) ProtoMessage() {} + +func (m *Offer_Operation) GetType() Offer_Operation_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Offer_Operation_LAUNCH +} + +func (m *Offer_Operation) GetLaunch() *Offer_Operation_Launch { + if m != nil { + return m.Launch + } + return nil +} + +func (m *Offer_Operation) GetReserve() *Offer_Operation_Reserve { + if m != nil { + return m.Reserve + } + return nil +} + +func (m *Offer_Operation) GetUnreserve() *Offer_Operation_Unreserve { + if m != nil { + return m.Unreserve + } + return nil +} + +func (m *Offer_Operation) GetCreate() *Offer_Operation_Create { + if m != nil { + return m.Create + } + return nil +} + +func (m *Offer_Operation) GetDestroy() *Offer_Operation_Destroy { + if m != nil { + return m.Destroy + } + return nil +} + +type Offer_Operation_Launch struct { + TaskInfos []*TaskInfo `protobuf:"bytes,1,rep,name=task_infos" json:"task_infos,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Offer_Operation_Launch) Reset() { *m = Offer_Operation_Launch{} } +func (*Offer_Operation_Launch) ProtoMessage() {} + +func (m *Offer_Operation_Launch) GetTaskInfos() []*TaskInfo { + if m != nil { + return m.TaskInfos + } + return nil +} + +type Offer_Operation_Reserve struct { + Resources []*Resource `protobuf:"bytes,1,rep,name=resources" json:"resources,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Offer_Operation_Reserve) Reset() { *m = Offer_Operation_Reserve{} } +func (*Offer_Operation_Reserve) ProtoMessage() {} + +func (m *Offer_Operation_Reserve) GetResources() []*Resource { + if m != nil { + return m.Resources + } + return nil +} + +type Offer_Operation_Unreserve struct { + Resources []*Resource `protobuf:"bytes,1,rep,name=resources" json:"resources,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Offer_Operation_Unreserve) Reset() { *m = Offer_Operation_Unreserve{} } +func (*Offer_Operation_Unreserve) ProtoMessage() {} + +func (m *Offer_Operation_Unreserve) GetResources() []*Resource { + if m != nil { + return m.Resources + } + return nil +} + +type Offer_Operation_Create struct { + Volumes []*Resource `protobuf:"bytes,1,rep,name=volumes" json:"volumes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Offer_Operation_Create) Reset() { *m = Offer_Operation_Create{} } +func (*Offer_Operation_Create) ProtoMessage() {} + +func (m *Offer_Operation_Create) GetVolumes() []*Resource { + if m != nil { + return m.Volumes + } + return nil +} + +type Offer_Operation_Destroy struct { + Volumes []*Resource `protobuf:"bytes,1,rep,name=volumes" json:"volumes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Offer_Operation_Destroy) Reset() { *m = Offer_Operation_Destroy{} } +func (*Offer_Operation_Destroy) ProtoMessage() {} + +func (m *Offer_Operation_Destroy) GetVolumes() []*Resource { + if m != nil { + return m.Volumes + } + return nil +} + // * // Describes a task. Passed from the scheduler all the way to an // executor (see SchedulerDriver::launchTasks and @@ -2226,8 +2908,19 @@ type TaskInfo struct { Data []byte `protobuf:"bytes,6,opt,name=data" json:"data,omitempty"` // A health check for the task (currently in *alpha* and initial // support will only be for TaskInfo's that have a CommandInfo). - HealthCheck *HealthCheck `protobuf:"bytes,8,opt,name=health_check" json:"health_check,omitempty"` - XXX_unrecognized []byte `json:"-"` + HealthCheck *HealthCheck `protobuf:"bytes,8,opt,name=health_check" json:"health_check,omitempty"` + // Labels are free-form key value pairs which are exposed through + // master and slave endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and slave processes. Therefore, + // labels should be used to tag tasks with light-weight meta-data. + Labels *Labels `protobuf:"bytes,10,opt,name=labels" json:"labels,omitempty"` + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + Discovery *DiscoveryInfo `protobuf:"bytes,11,opt,name=discovery" json:"discovery,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *TaskInfo) Reset() { *m = TaskInfo{} } @@ -2296,6 +2989,20 @@ func (m *TaskInfo) GetHealthCheck() *HealthCheck { return nil } +func (m *TaskInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +func (m *TaskInfo) GetDiscovery() *DiscoveryInfo { + if m != nil { + return m.Discovery + } + return nil +} + // * // Describes the current status of a task. type TaskStatus struct { @@ -2308,6 +3015,16 @@ type TaskStatus struct { SlaveId *SlaveID `protobuf:"bytes,5,opt,name=slave_id" json:"slave_id,omitempty"` ExecutorId *ExecutorID `protobuf:"bytes,7,opt,name=executor_id" json:"executor_id,omitempty"` Timestamp *float64 `protobuf:"fixed64,6,opt,name=timestamp" json:"timestamp,omitempty"` + // Statuses that are delivered reliably to the scheduler will + // include a 'uuid'. The status is considered delivered once + // it is acknowledged by the scheduler. Schedulers can choose + // to either explicitly acknowledge statuses or let the scheduler + // driver implicitly acknowledge (default). + // + // TODO(bmahler): This is currently overwritten in the scheduler + // driver and executor driver, but executors will need to set this + // to a valid RFC-4122 UUID if using the HTTP API. + Uuid []byte `protobuf:"bytes,11,opt,name=uuid" json:"uuid,omitempty"` // Describes whether the task has been determined to be healthy // (true) or unhealthy (false) according to the HealthCheck field in // the command info. @@ -2381,6 +3098,13 @@ func (m *TaskStatus) GetTimestamp() float64 { return 0 } +func (m *TaskStatus) GetUuid() []byte { + if m != nil { + return m.Uuid + } + return nil +} + func (m *TaskStatus) GetHealthy() bool { if m != nil && m.Healthy != nil { return *m.Healthy @@ -2895,11 +3619,15 @@ type ContainerInfo_DockerInfo struct { PortMappings []*ContainerInfo_DockerInfo_PortMapping `protobuf:"bytes,3,rep,name=port_mappings" json:"port_mappings,omitempty"` Privileged *bool `protobuf:"varint,4,opt,name=privileged,def=0" json:"privileged,omitempty"` // Allowing arbitrary parameters to be passed to docker CLI. - // Note that anything passed to this field is not guranteed + // Note that anything passed to this field is not guaranteed // to be supported moving forward, as we might move away from // the docker CLI. - Parameters []*Parameter `protobuf:"bytes,5,rep,name=parameters" json:"parameters,omitempty"` - XXX_unrecognized []byte `json:"-"` + Parameters []*Parameter `protobuf:"bytes,5,rep,name=parameters" json:"parameters,omitempty"` + // With this flag set to true, the docker containerizer will + // pull the docker image from the registry even if the image + // is already downloaded on the slave. + ForcePullImage *bool `protobuf:"varint,6,opt,name=force_pull_image" json:"force_pull_image,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ContainerInfo_DockerInfo) Reset() { *m = ContainerInfo_DockerInfo{} } @@ -2943,6 +3671,13 @@ func (m *ContainerInfo_DockerInfo) GetParameters() []*Parameter { return nil } +func (m *ContainerInfo_DockerInfo) GetForcePullImage() bool { + if m != nil && m.ForcePullImage != nil { + return *m.ForcePullImage + } + return false +} + type ContainerInfo_DockerInfo_PortMapping struct { HostPort *uint32 `protobuf:"varint,1,req,name=host_port" json:"host_port,omitempty"` ContainerPort *uint32 `protobuf:"varint,2,req,name=container_port" json:"container_port,omitempty"` @@ -2975,10588 +3710,11961 @@ func (m *ContainerInfo_DockerInfo_PortMapping) GetProtocol() string { return "" } -func init() { - proto.RegisterEnum("mesosproto.Status", Status_name, Status_value) - proto.RegisterEnum("mesosproto.TaskState", TaskState_name, TaskState_value) - proto.RegisterEnum("mesosproto.Value_Type", Value_Type_name, Value_Type_value) - proto.RegisterEnum("mesosproto.TaskStatus_Source", TaskStatus_Source_name, TaskStatus_Source_value) - proto.RegisterEnum("mesosproto.TaskStatus_Reason", TaskStatus_Reason_name, TaskStatus_Reason_value) - proto.RegisterEnum("mesosproto.ACL_Entity_Type", ACL_Entity_Type_name, ACL_Entity_Type_value) - proto.RegisterEnum("mesosproto.Volume_Mode", Volume_Mode_name, Volume_Mode_value) - proto.RegisterEnum("mesosproto.ContainerInfo_Type", ContainerInfo_Type_name, ContainerInfo_Type_value) - proto.RegisterEnum("mesosproto.ContainerInfo_DockerInfo_Network", ContainerInfo_DockerInfo_Network_name, ContainerInfo_DockerInfo_Network_value) +// * +// Collection of labels. +type Labels struct { + Labels []*Label `protobuf:"bytes,1,rep,name=labels" json:"labels,omitempty"` + XXX_unrecognized []byte `json:"-"` } -func (m *FrameworkID) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } + +func (m *Labels) Reset() { *m = Labels{} } +func (*Labels) ProtoMessage() {} + +func (m *Labels) GetLabels() []*Label { + if m != nil { + return m.Labels } return nil } -func (m *OfferID) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } + +// * +// Key, value pair used to store free form user-data. +type Label struct { + Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Label) Reset() { *m = Label{} } +func (*Label) ProtoMessage() {} + +func (m *Label) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *Label) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +// * +// Named port used for service discovery. +type Port struct { + Number *uint32 `protobuf:"varint,1,req,name=number" json:"number,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Port) Reset() { *m = Port{} } +func (*Port) ProtoMessage() {} + +func (m *Port) GetNumber() uint32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *Port) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Port) GetProtocol() string { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return "" +} + +// * +// Collection of ports. +type Ports struct { + Ports []*Port `protobuf:"bytes,1,rep,name=ports" json:"ports,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Ports) Reset() { *m = Ports{} } +func (*Ports) ProtoMessage() {} + +func (m *Ports) GetPorts() []*Port { + if m != nil { + return m.Ports } return nil } -func (m *SlaveID) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } + +// * +// Service discovery information. +// The visibility field restricts discovery within a framework +// (FRAMEWORK), within a Mesos cluster (CLUSTER), or places no +// restrictions (EXTERNAL). +// The environment, location, and version fields provide first class +// support for common attributes used to differentiate between +// similar services. The environment may receive values such as +// PROD/QA/DEV, the location field may receive values like +// EAST-US/WEST-US/EUROPE/AMEA, and the version field may receive +// values like v2.0/v0.9. The exact use of these fields is up to each +// service discovery system. +type DiscoveryInfo struct { + Visibility *DiscoveryInfo_Visibility `protobuf:"varint,1,req,name=visibility,enum=mesosproto.DiscoveryInfo_Visibility" json:"visibility,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Environment *string `protobuf:"bytes,3,opt,name=environment" json:"environment,omitempty"` + Location *string `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"` + Version *string `protobuf:"bytes,5,opt,name=version" json:"version,omitempty"` + Ports *Ports `protobuf:"bytes,6,opt,name=ports" json:"ports,omitempty"` + Labels *Labels `protobuf:"bytes,7,opt,name=labels" json:"labels,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DiscoveryInfo) Reset() { *m = DiscoveryInfo{} } +func (*DiscoveryInfo) ProtoMessage() {} + +func (m *DiscoveryInfo) GetVisibility() DiscoveryInfo_Visibility { + if m != nil && m.Visibility != nil { + return *m.Visibility + } + return DiscoveryInfo_FRAMEWORK +} + +func (m *DiscoveryInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DiscoveryInfo) GetEnvironment() string { + if m != nil && m.Environment != nil { + return *m.Environment + } + return "" +} + +func (m *DiscoveryInfo) GetLocation() string { + if m != nil && m.Location != nil { + return *m.Location + } + return "" +} + +func (m *DiscoveryInfo) GetVersion() string { + if m != nil && m.Version != nil { + return *m.Version + } + return "" +} + +func (m *DiscoveryInfo) GetPorts() *Ports { + if m != nil { + return m.Ports } return nil } -func (m *TaskID) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + +func (m *DiscoveryInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +func init() { + proto.RegisterEnum("mesosproto.Status", Status_name, Status_value) + proto.RegisterEnum("mesosproto.TaskState", TaskState_name, TaskState_value) + proto.RegisterEnum("mesosproto.FrameworkInfo_Capability_Type", FrameworkInfo_Capability_Type_name, FrameworkInfo_Capability_Type_value) + proto.RegisterEnum("mesosproto.Value_Type", Value_Type_name, Value_Type_value) + proto.RegisterEnum("mesosproto.Offer_Operation_Type", Offer_Operation_Type_name, Offer_Operation_Type_value) + proto.RegisterEnum("mesosproto.TaskStatus_Source", TaskStatus_Source_name, TaskStatus_Source_value) + proto.RegisterEnum("mesosproto.TaskStatus_Reason", TaskStatus_Reason_name, TaskStatus_Reason_value) + proto.RegisterEnum("mesosproto.ACL_Entity_Type", ACL_Entity_Type_name, ACL_Entity_Type_value) + proto.RegisterEnum("mesosproto.Volume_Mode", Volume_Mode_name, Volume_Mode_value) + proto.RegisterEnum("mesosproto.ContainerInfo_Type", ContainerInfo_Type_name, ContainerInfo_Type_value) + proto.RegisterEnum("mesosproto.ContainerInfo_DockerInfo_Network", ContainerInfo_DockerInfo_Network_name, ContainerInfo_DockerInfo_Network_value) + proto.RegisterEnum("mesosproto.DiscoveryInfo_Visibility", DiscoveryInfo_Visibility_name, DiscoveryInfo_Visibility_value) +} +func (this *FrameworkID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FrameworkID) + if !ok { + return fmt.Errorf("that is not of type *FrameworkID") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FrameworkID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FrameworkIDbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *ExecutorID) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *FrameworkID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*FrameworkID) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OfferID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OfferID) + if !ok { + return fmt.Errorf("that is not of type *OfferID") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OfferID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OfferIDbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *ContainerID) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *OfferID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*OfferID) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SlaveID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SlaveID) + if !ok { + return fmt.Errorf("that is not of type *SlaveID") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SlaveID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SlaveIDbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *FrameworkInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *SlaveID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.User = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &FrameworkID{} - } - if err := m.Id.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field FailoverTimeout", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.FailoverTimeout = &v2 - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Checkpoint = &b - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Role = &s - index = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Hostname = &s - index = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Principal = &s - index = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WebuiUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.WebuiUrl = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*SlaveID) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *HealthCheck) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *TaskID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Http == nil { - m.Http = &HealthCheck_HTTP{} - } - if err := m.Http.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DelaySeconds", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.DelaySeconds = &v2 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field IntervalSeconds", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.IntervalSeconds = &v2 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.TimeoutSeconds = &v2 - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsecutiveFailures", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ConsecutiveFailures = &v - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.GracePeriodSeconds = &v2 - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Command == nil { - m.Command = &CommandInfo{} - } - if err := m.Command.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskID) + if !ok { + return fmt.Errorf("that is not of type *TaskID") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskIDbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Path = &s - index = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Statuses = append(m.Statuses, v) - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy +func (this *TaskID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } + return false } - return nil -} -func (m *CommandInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + + that1, ok := that.(*TaskID) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Container == nil { - m.Container = &CommandInfo_ContainerInfo{} - } - if err := m.Container.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uris", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Uris = append(m.Uris, &CommandInfo_URI{}) - m.Uris[len(m.Uris)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Environment == nil { - m.Environment = &Environment{} - } - if err := m.Environment.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Shell", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Shell = &b - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Arguments = append(m.Arguments, string(data[index:postIndex])) - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.User = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false } - return nil + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *CommandInfo_URI) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Executable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Executable = &b - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Extract", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Extract = &b - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy +func (this *ExecutorID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ExecutorID) + if !ok { + return fmt.Errorf("that is not of type *ExecutorID") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ExecutorID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ExecutorIDbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *ExecutorID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Image = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options, string(data[index:postIndex])) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*ExecutorID) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainerID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerID) + if !ok { + return fmt.Errorf("that is not of type *ContainerID") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerIDbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *ExecutorInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *ContainerID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutorId == nil { - m.ExecutorId = &ExecutorID{} - } - if err := m.ExecutorId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FrameworkId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FrameworkId == nil { - m.FrameworkId = &FrameworkID{} - } - if err := m.FrameworkId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Command == nil { - m.Command = &CommandInfo{} - } - if err := m.Command.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Container == nil { - m.Container = &ContainerInfo{} - } - if err := m.Container.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &Resource{}) - m.Resources[len(m.Resources)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Source = &s - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[index:postIndex]...) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*ContainerID) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FrameworkInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FrameworkInfo) + if !ok { + return fmt.Errorf("that is not of type *FrameworkInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FrameworkInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FrameworkInfobut is not nil && this == nil") + } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return fmt.Errorf("User this(%v) Not Equal that(%v)", *this.User, *that1.User) + } + } else if this.User != nil { + return fmt.Errorf("this.User == nil && that.User != nil") + } else if that1.User != nil { + return fmt.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if this.FailoverTimeout != nil && that1.FailoverTimeout != nil { + if *this.FailoverTimeout != *that1.FailoverTimeout { + return fmt.Errorf("FailoverTimeout this(%v) Not Equal that(%v)", *this.FailoverTimeout, *that1.FailoverTimeout) + } + } else if this.FailoverTimeout != nil { + return fmt.Errorf("this.FailoverTimeout == nil && that.FailoverTimeout != nil") + } else if that1.FailoverTimeout != nil { + return fmt.Errorf("FailoverTimeout this(%v) Not Equal that(%v)", this.FailoverTimeout, that1.FailoverTimeout) + } + if this.Checkpoint != nil && that1.Checkpoint != nil { + if *this.Checkpoint != *that1.Checkpoint { + return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", *this.Checkpoint, *that1.Checkpoint) } + } else if this.Checkpoint != nil { + return fmt.Errorf("this.Checkpoint == nil && that.Checkpoint != nil") + } else if that1.Checkpoint != nil { + return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", this.Checkpoint, that1.Checkpoint) + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) + } + } else if this.Role != nil { + return fmt.Errorf("this.Role == nil && that.Role != nil") + } else if that1.Role != nil { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + } + } else if this.Principal != nil { + return fmt.Errorf("this.Principal == nil && that.Principal != nil") + } else if that1.Principal != nil { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if this.WebuiUrl != nil && that1.WebuiUrl != nil { + if *this.WebuiUrl != *that1.WebuiUrl { + return fmt.Errorf("WebuiUrl this(%v) Not Equal that(%v)", *this.WebuiUrl, *that1.WebuiUrl) + } + } else if this.WebuiUrl != nil { + return fmt.Errorf("this.WebuiUrl == nil && that.WebuiUrl != nil") + } else if that1.WebuiUrl != nil { + return fmt.Errorf("WebuiUrl this(%v) Not Equal that(%v)", this.WebuiUrl, that1.WebuiUrl) + } + if len(this.Capabilities) != len(that1.Capabilities) { + return fmt.Errorf("Capabilities this(%v) Not Equal that(%v)", len(this.Capabilities), len(that1.Capabilities)) + } + for i := range this.Capabilities { + if !this.Capabilities[i].Equal(that1.Capabilities[i]) { + return fmt.Errorf("Capabilities this[%v](%v) Not Equal that[%v](%v)", i, this.Capabilities[i], i, that1.Capabilities[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *MasterInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *FrameworkInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Id = &s - index = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Ip = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Pid = &s - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Hostname = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*FrameworkInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil -} -func (m *SlaveInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return false } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Hostname = &s - index = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &Resource{}) - m.Resources[len(m.Resources)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &Attribute{}) - m.Attributes[len(m.Attributes)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &SlaveID{} - } - if err := m.Id.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Checkpoint = &b - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.User != nil { + return false + } else if that1.User != nil { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false } - return nil -} -func (m *Value) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if !this.Id.Equal(that1.Id) { + return false + } + if this.FailoverTimeout != nil && that1.FailoverTimeout != nil { + if *this.FailoverTimeout != *that1.FailoverTimeout { + return false } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Value_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Value_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scalar == nil { - m.Scalar = &Value_Scalar{} - } - if err := m.Scalar.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ranges == nil { - m.Ranges = &Value_Ranges{} - } - if err := m.Ranges.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Set == nil { - m.Set = &Value_Set{} - } - if err := m.Set.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Text == nil { - m.Text = &Value_Text{} - } - if err := m.Text.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.FailoverTimeout != nil { + return false + } else if that1.FailoverTimeout != nil { + return false + } + if this.Checkpoint != nil && that1.Checkpoint != nil { + if *this.Checkpoint != *that1.Checkpoint { + return false } + } else if this.Checkpoint != nil { + return false + } else if that1.Checkpoint != nil { + return false } - return nil -} -func (m *Value_Scalar) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return false } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.Value = &v2 - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.Role != nil { + return false + } else if that1.Role != nil { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false } - return nil -} -func (m *Value_Range) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return false } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Begin = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.End = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.Principal != nil { + return false + } else if that1.Principal != nil { + return false + } + if this.WebuiUrl != nil && that1.WebuiUrl != nil { + if *this.WebuiUrl != *that1.WebuiUrl { + return false } + } else if this.WebuiUrl != nil { + return false + } else if that1.WebuiUrl != nil { + return false } - return nil + if len(this.Capabilities) != len(that1.Capabilities) { + return false + } + for i := range this.Capabilities { + if !this.Capabilities[i].Equal(that1.Capabilities[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *Value_Ranges) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *FrameworkInfo_Capability) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Range = append(m.Range, &Value_Range{}) - m.Range[len(m.Range)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FrameworkInfo_Capability) + if !ok { + return fmt.Errorf("that is not of type *FrameworkInfo_Capability") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FrameworkInfo_Capability but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FrameworkInfo_Capabilitybut is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Value_Set) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *FrameworkInfo_Capability) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Item", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Item = append(m.Item, string(data[index:postIndex])) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*FrameworkInfo_Capability) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *Value_Text) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *HealthCheck) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*HealthCheck) + if !ok { + return fmt.Errorf("that is not of type *HealthCheck") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *HealthCheck but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *HealthCheckbut is not nil && this == nil") + } + if !this.Http.Equal(that1.Http) { + return fmt.Errorf("Http this(%v) Not Equal that(%v)", this.Http, that1.Http) + } + if this.DelaySeconds != nil && that1.DelaySeconds != nil { + if *this.DelaySeconds != *that1.DelaySeconds { + return fmt.Errorf("DelaySeconds this(%v) Not Equal that(%v)", *this.DelaySeconds, *that1.DelaySeconds) + } + } else if this.DelaySeconds != nil { + return fmt.Errorf("this.DelaySeconds == nil && that.DelaySeconds != nil") + } else if that1.DelaySeconds != nil { + return fmt.Errorf("DelaySeconds this(%v) Not Equal that(%v)", this.DelaySeconds, that1.DelaySeconds) + } + if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { + if *this.IntervalSeconds != *that1.IntervalSeconds { + return fmt.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", *this.IntervalSeconds, *that1.IntervalSeconds) + } + } else if this.IntervalSeconds != nil { + return fmt.Errorf("this.IntervalSeconds == nil && that.IntervalSeconds != nil") + } else if that1.IntervalSeconds != nil { + return fmt.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", this.IntervalSeconds, that1.IntervalSeconds) + } + if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { + if *this.TimeoutSeconds != *that1.TimeoutSeconds { + return fmt.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", *this.TimeoutSeconds, *that1.TimeoutSeconds) + } + } else if this.TimeoutSeconds != nil { + return fmt.Errorf("this.TimeoutSeconds == nil && that.TimeoutSeconds != nil") + } else if that1.TimeoutSeconds != nil { + return fmt.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", this.TimeoutSeconds, that1.TimeoutSeconds) + } + if this.ConsecutiveFailures != nil && that1.ConsecutiveFailures != nil { + if *this.ConsecutiveFailures != *that1.ConsecutiveFailures { + return fmt.Errorf("ConsecutiveFailures this(%v) Not Equal that(%v)", *this.ConsecutiveFailures, *that1.ConsecutiveFailures) } + } else if this.ConsecutiveFailures != nil { + return fmt.Errorf("this.ConsecutiveFailures == nil && that.ConsecutiveFailures != nil") + } else if that1.ConsecutiveFailures != nil { + return fmt.Errorf("ConsecutiveFailures this(%v) Not Equal that(%v)", this.ConsecutiveFailures, that1.ConsecutiveFailures) + } + if this.GracePeriodSeconds != nil && that1.GracePeriodSeconds != nil { + if *this.GracePeriodSeconds != *that1.GracePeriodSeconds { + return fmt.Errorf("GracePeriodSeconds this(%v) Not Equal that(%v)", *this.GracePeriodSeconds, *that1.GracePeriodSeconds) + } + } else if this.GracePeriodSeconds != nil { + return fmt.Errorf("this.GracePeriodSeconds == nil && that.GracePeriodSeconds != nil") + } else if that1.GracePeriodSeconds != nil { + return fmt.Errorf("GracePeriodSeconds this(%v) Not Equal that(%v)", this.GracePeriodSeconds, that1.GracePeriodSeconds) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Attribute) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *HealthCheck) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Value_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Value_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scalar == nil { - m.Scalar = &Value_Scalar{} - } - if err := m.Scalar.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ranges == nil { - m.Ranges = &Value_Ranges{} - } - if err := m.Ranges.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Set == nil { - m.Set = &Value_Set{} - } - if err := m.Set.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Text == nil { - m.Text = &Value_Text{} - } - if err := m.Text.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*HealthCheck) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false + } + if !this.Http.Equal(that1.Http) { + return false + } + if this.DelaySeconds != nil && that1.DelaySeconds != nil { + if *this.DelaySeconds != *that1.DelaySeconds { + return false + } + } else if this.DelaySeconds != nil { + return false + } else if that1.DelaySeconds != nil { + return false + } + if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { + if *this.IntervalSeconds != *that1.IntervalSeconds { + return false + } + } else if this.IntervalSeconds != nil { + return false + } else if that1.IntervalSeconds != nil { + return false + } + if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { + if *this.TimeoutSeconds != *that1.TimeoutSeconds { + return false + } + } else if this.TimeoutSeconds != nil { + return false + } else if that1.TimeoutSeconds != nil { + return false + } + if this.ConsecutiveFailures != nil && that1.ConsecutiveFailures != nil { + if *this.ConsecutiveFailures != *that1.ConsecutiveFailures { + return false + } + } else if this.ConsecutiveFailures != nil { + return false + } else if that1.ConsecutiveFailures != nil { + return false + } + if this.GracePeriodSeconds != nil && that1.GracePeriodSeconds != nil { + if *this.GracePeriodSeconds != *that1.GracePeriodSeconds { + return false + } + } else if this.GracePeriodSeconds != nil { + return false + } else if that1.GracePeriodSeconds != nil { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *HealthCheck_HTTP) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*HealthCheck_HTTP) + if !ok { + return fmt.Errorf("that is not of type *HealthCheck_HTTP") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *HealthCheck_HTTP but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *HealthCheck_HTTPbut is not nil && this == nil") + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) + } + } else if this.Port != nil { + return fmt.Errorf("this.Port == nil && that.Port != nil") + } else if that1.Port != nil { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", *this.Path, *that1.Path) + } + } else if this.Path != nil { + return fmt.Errorf("this.Path == nil && that.Path != nil") + } else if that1.Path != nil { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if len(this.Statuses) != len(that1.Statuses) { + return fmt.Errorf("Statuses this(%v) Not Equal that(%v)", len(this.Statuses), len(that1.Statuses)) + } + for i := range this.Statuses { + if this.Statuses[i] != that1.Statuses[i] { + return fmt.Errorf("Statuses this[%v](%v) Not Equal that[%v](%v)", i, this.Statuses[i], i, that1.Statuses[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Resource) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *HealthCheck_HTTP) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Value_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Value_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scalar == nil { - m.Scalar = &Value_Scalar{} - } - if err := m.Scalar.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ranges == nil { - m.Ranges = &Value_Ranges{} - } - if err := m.Ranges.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Set == nil { - m.Set = &Value_Set{} - } - if err := m.Set.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Role = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*HealthCheck_HTTP) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return false + } + } else if this.Port != nil { + return false + } else if that1.Port != nil { + return false + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return false + } + } else if this.Path != nil { + return false + } else if that1.Path != nil { + return false + } + if len(this.Statuses) != len(that1.Statuses) { + return false + } + for i := range this.Statuses { + if this.Statuses[i] != that1.Statuses[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CommandInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CommandInfo) + if !ok { + return fmt.Errorf("that is not of type *CommandInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CommandInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CommandInfobut is not nil && this == nil") + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + if len(this.Uris) != len(that1.Uris) { + return fmt.Errorf("Uris this(%v) Not Equal that(%v)", len(this.Uris), len(that1.Uris)) + } + for i := range this.Uris { + if !this.Uris[i].Equal(that1.Uris[i]) { + return fmt.Errorf("Uris this[%v](%v) Not Equal that[%v](%v)", i, this.Uris[i], i, that1.Uris[i]) + } + } + if !this.Environment.Equal(that1.Environment) { + return fmt.Errorf("Environment this(%v) Not Equal that(%v)", this.Environment, that1.Environment) + } + if this.Shell != nil && that1.Shell != nil { + if *this.Shell != *that1.Shell { + return fmt.Errorf("Shell this(%v) Not Equal that(%v)", *this.Shell, *that1.Shell) + } + } else if this.Shell != nil { + return fmt.Errorf("this.Shell == nil && that.Shell != nil") + } else if that1.Shell != nil { + return fmt.Errorf("Shell this(%v) Not Equal that(%v)", this.Shell, that1.Shell) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if len(this.Arguments) != len(that1.Arguments) { + return fmt.Errorf("Arguments this(%v) Not Equal that(%v)", len(this.Arguments), len(that1.Arguments)) + } + for i := range this.Arguments { + if this.Arguments[i] != that1.Arguments[i] { + return fmt.Errorf("Arguments this[%v](%v) Not Equal that[%v](%v)", i, this.Arguments[i], i, that1.Arguments[i]) + } + } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return fmt.Errorf("User this(%v) Not Equal that(%v)", *this.User, *that1.User) } + } else if this.User != nil { + return fmt.Errorf("this.User == nil && that.User != nil") + } else if that1.User != nil { + return fmt.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *ResourceStatistics) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *CommandInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.Timestamp = &v2 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CpusUserTimeSecs", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.CpusUserTimeSecs = &v2 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CpusSystemTimeSecs", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.CpusSystemTimeSecs = &v2 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CpusLimit", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.CpusLimit = &v2 - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CpusNrPeriods", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.CpusNrPeriods = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CpusNrThrottled", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.CpusNrThrottled = &v - case 9: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CpusThrottledTimeSecs", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.CpusThrottledTimeSecs = &v2 - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemRssBytes", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MemRssBytes = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemLimitBytes", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MemLimitBytes = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemFileBytes", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MemFileBytes = &v - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemAnonBytes", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MemAnonBytes = &v - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemMappedFileBytes", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MemMappedFileBytes = &v - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Perf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Perf == nil { - m.Perf = &PerfStatistics{} - } - if err := m.Perf.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetRxPackets", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetRxPackets = &v - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetRxBytes", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetRxBytes = &v - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetRxErrors", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetRxErrors = &v - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetRxDropped", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetRxDropped = &v - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTxPackets", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetTxPackets = &v - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTxBytes", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetTxBytes = &v - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTxErrors", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetTxErrors = &v - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTxDropped", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NetTxDropped = &v - case 22: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP50", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.NetTcpRttMicrosecsP50 = &v2 - case 23: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP90", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.NetTcpRttMicrosecsP90 = &v2 - case 24: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP95", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.NetTcpRttMicrosecsP95 = &v2 - case 25: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP99", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.NetTcpRttMicrosecsP99 = &v2 - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } - } - return nil -} -func (m *ResourceUsage) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SlaveId == nil { - m.SlaveId = &SlaveID{} - } - if err := m.SlaveId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FrameworkId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FrameworkId == nil { - m.FrameworkId = &FrameworkID{} - } - if err := m.FrameworkId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutorId == nil { - m.ExecutorId = &ExecutorID{} - } - if err := m.ExecutorId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.ExecutorName = &s - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TaskId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TaskId == nil { - m.TaskId = &TaskID{} - } - if err := m.TaskId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Statistics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Statistics == nil { - m.Statistics = &ResourceStatistics{} - } - if err := m.Statistics.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } - } - return nil -} -func (m *PerfStatistics) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.Timestamp = &v2 - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.Duration = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Cycles", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Cycles = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StalledCyclesFrontend", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StalledCyclesFrontend = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StalledCyclesBackend", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.StalledCyclesBackend = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Instructions", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Instructions = &v - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CacheReferences", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.CacheReferences = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CacheMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.CacheMisses = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Branches", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Branches = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BranchMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BranchMisses = &v - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BusCycles", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BusCycles = &v - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RefCycles", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.RefCycles = &v - case 13: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CpuClock", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.CpuClock = &v2 - case 14: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TaskClock", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.TaskClock = &v2 - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageFaults", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.PageFaults = &v - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinorFaults", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MinorFaults = &v - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MajorFaults", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MajorFaults = &v - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextSwitches", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ContextSwitches = &v - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CpuMigrations", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.CpuMigrations = &v - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AlignmentFaults", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AlignmentFaults = &v - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EmulationFaults", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.EmulationFaults = &v - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheLoads", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1DcacheLoads = &v - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheLoadMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1DcacheLoadMisses = &v - case 24: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheStores", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1DcacheStores = &v - case 25: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheStoreMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1DcacheStoreMisses = &v - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DcachePrefetches", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1DcachePrefetches = &v - case 27: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1DcachePrefetchMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1DcachePrefetchMisses = &v - case 28: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1IcacheLoads", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1IcacheLoads = &v - case 29: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1IcacheLoadMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1IcacheLoadMisses = &v - case 30: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1IcachePrefetches", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1IcachePrefetches = &v - case 31: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field L1IcachePrefetchMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.L1IcachePrefetchMisses = &v - case 32: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LlcLoads", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.LlcLoads = &v - case 33: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LlcLoadMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.LlcLoadMisses = &v - case 34: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LlcStores", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.LlcStores = &v - case 35: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LlcStoreMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.LlcStoreMisses = &v - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LlcPrefetches", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.LlcPrefetches = &v - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LlcPrefetchMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.LlcPrefetchMisses = &v - case 38: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DtlbLoads", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DtlbLoads = &v - case 39: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DtlbLoadMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DtlbLoadMisses = &v - case 40: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DtlbStores", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DtlbStores = &v - case 41: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DtlbStoreMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DtlbStoreMisses = &v - case 42: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DtlbPrefetches", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DtlbPrefetches = &v - case 43: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DtlbPrefetchMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DtlbPrefetchMisses = &v - case 44: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ItlbLoads", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ItlbLoads = &v - case 45: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ItlbLoadMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ItlbLoadMisses = &v - case 46: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BranchLoads", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BranchLoads = &v - case 47: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BranchLoadMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BranchLoadMisses = &v - case 48: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeLoads", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NodeLoads = &v - case 49: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeLoadMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NodeLoadMisses = &v - case 50: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeStores", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NodeStores = &v - case 51: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeStoreMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NodeStoreMisses = &v - case 52: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodePrefetches", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NodePrefetches = &v - case 53: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodePrefetchMisses", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.NodePrefetchMisses = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*CommandInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + if len(this.Uris) != len(that1.Uris) { + return false + } + for i := range this.Uris { + if !this.Uris[i].Equal(that1.Uris[i]) { + return false + } + } + if !this.Environment.Equal(that1.Environment) { + return false + } + if this.Shell != nil && that1.Shell != nil { + if *this.Shell != *that1.Shell { + return false + } + } else if this.Shell != nil { + return false + } else if that1.Shell != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if len(this.Arguments) != len(that1.Arguments) { + return false + } + for i := range this.Arguments { + if this.Arguments[i] != that1.Arguments[i] { + return false + } + } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return false + } + } else if this.User != nil { + return false + } else if that1.User != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CommandInfo_URI) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CommandInfo_URI) + if !ok { + return fmt.Errorf("that is not of type *CommandInfo_URI") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CommandInfo_URI but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CommandInfo_URIbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Executable != nil && that1.Executable != nil { + if *this.Executable != *that1.Executable { + return fmt.Errorf("Executable this(%v) Not Equal that(%v)", *this.Executable, *that1.Executable) + } + } else if this.Executable != nil { + return fmt.Errorf("this.Executable == nil && that.Executable != nil") + } else if that1.Executable != nil { + return fmt.Errorf("Executable this(%v) Not Equal that(%v)", this.Executable, that1.Executable) + } + if this.Extract != nil && that1.Extract != nil { + if *this.Extract != *that1.Extract { + return fmt.Errorf("Extract this(%v) Not Equal that(%v)", *this.Extract, *that1.Extract) + } + } else if this.Extract != nil { + return fmt.Errorf("this.Extract == nil && that.Extract != nil") + } else if that1.Extract != nil { + return fmt.Errorf("Extract this(%v) Not Equal that(%v)", this.Extract, that1.Extract) + } + if this.Cache != nil && that1.Cache != nil { + if *this.Cache != *that1.Cache { + return fmt.Errorf("Cache this(%v) Not Equal that(%v)", *this.Cache, *that1.Cache) + } + } else if this.Cache != nil { + return fmt.Errorf("this.Cache == nil && that.Cache != nil") + } else if that1.Cache != nil { + return fmt.Errorf("Cache this(%v) Not Equal that(%v)", this.Cache, that1.Cache) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CommandInfo_URI) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CommandInfo_URI) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if this.Executable != nil && that1.Executable != nil { + if *this.Executable != *that1.Executable { + return false + } + } else if this.Executable != nil { + return false + } else if that1.Executable != nil { + return false + } + if this.Extract != nil && that1.Extract != nil { + if *this.Extract != *that1.Extract { + return false + } + } else if this.Extract != nil { + return false + } else if that1.Extract != nil { + return false + } + if this.Cache != nil && that1.Cache != nil { + if *this.Cache != *that1.Cache { + return false + } + } else if this.Cache != nil { + return false + } else if that1.Cache != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CommandInfo_ContainerInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CommandInfo_ContainerInfo) + if !ok { + return fmt.Errorf("that is not of type *CommandInfo_ContainerInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CommandInfo_ContainerInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CommandInfo_ContainerInfobut is not nil && this == nil") + } + if this.Image != nil && that1.Image != nil { + if *this.Image != *that1.Image { + return fmt.Errorf("Image this(%v) Not Equal that(%v)", *this.Image, *that1.Image) + } + } else if this.Image != nil { + return fmt.Errorf("this.Image == nil && that.Image != nil") + } else if that1.Image != nil { + return fmt.Errorf("Image this(%v) Not Equal that(%v)", this.Image, that1.Image) + } + if len(this.Options) != len(that1.Options) { + return fmt.Errorf("Options this(%v) Not Equal that(%v)", len(this.Options), len(that1.Options)) + } + for i := range this.Options { + if this.Options[i] != that1.Options[i] { + return fmt.Errorf("Options this[%v](%v) Not Equal that[%v](%v)", i, this.Options[i], i, that1.Options[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CommandInfo_ContainerInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CommandInfo_ContainerInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Image != nil && that1.Image != nil { + if *this.Image != *that1.Image { + return false + } + } else if this.Image != nil { + return false + } else if that1.Image != nil { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if this.Options[i] != that1.Options[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ExecutorInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ExecutorInfo) + if !ok { + return fmt.Errorf("that is not of type *ExecutorInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ExecutorInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ExecutorInfobut is not nil && this == nil") + } + if !this.ExecutorId.Equal(that1.ExecutorId) { + return fmt.Errorf("ExecutorId this(%v) Not Equal that(%v)", this.ExecutorId, that1.ExecutorId) + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return fmt.Errorf("FrameworkId this(%v) Not Equal that(%v)", this.FrameworkId, that1.FrameworkId) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", *this.Source, *that1.Source) + } + } else if this.Source != nil { + return fmt.Errorf("this.Source == nil && that.Source != nil") + } else if that1.Source != nil { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !this.Discovery.Equal(that1.Discovery) { + return fmt.Errorf("Discovery this(%v) Not Equal that(%v)", this.Discovery, that1.Discovery) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ExecutorInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ExecutorInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ExecutorId.Equal(that1.ExecutorId) { + return false + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return false + } + } else if this.Source != nil { + return false + } else if that1.Source != nil { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !this.Discovery.Equal(that1.Discovery) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MasterInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MasterInfo) + if !ok { + return fmt.Errorf("that is not of type *MasterInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MasterInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MasterInfobut is not nil && this == nil") + } + if this.Id != nil && that1.Id != nil { + if *this.Id != *that1.Id { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", *this.Id, *that1.Id) + } + } else if this.Id != nil { + return fmt.Errorf("this.Id == nil && that.Id != nil") + } else if that1.Id != nil { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if this.Ip != nil && that1.Ip != nil { + if *this.Ip != *that1.Ip { + return fmt.Errorf("Ip this(%v) Not Equal that(%v)", *this.Ip, *that1.Ip) + } + } else if this.Ip != nil { + return fmt.Errorf("this.Ip == nil && that.Ip != nil") + } else if that1.Ip != nil { + return fmt.Errorf("Ip this(%v) Not Equal that(%v)", this.Ip, that1.Ip) + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) + } + } else if this.Port != nil { + return fmt.Errorf("this.Port == nil && that.Port != nil") + } else if that1.Port != nil { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + if this.Pid != nil && that1.Pid != nil { + if *this.Pid != *that1.Pid { + return fmt.Errorf("Pid this(%v) Not Equal that(%v)", *this.Pid, *that1.Pid) + } + } else if this.Pid != nil { + return fmt.Errorf("this.Pid == nil && that.Pid != nil") + } else if that1.Pid != nil { + return fmt.Errorf("Pid this(%v) Not Equal that(%v)", this.Pid, that1.Pid) + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", *this.Version, *that1.Version) + } + } else if this.Version != nil { + return fmt.Errorf("this.Version == nil && that.Version != nil") + } else if that1.Version != nil { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", this.Version, that1.Version) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MasterInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MasterInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Id != nil && that1.Id != nil { + if *this.Id != *that1.Id { + return false + } + } else if this.Id != nil { + return false + } else if that1.Id != nil { + return false + } + if this.Ip != nil && that1.Ip != nil { + if *this.Ip != *that1.Ip { + return false + } + } else if this.Ip != nil { + return false + } else if that1.Ip != nil { + return false + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return false + } + } else if this.Port != nil { + return false + } else if that1.Port != nil { + return false + } + if this.Pid != nil && that1.Pid != nil { + if *this.Pid != *that1.Pid { + return false + } + } else if this.Pid != nil { + return false + } else if that1.Pid != nil { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return false + } + } else if this.Version != nil { + return false + } else if that1.Version != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SlaveInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SlaveInfo) + if !ok { + return fmt.Errorf("that is not of type *SlaveInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SlaveInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SlaveInfobut is not nil && this == nil") + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) + } + } else if this.Port != nil { + return fmt.Errorf("this.Port == nil && that.Port != nil") + } else if that1.Port != nil { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if len(this.Attributes) != len(that1.Attributes) { + return fmt.Errorf("Attributes this(%v) Not Equal that(%v)", len(this.Attributes), len(that1.Attributes)) + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(that1.Attributes[i]) { + return fmt.Errorf("Attributes this[%v](%v) Not Equal that[%v](%v)", i, this.Attributes[i], i, that1.Attributes[i]) + } + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if this.Checkpoint != nil && that1.Checkpoint != nil { + if *this.Checkpoint != *that1.Checkpoint { + return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", *this.Checkpoint, *that1.Checkpoint) + } + } else if this.Checkpoint != nil { + return fmt.Errorf("this.Checkpoint == nil && that.Checkpoint != nil") + } else if that1.Checkpoint != nil { + return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", this.Checkpoint, that1.Checkpoint) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SlaveInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SlaveInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return false + } + } else if this.Port != nil { + return false + } else if that1.Port != nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(that1.Attributes[i]) { + return false + } + } + if !this.Id.Equal(that1.Id) { + return false + } + if this.Checkpoint != nil && that1.Checkpoint != nil { + if *this.Checkpoint != *that1.Checkpoint { + return false + } + } else if this.Checkpoint != nil { + return false + } else if that1.Checkpoint != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value) + if !ok { + return fmt.Errorf("that is not of type *Value") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Valuebut is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Scalar.Equal(that1.Scalar) { + return fmt.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + } + if !this.Ranges.Equal(that1.Ranges) { + return fmt.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + } + if !this.Set.Equal(that1.Set) { + return fmt.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + } + if !this.Text.Equal(that1.Text) { + return fmt.Errorf("Text this(%v) Not Equal that(%v)", this.Text, that1.Text) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Value) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Scalar.Equal(that1.Scalar) { + return false + } + if !this.Ranges.Equal(that1.Ranges) { + return false + } + if !this.Set.Equal(that1.Set) { + return false + } + if !this.Text.Equal(that1.Text) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_Scalar) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Scalar) + if !ok { + return fmt.Errorf("that is not of type *Value_Scalar") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Scalar but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Scalarbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Value_Scalar) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Scalar) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_Range) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Range) + if !ok { + return fmt.Errorf("that is not of type *Value_Range") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Range but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Rangebut is not nil && this == nil") + } + if this.Begin != nil && that1.Begin != nil { + if *this.Begin != *that1.Begin { + return fmt.Errorf("Begin this(%v) Not Equal that(%v)", *this.Begin, *that1.Begin) + } + } else if this.Begin != nil { + return fmt.Errorf("this.Begin == nil && that.Begin != nil") + } else if that1.Begin != nil { + return fmt.Errorf("Begin this(%v) Not Equal that(%v)", this.Begin, that1.Begin) + } + if this.End != nil && that1.End != nil { + if *this.End != *that1.End { + return fmt.Errorf("End this(%v) Not Equal that(%v)", *this.End, *that1.End) + } + } else if this.End != nil { + return fmt.Errorf("this.End == nil && that.End != nil") + } else if that1.End != nil { + return fmt.Errorf("End this(%v) Not Equal that(%v)", this.End, that1.End) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Value_Range) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Range) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Begin != nil && that1.Begin != nil { + if *this.Begin != *that1.Begin { + return false + } + } else if this.Begin != nil { + return false + } else if that1.Begin != nil { + return false + } + if this.End != nil && that1.End != nil { + if *this.End != *that1.End { + return false + } + } else if this.End != nil { + return false + } else if that1.End != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_Ranges) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Ranges) + if !ok { + return fmt.Errorf("that is not of type *Value_Ranges") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Ranges but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Rangesbut is not nil && this == nil") + } + if len(this.Range) != len(that1.Range) { + return fmt.Errorf("Range this(%v) Not Equal that(%v)", len(this.Range), len(that1.Range)) + } + for i := range this.Range { + if !this.Range[i].Equal(that1.Range[i]) { + return fmt.Errorf("Range this[%v](%v) Not Equal that[%v](%v)", i, this.Range[i], i, that1.Range[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Value_Ranges) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Ranges) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Range) != len(that1.Range) { + return false + } + for i := range this.Range { + if !this.Range[i].Equal(that1.Range[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_Set) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Set) + if !ok { + return fmt.Errorf("that is not of type *Value_Set") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Set but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Setbut is not nil && this == nil") + } + if len(this.Item) != len(that1.Item) { + return fmt.Errorf("Item this(%v) Not Equal that(%v)", len(this.Item), len(that1.Item)) + } + for i := range this.Item { + if this.Item[i] != that1.Item[i] { + return fmt.Errorf("Item this[%v](%v) Not Equal that[%v](%v)", i, this.Item[i], i, that1.Item[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Value_Set) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Set) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Item) != len(that1.Item) { + return false + } + for i := range this.Item { + if this.Item[i] != that1.Item[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_Text) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Text) + if !ok { + return fmt.Errorf("that is not of type *Value_Text") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Text but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Textbut is not nil && this == nil") + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Value_Text) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Text) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Attribute) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Attribute) + if !ok { + return fmt.Errorf("that is not of type *Attribute") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Attribute but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Attributebut is not nil && this == nil") + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Scalar.Equal(that1.Scalar) { + return fmt.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + } + if !this.Ranges.Equal(that1.Ranges) { + return fmt.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + } + if !this.Set.Equal(that1.Set) { + return fmt.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + } + if !this.Text.Equal(that1.Text) { + return fmt.Errorf("Text this(%v) Not Equal that(%v)", this.Text, that1.Text) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Attribute) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Attribute) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Scalar.Equal(that1.Scalar) { + return false + } + if !this.Ranges.Equal(that1.Ranges) { + return false + } + if !this.Set.Equal(that1.Set) { + return false + } + if !this.Text.Equal(that1.Text) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Resource) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource) + if !ok { + return fmt.Errorf("that is not of type *Resource") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resourcebut is not nil && this == nil") + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Scalar.Equal(that1.Scalar) { + return fmt.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + } + if !this.Ranges.Equal(that1.Ranges) { + return fmt.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + } + if !this.Set.Equal(that1.Set) { + return fmt.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) + } + } else if this.Role != nil { + return fmt.Errorf("this.Role == nil && that.Role != nil") + } else if that1.Role != nil { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + } + if !this.Reservation.Equal(that1.Reservation) { + return fmt.Errorf("Reservation this(%v) Not Equal that(%v)", this.Reservation, that1.Reservation) + } + if !this.Disk.Equal(that1.Disk) { + return fmt.Errorf("Disk this(%v) Not Equal that(%v)", this.Disk, that1.Disk) + } + if !this.Revocable.Equal(that1.Revocable) { + return fmt.Errorf("Revocable this(%v) Not Equal that(%v)", this.Revocable, that1.Revocable) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Resource) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Scalar.Equal(that1.Scalar) { + return false + } + if !this.Ranges.Equal(that1.Ranges) { + return false + } + if !this.Set.Equal(that1.Set) { + return false + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return false + } + } else if this.Role != nil { + return false + } else if that1.Role != nil { + return false + } + if !this.Reservation.Equal(that1.Reservation) { + return false + } + if !this.Disk.Equal(that1.Disk) { + return false + } + if !this.Revocable.Equal(that1.Revocable) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Resource_ReservationInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_ReservationInfo) + if !ok { + return fmt.Errorf("that is not of type *Resource_ReservationInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_ReservationInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_ReservationInfobut is not nil && this == nil") + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + } + } else if this.Principal != nil { + return fmt.Errorf("this.Principal == nil && that.Principal != nil") + } else if that1.Principal != nil { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Resource_ReservationInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_ReservationInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return false + } + } else if this.Principal != nil { + return false + } else if that1.Principal != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Resource_DiskInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_DiskInfo) + if !ok { + return fmt.Errorf("that is not of type *Resource_DiskInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_DiskInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_DiskInfobut is not nil && this == nil") + } + if !this.Persistence.Equal(that1.Persistence) { + return fmt.Errorf("Persistence this(%v) Not Equal that(%v)", this.Persistence, that1.Persistence) + } + if !this.Volume.Equal(that1.Volume) { + return fmt.Errorf("Volume this(%v) Not Equal that(%v)", this.Volume, that1.Volume) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Resource_DiskInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_DiskInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Persistence.Equal(that1.Persistence) { + return false + } + if !this.Volume.Equal(that1.Volume) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Resource_DiskInfo_Persistence) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_DiskInfo_Persistence) + if !ok { + return fmt.Errorf("that is not of type *Resource_DiskInfo_Persistence") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_DiskInfo_Persistence but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_DiskInfo_Persistencebut is not nil && this == nil") + } + if this.Id != nil && that1.Id != nil { + if *this.Id != *that1.Id { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", *this.Id, *that1.Id) + } + } else if this.Id != nil { + return fmt.Errorf("this.Id == nil && that.Id != nil") + } else if that1.Id != nil { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Resource_DiskInfo_Persistence) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_DiskInfo_Persistence) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Id != nil && that1.Id != nil { + if *this.Id != *that1.Id { + return false + } + } else if this.Id != nil { + return false + } else if that1.Id != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Resource_RevocableInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_RevocableInfo) + if !ok { + return fmt.Errorf("that is not of type *Resource_RevocableInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_RevocableInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_RevocableInfobut is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Resource_RevocableInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_RevocableInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TrafficControlStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TrafficControlStatistics) + if !ok { + return fmt.Errorf("that is not of type *TrafficControlStatistics") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TrafficControlStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TrafficControlStatisticsbut is not nil && this == nil") + } + if this.Id != nil && that1.Id != nil { + if *this.Id != *that1.Id { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", *this.Id, *that1.Id) + } + } else if this.Id != nil { + return fmt.Errorf("this.Id == nil && that.Id != nil") + } else if that1.Id != nil { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if this.Backlog != nil && that1.Backlog != nil { + if *this.Backlog != *that1.Backlog { + return fmt.Errorf("Backlog this(%v) Not Equal that(%v)", *this.Backlog, *that1.Backlog) + } + } else if this.Backlog != nil { + return fmt.Errorf("this.Backlog == nil && that.Backlog != nil") + } else if that1.Backlog != nil { + return fmt.Errorf("Backlog this(%v) Not Equal that(%v)", this.Backlog, that1.Backlog) + } + if this.Bytes != nil && that1.Bytes != nil { + if *this.Bytes != *that1.Bytes { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", *this.Bytes, *that1.Bytes) + } + } else if this.Bytes != nil { + return fmt.Errorf("this.Bytes == nil && that.Bytes != nil") + } else if that1.Bytes != nil { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if this.Drops != nil && that1.Drops != nil { + if *this.Drops != *that1.Drops { + return fmt.Errorf("Drops this(%v) Not Equal that(%v)", *this.Drops, *that1.Drops) + } + } else if this.Drops != nil { + return fmt.Errorf("this.Drops == nil && that.Drops != nil") + } else if that1.Drops != nil { + return fmt.Errorf("Drops this(%v) Not Equal that(%v)", this.Drops, that1.Drops) + } + if this.Overlimits != nil && that1.Overlimits != nil { + if *this.Overlimits != *that1.Overlimits { + return fmt.Errorf("Overlimits this(%v) Not Equal that(%v)", *this.Overlimits, *that1.Overlimits) + } + } else if this.Overlimits != nil { + return fmt.Errorf("this.Overlimits == nil && that.Overlimits != nil") + } else if that1.Overlimits != nil { + return fmt.Errorf("Overlimits this(%v) Not Equal that(%v)", this.Overlimits, that1.Overlimits) + } + if this.Packets != nil && that1.Packets != nil { + if *this.Packets != *that1.Packets { + return fmt.Errorf("Packets this(%v) Not Equal that(%v)", *this.Packets, *that1.Packets) + } + } else if this.Packets != nil { + return fmt.Errorf("this.Packets == nil && that.Packets != nil") + } else if that1.Packets != nil { + return fmt.Errorf("Packets this(%v) Not Equal that(%v)", this.Packets, that1.Packets) + } + if this.Qlen != nil && that1.Qlen != nil { + if *this.Qlen != *that1.Qlen { + return fmt.Errorf("Qlen this(%v) Not Equal that(%v)", *this.Qlen, *that1.Qlen) + } + } else if this.Qlen != nil { + return fmt.Errorf("this.Qlen == nil && that.Qlen != nil") + } else if that1.Qlen != nil { + return fmt.Errorf("Qlen this(%v) Not Equal that(%v)", this.Qlen, that1.Qlen) + } + if this.Ratebps != nil && that1.Ratebps != nil { + if *this.Ratebps != *that1.Ratebps { + return fmt.Errorf("Ratebps this(%v) Not Equal that(%v)", *this.Ratebps, *that1.Ratebps) + } + } else if this.Ratebps != nil { + return fmt.Errorf("this.Ratebps == nil && that.Ratebps != nil") + } else if that1.Ratebps != nil { + return fmt.Errorf("Ratebps this(%v) Not Equal that(%v)", this.Ratebps, that1.Ratebps) + } + if this.Ratepps != nil && that1.Ratepps != nil { + if *this.Ratepps != *that1.Ratepps { + return fmt.Errorf("Ratepps this(%v) Not Equal that(%v)", *this.Ratepps, *that1.Ratepps) + } + } else if this.Ratepps != nil { + return fmt.Errorf("this.Ratepps == nil && that.Ratepps != nil") + } else if that1.Ratepps != nil { + return fmt.Errorf("Ratepps this(%v) Not Equal that(%v)", this.Ratepps, that1.Ratepps) + } + if this.Requeues != nil && that1.Requeues != nil { + if *this.Requeues != *that1.Requeues { + return fmt.Errorf("Requeues this(%v) Not Equal that(%v)", *this.Requeues, *that1.Requeues) + } + } else if this.Requeues != nil { + return fmt.Errorf("this.Requeues == nil && that.Requeues != nil") + } else if that1.Requeues != nil { + return fmt.Errorf("Requeues this(%v) Not Equal that(%v)", this.Requeues, that1.Requeues) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TrafficControlStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TrafficControlStatistics) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Id != nil && that1.Id != nil { + if *this.Id != *that1.Id { + return false + } + } else if this.Id != nil { + return false + } else if that1.Id != nil { + return false + } + if this.Backlog != nil && that1.Backlog != nil { + if *this.Backlog != *that1.Backlog { + return false + } + } else if this.Backlog != nil { + return false + } else if that1.Backlog != nil { + return false + } + if this.Bytes != nil && that1.Bytes != nil { + if *this.Bytes != *that1.Bytes { + return false + } + } else if this.Bytes != nil { + return false + } else if that1.Bytes != nil { + return false + } + if this.Drops != nil && that1.Drops != nil { + if *this.Drops != *that1.Drops { + return false + } + } else if this.Drops != nil { + return false + } else if that1.Drops != nil { + return false + } + if this.Overlimits != nil && that1.Overlimits != nil { + if *this.Overlimits != *that1.Overlimits { + return false + } + } else if this.Overlimits != nil { + return false + } else if that1.Overlimits != nil { + return false + } + if this.Packets != nil && that1.Packets != nil { + if *this.Packets != *that1.Packets { + return false + } + } else if this.Packets != nil { + return false + } else if that1.Packets != nil { + return false + } + if this.Qlen != nil && that1.Qlen != nil { + if *this.Qlen != *that1.Qlen { + return false + } + } else if this.Qlen != nil { + return false + } else if that1.Qlen != nil { + return false + } + if this.Ratebps != nil && that1.Ratebps != nil { + if *this.Ratebps != *that1.Ratebps { + return false + } + } else if this.Ratebps != nil { + return false + } else if that1.Ratebps != nil { + return false + } + if this.Ratepps != nil && that1.Ratepps != nil { + if *this.Ratepps != *that1.Ratepps { + return false + } + } else if this.Ratepps != nil { + return false + } else if that1.Ratepps != nil { + return false + } + if this.Requeues != nil && that1.Requeues != nil { + if *this.Requeues != *that1.Requeues { + return false + } + } else if this.Requeues != nil { + return false + } else if that1.Requeues != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ResourceStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceStatistics) + if !ok { + return fmt.Errorf("that is not of type *ResourceStatistics") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceStatisticsbut is not nil && this == nil") + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", *this.Timestamp, *that1.Timestamp) + } + } else if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp == nil && that.Timestamp != nil") + } else if that1.Timestamp != nil { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Processes != nil && that1.Processes != nil { + if *this.Processes != *that1.Processes { + return fmt.Errorf("Processes this(%v) Not Equal that(%v)", *this.Processes, *that1.Processes) + } + } else if this.Processes != nil { + return fmt.Errorf("this.Processes == nil && that.Processes != nil") + } else if that1.Processes != nil { + return fmt.Errorf("Processes this(%v) Not Equal that(%v)", this.Processes, that1.Processes) + } + if this.Threads != nil && that1.Threads != nil { + if *this.Threads != *that1.Threads { + return fmt.Errorf("Threads this(%v) Not Equal that(%v)", *this.Threads, *that1.Threads) + } + } else if this.Threads != nil { + return fmt.Errorf("this.Threads == nil && that.Threads != nil") + } else if that1.Threads != nil { + return fmt.Errorf("Threads this(%v) Not Equal that(%v)", this.Threads, that1.Threads) + } + if this.CpusUserTimeSecs != nil && that1.CpusUserTimeSecs != nil { + if *this.CpusUserTimeSecs != *that1.CpusUserTimeSecs { + return fmt.Errorf("CpusUserTimeSecs this(%v) Not Equal that(%v)", *this.CpusUserTimeSecs, *that1.CpusUserTimeSecs) + } + } else if this.CpusUserTimeSecs != nil { + return fmt.Errorf("this.CpusUserTimeSecs == nil && that.CpusUserTimeSecs != nil") + } else if that1.CpusUserTimeSecs != nil { + return fmt.Errorf("CpusUserTimeSecs this(%v) Not Equal that(%v)", this.CpusUserTimeSecs, that1.CpusUserTimeSecs) + } + if this.CpusSystemTimeSecs != nil && that1.CpusSystemTimeSecs != nil { + if *this.CpusSystemTimeSecs != *that1.CpusSystemTimeSecs { + return fmt.Errorf("CpusSystemTimeSecs this(%v) Not Equal that(%v)", *this.CpusSystemTimeSecs, *that1.CpusSystemTimeSecs) + } + } else if this.CpusSystemTimeSecs != nil { + return fmt.Errorf("this.CpusSystemTimeSecs == nil && that.CpusSystemTimeSecs != nil") + } else if that1.CpusSystemTimeSecs != nil { + return fmt.Errorf("CpusSystemTimeSecs this(%v) Not Equal that(%v)", this.CpusSystemTimeSecs, that1.CpusSystemTimeSecs) + } + if this.CpusLimit != nil && that1.CpusLimit != nil { + if *this.CpusLimit != *that1.CpusLimit { + return fmt.Errorf("CpusLimit this(%v) Not Equal that(%v)", *this.CpusLimit, *that1.CpusLimit) + } + } else if this.CpusLimit != nil { + return fmt.Errorf("this.CpusLimit == nil && that.CpusLimit != nil") + } else if that1.CpusLimit != nil { + return fmt.Errorf("CpusLimit this(%v) Not Equal that(%v)", this.CpusLimit, that1.CpusLimit) + } + if this.CpusNrPeriods != nil && that1.CpusNrPeriods != nil { + if *this.CpusNrPeriods != *that1.CpusNrPeriods { + return fmt.Errorf("CpusNrPeriods this(%v) Not Equal that(%v)", *this.CpusNrPeriods, *that1.CpusNrPeriods) + } + } else if this.CpusNrPeriods != nil { + return fmt.Errorf("this.CpusNrPeriods == nil && that.CpusNrPeriods != nil") + } else if that1.CpusNrPeriods != nil { + return fmt.Errorf("CpusNrPeriods this(%v) Not Equal that(%v)", this.CpusNrPeriods, that1.CpusNrPeriods) + } + if this.CpusNrThrottled != nil && that1.CpusNrThrottled != nil { + if *this.CpusNrThrottled != *that1.CpusNrThrottled { + return fmt.Errorf("CpusNrThrottled this(%v) Not Equal that(%v)", *this.CpusNrThrottled, *that1.CpusNrThrottled) + } + } else if this.CpusNrThrottled != nil { + return fmt.Errorf("this.CpusNrThrottled == nil && that.CpusNrThrottled != nil") + } else if that1.CpusNrThrottled != nil { + return fmt.Errorf("CpusNrThrottled this(%v) Not Equal that(%v)", this.CpusNrThrottled, that1.CpusNrThrottled) + } + if this.CpusThrottledTimeSecs != nil && that1.CpusThrottledTimeSecs != nil { + if *this.CpusThrottledTimeSecs != *that1.CpusThrottledTimeSecs { + return fmt.Errorf("CpusThrottledTimeSecs this(%v) Not Equal that(%v)", *this.CpusThrottledTimeSecs, *that1.CpusThrottledTimeSecs) + } + } else if this.CpusThrottledTimeSecs != nil { + return fmt.Errorf("this.CpusThrottledTimeSecs == nil && that.CpusThrottledTimeSecs != nil") + } else if that1.CpusThrottledTimeSecs != nil { + return fmt.Errorf("CpusThrottledTimeSecs this(%v) Not Equal that(%v)", this.CpusThrottledTimeSecs, that1.CpusThrottledTimeSecs) + } + if this.MemTotalBytes != nil && that1.MemTotalBytes != nil { + if *this.MemTotalBytes != *that1.MemTotalBytes { + return fmt.Errorf("MemTotalBytes this(%v) Not Equal that(%v)", *this.MemTotalBytes, *that1.MemTotalBytes) + } + } else if this.MemTotalBytes != nil { + return fmt.Errorf("this.MemTotalBytes == nil && that.MemTotalBytes != nil") + } else if that1.MemTotalBytes != nil { + return fmt.Errorf("MemTotalBytes this(%v) Not Equal that(%v)", this.MemTotalBytes, that1.MemTotalBytes) + } + if this.MemTotalMemswBytes != nil && that1.MemTotalMemswBytes != nil { + if *this.MemTotalMemswBytes != *that1.MemTotalMemswBytes { + return fmt.Errorf("MemTotalMemswBytes this(%v) Not Equal that(%v)", *this.MemTotalMemswBytes, *that1.MemTotalMemswBytes) + } + } else if this.MemTotalMemswBytes != nil { + return fmt.Errorf("this.MemTotalMemswBytes == nil && that.MemTotalMemswBytes != nil") + } else if that1.MemTotalMemswBytes != nil { + return fmt.Errorf("MemTotalMemswBytes this(%v) Not Equal that(%v)", this.MemTotalMemswBytes, that1.MemTotalMemswBytes) + } + if this.MemLimitBytes != nil && that1.MemLimitBytes != nil { + if *this.MemLimitBytes != *that1.MemLimitBytes { + return fmt.Errorf("MemLimitBytes this(%v) Not Equal that(%v)", *this.MemLimitBytes, *that1.MemLimitBytes) + } + } else if this.MemLimitBytes != nil { + return fmt.Errorf("this.MemLimitBytes == nil && that.MemLimitBytes != nil") + } else if that1.MemLimitBytes != nil { + return fmt.Errorf("MemLimitBytes this(%v) Not Equal that(%v)", this.MemLimitBytes, that1.MemLimitBytes) + } + if this.MemSoftLimitBytes != nil && that1.MemSoftLimitBytes != nil { + if *this.MemSoftLimitBytes != *that1.MemSoftLimitBytes { + return fmt.Errorf("MemSoftLimitBytes this(%v) Not Equal that(%v)", *this.MemSoftLimitBytes, *that1.MemSoftLimitBytes) + } + } else if this.MemSoftLimitBytes != nil { + return fmt.Errorf("this.MemSoftLimitBytes == nil && that.MemSoftLimitBytes != nil") + } else if that1.MemSoftLimitBytes != nil { + return fmt.Errorf("MemSoftLimitBytes this(%v) Not Equal that(%v)", this.MemSoftLimitBytes, that1.MemSoftLimitBytes) + } + if this.MemFileBytes != nil && that1.MemFileBytes != nil { + if *this.MemFileBytes != *that1.MemFileBytes { + return fmt.Errorf("MemFileBytes this(%v) Not Equal that(%v)", *this.MemFileBytes, *that1.MemFileBytes) + } + } else if this.MemFileBytes != nil { + return fmt.Errorf("this.MemFileBytes == nil && that.MemFileBytes != nil") + } else if that1.MemFileBytes != nil { + return fmt.Errorf("MemFileBytes this(%v) Not Equal that(%v)", this.MemFileBytes, that1.MemFileBytes) + } + if this.MemAnonBytes != nil && that1.MemAnonBytes != nil { + if *this.MemAnonBytes != *that1.MemAnonBytes { + return fmt.Errorf("MemAnonBytes this(%v) Not Equal that(%v)", *this.MemAnonBytes, *that1.MemAnonBytes) + } + } else if this.MemAnonBytes != nil { + return fmt.Errorf("this.MemAnonBytes == nil && that.MemAnonBytes != nil") + } else if that1.MemAnonBytes != nil { + return fmt.Errorf("MemAnonBytes this(%v) Not Equal that(%v)", this.MemAnonBytes, that1.MemAnonBytes) + } + if this.MemCacheBytes != nil && that1.MemCacheBytes != nil { + if *this.MemCacheBytes != *that1.MemCacheBytes { + return fmt.Errorf("MemCacheBytes this(%v) Not Equal that(%v)", *this.MemCacheBytes, *that1.MemCacheBytes) + } + } else if this.MemCacheBytes != nil { + return fmt.Errorf("this.MemCacheBytes == nil && that.MemCacheBytes != nil") + } else if that1.MemCacheBytes != nil { + return fmt.Errorf("MemCacheBytes this(%v) Not Equal that(%v)", this.MemCacheBytes, that1.MemCacheBytes) + } + if this.MemRssBytes != nil && that1.MemRssBytes != nil { + if *this.MemRssBytes != *that1.MemRssBytes { + return fmt.Errorf("MemRssBytes this(%v) Not Equal that(%v)", *this.MemRssBytes, *that1.MemRssBytes) + } + } else if this.MemRssBytes != nil { + return fmt.Errorf("this.MemRssBytes == nil && that.MemRssBytes != nil") + } else if that1.MemRssBytes != nil { + return fmt.Errorf("MemRssBytes this(%v) Not Equal that(%v)", this.MemRssBytes, that1.MemRssBytes) + } + if this.MemMappedFileBytes != nil && that1.MemMappedFileBytes != nil { + if *this.MemMappedFileBytes != *that1.MemMappedFileBytes { + return fmt.Errorf("MemMappedFileBytes this(%v) Not Equal that(%v)", *this.MemMappedFileBytes, *that1.MemMappedFileBytes) + } + } else if this.MemMappedFileBytes != nil { + return fmt.Errorf("this.MemMappedFileBytes == nil && that.MemMappedFileBytes != nil") + } else if that1.MemMappedFileBytes != nil { + return fmt.Errorf("MemMappedFileBytes this(%v) Not Equal that(%v)", this.MemMappedFileBytes, that1.MemMappedFileBytes) + } + if this.MemSwapBytes != nil && that1.MemSwapBytes != nil { + if *this.MemSwapBytes != *that1.MemSwapBytes { + return fmt.Errorf("MemSwapBytes this(%v) Not Equal that(%v)", *this.MemSwapBytes, *that1.MemSwapBytes) + } + } else if this.MemSwapBytes != nil { + return fmt.Errorf("this.MemSwapBytes == nil && that.MemSwapBytes != nil") + } else if that1.MemSwapBytes != nil { + return fmt.Errorf("MemSwapBytes this(%v) Not Equal that(%v)", this.MemSwapBytes, that1.MemSwapBytes) + } + if this.MemLowPressureCounter != nil && that1.MemLowPressureCounter != nil { + if *this.MemLowPressureCounter != *that1.MemLowPressureCounter { + return fmt.Errorf("MemLowPressureCounter this(%v) Not Equal that(%v)", *this.MemLowPressureCounter, *that1.MemLowPressureCounter) + } + } else if this.MemLowPressureCounter != nil { + return fmt.Errorf("this.MemLowPressureCounter == nil && that.MemLowPressureCounter != nil") + } else if that1.MemLowPressureCounter != nil { + return fmt.Errorf("MemLowPressureCounter this(%v) Not Equal that(%v)", this.MemLowPressureCounter, that1.MemLowPressureCounter) + } + if this.MemMediumPressureCounter != nil && that1.MemMediumPressureCounter != nil { + if *this.MemMediumPressureCounter != *that1.MemMediumPressureCounter { + return fmt.Errorf("MemMediumPressureCounter this(%v) Not Equal that(%v)", *this.MemMediumPressureCounter, *that1.MemMediumPressureCounter) + } + } else if this.MemMediumPressureCounter != nil { + return fmt.Errorf("this.MemMediumPressureCounter == nil && that.MemMediumPressureCounter != nil") + } else if that1.MemMediumPressureCounter != nil { + return fmt.Errorf("MemMediumPressureCounter this(%v) Not Equal that(%v)", this.MemMediumPressureCounter, that1.MemMediumPressureCounter) + } + if this.MemCriticalPressureCounter != nil && that1.MemCriticalPressureCounter != nil { + if *this.MemCriticalPressureCounter != *that1.MemCriticalPressureCounter { + return fmt.Errorf("MemCriticalPressureCounter this(%v) Not Equal that(%v)", *this.MemCriticalPressureCounter, *that1.MemCriticalPressureCounter) + } + } else if this.MemCriticalPressureCounter != nil { + return fmt.Errorf("this.MemCriticalPressureCounter == nil && that.MemCriticalPressureCounter != nil") + } else if that1.MemCriticalPressureCounter != nil { + return fmt.Errorf("MemCriticalPressureCounter this(%v) Not Equal that(%v)", this.MemCriticalPressureCounter, that1.MemCriticalPressureCounter) + } + if this.DiskLimitBytes != nil && that1.DiskLimitBytes != nil { + if *this.DiskLimitBytes != *that1.DiskLimitBytes { + return fmt.Errorf("DiskLimitBytes this(%v) Not Equal that(%v)", *this.DiskLimitBytes, *that1.DiskLimitBytes) + } + } else if this.DiskLimitBytes != nil { + return fmt.Errorf("this.DiskLimitBytes == nil && that.DiskLimitBytes != nil") + } else if that1.DiskLimitBytes != nil { + return fmt.Errorf("DiskLimitBytes this(%v) Not Equal that(%v)", this.DiskLimitBytes, that1.DiskLimitBytes) + } + if this.DiskUsedBytes != nil && that1.DiskUsedBytes != nil { + if *this.DiskUsedBytes != *that1.DiskUsedBytes { + return fmt.Errorf("DiskUsedBytes this(%v) Not Equal that(%v)", *this.DiskUsedBytes, *that1.DiskUsedBytes) + } + } else if this.DiskUsedBytes != nil { + return fmt.Errorf("this.DiskUsedBytes == nil && that.DiskUsedBytes != nil") + } else if that1.DiskUsedBytes != nil { + return fmt.Errorf("DiskUsedBytes this(%v) Not Equal that(%v)", this.DiskUsedBytes, that1.DiskUsedBytes) + } + if !this.Perf.Equal(that1.Perf) { + return fmt.Errorf("Perf this(%v) Not Equal that(%v)", this.Perf, that1.Perf) + } + if this.NetRxPackets != nil && that1.NetRxPackets != nil { + if *this.NetRxPackets != *that1.NetRxPackets { + return fmt.Errorf("NetRxPackets this(%v) Not Equal that(%v)", *this.NetRxPackets, *that1.NetRxPackets) + } + } else if this.NetRxPackets != nil { + return fmt.Errorf("this.NetRxPackets == nil && that.NetRxPackets != nil") + } else if that1.NetRxPackets != nil { + return fmt.Errorf("NetRxPackets this(%v) Not Equal that(%v)", this.NetRxPackets, that1.NetRxPackets) + } + if this.NetRxBytes != nil && that1.NetRxBytes != nil { + if *this.NetRxBytes != *that1.NetRxBytes { + return fmt.Errorf("NetRxBytes this(%v) Not Equal that(%v)", *this.NetRxBytes, *that1.NetRxBytes) + } + } else if this.NetRxBytes != nil { + return fmt.Errorf("this.NetRxBytes == nil && that.NetRxBytes != nil") + } else if that1.NetRxBytes != nil { + return fmt.Errorf("NetRxBytes this(%v) Not Equal that(%v)", this.NetRxBytes, that1.NetRxBytes) + } + if this.NetRxErrors != nil && that1.NetRxErrors != nil { + if *this.NetRxErrors != *that1.NetRxErrors { + return fmt.Errorf("NetRxErrors this(%v) Not Equal that(%v)", *this.NetRxErrors, *that1.NetRxErrors) + } + } else if this.NetRxErrors != nil { + return fmt.Errorf("this.NetRxErrors == nil && that.NetRxErrors != nil") + } else if that1.NetRxErrors != nil { + return fmt.Errorf("NetRxErrors this(%v) Not Equal that(%v)", this.NetRxErrors, that1.NetRxErrors) + } + if this.NetRxDropped != nil && that1.NetRxDropped != nil { + if *this.NetRxDropped != *that1.NetRxDropped { + return fmt.Errorf("NetRxDropped this(%v) Not Equal that(%v)", *this.NetRxDropped, *that1.NetRxDropped) + } + } else if this.NetRxDropped != nil { + return fmt.Errorf("this.NetRxDropped == nil && that.NetRxDropped != nil") + } else if that1.NetRxDropped != nil { + return fmt.Errorf("NetRxDropped this(%v) Not Equal that(%v)", this.NetRxDropped, that1.NetRxDropped) + } + if this.NetTxPackets != nil && that1.NetTxPackets != nil { + if *this.NetTxPackets != *that1.NetTxPackets { + return fmt.Errorf("NetTxPackets this(%v) Not Equal that(%v)", *this.NetTxPackets, *that1.NetTxPackets) + } + } else if this.NetTxPackets != nil { + return fmt.Errorf("this.NetTxPackets == nil && that.NetTxPackets != nil") + } else if that1.NetTxPackets != nil { + return fmt.Errorf("NetTxPackets this(%v) Not Equal that(%v)", this.NetTxPackets, that1.NetTxPackets) + } + if this.NetTxBytes != nil && that1.NetTxBytes != nil { + if *this.NetTxBytes != *that1.NetTxBytes { + return fmt.Errorf("NetTxBytes this(%v) Not Equal that(%v)", *this.NetTxBytes, *that1.NetTxBytes) + } + } else if this.NetTxBytes != nil { + return fmt.Errorf("this.NetTxBytes == nil && that.NetTxBytes != nil") + } else if that1.NetTxBytes != nil { + return fmt.Errorf("NetTxBytes this(%v) Not Equal that(%v)", this.NetTxBytes, that1.NetTxBytes) + } + if this.NetTxErrors != nil && that1.NetTxErrors != nil { + if *this.NetTxErrors != *that1.NetTxErrors { + return fmt.Errorf("NetTxErrors this(%v) Not Equal that(%v)", *this.NetTxErrors, *that1.NetTxErrors) + } + } else if this.NetTxErrors != nil { + return fmt.Errorf("this.NetTxErrors == nil && that.NetTxErrors != nil") + } else if that1.NetTxErrors != nil { + return fmt.Errorf("NetTxErrors this(%v) Not Equal that(%v)", this.NetTxErrors, that1.NetTxErrors) + } + if this.NetTxDropped != nil && that1.NetTxDropped != nil { + if *this.NetTxDropped != *that1.NetTxDropped { + return fmt.Errorf("NetTxDropped this(%v) Not Equal that(%v)", *this.NetTxDropped, *that1.NetTxDropped) + } + } else if this.NetTxDropped != nil { + return fmt.Errorf("this.NetTxDropped == nil && that.NetTxDropped != nil") + } else if that1.NetTxDropped != nil { + return fmt.Errorf("NetTxDropped this(%v) Not Equal that(%v)", this.NetTxDropped, that1.NetTxDropped) + } + if this.NetTcpRttMicrosecsP50 != nil && that1.NetTcpRttMicrosecsP50 != nil { + if *this.NetTcpRttMicrosecsP50 != *that1.NetTcpRttMicrosecsP50 { + return fmt.Errorf("NetTcpRttMicrosecsP50 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP50, *that1.NetTcpRttMicrosecsP50) + } + } else if this.NetTcpRttMicrosecsP50 != nil { + return fmt.Errorf("this.NetTcpRttMicrosecsP50 == nil && that.NetTcpRttMicrosecsP50 != nil") + } else if that1.NetTcpRttMicrosecsP50 != nil { + return fmt.Errorf("NetTcpRttMicrosecsP50 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP50, that1.NetTcpRttMicrosecsP50) + } + if this.NetTcpRttMicrosecsP90 != nil && that1.NetTcpRttMicrosecsP90 != nil { + if *this.NetTcpRttMicrosecsP90 != *that1.NetTcpRttMicrosecsP90 { + return fmt.Errorf("NetTcpRttMicrosecsP90 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP90, *that1.NetTcpRttMicrosecsP90) + } + } else if this.NetTcpRttMicrosecsP90 != nil { + return fmt.Errorf("this.NetTcpRttMicrosecsP90 == nil && that.NetTcpRttMicrosecsP90 != nil") + } else if that1.NetTcpRttMicrosecsP90 != nil { + return fmt.Errorf("NetTcpRttMicrosecsP90 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP90, that1.NetTcpRttMicrosecsP90) + } + if this.NetTcpRttMicrosecsP95 != nil && that1.NetTcpRttMicrosecsP95 != nil { + if *this.NetTcpRttMicrosecsP95 != *that1.NetTcpRttMicrosecsP95 { + return fmt.Errorf("NetTcpRttMicrosecsP95 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP95, *that1.NetTcpRttMicrosecsP95) + } + } else if this.NetTcpRttMicrosecsP95 != nil { + return fmt.Errorf("this.NetTcpRttMicrosecsP95 == nil && that.NetTcpRttMicrosecsP95 != nil") + } else if that1.NetTcpRttMicrosecsP95 != nil { + return fmt.Errorf("NetTcpRttMicrosecsP95 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP95, that1.NetTcpRttMicrosecsP95) + } + if this.NetTcpRttMicrosecsP99 != nil && that1.NetTcpRttMicrosecsP99 != nil { + if *this.NetTcpRttMicrosecsP99 != *that1.NetTcpRttMicrosecsP99 { + return fmt.Errorf("NetTcpRttMicrosecsP99 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP99, *that1.NetTcpRttMicrosecsP99) + } + } else if this.NetTcpRttMicrosecsP99 != nil { + return fmt.Errorf("this.NetTcpRttMicrosecsP99 == nil && that.NetTcpRttMicrosecsP99 != nil") + } else if that1.NetTcpRttMicrosecsP99 != nil { + return fmt.Errorf("NetTcpRttMicrosecsP99 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP99, that1.NetTcpRttMicrosecsP99) + } + if this.NetTcpActiveConnections != nil && that1.NetTcpActiveConnections != nil { + if *this.NetTcpActiveConnections != *that1.NetTcpActiveConnections { + return fmt.Errorf("NetTcpActiveConnections this(%v) Not Equal that(%v)", *this.NetTcpActiveConnections, *that1.NetTcpActiveConnections) + } + } else if this.NetTcpActiveConnections != nil { + return fmt.Errorf("this.NetTcpActiveConnections == nil && that.NetTcpActiveConnections != nil") + } else if that1.NetTcpActiveConnections != nil { + return fmt.Errorf("NetTcpActiveConnections this(%v) Not Equal that(%v)", this.NetTcpActiveConnections, that1.NetTcpActiveConnections) + } + if this.NetTcpTimeWaitConnections != nil && that1.NetTcpTimeWaitConnections != nil { + if *this.NetTcpTimeWaitConnections != *that1.NetTcpTimeWaitConnections { + return fmt.Errorf("NetTcpTimeWaitConnections this(%v) Not Equal that(%v)", *this.NetTcpTimeWaitConnections, *that1.NetTcpTimeWaitConnections) + } + } else if this.NetTcpTimeWaitConnections != nil { + return fmt.Errorf("this.NetTcpTimeWaitConnections == nil && that.NetTcpTimeWaitConnections != nil") + } else if that1.NetTcpTimeWaitConnections != nil { + return fmt.Errorf("NetTcpTimeWaitConnections this(%v) Not Equal that(%v)", this.NetTcpTimeWaitConnections, that1.NetTcpTimeWaitConnections) + } + if len(this.NetTrafficControlStatistics) != len(that1.NetTrafficControlStatistics) { + return fmt.Errorf("NetTrafficControlStatistics this(%v) Not Equal that(%v)", len(this.NetTrafficControlStatistics), len(that1.NetTrafficControlStatistics)) + } + for i := range this.NetTrafficControlStatistics { + if !this.NetTrafficControlStatistics[i].Equal(that1.NetTrafficControlStatistics[i]) { + return fmt.Errorf("NetTrafficControlStatistics this[%v](%v) Not Equal that[%v](%v)", i, this.NetTrafficControlStatistics[i], i, that1.NetTrafficControlStatistics[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ResourceStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceStatistics) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return false + } + } else if this.Timestamp != nil { + return false + } else if that1.Timestamp != nil { + return false + } + if this.Processes != nil && that1.Processes != nil { + if *this.Processes != *that1.Processes { + return false + } + } else if this.Processes != nil { + return false + } else if that1.Processes != nil { + return false + } + if this.Threads != nil && that1.Threads != nil { + if *this.Threads != *that1.Threads { + return false + } + } else if this.Threads != nil { + return false + } else if that1.Threads != nil { + return false + } + if this.CpusUserTimeSecs != nil && that1.CpusUserTimeSecs != nil { + if *this.CpusUserTimeSecs != *that1.CpusUserTimeSecs { + return false + } + } else if this.CpusUserTimeSecs != nil { + return false + } else if that1.CpusUserTimeSecs != nil { + return false + } + if this.CpusSystemTimeSecs != nil && that1.CpusSystemTimeSecs != nil { + if *this.CpusSystemTimeSecs != *that1.CpusSystemTimeSecs { + return false + } + } else if this.CpusSystemTimeSecs != nil { + return false + } else if that1.CpusSystemTimeSecs != nil { + return false + } + if this.CpusLimit != nil && that1.CpusLimit != nil { + if *this.CpusLimit != *that1.CpusLimit { + return false + } + } else if this.CpusLimit != nil { + return false + } else if that1.CpusLimit != nil { + return false + } + if this.CpusNrPeriods != nil && that1.CpusNrPeriods != nil { + if *this.CpusNrPeriods != *that1.CpusNrPeriods { + return false + } + } else if this.CpusNrPeriods != nil { + return false + } else if that1.CpusNrPeriods != nil { + return false + } + if this.CpusNrThrottled != nil && that1.CpusNrThrottled != nil { + if *this.CpusNrThrottled != *that1.CpusNrThrottled { + return false + } + } else if this.CpusNrThrottled != nil { + return false + } else if that1.CpusNrThrottled != nil { + return false + } + if this.CpusThrottledTimeSecs != nil && that1.CpusThrottledTimeSecs != nil { + if *this.CpusThrottledTimeSecs != *that1.CpusThrottledTimeSecs { + return false + } + } else if this.CpusThrottledTimeSecs != nil { + return false + } else if that1.CpusThrottledTimeSecs != nil { + return false + } + if this.MemTotalBytes != nil && that1.MemTotalBytes != nil { + if *this.MemTotalBytes != *that1.MemTotalBytes { + return false + } + } else if this.MemTotalBytes != nil { + return false + } else if that1.MemTotalBytes != nil { + return false + } + if this.MemTotalMemswBytes != nil && that1.MemTotalMemswBytes != nil { + if *this.MemTotalMemswBytes != *that1.MemTotalMemswBytes { + return false + } + } else if this.MemTotalMemswBytes != nil { + return false + } else if that1.MemTotalMemswBytes != nil { + return false + } + if this.MemLimitBytes != nil && that1.MemLimitBytes != nil { + if *this.MemLimitBytes != *that1.MemLimitBytes { + return false + } + } else if this.MemLimitBytes != nil { + return false + } else if that1.MemLimitBytes != nil { + return false + } + if this.MemSoftLimitBytes != nil && that1.MemSoftLimitBytes != nil { + if *this.MemSoftLimitBytes != *that1.MemSoftLimitBytes { + return false + } + } else if this.MemSoftLimitBytes != nil { + return false + } else if that1.MemSoftLimitBytes != nil { + return false + } + if this.MemFileBytes != nil && that1.MemFileBytes != nil { + if *this.MemFileBytes != *that1.MemFileBytes { + return false + } + } else if this.MemFileBytes != nil { + return false + } else if that1.MemFileBytes != nil { + return false + } + if this.MemAnonBytes != nil && that1.MemAnonBytes != nil { + if *this.MemAnonBytes != *that1.MemAnonBytes { + return false + } + } else if this.MemAnonBytes != nil { + return false + } else if that1.MemAnonBytes != nil { + return false + } + if this.MemCacheBytes != nil && that1.MemCacheBytes != nil { + if *this.MemCacheBytes != *that1.MemCacheBytes { + return false + } + } else if this.MemCacheBytes != nil { + return false + } else if that1.MemCacheBytes != nil { + return false + } + if this.MemRssBytes != nil && that1.MemRssBytes != nil { + if *this.MemRssBytes != *that1.MemRssBytes { + return false + } + } else if this.MemRssBytes != nil { + return false + } else if that1.MemRssBytes != nil { + return false + } + if this.MemMappedFileBytes != nil && that1.MemMappedFileBytes != nil { + if *this.MemMappedFileBytes != *that1.MemMappedFileBytes { + return false + } + } else if this.MemMappedFileBytes != nil { + return false + } else if that1.MemMappedFileBytes != nil { + return false + } + if this.MemSwapBytes != nil && that1.MemSwapBytes != nil { + if *this.MemSwapBytes != *that1.MemSwapBytes { + return false + } + } else if this.MemSwapBytes != nil { + return false + } else if that1.MemSwapBytes != nil { + return false + } + if this.MemLowPressureCounter != nil && that1.MemLowPressureCounter != nil { + if *this.MemLowPressureCounter != *that1.MemLowPressureCounter { + return false + } + } else if this.MemLowPressureCounter != nil { + return false + } else if that1.MemLowPressureCounter != nil { + return false + } + if this.MemMediumPressureCounter != nil && that1.MemMediumPressureCounter != nil { + if *this.MemMediumPressureCounter != *that1.MemMediumPressureCounter { + return false + } + } else if this.MemMediumPressureCounter != nil { + return false + } else if that1.MemMediumPressureCounter != nil { + return false + } + if this.MemCriticalPressureCounter != nil && that1.MemCriticalPressureCounter != nil { + if *this.MemCriticalPressureCounter != *that1.MemCriticalPressureCounter { + return false + } + } else if this.MemCriticalPressureCounter != nil { + return false + } else if that1.MemCriticalPressureCounter != nil { + return false + } + if this.DiskLimitBytes != nil && that1.DiskLimitBytes != nil { + if *this.DiskLimitBytes != *that1.DiskLimitBytes { + return false + } + } else if this.DiskLimitBytes != nil { + return false + } else if that1.DiskLimitBytes != nil { + return false + } + if this.DiskUsedBytes != nil && that1.DiskUsedBytes != nil { + if *this.DiskUsedBytes != *that1.DiskUsedBytes { + return false + } + } else if this.DiskUsedBytes != nil { + return false + } else if that1.DiskUsedBytes != nil { + return false + } + if !this.Perf.Equal(that1.Perf) { + return false + } + if this.NetRxPackets != nil && that1.NetRxPackets != nil { + if *this.NetRxPackets != *that1.NetRxPackets { + return false + } + } else if this.NetRxPackets != nil { + return false + } else if that1.NetRxPackets != nil { + return false + } + if this.NetRxBytes != nil && that1.NetRxBytes != nil { + if *this.NetRxBytes != *that1.NetRxBytes { + return false + } + } else if this.NetRxBytes != nil { + return false + } else if that1.NetRxBytes != nil { + return false + } + if this.NetRxErrors != nil && that1.NetRxErrors != nil { + if *this.NetRxErrors != *that1.NetRxErrors { + return false + } + } else if this.NetRxErrors != nil { + return false + } else if that1.NetRxErrors != nil { + return false + } + if this.NetRxDropped != nil && that1.NetRxDropped != nil { + if *this.NetRxDropped != *that1.NetRxDropped { + return false + } + } else if this.NetRxDropped != nil { + return false + } else if that1.NetRxDropped != nil { + return false + } + if this.NetTxPackets != nil && that1.NetTxPackets != nil { + if *this.NetTxPackets != *that1.NetTxPackets { + return false + } + } else if this.NetTxPackets != nil { + return false + } else if that1.NetTxPackets != nil { + return false + } + if this.NetTxBytes != nil && that1.NetTxBytes != nil { + if *this.NetTxBytes != *that1.NetTxBytes { + return false + } + } else if this.NetTxBytes != nil { + return false + } else if that1.NetTxBytes != nil { + return false + } + if this.NetTxErrors != nil && that1.NetTxErrors != nil { + if *this.NetTxErrors != *that1.NetTxErrors { + return false + } + } else if this.NetTxErrors != nil { + return false + } else if that1.NetTxErrors != nil { + return false + } + if this.NetTxDropped != nil && that1.NetTxDropped != nil { + if *this.NetTxDropped != *that1.NetTxDropped { + return false + } + } else if this.NetTxDropped != nil { + return false + } else if that1.NetTxDropped != nil { + return false + } + if this.NetTcpRttMicrosecsP50 != nil && that1.NetTcpRttMicrosecsP50 != nil { + if *this.NetTcpRttMicrosecsP50 != *that1.NetTcpRttMicrosecsP50 { + return false + } + } else if this.NetTcpRttMicrosecsP50 != nil { + return false + } else if that1.NetTcpRttMicrosecsP50 != nil { + return false + } + if this.NetTcpRttMicrosecsP90 != nil && that1.NetTcpRttMicrosecsP90 != nil { + if *this.NetTcpRttMicrosecsP90 != *that1.NetTcpRttMicrosecsP90 { + return false + } + } else if this.NetTcpRttMicrosecsP90 != nil { + return false + } else if that1.NetTcpRttMicrosecsP90 != nil { + return false + } + if this.NetTcpRttMicrosecsP95 != nil && that1.NetTcpRttMicrosecsP95 != nil { + if *this.NetTcpRttMicrosecsP95 != *that1.NetTcpRttMicrosecsP95 { + return false + } + } else if this.NetTcpRttMicrosecsP95 != nil { + return false + } else if that1.NetTcpRttMicrosecsP95 != nil { + return false + } + if this.NetTcpRttMicrosecsP99 != nil && that1.NetTcpRttMicrosecsP99 != nil { + if *this.NetTcpRttMicrosecsP99 != *that1.NetTcpRttMicrosecsP99 { + return false + } + } else if this.NetTcpRttMicrosecsP99 != nil { + return false + } else if that1.NetTcpRttMicrosecsP99 != nil { + return false + } + if this.NetTcpActiveConnections != nil && that1.NetTcpActiveConnections != nil { + if *this.NetTcpActiveConnections != *that1.NetTcpActiveConnections { + return false + } + } else if this.NetTcpActiveConnections != nil { + return false + } else if that1.NetTcpActiveConnections != nil { + return false + } + if this.NetTcpTimeWaitConnections != nil && that1.NetTcpTimeWaitConnections != nil { + if *this.NetTcpTimeWaitConnections != *that1.NetTcpTimeWaitConnections { + return false + } + } else if this.NetTcpTimeWaitConnections != nil { + return false + } else if that1.NetTcpTimeWaitConnections != nil { + return false + } + if len(this.NetTrafficControlStatistics) != len(that1.NetTrafficControlStatistics) { + return false + } + for i := range this.NetTrafficControlStatistics { + if !this.NetTrafficControlStatistics[i].Equal(that1.NetTrafficControlStatistics[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ResourceUsage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceUsage) + if !ok { + return fmt.Errorf("that is not of type *ResourceUsage") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceUsage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceUsagebut is not nil && this == nil") + } + if len(this.Executors) != len(that1.Executors) { + return fmt.Errorf("Executors this(%v) Not Equal that(%v)", len(this.Executors), len(that1.Executors)) + } + for i := range this.Executors { + if !this.Executors[i].Equal(that1.Executors[i]) { + return fmt.Errorf("Executors this[%v](%v) Not Equal that[%v](%v)", i, this.Executors[i], i, that1.Executors[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ResourceUsage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceUsage) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Executors) != len(that1.Executors) { + return false + } + for i := range this.Executors { + if !this.Executors[i].Equal(that1.Executors[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ResourceUsage_Executor) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceUsage_Executor) + if !ok { + return fmt.Errorf("that is not of type *ResourceUsage_Executor") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceUsage_Executor but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceUsage_Executorbut is not nil && this == nil") + } + if !this.ExecutorInfo.Equal(that1.ExecutorInfo) { + return fmt.Errorf("ExecutorInfo this(%v) Not Equal that(%v)", this.ExecutorInfo, that1.ExecutorInfo) + } + if len(this.Allocated) != len(that1.Allocated) { + return fmt.Errorf("Allocated this(%v) Not Equal that(%v)", len(this.Allocated), len(that1.Allocated)) + } + for i := range this.Allocated { + if !this.Allocated[i].Equal(that1.Allocated[i]) { + return fmt.Errorf("Allocated this[%v](%v) Not Equal that[%v](%v)", i, this.Allocated[i], i, that1.Allocated[i]) + } + } + if !this.Statistics.Equal(that1.Statistics) { + return fmt.Errorf("Statistics this(%v) Not Equal that(%v)", this.Statistics, that1.Statistics) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ResourceUsage_Executor) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceUsage_Executor) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ExecutorInfo.Equal(that1.ExecutorInfo) { + return false + } + if len(this.Allocated) != len(that1.Allocated) { + return false + } + for i := range this.Allocated { + if !this.Allocated[i].Equal(that1.Allocated[i]) { + return false + } + } + if !this.Statistics.Equal(that1.Statistics) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *PerfStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*PerfStatistics) + if !ok { + return fmt.Errorf("that is not of type *PerfStatistics") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *PerfStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *PerfStatisticsbut is not nil && this == nil") + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", *this.Timestamp, *that1.Timestamp) + } + } else if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp == nil && that.Timestamp != nil") + } else if that1.Timestamp != nil { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if this.Cycles != nil && that1.Cycles != nil { + if *this.Cycles != *that1.Cycles { + return fmt.Errorf("Cycles this(%v) Not Equal that(%v)", *this.Cycles, *that1.Cycles) + } + } else if this.Cycles != nil { + return fmt.Errorf("this.Cycles == nil && that.Cycles != nil") + } else if that1.Cycles != nil { + return fmt.Errorf("Cycles this(%v) Not Equal that(%v)", this.Cycles, that1.Cycles) + } + if this.StalledCyclesFrontend != nil && that1.StalledCyclesFrontend != nil { + if *this.StalledCyclesFrontend != *that1.StalledCyclesFrontend { + return fmt.Errorf("StalledCyclesFrontend this(%v) Not Equal that(%v)", *this.StalledCyclesFrontend, *that1.StalledCyclesFrontend) + } + } else if this.StalledCyclesFrontend != nil { + return fmt.Errorf("this.StalledCyclesFrontend == nil && that.StalledCyclesFrontend != nil") + } else if that1.StalledCyclesFrontend != nil { + return fmt.Errorf("StalledCyclesFrontend this(%v) Not Equal that(%v)", this.StalledCyclesFrontend, that1.StalledCyclesFrontend) + } + if this.StalledCyclesBackend != nil && that1.StalledCyclesBackend != nil { + if *this.StalledCyclesBackend != *that1.StalledCyclesBackend { + return fmt.Errorf("StalledCyclesBackend this(%v) Not Equal that(%v)", *this.StalledCyclesBackend, *that1.StalledCyclesBackend) + } + } else if this.StalledCyclesBackend != nil { + return fmt.Errorf("this.StalledCyclesBackend == nil && that.StalledCyclesBackend != nil") + } else if that1.StalledCyclesBackend != nil { + return fmt.Errorf("StalledCyclesBackend this(%v) Not Equal that(%v)", this.StalledCyclesBackend, that1.StalledCyclesBackend) + } + if this.Instructions != nil && that1.Instructions != nil { + if *this.Instructions != *that1.Instructions { + return fmt.Errorf("Instructions this(%v) Not Equal that(%v)", *this.Instructions, *that1.Instructions) + } + } else if this.Instructions != nil { + return fmt.Errorf("this.Instructions == nil && that.Instructions != nil") + } else if that1.Instructions != nil { + return fmt.Errorf("Instructions this(%v) Not Equal that(%v)", this.Instructions, that1.Instructions) + } + if this.CacheReferences != nil && that1.CacheReferences != nil { + if *this.CacheReferences != *that1.CacheReferences { + return fmt.Errorf("CacheReferences this(%v) Not Equal that(%v)", *this.CacheReferences, *that1.CacheReferences) + } + } else if this.CacheReferences != nil { + return fmt.Errorf("this.CacheReferences == nil && that.CacheReferences != nil") + } else if that1.CacheReferences != nil { + return fmt.Errorf("CacheReferences this(%v) Not Equal that(%v)", this.CacheReferences, that1.CacheReferences) + } + if this.CacheMisses != nil && that1.CacheMisses != nil { + if *this.CacheMisses != *that1.CacheMisses { + return fmt.Errorf("CacheMisses this(%v) Not Equal that(%v)", *this.CacheMisses, *that1.CacheMisses) + } + } else if this.CacheMisses != nil { + return fmt.Errorf("this.CacheMisses == nil && that.CacheMisses != nil") + } else if that1.CacheMisses != nil { + return fmt.Errorf("CacheMisses this(%v) Not Equal that(%v)", this.CacheMisses, that1.CacheMisses) + } + if this.Branches != nil && that1.Branches != nil { + if *this.Branches != *that1.Branches { + return fmt.Errorf("Branches this(%v) Not Equal that(%v)", *this.Branches, *that1.Branches) + } + } else if this.Branches != nil { + return fmt.Errorf("this.Branches == nil && that.Branches != nil") + } else if that1.Branches != nil { + return fmt.Errorf("Branches this(%v) Not Equal that(%v)", this.Branches, that1.Branches) + } + if this.BranchMisses != nil && that1.BranchMisses != nil { + if *this.BranchMisses != *that1.BranchMisses { + return fmt.Errorf("BranchMisses this(%v) Not Equal that(%v)", *this.BranchMisses, *that1.BranchMisses) + } + } else if this.BranchMisses != nil { + return fmt.Errorf("this.BranchMisses == nil && that.BranchMisses != nil") + } else if that1.BranchMisses != nil { + return fmt.Errorf("BranchMisses this(%v) Not Equal that(%v)", this.BranchMisses, that1.BranchMisses) + } + if this.BusCycles != nil && that1.BusCycles != nil { + if *this.BusCycles != *that1.BusCycles { + return fmt.Errorf("BusCycles this(%v) Not Equal that(%v)", *this.BusCycles, *that1.BusCycles) + } + } else if this.BusCycles != nil { + return fmt.Errorf("this.BusCycles == nil && that.BusCycles != nil") + } else if that1.BusCycles != nil { + return fmt.Errorf("BusCycles this(%v) Not Equal that(%v)", this.BusCycles, that1.BusCycles) + } + if this.RefCycles != nil && that1.RefCycles != nil { + if *this.RefCycles != *that1.RefCycles { + return fmt.Errorf("RefCycles this(%v) Not Equal that(%v)", *this.RefCycles, *that1.RefCycles) + } + } else if this.RefCycles != nil { + return fmt.Errorf("this.RefCycles == nil && that.RefCycles != nil") + } else if that1.RefCycles != nil { + return fmt.Errorf("RefCycles this(%v) Not Equal that(%v)", this.RefCycles, that1.RefCycles) + } + if this.CpuClock != nil && that1.CpuClock != nil { + if *this.CpuClock != *that1.CpuClock { + return fmt.Errorf("CpuClock this(%v) Not Equal that(%v)", *this.CpuClock, *that1.CpuClock) + } + } else if this.CpuClock != nil { + return fmt.Errorf("this.CpuClock == nil && that.CpuClock != nil") + } else if that1.CpuClock != nil { + return fmt.Errorf("CpuClock this(%v) Not Equal that(%v)", this.CpuClock, that1.CpuClock) + } + if this.TaskClock != nil && that1.TaskClock != nil { + if *this.TaskClock != *that1.TaskClock { + return fmt.Errorf("TaskClock this(%v) Not Equal that(%v)", *this.TaskClock, *that1.TaskClock) + } + } else if this.TaskClock != nil { + return fmt.Errorf("this.TaskClock == nil && that.TaskClock != nil") + } else if that1.TaskClock != nil { + return fmt.Errorf("TaskClock this(%v) Not Equal that(%v)", this.TaskClock, that1.TaskClock) + } + if this.PageFaults != nil && that1.PageFaults != nil { + if *this.PageFaults != *that1.PageFaults { + return fmt.Errorf("PageFaults this(%v) Not Equal that(%v)", *this.PageFaults, *that1.PageFaults) + } + } else if this.PageFaults != nil { + return fmt.Errorf("this.PageFaults == nil && that.PageFaults != nil") + } else if that1.PageFaults != nil { + return fmt.Errorf("PageFaults this(%v) Not Equal that(%v)", this.PageFaults, that1.PageFaults) + } + if this.MinorFaults != nil && that1.MinorFaults != nil { + if *this.MinorFaults != *that1.MinorFaults { + return fmt.Errorf("MinorFaults this(%v) Not Equal that(%v)", *this.MinorFaults, *that1.MinorFaults) + } + } else if this.MinorFaults != nil { + return fmt.Errorf("this.MinorFaults == nil && that.MinorFaults != nil") + } else if that1.MinorFaults != nil { + return fmt.Errorf("MinorFaults this(%v) Not Equal that(%v)", this.MinorFaults, that1.MinorFaults) + } + if this.MajorFaults != nil && that1.MajorFaults != nil { + if *this.MajorFaults != *that1.MajorFaults { + return fmt.Errorf("MajorFaults this(%v) Not Equal that(%v)", *this.MajorFaults, *that1.MajorFaults) + } + } else if this.MajorFaults != nil { + return fmt.Errorf("this.MajorFaults == nil && that.MajorFaults != nil") + } else if that1.MajorFaults != nil { + return fmt.Errorf("MajorFaults this(%v) Not Equal that(%v)", this.MajorFaults, that1.MajorFaults) + } + if this.ContextSwitches != nil && that1.ContextSwitches != nil { + if *this.ContextSwitches != *that1.ContextSwitches { + return fmt.Errorf("ContextSwitches this(%v) Not Equal that(%v)", *this.ContextSwitches, *that1.ContextSwitches) + } + } else if this.ContextSwitches != nil { + return fmt.Errorf("this.ContextSwitches == nil && that.ContextSwitches != nil") + } else if that1.ContextSwitches != nil { + return fmt.Errorf("ContextSwitches this(%v) Not Equal that(%v)", this.ContextSwitches, that1.ContextSwitches) + } + if this.CpuMigrations != nil && that1.CpuMigrations != nil { + if *this.CpuMigrations != *that1.CpuMigrations { + return fmt.Errorf("CpuMigrations this(%v) Not Equal that(%v)", *this.CpuMigrations, *that1.CpuMigrations) + } + } else if this.CpuMigrations != nil { + return fmt.Errorf("this.CpuMigrations == nil && that.CpuMigrations != nil") + } else if that1.CpuMigrations != nil { + return fmt.Errorf("CpuMigrations this(%v) Not Equal that(%v)", this.CpuMigrations, that1.CpuMigrations) + } + if this.AlignmentFaults != nil && that1.AlignmentFaults != nil { + if *this.AlignmentFaults != *that1.AlignmentFaults { + return fmt.Errorf("AlignmentFaults this(%v) Not Equal that(%v)", *this.AlignmentFaults, *that1.AlignmentFaults) + } + } else if this.AlignmentFaults != nil { + return fmt.Errorf("this.AlignmentFaults == nil && that.AlignmentFaults != nil") + } else if that1.AlignmentFaults != nil { + return fmt.Errorf("AlignmentFaults this(%v) Not Equal that(%v)", this.AlignmentFaults, that1.AlignmentFaults) + } + if this.EmulationFaults != nil && that1.EmulationFaults != nil { + if *this.EmulationFaults != *that1.EmulationFaults { + return fmt.Errorf("EmulationFaults this(%v) Not Equal that(%v)", *this.EmulationFaults, *that1.EmulationFaults) + } + } else if this.EmulationFaults != nil { + return fmt.Errorf("this.EmulationFaults == nil && that.EmulationFaults != nil") + } else if that1.EmulationFaults != nil { + return fmt.Errorf("EmulationFaults this(%v) Not Equal that(%v)", this.EmulationFaults, that1.EmulationFaults) + } + if this.L1DcacheLoads != nil && that1.L1DcacheLoads != nil { + if *this.L1DcacheLoads != *that1.L1DcacheLoads { + return fmt.Errorf("L1DcacheLoads this(%v) Not Equal that(%v)", *this.L1DcacheLoads, *that1.L1DcacheLoads) + } + } else if this.L1DcacheLoads != nil { + return fmt.Errorf("this.L1DcacheLoads == nil && that.L1DcacheLoads != nil") + } else if that1.L1DcacheLoads != nil { + return fmt.Errorf("L1DcacheLoads this(%v) Not Equal that(%v)", this.L1DcacheLoads, that1.L1DcacheLoads) + } + if this.L1DcacheLoadMisses != nil && that1.L1DcacheLoadMisses != nil { + if *this.L1DcacheLoadMisses != *that1.L1DcacheLoadMisses { + return fmt.Errorf("L1DcacheLoadMisses this(%v) Not Equal that(%v)", *this.L1DcacheLoadMisses, *that1.L1DcacheLoadMisses) + } + } else if this.L1DcacheLoadMisses != nil { + return fmt.Errorf("this.L1DcacheLoadMisses == nil && that.L1DcacheLoadMisses != nil") + } else if that1.L1DcacheLoadMisses != nil { + return fmt.Errorf("L1DcacheLoadMisses this(%v) Not Equal that(%v)", this.L1DcacheLoadMisses, that1.L1DcacheLoadMisses) + } + if this.L1DcacheStores != nil && that1.L1DcacheStores != nil { + if *this.L1DcacheStores != *that1.L1DcacheStores { + return fmt.Errorf("L1DcacheStores this(%v) Not Equal that(%v)", *this.L1DcacheStores, *that1.L1DcacheStores) + } + } else if this.L1DcacheStores != nil { + return fmt.Errorf("this.L1DcacheStores == nil && that.L1DcacheStores != nil") + } else if that1.L1DcacheStores != nil { + return fmt.Errorf("L1DcacheStores this(%v) Not Equal that(%v)", this.L1DcacheStores, that1.L1DcacheStores) + } + if this.L1DcacheStoreMisses != nil && that1.L1DcacheStoreMisses != nil { + if *this.L1DcacheStoreMisses != *that1.L1DcacheStoreMisses { + return fmt.Errorf("L1DcacheStoreMisses this(%v) Not Equal that(%v)", *this.L1DcacheStoreMisses, *that1.L1DcacheStoreMisses) + } + } else if this.L1DcacheStoreMisses != nil { + return fmt.Errorf("this.L1DcacheStoreMisses == nil && that.L1DcacheStoreMisses != nil") + } else if that1.L1DcacheStoreMisses != nil { + return fmt.Errorf("L1DcacheStoreMisses this(%v) Not Equal that(%v)", this.L1DcacheStoreMisses, that1.L1DcacheStoreMisses) + } + if this.L1DcachePrefetches != nil && that1.L1DcachePrefetches != nil { + if *this.L1DcachePrefetches != *that1.L1DcachePrefetches { + return fmt.Errorf("L1DcachePrefetches this(%v) Not Equal that(%v)", *this.L1DcachePrefetches, *that1.L1DcachePrefetches) + } + } else if this.L1DcachePrefetches != nil { + return fmt.Errorf("this.L1DcachePrefetches == nil && that.L1DcachePrefetches != nil") + } else if that1.L1DcachePrefetches != nil { + return fmt.Errorf("L1DcachePrefetches this(%v) Not Equal that(%v)", this.L1DcachePrefetches, that1.L1DcachePrefetches) + } + if this.L1DcachePrefetchMisses != nil && that1.L1DcachePrefetchMisses != nil { + if *this.L1DcachePrefetchMisses != *that1.L1DcachePrefetchMisses { + return fmt.Errorf("L1DcachePrefetchMisses this(%v) Not Equal that(%v)", *this.L1DcachePrefetchMisses, *that1.L1DcachePrefetchMisses) + } + } else if this.L1DcachePrefetchMisses != nil { + return fmt.Errorf("this.L1DcachePrefetchMisses == nil && that.L1DcachePrefetchMisses != nil") + } else if that1.L1DcachePrefetchMisses != nil { + return fmt.Errorf("L1DcachePrefetchMisses this(%v) Not Equal that(%v)", this.L1DcachePrefetchMisses, that1.L1DcachePrefetchMisses) + } + if this.L1IcacheLoads != nil && that1.L1IcacheLoads != nil { + if *this.L1IcacheLoads != *that1.L1IcacheLoads { + return fmt.Errorf("L1IcacheLoads this(%v) Not Equal that(%v)", *this.L1IcacheLoads, *that1.L1IcacheLoads) + } + } else if this.L1IcacheLoads != nil { + return fmt.Errorf("this.L1IcacheLoads == nil && that.L1IcacheLoads != nil") + } else if that1.L1IcacheLoads != nil { + return fmt.Errorf("L1IcacheLoads this(%v) Not Equal that(%v)", this.L1IcacheLoads, that1.L1IcacheLoads) + } + if this.L1IcacheLoadMisses != nil && that1.L1IcacheLoadMisses != nil { + if *this.L1IcacheLoadMisses != *that1.L1IcacheLoadMisses { + return fmt.Errorf("L1IcacheLoadMisses this(%v) Not Equal that(%v)", *this.L1IcacheLoadMisses, *that1.L1IcacheLoadMisses) + } + } else if this.L1IcacheLoadMisses != nil { + return fmt.Errorf("this.L1IcacheLoadMisses == nil && that.L1IcacheLoadMisses != nil") + } else if that1.L1IcacheLoadMisses != nil { + return fmt.Errorf("L1IcacheLoadMisses this(%v) Not Equal that(%v)", this.L1IcacheLoadMisses, that1.L1IcacheLoadMisses) + } + if this.L1IcachePrefetches != nil && that1.L1IcachePrefetches != nil { + if *this.L1IcachePrefetches != *that1.L1IcachePrefetches { + return fmt.Errorf("L1IcachePrefetches this(%v) Not Equal that(%v)", *this.L1IcachePrefetches, *that1.L1IcachePrefetches) + } + } else if this.L1IcachePrefetches != nil { + return fmt.Errorf("this.L1IcachePrefetches == nil && that.L1IcachePrefetches != nil") + } else if that1.L1IcachePrefetches != nil { + return fmt.Errorf("L1IcachePrefetches this(%v) Not Equal that(%v)", this.L1IcachePrefetches, that1.L1IcachePrefetches) + } + if this.L1IcachePrefetchMisses != nil && that1.L1IcachePrefetchMisses != nil { + if *this.L1IcachePrefetchMisses != *that1.L1IcachePrefetchMisses { + return fmt.Errorf("L1IcachePrefetchMisses this(%v) Not Equal that(%v)", *this.L1IcachePrefetchMisses, *that1.L1IcachePrefetchMisses) + } + } else if this.L1IcachePrefetchMisses != nil { + return fmt.Errorf("this.L1IcachePrefetchMisses == nil && that.L1IcachePrefetchMisses != nil") + } else if that1.L1IcachePrefetchMisses != nil { + return fmt.Errorf("L1IcachePrefetchMisses this(%v) Not Equal that(%v)", this.L1IcachePrefetchMisses, that1.L1IcachePrefetchMisses) + } + if this.LlcLoads != nil && that1.LlcLoads != nil { + if *this.LlcLoads != *that1.LlcLoads { + return fmt.Errorf("LlcLoads this(%v) Not Equal that(%v)", *this.LlcLoads, *that1.LlcLoads) + } + } else if this.LlcLoads != nil { + return fmt.Errorf("this.LlcLoads == nil && that.LlcLoads != nil") + } else if that1.LlcLoads != nil { + return fmt.Errorf("LlcLoads this(%v) Not Equal that(%v)", this.LlcLoads, that1.LlcLoads) + } + if this.LlcLoadMisses != nil && that1.LlcLoadMisses != nil { + if *this.LlcLoadMisses != *that1.LlcLoadMisses { + return fmt.Errorf("LlcLoadMisses this(%v) Not Equal that(%v)", *this.LlcLoadMisses, *that1.LlcLoadMisses) + } + } else if this.LlcLoadMisses != nil { + return fmt.Errorf("this.LlcLoadMisses == nil && that.LlcLoadMisses != nil") + } else if that1.LlcLoadMisses != nil { + return fmt.Errorf("LlcLoadMisses this(%v) Not Equal that(%v)", this.LlcLoadMisses, that1.LlcLoadMisses) + } + if this.LlcStores != nil && that1.LlcStores != nil { + if *this.LlcStores != *that1.LlcStores { + return fmt.Errorf("LlcStores this(%v) Not Equal that(%v)", *this.LlcStores, *that1.LlcStores) + } + } else if this.LlcStores != nil { + return fmt.Errorf("this.LlcStores == nil && that.LlcStores != nil") + } else if that1.LlcStores != nil { + return fmt.Errorf("LlcStores this(%v) Not Equal that(%v)", this.LlcStores, that1.LlcStores) + } + if this.LlcStoreMisses != nil && that1.LlcStoreMisses != nil { + if *this.LlcStoreMisses != *that1.LlcStoreMisses { + return fmt.Errorf("LlcStoreMisses this(%v) Not Equal that(%v)", *this.LlcStoreMisses, *that1.LlcStoreMisses) + } + } else if this.LlcStoreMisses != nil { + return fmt.Errorf("this.LlcStoreMisses == nil && that.LlcStoreMisses != nil") + } else if that1.LlcStoreMisses != nil { + return fmt.Errorf("LlcStoreMisses this(%v) Not Equal that(%v)", this.LlcStoreMisses, that1.LlcStoreMisses) + } + if this.LlcPrefetches != nil && that1.LlcPrefetches != nil { + if *this.LlcPrefetches != *that1.LlcPrefetches { + return fmt.Errorf("LlcPrefetches this(%v) Not Equal that(%v)", *this.LlcPrefetches, *that1.LlcPrefetches) + } + } else if this.LlcPrefetches != nil { + return fmt.Errorf("this.LlcPrefetches == nil && that.LlcPrefetches != nil") + } else if that1.LlcPrefetches != nil { + return fmt.Errorf("LlcPrefetches this(%v) Not Equal that(%v)", this.LlcPrefetches, that1.LlcPrefetches) + } + if this.LlcPrefetchMisses != nil && that1.LlcPrefetchMisses != nil { + if *this.LlcPrefetchMisses != *that1.LlcPrefetchMisses { + return fmt.Errorf("LlcPrefetchMisses this(%v) Not Equal that(%v)", *this.LlcPrefetchMisses, *that1.LlcPrefetchMisses) + } + } else if this.LlcPrefetchMisses != nil { + return fmt.Errorf("this.LlcPrefetchMisses == nil && that.LlcPrefetchMisses != nil") + } else if that1.LlcPrefetchMisses != nil { + return fmt.Errorf("LlcPrefetchMisses this(%v) Not Equal that(%v)", this.LlcPrefetchMisses, that1.LlcPrefetchMisses) + } + if this.DtlbLoads != nil && that1.DtlbLoads != nil { + if *this.DtlbLoads != *that1.DtlbLoads { + return fmt.Errorf("DtlbLoads this(%v) Not Equal that(%v)", *this.DtlbLoads, *that1.DtlbLoads) + } + } else if this.DtlbLoads != nil { + return fmt.Errorf("this.DtlbLoads == nil && that.DtlbLoads != nil") + } else if that1.DtlbLoads != nil { + return fmt.Errorf("DtlbLoads this(%v) Not Equal that(%v)", this.DtlbLoads, that1.DtlbLoads) + } + if this.DtlbLoadMisses != nil && that1.DtlbLoadMisses != nil { + if *this.DtlbLoadMisses != *that1.DtlbLoadMisses { + return fmt.Errorf("DtlbLoadMisses this(%v) Not Equal that(%v)", *this.DtlbLoadMisses, *that1.DtlbLoadMisses) + } + } else if this.DtlbLoadMisses != nil { + return fmt.Errorf("this.DtlbLoadMisses == nil && that.DtlbLoadMisses != nil") + } else if that1.DtlbLoadMisses != nil { + return fmt.Errorf("DtlbLoadMisses this(%v) Not Equal that(%v)", this.DtlbLoadMisses, that1.DtlbLoadMisses) + } + if this.DtlbStores != nil && that1.DtlbStores != nil { + if *this.DtlbStores != *that1.DtlbStores { + return fmt.Errorf("DtlbStores this(%v) Not Equal that(%v)", *this.DtlbStores, *that1.DtlbStores) + } + } else if this.DtlbStores != nil { + return fmt.Errorf("this.DtlbStores == nil && that.DtlbStores != nil") + } else if that1.DtlbStores != nil { + return fmt.Errorf("DtlbStores this(%v) Not Equal that(%v)", this.DtlbStores, that1.DtlbStores) + } + if this.DtlbStoreMisses != nil && that1.DtlbStoreMisses != nil { + if *this.DtlbStoreMisses != *that1.DtlbStoreMisses { + return fmt.Errorf("DtlbStoreMisses this(%v) Not Equal that(%v)", *this.DtlbStoreMisses, *that1.DtlbStoreMisses) + } + } else if this.DtlbStoreMisses != nil { + return fmt.Errorf("this.DtlbStoreMisses == nil && that.DtlbStoreMisses != nil") + } else if that1.DtlbStoreMisses != nil { + return fmt.Errorf("DtlbStoreMisses this(%v) Not Equal that(%v)", this.DtlbStoreMisses, that1.DtlbStoreMisses) + } + if this.DtlbPrefetches != nil && that1.DtlbPrefetches != nil { + if *this.DtlbPrefetches != *that1.DtlbPrefetches { + return fmt.Errorf("DtlbPrefetches this(%v) Not Equal that(%v)", *this.DtlbPrefetches, *that1.DtlbPrefetches) + } + } else if this.DtlbPrefetches != nil { + return fmt.Errorf("this.DtlbPrefetches == nil && that.DtlbPrefetches != nil") + } else if that1.DtlbPrefetches != nil { + return fmt.Errorf("DtlbPrefetches this(%v) Not Equal that(%v)", this.DtlbPrefetches, that1.DtlbPrefetches) + } + if this.DtlbPrefetchMisses != nil && that1.DtlbPrefetchMisses != nil { + if *this.DtlbPrefetchMisses != *that1.DtlbPrefetchMisses { + return fmt.Errorf("DtlbPrefetchMisses this(%v) Not Equal that(%v)", *this.DtlbPrefetchMisses, *that1.DtlbPrefetchMisses) + } + } else if this.DtlbPrefetchMisses != nil { + return fmt.Errorf("this.DtlbPrefetchMisses == nil && that.DtlbPrefetchMisses != nil") + } else if that1.DtlbPrefetchMisses != nil { + return fmt.Errorf("DtlbPrefetchMisses this(%v) Not Equal that(%v)", this.DtlbPrefetchMisses, that1.DtlbPrefetchMisses) + } + if this.ItlbLoads != nil && that1.ItlbLoads != nil { + if *this.ItlbLoads != *that1.ItlbLoads { + return fmt.Errorf("ItlbLoads this(%v) Not Equal that(%v)", *this.ItlbLoads, *that1.ItlbLoads) + } + } else if this.ItlbLoads != nil { + return fmt.Errorf("this.ItlbLoads == nil && that.ItlbLoads != nil") + } else if that1.ItlbLoads != nil { + return fmt.Errorf("ItlbLoads this(%v) Not Equal that(%v)", this.ItlbLoads, that1.ItlbLoads) + } + if this.ItlbLoadMisses != nil && that1.ItlbLoadMisses != nil { + if *this.ItlbLoadMisses != *that1.ItlbLoadMisses { + return fmt.Errorf("ItlbLoadMisses this(%v) Not Equal that(%v)", *this.ItlbLoadMisses, *that1.ItlbLoadMisses) + } + } else if this.ItlbLoadMisses != nil { + return fmt.Errorf("this.ItlbLoadMisses == nil && that.ItlbLoadMisses != nil") + } else if that1.ItlbLoadMisses != nil { + return fmt.Errorf("ItlbLoadMisses this(%v) Not Equal that(%v)", this.ItlbLoadMisses, that1.ItlbLoadMisses) + } + if this.BranchLoads != nil && that1.BranchLoads != nil { + if *this.BranchLoads != *that1.BranchLoads { + return fmt.Errorf("BranchLoads this(%v) Not Equal that(%v)", *this.BranchLoads, *that1.BranchLoads) + } + } else if this.BranchLoads != nil { + return fmt.Errorf("this.BranchLoads == nil && that.BranchLoads != nil") + } else if that1.BranchLoads != nil { + return fmt.Errorf("BranchLoads this(%v) Not Equal that(%v)", this.BranchLoads, that1.BranchLoads) + } + if this.BranchLoadMisses != nil && that1.BranchLoadMisses != nil { + if *this.BranchLoadMisses != *that1.BranchLoadMisses { + return fmt.Errorf("BranchLoadMisses this(%v) Not Equal that(%v)", *this.BranchLoadMisses, *that1.BranchLoadMisses) + } + } else if this.BranchLoadMisses != nil { + return fmt.Errorf("this.BranchLoadMisses == nil && that.BranchLoadMisses != nil") + } else if that1.BranchLoadMisses != nil { + return fmt.Errorf("BranchLoadMisses this(%v) Not Equal that(%v)", this.BranchLoadMisses, that1.BranchLoadMisses) + } + if this.NodeLoads != nil && that1.NodeLoads != nil { + if *this.NodeLoads != *that1.NodeLoads { + return fmt.Errorf("NodeLoads this(%v) Not Equal that(%v)", *this.NodeLoads, *that1.NodeLoads) + } + } else if this.NodeLoads != nil { + return fmt.Errorf("this.NodeLoads == nil && that.NodeLoads != nil") + } else if that1.NodeLoads != nil { + return fmt.Errorf("NodeLoads this(%v) Not Equal that(%v)", this.NodeLoads, that1.NodeLoads) + } + if this.NodeLoadMisses != nil && that1.NodeLoadMisses != nil { + if *this.NodeLoadMisses != *that1.NodeLoadMisses { + return fmt.Errorf("NodeLoadMisses this(%v) Not Equal that(%v)", *this.NodeLoadMisses, *that1.NodeLoadMisses) + } + } else if this.NodeLoadMisses != nil { + return fmt.Errorf("this.NodeLoadMisses == nil && that.NodeLoadMisses != nil") + } else if that1.NodeLoadMisses != nil { + return fmt.Errorf("NodeLoadMisses this(%v) Not Equal that(%v)", this.NodeLoadMisses, that1.NodeLoadMisses) + } + if this.NodeStores != nil && that1.NodeStores != nil { + if *this.NodeStores != *that1.NodeStores { + return fmt.Errorf("NodeStores this(%v) Not Equal that(%v)", *this.NodeStores, *that1.NodeStores) + } + } else if this.NodeStores != nil { + return fmt.Errorf("this.NodeStores == nil && that.NodeStores != nil") + } else if that1.NodeStores != nil { + return fmt.Errorf("NodeStores this(%v) Not Equal that(%v)", this.NodeStores, that1.NodeStores) + } + if this.NodeStoreMisses != nil && that1.NodeStoreMisses != nil { + if *this.NodeStoreMisses != *that1.NodeStoreMisses { + return fmt.Errorf("NodeStoreMisses this(%v) Not Equal that(%v)", *this.NodeStoreMisses, *that1.NodeStoreMisses) + } + } else if this.NodeStoreMisses != nil { + return fmt.Errorf("this.NodeStoreMisses == nil && that.NodeStoreMisses != nil") + } else if that1.NodeStoreMisses != nil { + return fmt.Errorf("NodeStoreMisses this(%v) Not Equal that(%v)", this.NodeStoreMisses, that1.NodeStoreMisses) + } + if this.NodePrefetches != nil && that1.NodePrefetches != nil { + if *this.NodePrefetches != *that1.NodePrefetches { + return fmt.Errorf("NodePrefetches this(%v) Not Equal that(%v)", *this.NodePrefetches, *that1.NodePrefetches) + } + } else if this.NodePrefetches != nil { + return fmt.Errorf("this.NodePrefetches == nil && that.NodePrefetches != nil") + } else if that1.NodePrefetches != nil { + return fmt.Errorf("NodePrefetches this(%v) Not Equal that(%v)", this.NodePrefetches, that1.NodePrefetches) + } + if this.NodePrefetchMisses != nil && that1.NodePrefetchMisses != nil { + if *this.NodePrefetchMisses != *that1.NodePrefetchMisses { + return fmt.Errorf("NodePrefetchMisses this(%v) Not Equal that(%v)", *this.NodePrefetchMisses, *that1.NodePrefetchMisses) + } + } else if this.NodePrefetchMisses != nil { + return fmt.Errorf("this.NodePrefetchMisses == nil && that.NodePrefetchMisses != nil") + } else if that1.NodePrefetchMisses != nil { + return fmt.Errorf("NodePrefetchMisses this(%v) Not Equal that(%v)", this.NodePrefetchMisses, that1.NodePrefetchMisses) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *PerfStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*PerfStatistics) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return false + } + } else if this.Timestamp != nil { + return false + } else if that1.Timestamp != nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + if this.Cycles != nil && that1.Cycles != nil { + if *this.Cycles != *that1.Cycles { + return false + } + } else if this.Cycles != nil { + return false + } else if that1.Cycles != nil { + return false + } + if this.StalledCyclesFrontend != nil && that1.StalledCyclesFrontend != nil { + if *this.StalledCyclesFrontend != *that1.StalledCyclesFrontend { + return false + } + } else if this.StalledCyclesFrontend != nil { + return false + } else if that1.StalledCyclesFrontend != nil { + return false + } + if this.StalledCyclesBackend != nil && that1.StalledCyclesBackend != nil { + if *this.StalledCyclesBackend != *that1.StalledCyclesBackend { + return false + } + } else if this.StalledCyclesBackend != nil { + return false + } else if that1.StalledCyclesBackend != nil { + return false + } + if this.Instructions != nil && that1.Instructions != nil { + if *this.Instructions != *that1.Instructions { + return false + } + } else if this.Instructions != nil { + return false + } else if that1.Instructions != nil { + return false + } + if this.CacheReferences != nil && that1.CacheReferences != nil { + if *this.CacheReferences != *that1.CacheReferences { + return false + } + } else if this.CacheReferences != nil { + return false + } else if that1.CacheReferences != nil { + return false + } + if this.CacheMisses != nil && that1.CacheMisses != nil { + if *this.CacheMisses != *that1.CacheMisses { + return false + } + } else if this.CacheMisses != nil { + return false + } else if that1.CacheMisses != nil { + return false + } + if this.Branches != nil && that1.Branches != nil { + if *this.Branches != *that1.Branches { + return false + } + } else if this.Branches != nil { + return false + } else if that1.Branches != nil { + return false + } + if this.BranchMisses != nil && that1.BranchMisses != nil { + if *this.BranchMisses != *that1.BranchMisses { + return false + } + } else if this.BranchMisses != nil { + return false + } else if that1.BranchMisses != nil { + return false + } + if this.BusCycles != nil && that1.BusCycles != nil { + if *this.BusCycles != *that1.BusCycles { + return false + } + } else if this.BusCycles != nil { + return false + } else if that1.BusCycles != nil { + return false + } + if this.RefCycles != nil && that1.RefCycles != nil { + if *this.RefCycles != *that1.RefCycles { + return false + } + } else if this.RefCycles != nil { + return false + } else if that1.RefCycles != nil { + return false + } + if this.CpuClock != nil && that1.CpuClock != nil { + if *this.CpuClock != *that1.CpuClock { + return false + } + } else if this.CpuClock != nil { + return false + } else if that1.CpuClock != nil { + return false + } + if this.TaskClock != nil && that1.TaskClock != nil { + if *this.TaskClock != *that1.TaskClock { + return false + } + } else if this.TaskClock != nil { + return false + } else if that1.TaskClock != nil { + return false + } + if this.PageFaults != nil && that1.PageFaults != nil { + if *this.PageFaults != *that1.PageFaults { + return false + } + } else if this.PageFaults != nil { + return false + } else if that1.PageFaults != nil { + return false + } + if this.MinorFaults != nil && that1.MinorFaults != nil { + if *this.MinorFaults != *that1.MinorFaults { + return false + } + } else if this.MinorFaults != nil { + return false + } else if that1.MinorFaults != nil { + return false + } + if this.MajorFaults != nil && that1.MajorFaults != nil { + if *this.MajorFaults != *that1.MajorFaults { + return false + } + } else if this.MajorFaults != nil { + return false + } else if that1.MajorFaults != nil { + return false + } + if this.ContextSwitches != nil && that1.ContextSwitches != nil { + if *this.ContextSwitches != *that1.ContextSwitches { + return false + } + } else if this.ContextSwitches != nil { + return false + } else if that1.ContextSwitches != nil { + return false + } + if this.CpuMigrations != nil && that1.CpuMigrations != nil { + if *this.CpuMigrations != *that1.CpuMigrations { + return false + } + } else if this.CpuMigrations != nil { + return false + } else if that1.CpuMigrations != nil { + return false + } + if this.AlignmentFaults != nil && that1.AlignmentFaults != nil { + if *this.AlignmentFaults != *that1.AlignmentFaults { + return false + } + } else if this.AlignmentFaults != nil { + return false + } else if that1.AlignmentFaults != nil { + return false + } + if this.EmulationFaults != nil && that1.EmulationFaults != nil { + if *this.EmulationFaults != *that1.EmulationFaults { + return false + } + } else if this.EmulationFaults != nil { + return false + } else if that1.EmulationFaults != nil { + return false + } + if this.L1DcacheLoads != nil && that1.L1DcacheLoads != nil { + if *this.L1DcacheLoads != *that1.L1DcacheLoads { + return false + } + } else if this.L1DcacheLoads != nil { + return false + } else if that1.L1DcacheLoads != nil { + return false + } + if this.L1DcacheLoadMisses != nil && that1.L1DcacheLoadMisses != nil { + if *this.L1DcacheLoadMisses != *that1.L1DcacheLoadMisses { + return false + } + } else if this.L1DcacheLoadMisses != nil { + return false + } else if that1.L1DcacheLoadMisses != nil { + return false + } + if this.L1DcacheStores != nil && that1.L1DcacheStores != nil { + if *this.L1DcacheStores != *that1.L1DcacheStores { + return false + } + } else if this.L1DcacheStores != nil { + return false + } else if that1.L1DcacheStores != nil { + return false + } + if this.L1DcacheStoreMisses != nil && that1.L1DcacheStoreMisses != nil { + if *this.L1DcacheStoreMisses != *that1.L1DcacheStoreMisses { + return false + } + } else if this.L1DcacheStoreMisses != nil { + return false + } else if that1.L1DcacheStoreMisses != nil { + return false + } + if this.L1DcachePrefetches != nil && that1.L1DcachePrefetches != nil { + if *this.L1DcachePrefetches != *that1.L1DcachePrefetches { + return false + } + } else if this.L1DcachePrefetches != nil { + return false + } else if that1.L1DcachePrefetches != nil { + return false + } + if this.L1DcachePrefetchMisses != nil && that1.L1DcachePrefetchMisses != nil { + if *this.L1DcachePrefetchMisses != *that1.L1DcachePrefetchMisses { + return false + } + } else if this.L1DcachePrefetchMisses != nil { + return false + } else if that1.L1DcachePrefetchMisses != nil { + return false + } + if this.L1IcacheLoads != nil && that1.L1IcacheLoads != nil { + if *this.L1IcacheLoads != *that1.L1IcacheLoads { + return false + } + } else if this.L1IcacheLoads != nil { + return false + } else if that1.L1IcacheLoads != nil { + return false + } + if this.L1IcacheLoadMisses != nil && that1.L1IcacheLoadMisses != nil { + if *this.L1IcacheLoadMisses != *that1.L1IcacheLoadMisses { + return false + } + } else if this.L1IcacheLoadMisses != nil { + return false + } else if that1.L1IcacheLoadMisses != nil { + return false + } + if this.L1IcachePrefetches != nil && that1.L1IcachePrefetches != nil { + if *this.L1IcachePrefetches != *that1.L1IcachePrefetches { + return false + } + } else if this.L1IcachePrefetches != nil { + return false + } else if that1.L1IcachePrefetches != nil { + return false + } + if this.L1IcachePrefetchMisses != nil && that1.L1IcachePrefetchMisses != nil { + if *this.L1IcachePrefetchMisses != *that1.L1IcachePrefetchMisses { + return false + } + } else if this.L1IcachePrefetchMisses != nil { + return false + } else if that1.L1IcachePrefetchMisses != nil { + return false + } + if this.LlcLoads != nil && that1.LlcLoads != nil { + if *this.LlcLoads != *that1.LlcLoads { + return false + } + } else if this.LlcLoads != nil { + return false + } else if that1.LlcLoads != nil { + return false + } + if this.LlcLoadMisses != nil && that1.LlcLoadMisses != nil { + if *this.LlcLoadMisses != *that1.LlcLoadMisses { + return false + } + } else if this.LlcLoadMisses != nil { + return false + } else if that1.LlcLoadMisses != nil { + return false + } + if this.LlcStores != nil && that1.LlcStores != nil { + if *this.LlcStores != *that1.LlcStores { + return false + } + } else if this.LlcStores != nil { + return false + } else if that1.LlcStores != nil { + return false + } + if this.LlcStoreMisses != nil && that1.LlcStoreMisses != nil { + if *this.LlcStoreMisses != *that1.LlcStoreMisses { + return false + } + } else if this.LlcStoreMisses != nil { + return false + } else if that1.LlcStoreMisses != nil { + return false + } + if this.LlcPrefetches != nil && that1.LlcPrefetches != nil { + if *this.LlcPrefetches != *that1.LlcPrefetches { + return false + } + } else if this.LlcPrefetches != nil { + return false + } else if that1.LlcPrefetches != nil { + return false + } + if this.LlcPrefetchMisses != nil && that1.LlcPrefetchMisses != nil { + if *this.LlcPrefetchMisses != *that1.LlcPrefetchMisses { + return false + } + } else if this.LlcPrefetchMisses != nil { + return false + } else if that1.LlcPrefetchMisses != nil { + return false + } + if this.DtlbLoads != nil && that1.DtlbLoads != nil { + if *this.DtlbLoads != *that1.DtlbLoads { + return false + } + } else if this.DtlbLoads != nil { + return false + } else if that1.DtlbLoads != nil { + return false + } + if this.DtlbLoadMisses != nil && that1.DtlbLoadMisses != nil { + if *this.DtlbLoadMisses != *that1.DtlbLoadMisses { + return false + } + } else if this.DtlbLoadMisses != nil { + return false + } else if that1.DtlbLoadMisses != nil { + return false + } + if this.DtlbStores != nil && that1.DtlbStores != nil { + if *this.DtlbStores != *that1.DtlbStores { + return false + } + } else if this.DtlbStores != nil { + return false + } else if that1.DtlbStores != nil { + return false + } + if this.DtlbStoreMisses != nil && that1.DtlbStoreMisses != nil { + if *this.DtlbStoreMisses != *that1.DtlbStoreMisses { + return false + } + } else if this.DtlbStoreMisses != nil { + return false + } else if that1.DtlbStoreMisses != nil { + return false + } + if this.DtlbPrefetches != nil && that1.DtlbPrefetches != nil { + if *this.DtlbPrefetches != *that1.DtlbPrefetches { + return false + } + } else if this.DtlbPrefetches != nil { + return false + } else if that1.DtlbPrefetches != nil { + return false + } + if this.DtlbPrefetchMisses != nil && that1.DtlbPrefetchMisses != nil { + if *this.DtlbPrefetchMisses != *that1.DtlbPrefetchMisses { + return false + } + } else if this.DtlbPrefetchMisses != nil { + return false + } else if that1.DtlbPrefetchMisses != nil { + return false + } + if this.ItlbLoads != nil && that1.ItlbLoads != nil { + if *this.ItlbLoads != *that1.ItlbLoads { + return false + } + } else if this.ItlbLoads != nil { + return false + } else if that1.ItlbLoads != nil { + return false + } + if this.ItlbLoadMisses != nil && that1.ItlbLoadMisses != nil { + if *this.ItlbLoadMisses != *that1.ItlbLoadMisses { + return false + } + } else if this.ItlbLoadMisses != nil { + return false + } else if that1.ItlbLoadMisses != nil { + return false + } + if this.BranchLoads != nil && that1.BranchLoads != nil { + if *this.BranchLoads != *that1.BranchLoads { + return false + } + } else if this.BranchLoads != nil { + return false + } else if that1.BranchLoads != nil { + return false + } + if this.BranchLoadMisses != nil && that1.BranchLoadMisses != nil { + if *this.BranchLoadMisses != *that1.BranchLoadMisses { + return false + } + } else if this.BranchLoadMisses != nil { + return false + } else if that1.BranchLoadMisses != nil { + return false + } + if this.NodeLoads != nil && that1.NodeLoads != nil { + if *this.NodeLoads != *that1.NodeLoads { + return false + } + } else if this.NodeLoads != nil { + return false + } else if that1.NodeLoads != nil { + return false + } + if this.NodeLoadMisses != nil && that1.NodeLoadMisses != nil { + if *this.NodeLoadMisses != *that1.NodeLoadMisses { + return false + } + } else if this.NodeLoadMisses != nil { + return false + } else if that1.NodeLoadMisses != nil { + return false + } + if this.NodeStores != nil && that1.NodeStores != nil { + if *this.NodeStores != *that1.NodeStores { + return false + } + } else if this.NodeStores != nil { + return false + } else if that1.NodeStores != nil { + return false + } + if this.NodeStoreMisses != nil && that1.NodeStoreMisses != nil { + if *this.NodeStoreMisses != *that1.NodeStoreMisses { + return false + } + } else if this.NodeStoreMisses != nil { + return false + } else if that1.NodeStoreMisses != nil { + return false + } + if this.NodePrefetches != nil && that1.NodePrefetches != nil { + if *this.NodePrefetches != *that1.NodePrefetches { + return false + } + } else if this.NodePrefetches != nil { + return false + } else if that1.NodePrefetches != nil { + return false + } + if this.NodePrefetchMisses != nil && that1.NodePrefetchMisses != nil { + if *this.NodePrefetchMisses != *that1.NodePrefetchMisses { + return false + } + } else if this.NodePrefetchMisses != nil { + return false + } else if that1.NodePrefetchMisses != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Request) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Request) + if !ok { + return fmt.Errorf("that is not of type *Request") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Request but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Requestbut is not nil && this == nil") + } + if !this.SlaveId.Equal(that1.SlaveId) { + return fmt.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Request) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Request) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.SlaveId.Equal(that1.SlaveId) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Offer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer) + if !ok { + return fmt.Errorf("that is not of type *Offer") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offerbut is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return fmt.Errorf("FrameworkId this(%v) Not Equal that(%v)", this.FrameworkId, that1.FrameworkId) + } + if !this.SlaveId.Equal(that1.SlaveId) { + return fmt.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if len(this.Attributes) != len(that1.Attributes) { + return fmt.Errorf("Attributes this(%v) Not Equal that(%v)", len(this.Attributes), len(that1.Attributes)) + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(that1.Attributes[i]) { + return fmt.Errorf("Attributes this[%v](%v) Not Equal that[%v](%v)", i, this.Attributes[i], i, that1.Attributes[i]) + } + } + if len(this.ExecutorIds) != len(that1.ExecutorIds) { + return fmt.Errorf("ExecutorIds this(%v) Not Equal that(%v)", len(this.ExecutorIds), len(that1.ExecutorIds)) + } + for i := range this.ExecutorIds { + if !this.ExecutorIds[i].Equal(that1.ExecutorIds[i]) { + return fmt.Errorf("ExecutorIds this[%v](%v) Not Equal that[%v](%v)", i, this.ExecutorIds[i], i, that1.ExecutorIds[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Offer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.FrameworkId.Equal(that1.FrameworkId) { + return false + } + if !this.SlaveId.Equal(that1.SlaveId) { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(that1.Attributes[i]) { + return false + } + } + if len(this.ExecutorIds) != len(that1.ExecutorIds) { + return false + } + for i := range this.ExecutorIds { + if !this.ExecutorIds[i].Equal(that1.ExecutorIds[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Offer_Operation) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation) + if !ok { + return fmt.Errorf("that is not of type *Offer_Operation") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operationbut is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Launch.Equal(that1.Launch) { + return fmt.Errorf("Launch this(%v) Not Equal that(%v)", this.Launch, that1.Launch) + } + if !this.Reserve.Equal(that1.Reserve) { + return fmt.Errorf("Reserve this(%v) Not Equal that(%v)", this.Reserve, that1.Reserve) + } + if !this.Unreserve.Equal(that1.Unreserve) { + return fmt.Errorf("Unreserve this(%v) Not Equal that(%v)", this.Unreserve, that1.Unreserve) + } + if !this.Create.Equal(that1.Create) { + return fmt.Errorf("Create this(%v) Not Equal that(%v)", this.Create, that1.Create) + } + if !this.Destroy.Equal(that1.Destroy) { + return fmt.Errorf("Destroy this(%v) Not Equal that(%v)", this.Destroy, that1.Destroy) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Offer_Operation) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Launch.Equal(that1.Launch) { + return false + } + if !this.Reserve.Equal(that1.Reserve) { + return false + } + if !this.Unreserve.Equal(that1.Unreserve) { + return false + } + if !this.Create.Equal(that1.Create) { + return false + } + if !this.Destroy.Equal(that1.Destroy) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Offer_Operation_Launch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Launch) + if !ok { + return fmt.Errorf("that is not of type *Offer_Operation_Launch") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Launch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Launchbut is not nil && this == nil") + } + if len(this.TaskInfos) != len(that1.TaskInfos) { + return fmt.Errorf("TaskInfos this(%v) Not Equal that(%v)", len(this.TaskInfos), len(that1.TaskInfos)) + } + for i := range this.TaskInfos { + if !this.TaskInfos[i].Equal(that1.TaskInfos[i]) { + return fmt.Errorf("TaskInfos this[%v](%v) Not Equal that[%v](%v)", i, this.TaskInfos[i], i, that1.TaskInfos[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Offer_Operation_Launch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Launch) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.TaskInfos) != len(that1.TaskInfos) { + return false + } + for i := range this.TaskInfos { + if !this.TaskInfos[i].Equal(that1.TaskInfos[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Offer_Operation_Reserve) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Reserve) + if !ok { + return fmt.Errorf("that is not of type *Offer_Operation_Reserve") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Reserve but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Reservebut is not nil && this == nil") + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Offer_Operation_Reserve) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Reserve) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Offer_Operation_Unreserve) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Unreserve) + if !ok { + return fmt.Errorf("that is not of type *Offer_Operation_Unreserve") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Unreserve but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Unreservebut is not nil && this == nil") + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Offer_Operation_Unreserve) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Unreserve) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Offer_Operation_Create) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Create) + if !ok { + return fmt.Errorf("that is not of type *Offer_Operation_Create") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Create but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Createbut is not nil && this == nil") + } + if len(this.Volumes) != len(that1.Volumes) { + return fmt.Errorf("Volumes this(%v) Not Equal that(%v)", len(this.Volumes), len(that1.Volumes)) + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(that1.Volumes[i]) { + return fmt.Errorf("Volumes this[%v](%v) Not Equal that[%v](%v)", i, this.Volumes[i], i, that1.Volumes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Offer_Operation_Create) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Create) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Volumes) != len(that1.Volumes) { + return false + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(that1.Volumes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Offer_Operation_Destroy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Destroy) + if !ok { + return fmt.Errorf("that is not of type *Offer_Operation_Destroy") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Destroy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Destroybut is not nil && this == nil") + } + if len(this.Volumes) != len(that1.Volumes) { + return fmt.Errorf("Volumes this(%v) Not Equal that(%v)", len(this.Volumes), len(that1.Volumes)) + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(that1.Volumes[i]) { + return fmt.Errorf("Volumes this[%v](%v) Not Equal that[%v](%v)", i, this.Volumes[i], i, that1.Volumes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Offer_Operation_Destroy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Destroy) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Volumes) != len(that1.Volumes) { + return false + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(that1.Volumes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TaskInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskInfo) + if !ok { + return fmt.Errorf("that is not of type *TaskInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskInfobut is not nil && this == nil") + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.TaskId.Equal(that1.TaskId) { + return fmt.Errorf("TaskId this(%v) Not Equal that(%v)", this.TaskId, that1.TaskId) + } + if !this.SlaveId.Equal(that1.SlaveId) { + return fmt.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !this.Executor.Equal(that1.Executor) { + return fmt.Errorf("Executor this(%v) Not Equal that(%v)", this.Executor, that1.Executor) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !this.HealthCheck.Equal(that1.HealthCheck) { + return fmt.Errorf("HealthCheck this(%v) Not Equal that(%v)", this.HealthCheck, that1.HealthCheck) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + if !this.Discovery.Equal(that1.Discovery) { + return fmt.Errorf("Discovery this(%v) Not Equal that(%v)", this.Discovery, that1.Discovery) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TaskInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TaskInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if !this.TaskId.Equal(that1.TaskId) { + return false + } + if !this.SlaveId.Equal(that1.SlaveId) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(that1.Resources[i]) { + return false + } + } + if !this.Executor.Equal(that1.Executor) { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !this.HealthCheck.Equal(that1.HealthCheck) { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + if !this.Discovery.Equal(that1.Discovery) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TaskStatus) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskStatus) + if !ok { + return fmt.Errorf("that is not of type *TaskStatus") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskStatus but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskStatusbut is not nil && this == nil") + } + if !this.TaskId.Equal(that1.TaskId) { + return fmt.Errorf("TaskId this(%v) Not Equal that(%v)", this.TaskId, that1.TaskId) + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return fmt.Errorf("State this(%v) Not Equal that(%v)", *this.State, *that1.State) + } + } else if this.State != nil { + return fmt.Errorf("this.State == nil && that.State != nil") + } else if that1.State != nil { + return fmt.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", *this.Message, *that1.Message) + } + } else if this.Message != nil { + return fmt.Errorf("this.Message == nil && that.Message != nil") + } else if that1.Message != nil { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", this.Message, that1.Message) + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", *this.Source, *that1.Source) + } + } else if this.Source != nil { + return fmt.Errorf("this.Source == nil && that.Source != nil") + } else if that1.Source != nil { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", *this.Reason, *that1.Reason) + } + } else if this.Reason != nil { + return fmt.Errorf("this.Reason == nil && that.Reason != nil") + } else if that1.Reason != nil { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", this.Reason, that1.Reason) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !this.SlaveId.Equal(that1.SlaveId) { + return fmt.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) + } + if !this.ExecutorId.Equal(that1.ExecutorId) { + return fmt.Errorf("ExecutorId this(%v) Not Equal that(%v)", this.ExecutorId, that1.ExecutorId) + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", *this.Timestamp, *that1.Timestamp) + } + } else if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp == nil && that.Timestamp != nil") + } else if that1.Timestamp != nil { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !bytes.Equal(this.Uuid, that1.Uuid) { + return fmt.Errorf("Uuid this(%v) Not Equal that(%v)", this.Uuid, that1.Uuid) + } + if this.Healthy != nil && that1.Healthy != nil { + if *this.Healthy != *that1.Healthy { + return fmt.Errorf("Healthy this(%v) Not Equal that(%v)", *this.Healthy, *that1.Healthy) + } + } else if this.Healthy != nil { + return fmt.Errorf("this.Healthy == nil && that.Healthy != nil") + } else if that1.Healthy != nil { + return fmt.Errorf("Healthy this(%v) Not Equal that(%v)", this.Healthy, that1.Healthy) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TaskStatus) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TaskStatus) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.TaskId.Equal(that1.TaskId) { + return false + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return false + } + } else if this.State != nil { + return false + } else if that1.State != nil { + return false + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return false + } + } else if this.Message != nil { + return false + } else if that1.Message != nil { + return false + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return false + } + } else if this.Source != nil { + return false + } else if that1.Source != nil { + return false + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return false + } + } else if this.Reason != nil { + return false + } else if that1.Reason != nil { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !this.SlaveId.Equal(that1.SlaveId) { + return false + } + if !this.ExecutorId.Equal(that1.ExecutorId) { + return false + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return false + } + } else if this.Timestamp != nil { + return false + } else if that1.Timestamp != nil { + return false + } + if !bytes.Equal(this.Uuid, that1.Uuid) { + return false + } + if this.Healthy != nil && that1.Healthy != nil { + if *this.Healthy != *that1.Healthy { + return false + } + } else if this.Healthy != nil { + return false + } else if that1.Healthy != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Filters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Filters) + if !ok { + return fmt.Errorf("that is not of type *Filters") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Filters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Filtersbut is not nil && this == nil") + } + if this.RefuseSeconds != nil && that1.RefuseSeconds != nil { + if *this.RefuseSeconds != *that1.RefuseSeconds { + return fmt.Errorf("RefuseSeconds this(%v) Not Equal that(%v)", *this.RefuseSeconds, *that1.RefuseSeconds) + } + } else if this.RefuseSeconds != nil { + return fmt.Errorf("this.RefuseSeconds == nil && that.RefuseSeconds != nil") + } else if that1.RefuseSeconds != nil { + return fmt.Errorf("RefuseSeconds this(%v) Not Equal that(%v)", this.RefuseSeconds, that1.RefuseSeconds) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Filters) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Filters) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.RefuseSeconds != nil && that1.RefuseSeconds != nil { + if *this.RefuseSeconds != *that1.RefuseSeconds { + return false + } + } else if this.RefuseSeconds != nil { + return false + } else if that1.RefuseSeconds != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Environment) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Environment) + if !ok { + return fmt.Errorf("that is not of type *Environment") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Environment but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Environmentbut is not nil && this == nil") + } + if len(this.Variables) != len(that1.Variables) { + return fmt.Errorf("Variables this(%v) Not Equal that(%v)", len(this.Variables), len(that1.Variables)) + } + for i := range this.Variables { + if !this.Variables[i].Equal(that1.Variables[i]) { + return fmt.Errorf("Variables this[%v](%v) Not Equal that[%v](%v)", i, this.Variables[i], i, that1.Variables[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Environment) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Environment) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Variables) != len(that1.Variables) { + return false + } + for i := range this.Variables { + if !this.Variables[i].Equal(that1.Variables[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Environment_Variable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Environment_Variable) + if !ok { + return fmt.Errorf("that is not of type *Environment_Variable") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Environment_Variable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Environment_Variablebut is not nil && this == nil") + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Environment_Variable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Environment_Variable) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Parameter) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Parameter) + if !ok { + return fmt.Errorf("that is not of type *Parameter") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Parameter but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Parameterbut is not nil && this == nil") + } + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", *this.Key, *that1.Key) + } + } else if this.Key != nil { + return fmt.Errorf("this.Key == nil && that.Key != nil") + } else if that1.Key != nil { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Parameter) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Parameter) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return false + } + } else if this.Key != nil { + return false + } else if that1.Key != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Parameters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Parameters) + if !ok { + return fmt.Errorf("that is not of type *Parameters") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Parameters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Parametersbut is not nil && this == nil") + } + if len(this.Parameter) != len(that1.Parameter) { + return fmt.Errorf("Parameter this(%v) Not Equal that(%v)", len(this.Parameter), len(that1.Parameter)) + } + for i := range this.Parameter { + if !this.Parameter[i].Equal(that1.Parameter[i]) { + return fmt.Errorf("Parameter this[%v](%v) Not Equal that[%v](%v)", i, this.Parameter[i], i, that1.Parameter[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Parameters) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Parameters) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Parameter) != len(that1.Parameter) { + return false + } + for i := range this.Parameter { + if !this.Parameter[i].Equal(that1.Parameter[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Credential) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Credential) + if !ok { + return fmt.Errorf("that is not of type *Credential") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Credential but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Credentialbut is not nil && this == nil") + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + } + } else if this.Principal != nil { + return fmt.Errorf("this.Principal == nil && that.Principal != nil") + } else if that1.Principal != nil { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if !bytes.Equal(this.Secret, that1.Secret) { + return fmt.Errorf("Secret this(%v) Not Equal that(%v)", this.Secret, that1.Secret) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Credential) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Credential) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return false + } + } else if this.Principal != nil { + return false + } else if that1.Principal != nil { + return false + } + if !bytes.Equal(this.Secret, that1.Secret) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Credentials) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Credentials) + if !ok { + return fmt.Errorf("that is not of type *Credentials") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Credentials but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Credentialsbut is not nil && this == nil") + } + if len(this.Credentials) != len(that1.Credentials) { + return fmt.Errorf("Credentials this(%v) Not Equal that(%v)", len(this.Credentials), len(that1.Credentials)) + } + for i := range this.Credentials { + if !this.Credentials[i].Equal(that1.Credentials[i]) { + return fmt.Errorf("Credentials this[%v](%v) Not Equal that[%v](%v)", i, this.Credentials[i], i, that1.Credentials[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Credentials) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Credentials) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Credentials) != len(that1.Credentials) { + return false + } + for i := range this.Credentials { + if !this.Credentials[i].Equal(that1.Credentials[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ACL) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ACL) + if !ok { + return fmt.Errorf("that is not of type *ACL") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ACL but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ACLbut is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ACL) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ACL) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ACL_Entity) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ACL_Entity) + if !ok { + return fmt.Errorf("that is not of type *ACL_Entity") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ACL_Entity but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ACL_Entitybut is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if len(this.Values) != len(that1.Values) { + return fmt.Errorf("Values this(%v) Not Equal that(%v)", len(this.Values), len(that1.Values)) + } + for i := range this.Values { + if this.Values[i] != that1.Values[i] { + return fmt.Errorf("Values this[%v](%v) Not Equal that[%v](%v)", i, this.Values[i], i, that1.Values[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ACL_Entity) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ACL_Entity) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if len(this.Values) != len(that1.Values) { + return false + } + for i := range this.Values { + if this.Values[i] != that1.Values[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ACL_RegisterFramework) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ACL_RegisterFramework) + if !ok { + return fmt.Errorf("that is not of type *ACL_RegisterFramework") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ACL_RegisterFramework but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ACL_RegisterFrameworkbut is not nil && this == nil") + } + if !this.Principals.Equal(that1.Principals) { + return fmt.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) + } + if !this.Roles.Equal(that1.Roles) { + return fmt.Errorf("Roles this(%v) Not Equal that(%v)", this.Roles, that1.Roles) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ACL_RegisterFramework) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ACL_RegisterFramework) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Principals.Equal(that1.Principals) { + return false + } + if !this.Roles.Equal(that1.Roles) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ACL_RunTask) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ACL_RunTask) + if !ok { + return fmt.Errorf("that is not of type *ACL_RunTask") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ACL_RunTask but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ACL_RunTaskbut is not nil && this == nil") + } + if !this.Principals.Equal(that1.Principals) { + return fmt.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) + } + if !this.Users.Equal(that1.Users) { + return fmt.Errorf("Users this(%v) Not Equal that(%v)", this.Users, that1.Users) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ACL_RunTask) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ACL_RunTask) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Principals.Equal(that1.Principals) { + return false + } + if !this.Users.Equal(that1.Users) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ACL_ShutdownFramework) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ACL_ShutdownFramework) + if !ok { + return fmt.Errorf("that is not of type *ACL_ShutdownFramework") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ACL_ShutdownFramework but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ACL_ShutdownFrameworkbut is not nil && this == nil") + } + if !this.Principals.Equal(that1.Principals) { + return fmt.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) + } + if !this.FrameworkPrincipals.Equal(that1.FrameworkPrincipals) { + return fmt.Errorf("FrameworkPrincipals this(%v) Not Equal that(%v)", this.FrameworkPrincipals, that1.FrameworkPrincipals) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ACL_ShutdownFramework) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ACL_ShutdownFramework) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Principals.Equal(that1.Principals) { + return false + } + if !this.FrameworkPrincipals.Equal(that1.FrameworkPrincipals) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ACLs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ACLs) + if !ok { + return fmt.Errorf("that is not of type *ACLs") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ACLs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ACLsbut is not nil && this == nil") + } + if this.Permissive != nil && that1.Permissive != nil { + if *this.Permissive != *that1.Permissive { + return fmt.Errorf("Permissive this(%v) Not Equal that(%v)", *this.Permissive, *that1.Permissive) + } + } else if this.Permissive != nil { + return fmt.Errorf("this.Permissive == nil && that.Permissive != nil") + } else if that1.Permissive != nil { + return fmt.Errorf("Permissive this(%v) Not Equal that(%v)", this.Permissive, that1.Permissive) + } + if len(this.RegisterFrameworks) != len(that1.RegisterFrameworks) { + return fmt.Errorf("RegisterFrameworks this(%v) Not Equal that(%v)", len(this.RegisterFrameworks), len(that1.RegisterFrameworks)) + } + for i := range this.RegisterFrameworks { + if !this.RegisterFrameworks[i].Equal(that1.RegisterFrameworks[i]) { + return fmt.Errorf("RegisterFrameworks this[%v](%v) Not Equal that[%v](%v)", i, this.RegisterFrameworks[i], i, that1.RegisterFrameworks[i]) + } + } + if len(this.RunTasks) != len(that1.RunTasks) { + return fmt.Errorf("RunTasks this(%v) Not Equal that(%v)", len(this.RunTasks), len(that1.RunTasks)) + } + for i := range this.RunTasks { + if !this.RunTasks[i].Equal(that1.RunTasks[i]) { + return fmt.Errorf("RunTasks this[%v](%v) Not Equal that[%v](%v)", i, this.RunTasks[i], i, that1.RunTasks[i]) + } + } + if len(this.ShutdownFrameworks) != len(that1.ShutdownFrameworks) { + return fmt.Errorf("ShutdownFrameworks this(%v) Not Equal that(%v)", len(this.ShutdownFrameworks), len(that1.ShutdownFrameworks)) + } + for i := range this.ShutdownFrameworks { + if !this.ShutdownFrameworks[i].Equal(that1.ShutdownFrameworks[i]) { + return fmt.Errorf("ShutdownFrameworks this[%v](%v) Not Equal that[%v](%v)", i, this.ShutdownFrameworks[i], i, that1.ShutdownFrameworks[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ACLs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ACLs) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Permissive != nil && that1.Permissive != nil { + if *this.Permissive != *that1.Permissive { + return false + } + } else if this.Permissive != nil { + return false + } else if that1.Permissive != nil { + return false + } + if len(this.RegisterFrameworks) != len(that1.RegisterFrameworks) { + return false + } + for i := range this.RegisterFrameworks { + if !this.RegisterFrameworks[i].Equal(that1.RegisterFrameworks[i]) { + return false + } + } + if len(this.RunTasks) != len(that1.RunTasks) { + return false + } + for i := range this.RunTasks { + if !this.RunTasks[i].Equal(that1.RunTasks[i]) { + return false + } + } + if len(this.ShutdownFrameworks) != len(that1.ShutdownFrameworks) { + return false + } + for i := range this.ShutdownFrameworks { + if !this.ShutdownFrameworks[i].Equal(that1.ShutdownFrameworks[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RateLimit) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RateLimit) + if !ok { + return fmt.Errorf("that is not of type *RateLimit") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RateLimit but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RateLimitbut is not nil && this == nil") + } + if this.Qps != nil && that1.Qps != nil { + if *this.Qps != *that1.Qps { + return fmt.Errorf("Qps this(%v) Not Equal that(%v)", *this.Qps, *that1.Qps) + } + } else if this.Qps != nil { + return fmt.Errorf("this.Qps == nil && that.Qps != nil") + } else if that1.Qps != nil { + return fmt.Errorf("Qps this(%v) Not Equal that(%v)", this.Qps, that1.Qps) + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + } + } else if this.Principal != nil { + return fmt.Errorf("this.Principal == nil && that.Principal != nil") + } else if that1.Principal != nil { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if this.Capacity != nil && that1.Capacity != nil { + if *this.Capacity != *that1.Capacity { + return fmt.Errorf("Capacity this(%v) Not Equal that(%v)", *this.Capacity, *that1.Capacity) + } + } else if this.Capacity != nil { + return fmt.Errorf("this.Capacity == nil && that.Capacity != nil") + } else if that1.Capacity != nil { + return fmt.Errorf("Capacity this(%v) Not Equal that(%v)", this.Capacity, that1.Capacity) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RateLimit) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } + return false } - return nil -} -func (m *Request) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + + that1, ok := that.(*RateLimit) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SlaveId == nil { - m.SlaveId = &SlaveID{} - } - if err := m.SlaveId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &Resource{}) - m.Resources[len(m.Resources)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } else if this == nil { + return false + } + if this.Qps != nil && that1.Qps != nil { + if *this.Qps != *that1.Qps { + return false } + } else if this.Qps != nil { + return false + } else if that1.Qps != nil { + return false } - return nil -} -func (m *Offer) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return false } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &OfferID{} - } - if err := m.Id.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FrameworkId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FrameworkId == nil { - m.FrameworkId = &FrameworkID{} - } - if err := m.FrameworkId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SlaveId == nil { - m.SlaveId = &SlaveID{} - } - if err := m.SlaveId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Hostname = &s - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &Resource{}) - m.Resources[len(m.Resources)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &Attribute{}) - m.Attributes[len(m.Attributes)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorIds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExecutorIds = append(m.ExecutorIds, &ExecutorID{}) - m.ExecutorIds[len(m.ExecutorIds)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.Principal != nil { + return false + } else if that1.Principal != nil { + return false + } + if this.Capacity != nil && that1.Capacity != nil { + if *this.Capacity != *that1.Capacity { + return false + } + } else if this.Capacity != nil { + return false + } else if that1.Capacity != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RateLimits) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RateLimits) + if !ok { + return fmt.Errorf("that is not of type *RateLimits") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RateLimits but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RateLimitsbut is not nil && this == nil") + } + if len(this.Limits) != len(that1.Limits) { + return fmt.Errorf("Limits this(%v) Not Equal that(%v)", len(this.Limits), len(that1.Limits)) + } + for i := range this.Limits { + if !this.Limits[i].Equal(that1.Limits[i]) { + return fmt.Errorf("Limits this[%v](%v) Not Equal that[%v](%v)", i, this.Limits[i], i, that1.Limits[i]) + } + } + if this.AggregateDefaultQps != nil && that1.AggregateDefaultQps != nil { + if *this.AggregateDefaultQps != *that1.AggregateDefaultQps { + return fmt.Errorf("AggregateDefaultQps this(%v) Not Equal that(%v)", *this.AggregateDefaultQps, *that1.AggregateDefaultQps) + } + } else if this.AggregateDefaultQps != nil { + return fmt.Errorf("this.AggregateDefaultQps == nil && that.AggregateDefaultQps != nil") + } else if that1.AggregateDefaultQps != nil { + return fmt.Errorf("AggregateDefaultQps this(%v) Not Equal that(%v)", this.AggregateDefaultQps, that1.AggregateDefaultQps) + } + if this.AggregateDefaultCapacity != nil && that1.AggregateDefaultCapacity != nil { + if *this.AggregateDefaultCapacity != *that1.AggregateDefaultCapacity { + return fmt.Errorf("AggregateDefaultCapacity this(%v) Not Equal that(%v)", *this.AggregateDefaultCapacity, *that1.AggregateDefaultCapacity) } + } else if this.AggregateDefaultCapacity != nil { + return fmt.Errorf("this.AggregateDefaultCapacity == nil && that.AggregateDefaultCapacity != nil") + } else if that1.AggregateDefaultCapacity != nil { + return fmt.Errorf("AggregateDefaultCapacity this(%v) Not Equal that(%v)", this.AggregateDefaultCapacity, that1.AggregateDefaultCapacity) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *TaskInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *RateLimits) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TaskId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TaskId == nil { - m.TaskId = &TaskID{} - } - if err := m.TaskId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SlaveId == nil { - m.SlaveId = &SlaveID{} - } - if err := m.SlaveId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &Resource{}) - m.Resources[len(m.Resources)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Executor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Executor == nil { - m.Executor = &ExecutorInfo{} - } - if err := m.Executor.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Command == nil { - m.Command = &CommandInfo{} - } - if err := m.Command.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Container == nil { - m.Container = &ContainerInfo{} - } - if err := m.Container.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[index:postIndex]...) - index = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthCheck", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HealthCheck == nil { - m.HealthCheck = &HealthCheck{} - } - if err := m.HealthCheck.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*RateLimits) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil + if len(this.Limits) != len(that1.Limits) { + return false + } + for i := range this.Limits { + if !this.Limits[i].Equal(that1.Limits[i]) { + return false + } + } + if this.AggregateDefaultQps != nil && that1.AggregateDefaultQps != nil { + if *this.AggregateDefaultQps != *that1.AggregateDefaultQps { + return false + } + } else if this.AggregateDefaultQps != nil { + return false + } else if that1.AggregateDefaultQps != nil { + return false + } + if this.AggregateDefaultCapacity != nil && that1.AggregateDefaultCapacity != nil { + if *this.AggregateDefaultCapacity != *that1.AggregateDefaultCapacity { + return false + } + } else if this.AggregateDefaultCapacity != nil { + return false + } else if that1.AggregateDefaultCapacity != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *TaskStatus) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Volume) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TaskId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TaskId == nil { - m.TaskId = &TaskID{} - } - if err := m.TaskId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var v TaskState - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (TaskState(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.State = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Message = &s - index = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var v TaskStatus_Source - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (TaskStatus_Source(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Source = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var v TaskStatus_Reason - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (TaskStatus_Reason(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Reason = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append([]byte{}, data[index:postIndex]...) - index = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SlaveId == nil { - m.SlaveId = &SlaveID{} - } - if err := m.SlaveId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecutorId == nil { - m.ExecutorId = &ExecutorID{} - } - if err := m.ExecutorId.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.Timestamp = &v2 - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Healthy", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Healthy = &b - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Volume) + if !ok { + return fmt.Errorf("that is not of type *Volume") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Volume but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Volumebut is not nil && this == nil") + } + if this.ContainerPath != nil && that1.ContainerPath != nil { + if *this.ContainerPath != *that1.ContainerPath { + return fmt.Errorf("ContainerPath this(%v) Not Equal that(%v)", *this.ContainerPath, *that1.ContainerPath) + } + } else if this.ContainerPath != nil { + return fmt.Errorf("this.ContainerPath == nil && that.ContainerPath != nil") + } else if that1.ContainerPath != nil { + return fmt.Errorf("ContainerPath this(%v) Not Equal that(%v)", this.ContainerPath, that1.ContainerPath) + } + if this.HostPath != nil && that1.HostPath != nil { + if *this.HostPath != *that1.HostPath { + return fmt.Errorf("HostPath this(%v) Not Equal that(%v)", *this.HostPath, *that1.HostPath) + } + } else if this.HostPath != nil { + return fmt.Errorf("this.HostPath == nil && that.HostPath != nil") + } else if that1.HostPath != nil { + return fmt.Errorf("HostPath this(%v) Not Equal that(%v)", this.HostPath, that1.HostPath) + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", *this.Mode, *that1.Mode) } + } else if this.Mode != nil { + return fmt.Errorf("this.Mode == nil && that.Mode != nil") + } else if that1.Mode != nil { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", this.Mode, that1.Mode) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Filters) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field RefuseSeconds", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.RefuseSeconds = &v2 - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy +func (this *Volume) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } + return false } - return nil -} -func (m *Environment) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + + that1, ok := that.(*Volume) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Variables = append(m.Variables, &Environment_Variable{}) - m.Variables[len(m.Variables)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } else if this == nil { + return false + } + if this.ContainerPath != nil && that1.ContainerPath != nil { + if *this.ContainerPath != *that1.ContainerPath { + return false } + } else if this.ContainerPath != nil { + return false + } else if that1.ContainerPath != nil { + return false } - return nil -} -func (m *Environment_Variable) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if this.HostPath != nil && that1.HostPath != nil { + if *this.HostPath != *that1.HostPath { + return false } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.HostPath != nil { + return false + } else if that1.HostPath != nil { + return false + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return false } + } else if this.Mode != nil { + return false + } else if that1.Mode != nil { + return false } - return nil + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *Parameter) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Key = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Value = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy +func (this *ContainerInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } + return fmt.Errorf("that == nil && this != nil") } - return nil -} -func (m *Parameters) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + + that1, ok := that.(*ContainerInfo) + if !ok { + return fmt.Errorf("that is not of type *ContainerInfo") + } + if that1 == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Parameter = append(m.Parameter, &Parameter{}) - m.Parameter[len(m.Parameter)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that is type *ContainerInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerInfobut is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } - return nil -} -func (m *Credential) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if len(this.Volumes) != len(that1.Volumes) { + return fmt.Errorf("Volumes this(%v) Not Equal that(%v)", len(this.Volumes), len(that1.Volumes)) + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(that1.Volumes[i]) { + return fmt.Errorf("Volumes this[%v](%v) Not Equal that[%v](%v)", i, this.Volumes[i], i, that1.Volumes[i]) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Principal = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = append([]byte{}, data[index:postIndex]...) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if !this.Docker.Equal(that1.Docker) { + return fmt.Errorf("Docker this(%v) Not Equal that(%v)", this.Docker, that1.Docker) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Credentials) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *ContainerInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = append(m.Credentials, &Credential{}) - m.Credentials[len(m.Credentials)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*ContainerInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if len(this.Volumes) != len(that1.Volumes) { + return false + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(that1.Volumes[i]) { + return false + } + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if !this.Docker.Equal(that1.Docker) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *ACL) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *ContainerInfo_DockerInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerInfo_DockerInfo) + if !ok { + return fmt.Errorf("that is not of type *ContainerInfo_DockerInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerInfo_DockerInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerInfo_DockerInfobut is not nil && this == nil") + } + if this.Image != nil && that1.Image != nil { + if *this.Image != *that1.Image { + return fmt.Errorf("Image this(%v) Not Equal that(%v)", *this.Image, *that1.Image) } - fieldNum := int32(wire >> 3) - switch fieldNum { - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } else if this.Image != nil { + return fmt.Errorf("this.Image == nil && that.Image != nil") + } else if that1.Image != nil { + return fmt.Errorf("Image this(%v) Not Equal that(%v)", this.Image, that1.Image) + } + if this.Network != nil && that1.Network != nil { + if *this.Network != *that1.Network { + return fmt.Errorf("Network this(%v) Not Equal that(%v)", *this.Network, *that1.Network) } + } else if this.Network != nil { + return fmt.Errorf("this.Network == nil && that.Network != nil") + } else if that1.Network != nil { + return fmt.Errorf("Network this(%v) Not Equal that(%v)", this.Network, that1.Network) } - return nil -} -func (m *ACL_Entity) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if len(this.PortMappings) != len(that1.PortMappings) { + return fmt.Errorf("PortMappings this(%v) Not Equal that(%v)", len(this.PortMappings), len(that1.PortMappings)) + } + for i := range this.PortMappings { + if !this.PortMappings[i].Equal(that1.PortMappings[i]) { + return fmt.Errorf("PortMappings this[%v](%v) Not Equal that[%v](%v)", i, this.PortMappings[i], i, that1.PortMappings[i]) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v ACL_Entity_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (ACL_Entity_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, string(data[index:postIndex])) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } + if this.Privileged != nil && that1.Privileged != nil { + if *this.Privileged != *that1.Privileged { + return fmt.Errorf("Privileged this(%v) Not Equal that(%v)", *this.Privileged, *that1.Privileged) } + } else if this.Privileged != nil { + return fmt.Errorf("this.Privileged == nil && that.Privileged != nil") + } else if that1.Privileged != nil { + return fmt.Errorf("Privileged this(%v) Not Equal that(%v)", this.Privileged, that1.Privileged) } - return nil -} -func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if len(this.Parameters) != len(that1.Parameters) { + return fmt.Errorf("Parameters this(%v) Not Equal that(%v)", len(this.Parameters), len(that1.Parameters)) + } + for i := range this.Parameters { + if !this.Parameters[i].Equal(that1.Parameters[i]) { + return fmt.Errorf("Parameters this[%v](%v) Not Equal that[%v](%v)", i, this.Parameters[i], i, that1.Parameters[i]) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Principals == nil { - m.Principals = &ACL_Entity{} - } - if err := m.Principals.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Roles == nil { - m.Roles = &ACL_Entity{} - } - if err := m.Roles.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + } + if this.ForcePullImage != nil && that1.ForcePullImage != nil { + if *this.ForcePullImage != *that1.ForcePullImage { + return fmt.Errorf("ForcePullImage this(%v) Not Equal that(%v)", *this.ForcePullImage, *that1.ForcePullImage) } + } else if this.ForcePullImage != nil { + return fmt.Errorf("this.ForcePullImage == nil && that.ForcePullImage != nil") + } else if that1.ForcePullImage != nil { + return fmt.Errorf("ForcePullImage this(%v) Not Equal that(%v)", this.ForcePullImage, that1.ForcePullImage) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *ACL_RunTask) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *ContainerInfo_DockerInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Principals == nil { - m.Principals = &ACL_Entity{} - } - if err := m.Principals.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Users == nil { - m.Users = &ACL_Entity{} - } - if err := m.Users.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*ContainerInfo_DockerInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil + if this.Image != nil && that1.Image != nil { + if *this.Image != *that1.Image { + return false + } + } else if this.Image != nil { + return false + } else if that1.Image != nil { + return false + } + if this.Network != nil && that1.Network != nil { + if *this.Network != *that1.Network { + return false + } + } else if this.Network != nil { + return false + } else if that1.Network != nil { + return false + } + if len(this.PortMappings) != len(that1.PortMappings) { + return false + } + for i := range this.PortMappings { + if !this.PortMappings[i].Equal(that1.PortMappings[i]) { + return false + } + } + if this.Privileged != nil && that1.Privileged != nil { + if *this.Privileged != *that1.Privileged { + return false + } + } else if this.Privileged != nil { + return false + } else if that1.Privileged != nil { + return false + } + if len(this.Parameters) != len(that1.Parameters) { + return false + } + for i := range this.Parameters { + if !this.Parameters[i].Equal(that1.Parameters[i]) { + return false + } + } + if this.ForcePullImage != nil && that1.ForcePullImage != nil { + if *this.ForcePullImage != *that1.ForcePullImage { + return false + } + } else if this.ForcePullImage != nil { + return false + } else if that1.ForcePullImage != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *ContainerInfo_DockerInfo_PortMapping) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Principals == nil { - m.Principals = &ACL_Entity{} - } - if err := m.Principals.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FrameworkPrincipals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FrameworkPrincipals == nil { - m.FrameworkPrincipals = &ACL_Entity{} - } - if err := m.FrameworkPrincipals.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerInfo_DockerInfo_PortMapping) + if !ok { + return fmt.Errorf("that is not of type *ContainerInfo_DockerInfo_PortMapping") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerInfo_DockerInfo_PortMapping but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerInfo_DockerInfo_PortMappingbut is not nil && this == nil") + } + if this.HostPort != nil && that1.HostPort != nil { + if *this.HostPort != *that1.HostPort { + return fmt.Errorf("HostPort this(%v) Not Equal that(%v)", *this.HostPort, *that1.HostPort) + } + } else if this.HostPort != nil { + return fmt.Errorf("this.HostPort == nil && that.HostPort != nil") + } else if that1.HostPort != nil { + return fmt.Errorf("HostPort this(%v) Not Equal that(%v)", this.HostPort, that1.HostPort) + } + if this.ContainerPort != nil && that1.ContainerPort != nil { + if *this.ContainerPort != *that1.ContainerPort { + return fmt.Errorf("ContainerPort this(%v) Not Equal that(%v)", *this.ContainerPort, *that1.ContainerPort) + } + } else if this.ContainerPort != nil { + return fmt.Errorf("this.ContainerPort == nil && that.ContainerPort != nil") + } else if that1.ContainerPort != nil { + return fmt.Errorf("ContainerPort this(%v) Not Equal that(%v)", this.ContainerPort, that1.ContainerPort) + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *ACLs) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Permissive = &b - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RegisterFrameworks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RegisterFrameworks = append(m.RegisterFrameworks, &ACL_RegisterFramework{}) - m.RegisterFrameworks[len(m.RegisterFrameworks)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RunTasks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RunTasks = append(m.RunTasks, &ACL_RunTask{}) - m.RunTasks[len(m.RunTasks)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShutdownFrameworks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShutdownFrameworks = append(m.ShutdownFrameworks, &ACL_ShutdownFramework{}) - m.ShutdownFrameworks[len(m.ShutdownFrameworks)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy +func (this *ContainerInfo_DockerInfo_PortMapping) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } + return false + } + + that1, ok := that.(*ContainerInfo_DockerInfo_PortMapping) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.HostPort != nil && that1.HostPort != nil { + if *this.HostPort != *that1.HostPort { + return false + } + } else if this.HostPort != nil { + return false + } else if that1.HostPort != nil { + return false + } + if this.ContainerPort != nil && that1.ContainerPort != nil { + if *this.ContainerPort != *that1.ContainerPort { + return false + } + } else if this.ContainerPort != nil { + return false + } else if that1.ContainerPort != nil { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Labels) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Labels) + if !ok { + return fmt.Errorf("that is not of type *Labels") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Labels but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Labelsbut is not nil && this == nil") + } + if len(this.Labels) != len(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", len(this.Labels), len(that1.Labels)) + } + for i := range this.Labels { + if !this.Labels[i].Equal(that1.Labels[i]) { + return fmt.Errorf("Labels this[%v](%v) Not Equal that[%v](%v)", i, this.Labels[i], i, that1.Labels[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *RateLimit) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Labels) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Qps", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.Qps = &v2 - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Principal = &s - index = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Capacity = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Labels) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Labels) != len(that1.Labels) { + return false + } + for i := range this.Labels { + if !this.Labels[i].Equal(that1.Labels[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Label) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Label) + if !ok { + return fmt.Errorf("that is not of type *Label") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Label but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Labelbut is not nil && this == nil") + } + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", *this.Key, *that1.Key) + } + } else if this.Key != nil { + return fmt.Errorf("this.Key == nil && that.Key != nil") + } else if that1.Key != nil { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *RateLimits) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Label) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Limits = append(m.Limits, &RateLimit{}) - m.Limits[len(m.Limits)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregateDefaultQps", wireType) - } - var v uint64 - i := index + 8 - if i > l { - return io.ErrUnexpectedEOF - } - index = i - v = uint64(data[i-8]) - v |= uint64(data[i-7]) << 8 - v |= uint64(data[i-6]) << 16 - v |= uint64(data[i-5]) << 24 - v |= uint64(data[i-4]) << 32 - v |= uint64(data[i-3]) << 40 - v |= uint64(data[i-2]) << 48 - v |= uint64(data[i-1]) << 56 - v2 := math1.Float64frombits(v) - m.AggregateDefaultQps = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregateDefaultCapacity", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AggregateDefaultCapacity = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Label) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return false + } + } else if this.Key != nil { + return false + } else if that1.Key != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *Volume) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Port) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.ContainerPath = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.HostPath = &s - index = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - var v Volume_Mode - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Volume_Mode(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Mode = &v - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Port) + if !ok { + return fmt.Errorf("that is not of type *Port") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Port but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Portbut is not nil && this == nil") + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) + } + } else if this.Number != nil { + return fmt.Errorf("this.Number == nil && that.Number != nil") + } else if that1.Number != nil { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *ContainerInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Port) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v ContainerInfo_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (ContainerInfo_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Volumes = append(m.Volumes, &Volume{}) - m.Volumes[len(m.Volumes)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Hostname = &s - index = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docker", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Docker == nil { - m.Docker = &ContainerInfo_DockerInfo{} - } - if err := m.Docker.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Port) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return false + } + } else if this.Number != nil { + return false + } else if that1.Number != nil { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false } - return nil + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Ports) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Image = &s - index = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var v ContainerInfo_DockerInfo_Network - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (ContainerInfo_DockerInfo_Network(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Network = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortMappings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortMappings = append(m.PortMappings, &ContainerInfo_DockerInfo_PortMapping{}) - m.PortMappings[len(m.PortMappings)-1].Unmarshal(data[index:postIndex]) - index = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Privileged = &b - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Parameters = append(m.Parameters, &Parameter{}) - m.Parameters[len(m.Parameters)-1].Unmarshal(data[index:postIndex]) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Ports) + if !ok { + return fmt.Errorf("that is not of type *Ports") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Ports but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Portsbut is not nil && this == nil") + } + if len(this.Ports) != len(that1.Ports) { + return fmt.Errorf("Ports this(%v) Not Equal that(%v)", len(this.Ports), len(that1.Ports)) + } + for i := range this.Ports { + if !this.Ports[i].Equal(that1.Ports[i]) { + return fmt.Errorf("Ports this[%v](%v) Not Equal that[%v](%v)", i, this.Ports[i], i, that1.Ports[i]) } } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } return nil } -func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Ports) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.HostPort = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ContainerPort = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Protocol = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Ports) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil + if len(this.Ports) != len(that1.Ports) { + return false + } + for i := range this.Ports { + if !this.Ports[i].Equal(that1.Ports[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true } -func (this *FrameworkID) String() string { - if this == nil { - return "nil" +func (this *DiscoveryInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DiscoveryInfo) + if !ok { + return fmt.Errorf("that is not of type *DiscoveryInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DiscoveryInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DiscoveryInfobut is not nil && this == nil") + } + if this.Visibility != nil && that1.Visibility != nil { + if *this.Visibility != *that1.Visibility { + return fmt.Errorf("Visibility this(%v) Not Equal that(%v)", *this.Visibility, *that1.Visibility) + } + } else if this.Visibility != nil { + return fmt.Errorf("this.Visibility == nil && that.Visibility != nil") + } else if that1.Visibility != nil { + return fmt.Errorf("Visibility this(%v) Not Equal that(%v)", this.Visibility, that1.Visibility) + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) } - s := strings.Join([]string{`&FrameworkID{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *OfferID) String() string { - if this == nil { - return "nil" + if this.Environment != nil && that1.Environment != nil { + if *this.Environment != *that1.Environment { + return fmt.Errorf("Environment this(%v) Not Equal that(%v)", *this.Environment, *that1.Environment) + } + } else if this.Environment != nil { + return fmt.Errorf("this.Environment == nil && that.Environment != nil") + } else if that1.Environment != nil { + return fmt.Errorf("Environment this(%v) Not Equal that(%v)", this.Environment, that1.Environment) } - s := strings.Join([]string{`&OfferID{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *SlaveID) String() string { - if this == nil { - return "nil" + if this.Location != nil && that1.Location != nil { + if *this.Location != *that1.Location { + return fmt.Errorf("Location this(%v) Not Equal that(%v)", *this.Location, *that1.Location) + } + } else if this.Location != nil { + return fmt.Errorf("this.Location == nil && that.Location != nil") + } else if that1.Location != nil { + return fmt.Errorf("Location this(%v) Not Equal that(%v)", this.Location, that1.Location) } - s := strings.Join([]string{`&SlaveID{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *TaskID) String() string { - if this == nil { - return "nil" + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", *this.Version, *that1.Version) + } + } else if this.Version != nil { + return fmt.Errorf("this.Version == nil && that.Version != nil") + } else if that1.Version != nil { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", this.Version, that1.Version) } - s := strings.Join([]string{`&TaskID{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ExecutorID) String() string { - if this == nil { - return "nil" + if !this.Ports.Equal(that1.Ports) { + return fmt.Errorf("Ports this(%v) Not Equal that(%v)", this.Ports, that1.Ports) } - s := strings.Join([]string{`&ExecutorID{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ContainerID) String() string { - if this == nil { - return "nil" + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) } - s := strings.Join([]string{`&ContainerID{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *FrameworkInfo) String() string { - if this == nil { - return "nil" + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } - s := strings.Join([]string{`&FrameworkInfo{`, - `User:` + valueToStringMesos(this.User) + `,`, - `Name:` + valueToStringMesos(this.Name) + `,`, - `Id:` + strings.Replace(fmt1.Sprintf("%v", this.Id), "FrameworkID", "FrameworkID", 1) + `,`, - `FailoverTimeout:` + valueToStringMesos(this.FailoverTimeout) + `,`, - `Checkpoint:` + valueToStringMesos(this.Checkpoint) + `,`, - `Role:` + valueToStringMesos(this.Role) + `,`, - `Hostname:` + valueToStringMesos(this.Hostname) + `,`, - `Principal:` + valueToStringMesos(this.Principal) + `,`, - `WebuiUrl:` + valueToStringMesos(this.WebuiUrl) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + return nil } -func (this *HealthCheck) String() string { - if this == nil { - return "nil" +func (this *DiscoveryInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false } - s := strings.Join([]string{`&HealthCheck{`, - `Http:` + strings.Replace(fmt1.Sprintf("%v", this.Http), "HealthCheck_HTTP", "HealthCheck_HTTP", 1) + `,`, - `DelaySeconds:` + valueToStringMesos(this.DelaySeconds) + `,`, - `IntervalSeconds:` + valueToStringMesos(this.IntervalSeconds) + `,`, - `TimeoutSeconds:` + valueToStringMesos(this.TimeoutSeconds) + `,`, - `ConsecutiveFailures:` + valueToStringMesos(this.ConsecutiveFailures) + `,`, - `GracePeriodSeconds:` + valueToStringMesos(this.GracePeriodSeconds) + `,`, - `Command:` + strings.Replace(fmt1.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *HealthCheck_HTTP) String() string { - if this == nil { - return "nil" + + that1, ok := that.(*DiscoveryInfo) + if !ok { + return false } - s := strings.Join([]string{`&HealthCheck_HTTP{`, - `Port:` + valueToStringMesos(this.Port) + `,`, - `Path:` + valueToStringMesos(this.Path) + `,`, - `Statuses:` + fmt1.Sprintf("%v", this.Statuses) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CommandInfo) String() string { - if this == nil { - return "nil" + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - s := strings.Join([]string{`&CommandInfo{`, - `Container:` + strings.Replace(fmt1.Sprintf("%v", this.Container), "CommandInfo_ContainerInfo", "CommandInfo_ContainerInfo", 1) + `,`, - `Uris:` + strings.Replace(fmt1.Sprintf("%v", this.Uris), "CommandInfo_URI", "CommandInfo_URI", 1) + `,`, - `Environment:` + strings.Replace(fmt1.Sprintf("%v", this.Environment), "Environment", "Environment", 1) + `,`, - `Shell:` + valueToStringMesos(this.Shell) + `,`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `Arguments:` + fmt1.Sprintf("%v", this.Arguments) + `,`, - `User:` + valueToStringMesos(this.User) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CommandInfo_URI) String() string { - if this == nil { - return "nil" + if this.Visibility != nil && that1.Visibility != nil { + if *this.Visibility != *that1.Visibility { + return false + } + } else if this.Visibility != nil { + return false + } else if that1.Visibility != nil { + return false } - s := strings.Join([]string{`&CommandInfo_URI{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `Executable:` + valueToStringMesos(this.Executable) + `,`, - `Extract:` + valueToStringMesos(this.Extract) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *CommandInfo_ContainerInfo) String() string { - if this == nil { - return "nil" + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false } - s := strings.Join([]string{`&CommandInfo_ContainerInfo{`, - `Image:` + valueToStringMesos(this.Image) + `,`, - `Options:` + fmt1.Sprintf("%v", this.Options) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ExecutorInfo) String() string { - if this == nil { - return "nil" + if this.Environment != nil && that1.Environment != nil { + if *this.Environment != *that1.Environment { + return false + } + } else if this.Environment != nil { + return false + } else if that1.Environment != nil { + return false } - s := strings.Join([]string{`&ExecutorInfo{`, - `ExecutorId:` + strings.Replace(fmt1.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, - `FrameworkId:` + strings.Replace(fmt1.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, - `Command:` + strings.Replace(fmt1.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, - `Container:` + strings.Replace(fmt1.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, - `Resources:` + strings.Replace(fmt1.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, - `Name:` + valueToStringMesos(this.Name) + `,`, - `Source:` + valueToStringMesos(this.Source) + `,`, - `Data:` + valueToStringMesos(this.Data) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *MasterInfo) String() string { - if this == nil { - return "nil" + if this.Location != nil && that1.Location != nil { + if *this.Location != *that1.Location { + return false + } + } else if this.Location != nil { + return false + } else if that1.Location != nil { + return false } - s := strings.Join([]string{`&MasterInfo{`, - `Id:` + valueToStringMesos(this.Id) + `,`, - `Ip:` + valueToStringMesos(this.Ip) + `,`, - `Port:` + valueToStringMesos(this.Port) + `,`, - `Pid:` + valueToStringMesos(this.Pid) + `,`, - `Hostname:` + valueToStringMesos(this.Hostname) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *SlaveInfo) String() string { - if this == nil { - return "nil" + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return false + } + } else if this.Version != nil { + return false + } else if that1.Version != nil { + return false } - s := strings.Join([]string{`&SlaveInfo{`, - `Hostname:` + valueToStringMesos(this.Hostname) + `,`, - `Port:` + valueToStringMesos(this.Port) + `,`, - `Resources:` + strings.Replace(fmt1.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, - `Attributes:` + strings.Replace(fmt1.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1) + `,`, - `Id:` + strings.Replace(fmt1.Sprintf("%v", this.Id), "SlaveID", "SlaveID", 1) + `,`, - `Checkpoint:` + valueToStringMesos(this.Checkpoint) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Value) String() string { - if this == nil { - return "nil" + if !this.Ports.Equal(that1.Ports) { + return false } - s := strings.Join([]string{`&Value{`, - `Type:` + valueToStringMesos(this.Type) + `,`, - `Scalar:` + strings.Replace(fmt1.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, - `Ranges:` + strings.Replace(fmt1.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, - `Set:` + strings.Replace(fmt1.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, - `Text:` + strings.Replace(fmt1.Sprintf("%v", this.Text), "Value_Text", "Value_Text", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Value_Scalar) String() string { - if this == nil { - return "nil" + if !this.Labels.Equal(that1.Labels) { + return false } - s := strings.Join([]string{`&Value_Scalar{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Value_Range) String() string { - if this == nil { - return "nil" + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - s := strings.Join([]string{`&Value_Range{`, - `Begin:` + valueToStringMesos(this.Begin) + `,`, - `End:` + valueToStringMesos(this.End) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + return true } -func (this *Value_Ranges) String() string { +func (this *FrameworkID) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Value_Ranges{`, - `Range:` + strings.Replace(fmt1.Sprintf("%v", this.Range), "Value_Range", "Value_Range", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Value_Set) String() string { - if this == nil { - return "nil" + s := make([]string, 0, 5) + s = append(s, "&mesosproto.FrameworkID{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") } - s := strings.Join([]string{`&Value_Set{`, - `Item:` + fmt1.Sprintf("%v", this.Item) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Value_Text) String() string { +func (this *OfferID) GoString() string { if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value_Text{`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.OfferID{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Attribute) String() string { +func (this *SlaveID) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Attribute{`, - `Name:` + valueToStringMesos(this.Name) + `,`, - `Type:` + valueToStringMesos(this.Type) + `,`, - `Scalar:` + strings.Replace(fmt1.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, - `Ranges:` + strings.Replace(fmt1.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, - `Set:` + strings.Replace(fmt1.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, - `Text:` + strings.Replace(fmt1.Sprintf("%v", this.Text), "Value_Text", "Value_Text", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.SlaveID{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Resource) String() string { +func (this *TaskID) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Resource{`, - `Name:` + valueToStringMesos(this.Name) + `,`, - `Type:` + valueToStringMesos(this.Type) + `,`, - `Scalar:` + strings.Replace(fmt1.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, - `Ranges:` + strings.Replace(fmt1.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, - `Set:` + strings.Replace(fmt1.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, - `Role:` + valueToStringMesos(this.Role) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.TaskID{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ResourceStatistics) String() string { +func (this *ExecutorID) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ResourceStatistics{`, - `Timestamp:` + valueToStringMesos(this.Timestamp) + `,`, - `CpusUserTimeSecs:` + valueToStringMesos(this.CpusUserTimeSecs) + `,`, - `CpusSystemTimeSecs:` + valueToStringMesos(this.CpusSystemTimeSecs) + `,`, - `CpusLimit:` + valueToStringMesos(this.CpusLimit) + `,`, - `CpusNrPeriods:` + valueToStringMesos(this.CpusNrPeriods) + `,`, - `CpusNrThrottled:` + valueToStringMesos(this.CpusNrThrottled) + `,`, - `CpusThrottledTimeSecs:` + valueToStringMesos(this.CpusThrottledTimeSecs) + `,`, - `MemRssBytes:` + valueToStringMesos(this.MemRssBytes) + `,`, - `MemLimitBytes:` + valueToStringMesos(this.MemLimitBytes) + `,`, - `MemFileBytes:` + valueToStringMesos(this.MemFileBytes) + `,`, - `MemAnonBytes:` + valueToStringMesos(this.MemAnonBytes) + `,`, - `MemMappedFileBytes:` + valueToStringMesos(this.MemMappedFileBytes) + `,`, - `Perf:` + strings.Replace(fmt1.Sprintf("%v", this.Perf), "PerfStatistics", "PerfStatistics", 1) + `,`, - `NetRxPackets:` + valueToStringMesos(this.NetRxPackets) + `,`, - `NetRxBytes:` + valueToStringMesos(this.NetRxBytes) + `,`, - `NetRxErrors:` + valueToStringMesos(this.NetRxErrors) + `,`, - `NetRxDropped:` + valueToStringMesos(this.NetRxDropped) + `,`, - `NetTxPackets:` + valueToStringMesos(this.NetTxPackets) + `,`, - `NetTxBytes:` + valueToStringMesos(this.NetTxBytes) + `,`, - `NetTxErrors:` + valueToStringMesos(this.NetTxErrors) + `,`, - `NetTxDropped:` + valueToStringMesos(this.NetTxDropped) + `,`, - `NetTcpRttMicrosecsP50:` + valueToStringMesos(this.NetTcpRttMicrosecsP50) + `,`, - `NetTcpRttMicrosecsP90:` + valueToStringMesos(this.NetTcpRttMicrosecsP90) + `,`, - `NetTcpRttMicrosecsP95:` + valueToStringMesos(this.NetTcpRttMicrosecsP95) + `,`, - `NetTcpRttMicrosecsP99:` + valueToStringMesos(this.NetTcpRttMicrosecsP99) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.ExecutorID{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ResourceUsage) String() string { +func (this *ContainerID) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ResourceUsage{`, - `SlaveId:` + strings.Replace(fmt1.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `FrameworkId:` + strings.Replace(fmt1.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, - `ExecutorId:` + strings.Replace(fmt1.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, - `ExecutorName:` + valueToStringMesos(this.ExecutorName) + `,`, - `TaskId:` + strings.Replace(fmt1.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, - `Statistics:` + strings.Replace(fmt1.Sprintf("%v", this.Statistics), "ResourceStatistics", "ResourceStatistics", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.ContainerID{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *PerfStatistics) String() string { +func (this *FrameworkInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PerfStatistics{`, - `Timestamp:` + valueToStringMesos(this.Timestamp) + `,`, - `Duration:` + valueToStringMesos(this.Duration) + `,`, - `Cycles:` + valueToStringMesos(this.Cycles) + `,`, - `StalledCyclesFrontend:` + valueToStringMesos(this.StalledCyclesFrontend) + `,`, - `StalledCyclesBackend:` + valueToStringMesos(this.StalledCyclesBackend) + `,`, - `Instructions:` + valueToStringMesos(this.Instructions) + `,`, - `CacheReferences:` + valueToStringMesos(this.CacheReferences) + `,`, - `CacheMisses:` + valueToStringMesos(this.CacheMisses) + `,`, - `Branches:` + valueToStringMesos(this.Branches) + `,`, - `BranchMisses:` + valueToStringMesos(this.BranchMisses) + `,`, - `BusCycles:` + valueToStringMesos(this.BusCycles) + `,`, - `RefCycles:` + valueToStringMesos(this.RefCycles) + `,`, - `CpuClock:` + valueToStringMesos(this.CpuClock) + `,`, - `TaskClock:` + valueToStringMesos(this.TaskClock) + `,`, - `PageFaults:` + valueToStringMesos(this.PageFaults) + `,`, - `MinorFaults:` + valueToStringMesos(this.MinorFaults) + `,`, - `MajorFaults:` + valueToStringMesos(this.MajorFaults) + `,`, - `ContextSwitches:` + valueToStringMesos(this.ContextSwitches) + `,`, - `CpuMigrations:` + valueToStringMesos(this.CpuMigrations) + `,`, - `AlignmentFaults:` + valueToStringMesos(this.AlignmentFaults) + `,`, - `EmulationFaults:` + valueToStringMesos(this.EmulationFaults) + `,`, - `L1DcacheLoads:` + valueToStringMesos(this.L1DcacheLoads) + `,`, - `L1DcacheLoadMisses:` + valueToStringMesos(this.L1DcacheLoadMisses) + `,`, - `L1DcacheStores:` + valueToStringMesos(this.L1DcacheStores) + `,`, - `L1DcacheStoreMisses:` + valueToStringMesos(this.L1DcacheStoreMisses) + `,`, - `L1DcachePrefetches:` + valueToStringMesos(this.L1DcachePrefetches) + `,`, - `L1DcachePrefetchMisses:` + valueToStringMesos(this.L1DcachePrefetchMisses) + `,`, - `L1IcacheLoads:` + valueToStringMesos(this.L1IcacheLoads) + `,`, - `L1IcacheLoadMisses:` + valueToStringMesos(this.L1IcacheLoadMisses) + `,`, - `L1IcachePrefetches:` + valueToStringMesos(this.L1IcachePrefetches) + `,`, - `L1IcachePrefetchMisses:` + valueToStringMesos(this.L1IcachePrefetchMisses) + `,`, - `LlcLoads:` + valueToStringMesos(this.LlcLoads) + `,`, - `LlcLoadMisses:` + valueToStringMesos(this.LlcLoadMisses) + `,`, - `LlcStores:` + valueToStringMesos(this.LlcStores) + `,`, - `LlcStoreMisses:` + valueToStringMesos(this.LlcStoreMisses) + `,`, - `LlcPrefetches:` + valueToStringMesos(this.LlcPrefetches) + `,`, - `LlcPrefetchMisses:` + valueToStringMesos(this.LlcPrefetchMisses) + `,`, - `DtlbLoads:` + valueToStringMesos(this.DtlbLoads) + `,`, - `DtlbLoadMisses:` + valueToStringMesos(this.DtlbLoadMisses) + `,`, - `DtlbStores:` + valueToStringMesos(this.DtlbStores) + `,`, - `DtlbStoreMisses:` + valueToStringMesos(this.DtlbStoreMisses) + `,`, - `DtlbPrefetches:` + valueToStringMesos(this.DtlbPrefetches) + `,`, - `DtlbPrefetchMisses:` + valueToStringMesos(this.DtlbPrefetchMisses) + `,`, - `ItlbLoads:` + valueToStringMesos(this.ItlbLoads) + `,`, - `ItlbLoadMisses:` + valueToStringMesos(this.ItlbLoadMisses) + `,`, - `BranchLoads:` + valueToStringMesos(this.BranchLoads) + `,`, - `BranchLoadMisses:` + valueToStringMesos(this.BranchLoadMisses) + `,`, - `NodeLoads:` + valueToStringMesos(this.NodeLoads) + `,`, - `NodeLoadMisses:` + valueToStringMesos(this.NodeLoadMisses) + `,`, - `NodeStores:` + valueToStringMesos(this.NodeStores) + `,`, - `NodeStoreMisses:` + valueToStringMesos(this.NodeStoreMisses) + `,`, - `NodePrefetches:` + valueToStringMesos(this.NodePrefetches) + `,`, - `NodePrefetchMisses:` + valueToStringMesos(this.NodePrefetchMisses) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 14) + s = append(s, "&mesosproto.FrameworkInfo{") + if this.User != nil { + s = append(s, "User: "+valueToGoStringMesos(this.User, "string")+",\n") + } + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.FailoverTimeout != nil { + s = append(s, "FailoverTimeout: "+valueToGoStringMesos(this.FailoverTimeout, "float64")+",\n") + } + if this.Checkpoint != nil { + s = append(s, "Checkpoint: "+valueToGoStringMesos(this.Checkpoint, "bool")+",\n") + } + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.Principal != nil { + s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") + } + if this.WebuiUrl != nil { + s = append(s, "WebuiUrl: "+valueToGoStringMesos(this.WebuiUrl, "string")+",\n") + } + if this.Capabilities != nil { + s = append(s, "Capabilities: "+fmt.Sprintf("%#v", this.Capabilities)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Request) String() string { +func (this *FrameworkInfo_Capability) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Request{`, - `SlaveId:` + strings.Replace(fmt1.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `Resources:` + strings.Replace(fmt1.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.FrameworkInfo_Capability{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.FrameworkInfo_Capability_Type")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Offer) String() string { +func (this *HealthCheck) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Offer{`, - `Id:` + strings.Replace(fmt1.Sprintf("%v", this.Id), "OfferID", "OfferID", 1) + `,`, - `FrameworkId:` + strings.Replace(fmt1.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, - `SlaveId:` + strings.Replace(fmt1.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `Hostname:` + valueToStringMesos(this.Hostname) + `,`, - `Resources:` + strings.Replace(fmt1.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, - `Attributes:` + strings.Replace(fmt1.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1) + `,`, - `ExecutorIds:` + strings.Replace(fmt1.Sprintf("%v", this.ExecutorIds), "ExecutorID", "ExecutorID", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 11) + s = append(s, "&mesosproto.HealthCheck{") + if this.Http != nil { + s = append(s, "Http: "+fmt.Sprintf("%#v", this.Http)+",\n") + } + if this.DelaySeconds != nil { + s = append(s, "DelaySeconds: "+valueToGoStringMesos(this.DelaySeconds, "float64")+",\n") + } + if this.IntervalSeconds != nil { + s = append(s, "IntervalSeconds: "+valueToGoStringMesos(this.IntervalSeconds, "float64")+",\n") + } + if this.TimeoutSeconds != nil { + s = append(s, "TimeoutSeconds: "+valueToGoStringMesos(this.TimeoutSeconds, "float64")+",\n") + } + if this.ConsecutiveFailures != nil { + s = append(s, "ConsecutiveFailures: "+valueToGoStringMesos(this.ConsecutiveFailures, "uint32")+",\n") + } + if this.GracePeriodSeconds != nil { + s = append(s, "GracePeriodSeconds: "+valueToGoStringMesos(this.GracePeriodSeconds, "float64")+",\n") + } + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *TaskInfo) String() string { +func (this *HealthCheck_HTTP) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&TaskInfo{`, - `Name:` + valueToStringMesos(this.Name) + `,`, - `TaskId:` + strings.Replace(fmt1.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, - `SlaveId:` + strings.Replace(fmt1.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `Resources:` + strings.Replace(fmt1.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, - `Executor:` + strings.Replace(fmt1.Sprintf("%v", this.Executor), "ExecutorInfo", "ExecutorInfo", 1) + `,`, - `Command:` + strings.Replace(fmt1.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, - `Container:` + strings.Replace(fmt1.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, - `Data:` + valueToStringMesos(this.Data) + `,`, - `HealthCheck:` + strings.Replace(fmt1.Sprintf("%v", this.HealthCheck), "HealthCheck", "HealthCheck", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 7) + s = append(s, "&mesosproto.HealthCheck_HTTP{") + if this.Port != nil { + s = append(s, "Port: "+valueToGoStringMesos(this.Port, "uint32")+",\n") + } + if this.Path != nil { + s = append(s, "Path: "+valueToGoStringMesos(this.Path, "string")+",\n") + } + if this.Statuses != nil { + s = append(s, "Statuses: "+fmt.Sprintf("%#v", this.Statuses)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *TaskStatus) String() string { +func (this *CommandInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&TaskStatus{`, - `TaskId:` + strings.Replace(fmt1.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, - `State:` + valueToStringMesos(this.State) + `,`, - `Message:` + valueToStringMesos(this.Message) + `,`, - `Source:` + valueToStringMesos(this.Source) + `,`, - `Reason:` + valueToStringMesos(this.Reason) + `,`, - `Data:` + valueToStringMesos(this.Data) + `,`, - `SlaveId:` + strings.Replace(fmt1.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, - `ExecutorId:` + strings.Replace(fmt1.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, - `Timestamp:` + valueToStringMesos(this.Timestamp) + `,`, - `Healthy:` + valueToStringMesos(this.Healthy) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 11) + s = append(s, "&mesosproto.CommandInfo{") + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + if this.Uris != nil { + s = append(s, "Uris: "+fmt.Sprintf("%#v", this.Uris)+",\n") + } + if this.Environment != nil { + s = append(s, "Environment: "+fmt.Sprintf("%#v", this.Environment)+",\n") + } + if this.Shell != nil { + s = append(s, "Shell: "+valueToGoStringMesos(this.Shell, "bool")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.Arguments != nil { + s = append(s, "Arguments: "+fmt.Sprintf("%#v", this.Arguments)+",\n") + } + if this.User != nil { + s = append(s, "User: "+valueToGoStringMesos(this.User, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Filters) String() string { +func (this *CommandInfo_URI) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Filters{`, - `RefuseSeconds:` + valueToStringMesos(this.RefuseSeconds) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 8) + s = append(s, "&mesosproto.CommandInfo_URI{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.Executable != nil { + s = append(s, "Executable: "+valueToGoStringMesos(this.Executable, "bool")+",\n") + } + if this.Extract != nil { + s = append(s, "Extract: "+valueToGoStringMesos(this.Extract, "bool")+",\n") + } + if this.Cache != nil { + s = append(s, "Cache: "+valueToGoStringMesos(this.Cache, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Environment) String() string { +func (this *CommandInfo_ContainerInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Environment{`, - `Variables:` + strings.Replace(fmt1.Sprintf("%v", this.Variables), "Environment_Variable", "Environment_Variable", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&mesosproto.CommandInfo_ContainerInfo{") + if this.Image != nil { + s = append(s, "Image: "+valueToGoStringMesos(this.Image, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Environment_Variable) String() string { +func (this *ExecutorInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Environment_Variable{`, - `Name:` + valueToStringMesos(this.Name) + `,`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 13) + s = append(s, "&mesosproto.ExecutorInfo{") + if this.ExecutorId != nil { + s = append(s, "ExecutorId: "+fmt.Sprintf("%#v", this.ExecutorId)+",\n") + } + if this.FrameworkId != nil { + s = append(s, "FrameworkId: "+fmt.Sprintf("%#v", this.FrameworkId)+",\n") + } + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Source != nil { + s = append(s, "Source: "+valueToGoStringMesos(this.Source, "string")+",\n") + } + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMesos(this.Data, "byte")+",\n") + } + if this.Discovery != nil { + s = append(s, "Discovery: "+fmt.Sprintf("%#v", this.Discovery)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Parameter) String() string { +func (this *MasterInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Parameter{`, - `Key:` + valueToStringMesos(this.Key) + `,`, - `Value:` + valueToStringMesos(this.Value) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 10) + s = append(s, "&mesosproto.MasterInfo{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringMesos(this.Id, "string")+",\n") + } + if this.Ip != nil { + s = append(s, "Ip: "+valueToGoStringMesos(this.Ip, "uint32")+",\n") + } + if this.Port != nil { + s = append(s, "Port: "+valueToGoStringMesos(this.Port, "uint32")+",\n") + } + if this.Pid != nil { + s = append(s, "Pid: "+valueToGoStringMesos(this.Pid, "string")+",\n") + } + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.Version != nil { + s = append(s, "Version: "+valueToGoStringMesos(this.Version, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Parameters) String() string { +func (this *SlaveInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Parameters{`, - `Parameter:` + strings.Replace(fmt1.Sprintf("%v", this.Parameter), "Parameter", "Parameter", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 10) + s = append(s, "&mesosproto.SlaveInfo{") + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.Port != nil { + s = append(s, "Port: "+valueToGoStringMesos(this.Port, "int32")+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Attributes != nil { + s = append(s, "Attributes: "+fmt.Sprintf("%#v", this.Attributes)+",\n") + } + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Checkpoint != nil { + s = append(s, "Checkpoint: "+valueToGoStringMesos(this.Checkpoint, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Credential) String() string { +func (this *Value) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Credential{`, - `Principal:` + valueToStringMesos(this.Principal) + `,`, - `Secret:` + valueToStringMesos(this.Secret) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 9) + s = append(s, "&mesosproto.Value{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.Value_Type")+",\n") + } + if this.Scalar != nil { + s = append(s, "Scalar: "+fmt.Sprintf("%#v", this.Scalar)+",\n") + } + if this.Ranges != nil { + s = append(s, "Ranges: "+fmt.Sprintf("%#v", this.Ranges)+",\n") + } + if this.Set != nil { + s = append(s, "Set: "+fmt.Sprintf("%#v", this.Set)+",\n") + } + if this.Text != nil { + s = append(s, "Text: "+fmt.Sprintf("%#v", this.Text)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Credentials) String() string { +func (this *Value_Scalar) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Credentials{`, - `Credentials:` + strings.Replace(fmt1.Sprintf("%v", this.Credentials), "Credential", "Credential", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Value_Scalar{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "float64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ACL) String() string { +func (this *Value_Range) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ACL{`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Value_Range{") + if this.Begin != nil { + s = append(s, "Begin: "+valueToGoStringMesos(this.Begin, "uint64")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringMesos(this.End, "uint64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ACL_Entity) String() string { +func (this *Value_Ranges) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ACL_Entity{`, - `Type:` + valueToStringMesos(this.Type) + `,`, - `Values:` + fmt1.Sprintf("%v", this.Values) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Value_Ranges{") + if this.Range != nil { + s = append(s, "Range: "+fmt.Sprintf("%#v", this.Range)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ACL_RegisterFramework) String() string { +func (this *Value_Set) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ACL_RegisterFramework{`, - `Principals:` + strings.Replace(fmt1.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `Roles:` + strings.Replace(fmt1.Sprintf("%v", this.Roles), "ACL_Entity", "ACL_Entity", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Value_Set{") + if this.Item != nil { + s = append(s, "Item: "+fmt.Sprintf("%#v", this.Item)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ACL_RunTask) String() string { +func (this *Value_Text) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ACL_RunTask{`, - `Principals:` + strings.Replace(fmt1.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `Users:` + strings.Replace(fmt1.Sprintf("%v", this.Users), "ACL_Entity", "ACL_Entity", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Value_Text{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ACL_ShutdownFramework) String() string { +func (this *Attribute) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ACL_ShutdownFramework{`, - `Principals:` + strings.Replace(fmt1.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `FrameworkPrincipals:` + strings.Replace(fmt1.Sprintf("%v", this.FrameworkPrincipals), "ACL_Entity", "ACL_Entity", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 10) + s = append(s, "&mesosproto.Attribute{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.Value_Type")+",\n") + } + if this.Scalar != nil { + s = append(s, "Scalar: "+fmt.Sprintf("%#v", this.Scalar)+",\n") + } + if this.Ranges != nil { + s = append(s, "Ranges: "+fmt.Sprintf("%#v", this.Ranges)+",\n") + } + if this.Set != nil { + s = append(s, "Set: "+fmt.Sprintf("%#v", this.Set)+",\n") + } + if this.Text != nil { + s = append(s, "Text: "+fmt.Sprintf("%#v", this.Text)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ACLs) String() string { +func (this *Resource) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ACLs{`, - `Permissive:` + valueToStringMesos(this.Permissive) + `,`, - `RegisterFrameworks:` + strings.Replace(fmt1.Sprintf("%v", this.RegisterFrameworks), "ACL_RegisterFramework", "ACL_RegisterFramework", 1) + `,`, - `RunTasks:` + strings.Replace(fmt1.Sprintf("%v", this.RunTasks), "ACL_RunTask", "ACL_RunTask", 1) + `,`, - `ShutdownFrameworks:` + strings.Replace(fmt1.Sprintf("%v", this.ShutdownFrameworks), "ACL_ShutdownFramework", "ACL_ShutdownFramework", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 13) + s = append(s, "&mesosproto.Resource{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.Value_Type")+",\n") + } + if this.Scalar != nil { + s = append(s, "Scalar: "+fmt.Sprintf("%#v", this.Scalar)+",\n") + } + if this.Ranges != nil { + s = append(s, "Ranges: "+fmt.Sprintf("%#v", this.Ranges)+",\n") + } + if this.Set != nil { + s = append(s, "Set: "+fmt.Sprintf("%#v", this.Set)+",\n") + } + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + if this.Reservation != nil { + s = append(s, "Reservation: "+fmt.Sprintf("%#v", this.Reservation)+",\n") + } + if this.Disk != nil { + s = append(s, "Disk: "+fmt.Sprintf("%#v", this.Disk)+",\n") + } + if this.Revocable != nil { + s = append(s, "Revocable: "+fmt.Sprintf("%#v", this.Revocable)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *RateLimit) String() string { +func (this *Resource_ReservationInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&RateLimit{`, - `Qps:` + valueToStringMesos(this.Qps) + `,`, - `Principal:` + valueToStringMesos(this.Principal) + `,`, - `Capacity:` + valueToStringMesos(this.Capacity) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Resource_ReservationInfo{") + if this.Principal != nil { + s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *RateLimits) String() string { +func (this *Resource_DiskInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&RateLimits{`, - `Limits:` + strings.Replace(fmt1.Sprintf("%v", this.Limits), "RateLimit", "RateLimit", 1) + `,`, - `AggregateDefaultQps:` + valueToStringMesos(this.AggregateDefaultQps) + `,`, - `AggregateDefaultCapacity:` + valueToStringMesos(this.AggregateDefaultCapacity) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Resource_DiskInfo{") + if this.Persistence != nil { + s = append(s, "Persistence: "+fmt.Sprintf("%#v", this.Persistence)+",\n") + } + if this.Volume != nil { + s = append(s, "Volume: "+fmt.Sprintf("%#v", this.Volume)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *Volume) String() string { +func (this *Resource_DiskInfo_Persistence) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Volume{`, - `ContainerPath:` + valueToStringMesos(this.ContainerPath) + `,`, - `HostPath:` + valueToStringMesos(this.HostPath) + `,`, - `Mode:` + valueToStringMesos(this.Mode) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Resource_DiskInfo_Persistence{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringMesos(this.Id, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ContainerInfo) String() string { +func (this *Resource_RevocableInfo) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ContainerInfo{`, - `Type:` + valueToStringMesos(this.Type) + `,`, - `Volumes:` + strings.Replace(fmt1.Sprintf("%v", this.Volumes), "Volume", "Volume", 1) + `,`, - `Hostname:` + valueToStringMesos(this.Hostname) + `,`, - `Docker:` + strings.Replace(fmt1.Sprintf("%v", this.Docker), "ContainerInfo_DockerInfo", "ContainerInfo_DockerInfo", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 4) + s = append(s, "&mesosproto.Resource_RevocableInfo{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ContainerInfo_DockerInfo) String() string { +func (this *TrafficControlStatistics) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ContainerInfo_DockerInfo{`, - `Image:` + valueToStringMesos(this.Image) + `,`, - `Network:` + valueToStringMesos(this.Network) + `,`, - `PortMappings:` + strings.Replace(fmt1.Sprintf("%v", this.PortMappings), "ContainerInfo_DockerInfo_PortMapping", "ContainerInfo_DockerInfo_PortMapping", 1) + `,`, - `Privileged:` + valueToStringMesos(this.Privileged) + `,`, - `Parameters:` + strings.Replace(fmt1.Sprintf("%v", this.Parameters), "Parameter", "Parameter", 1) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 14) + s = append(s, "&mesosproto.TrafficControlStatistics{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringMesos(this.Id, "string")+",\n") + } + if this.Backlog != nil { + s = append(s, "Backlog: "+valueToGoStringMesos(this.Backlog, "uint64")+",\n") + } + if this.Bytes != nil { + s = append(s, "Bytes: "+valueToGoStringMesos(this.Bytes, "uint64")+",\n") + } + if this.Drops != nil { + s = append(s, "Drops: "+valueToGoStringMesos(this.Drops, "uint64")+",\n") + } + if this.Overlimits != nil { + s = append(s, "Overlimits: "+valueToGoStringMesos(this.Overlimits, "uint64")+",\n") + } + if this.Packets != nil { + s = append(s, "Packets: "+valueToGoStringMesos(this.Packets, "uint64")+",\n") + } + if this.Qlen != nil { + s = append(s, "Qlen: "+valueToGoStringMesos(this.Qlen, "uint64")+",\n") + } + if this.Ratebps != nil { + s = append(s, "Ratebps: "+valueToGoStringMesos(this.Ratebps, "uint64")+",\n") + } + if this.Ratepps != nil { + s = append(s, "Ratepps: "+valueToGoStringMesos(this.Ratepps, "uint64")+",\n") + } + if this.Requeues != nil { + s = append(s, "Requeues: "+valueToGoStringMesos(this.Requeues, "uint64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ContainerInfo_DockerInfo_PortMapping) String() string { +func (this *ResourceStatistics) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ContainerInfo_DockerInfo_PortMapping{`, - `HostPort:` + valueToStringMesos(this.HostPort) + `,`, - `ContainerPort:` + valueToStringMesos(this.ContainerPort) + `,`, - `Protocol:` + valueToStringMesos(this.Protocol) + `,`, - `XXX_unrecognized:` + fmt1.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringMesos(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + s := make([]string, 0, 44) + s = append(s, "&mesosproto.ResourceStatistics{") + if this.Timestamp != nil { + s = append(s, "Timestamp: "+valueToGoStringMesos(this.Timestamp, "float64")+",\n") } - pv := reflect.Indirect(rv).Interface() - return fmt1.Sprintf("*%v", pv) -} -func (m *FrameworkID) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) + if this.Processes != nil { + s = append(s, "Processes: "+valueToGoStringMesos(this.Processes, "uint32")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Threads != nil { + s = append(s, "Threads: "+valueToGoStringMesos(this.Threads, "uint32")+",\n") } - return n -} - -func (m *OfferID) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) + if this.CpusUserTimeSecs != nil { + s = append(s, "CpusUserTimeSecs: "+valueToGoStringMesos(this.CpusUserTimeSecs, "float64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.CpusSystemTimeSecs != nil { + s = append(s, "CpusSystemTimeSecs: "+valueToGoStringMesos(this.CpusSystemTimeSecs, "float64")+",\n") } - return n + if this.CpusLimit != nil { + s = append(s, "CpusLimit: "+valueToGoStringMesos(this.CpusLimit, "float64")+",\n") + } + if this.CpusNrPeriods != nil { + s = append(s, "CpusNrPeriods: "+valueToGoStringMesos(this.CpusNrPeriods, "uint32")+",\n") + } + if this.CpusNrThrottled != nil { + s = append(s, "CpusNrThrottled: "+valueToGoStringMesos(this.CpusNrThrottled, "uint32")+",\n") + } + if this.CpusThrottledTimeSecs != nil { + s = append(s, "CpusThrottledTimeSecs: "+valueToGoStringMesos(this.CpusThrottledTimeSecs, "float64")+",\n") + } + if this.MemTotalBytes != nil { + s = append(s, "MemTotalBytes: "+valueToGoStringMesos(this.MemTotalBytes, "uint64")+",\n") + } + if this.MemTotalMemswBytes != nil { + s = append(s, "MemTotalMemswBytes: "+valueToGoStringMesos(this.MemTotalMemswBytes, "uint64")+",\n") + } + if this.MemLimitBytes != nil { + s = append(s, "MemLimitBytes: "+valueToGoStringMesos(this.MemLimitBytes, "uint64")+",\n") + } + if this.MemSoftLimitBytes != nil { + s = append(s, "MemSoftLimitBytes: "+valueToGoStringMesos(this.MemSoftLimitBytes, "uint64")+",\n") + } + if this.MemFileBytes != nil { + s = append(s, "MemFileBytes: "+valueToGoStringMesos(this.MemFileBytes, "uint64")+",\n") + } + if this.MemAnonBytes != nil { + s = append(s, "MemAnonBytes: "+valueToGoStringMesos(this.MemAnonBytes, "uint64")+",\n") + } + if this.MemCacheBytes != nil { + s = append(s, "MemCacheBytes: "+valueToGoStringMesos(this.MemCacheBytes, "uint64")+",\n") + } + if this.MemRssBytes != nil { + s = append(s, "MemRssBytes: "+valueToGoStringMesos(this.MemRssBytes, "uint64")+",\n") + } + if this.MemMappedFileBytes != nil { + s = append(s, "MemMappedFileBytes: "+valueToGoStringMesos(this.MemMappedFileBytes, "uint64")+",\n") + } + if this.MemSwapBytes != nil { + s = append(s, "MemSwapBytes: "+valueToGoStringMesos(this.MemSwapBytes, "uint64")+",\n") + } + if this.MemLowPressureCounter != nil { + s = append(s, "MemLowPressureCounter: "+valueToGoStringMesos(this.MemLowPressureCounter, "uint64")+",\n") + } + if this.MemMediumPressureCounter != nil { + s = append(s, "MemMediumPressureCounter: "+valueToGoStringMesos(this.MemMediumPressureCounter, "uint64")+",\n") + } + if this.MemCriticalPressureCounter != nil { + s = append(s, "MemCriticalPressureCounter: "+valueToGoStringMesos(this.MemCriticalPressureCounter, "uint64")+",\n") + } + if this.DiskLimitBytes != nil { + s = append(s, "DiskLimitBytes: "+valueToGoStringMesos(this.DiskLimitBytes, "uint64")+",\n") + } + if this.DiskUsedBytes != nil { + s = append(s, "DiskUsedBytes: "+valueToGoStringMesos(this.DiskUsedBytes, "uint64")+",\n") + } + if this.Perf != nil { + s = append(s, "Perf: "+fmt.Sprintf("%#v", this.Perf)+",\n") + } + if this.NetRxPackets != nil { + s = append(s, "NetRxPackets: "+valueToGoStringMesos(this.NetRxPackets, "uint64")+",\n") + } + if this.NetRxBytes != nil { + s = append(s, "NetRxBytes: "+valueToGoStringMesos(this.NetRxBytes, "uint64")+",\n") + } + if this.NetRxErrors != nil { + s = append(s, "NetRxErrors: "+valueToGoStringMesos(this.NetRxErrors, "uint64")+",\n") + } + if this.NetRxDropped != nil { + s = append(s, "NetRxDropped: "+valueToGoStringMesos(this.NetRxDropped, "uint64")+",\n") + } + if this.NetTxPackets != nil { + s = append(s, "NetTxPackets: "+valueToGoStringMesos(this.NetTxPackets, "uint64")+",\n") + } + if this.NetTxBytes != nil { + s = append(s, "NetTxBytes: "+valueToGoStringMesos(this.NetTxBytes, "uint64")+",\n") + } + if this.NetTxErrors != nil { + s = append(s, "NetTxErrors: "+valueToGoStringMesos(this.NetTxErrors, "uint64")+",\n") + } + if this.NetTxDropped != nil { + s = append(s, "NetTxDropped: "+valueToGoStringMesos(this.NetTxDropped, "uint64")+",\n") + } + if this.NetTcpRttMicrosecsP50 != nil { + s = append(s, "NetTcpRttMicrosecsP50: "+valueToGoStringMesos(this.NetTcpRttMicrosecsP50, "float64")+",\n") + } + if this.NetTcpRttMicrosecsP90 != nil { + s = append(s, "NetTcpRttMicrosecsP90: "+valueToGoStringMesos(this.NetTcpRttMicrosecsP90, "float64")+",\n") + } + if this.NetTcpRttMicrosecsP95 != nil { + s = append(s, "NetTcpRttMicrosecsP95: "+valueToGoStringMesos(this.NetTcpRttMicrosecsP95, "float64")+",\n") + } + if this.NetTcpRttMicrosecsP99 != nil { + s = append(s, "NetTcpRttMicrosecsP99: "+valueToGoStringMesos(this.NetTcpRttMicrosecsP99, "float64")+",\n") + } + if this.NetTcpActiveConnections != nil { + s = append(s, "NetTcpActiveConnections: "+valueToGoStringMesos(this.NetTcpActiveConnections, "float64")+",\n") + } + if this.NetTcpTimeWaitConnections != nil { + s = append(s, "NetTcpTimeWaitConnections: "+valueToGoStringMesos(this.NetTcpTimeWaitConnections, "float64")+",\n") + } + if this.NetTrafficControlStatistics != nil { + s = append(s, "NetTrafficControlStatistics: "+fmt.Sprintf("%#v", this.NetTrafficControlStatistics)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *SlaveID) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) +func (this *ResourceUsage) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.ResourceUsage{") + if this.Executors != nil { + s = append(s, "Executors: "+fmt.Sprintf("%#v", this.Executors)+",\n") } - return n + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *TaskID) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) +func (this *ResourceUsage_Executor) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 7) + s = append(s, "&mesosproto.ResourceUsage_Executor{") + if this.ExecutorInfo != nil { + s = append(s, "ExecutorInfo: "+fmt.Sprintf("%#v", this.ExecutorInfo)+",\n") } - return n + if this.Allocated != nil { + s = append(s, "Allocated: "+fmt.Sprintf("%#v", this.Allocated)+",\n") + } + if this.Statistics != nil { + s = append(s, "Statistics: "+fmt.Sprintf("%#v", this.Statistics)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *ExecutorID) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) +func (this *PerfStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 57) + s = append(s, "&mesosproto.PerfStatistics{") + if this.Timestamp != nil { + s = append(s, "Timestamp: "+valueToGoStringMesos(this.Timestamp, "float64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Duration != nil { + s = append(s, "Duration: "+valueToGoStringMesos(this.Duration, "float64")+",\n") } - return n -} - -func (m *ContainerID) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) + if this.Cycles != nil { + s = append(s, "Cycles: "+valueToGoStringMesos(this.Cycles, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.StalledCyclesFrontend != nil { + s = append(s, "StalledCyclesFrontend: "+valueToGoStringMesos(this.StalledCyclesFrontend, "uint64")+",\n") } - return n -} - -func (m *FrameworkInfo) Size() (n int) { - var l int - _ = l - if m.User != nil { - l = len(*m.User) - n += 1 + l + sovMesos(uint64(l)) + if this.StalledCyclesBackend != nil { + s = append(s, "StalledCyclesBackend: "+valueToGoStringMesos(this.StalledCyclesBackend, "uint64")+",\n") } - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMesos(uint64(l)) + if this.Instructions != nil { + s = append(s, "Instructions: "+valueToGoStringMesos(this.Instructions, "uint64")+",\n") } - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.CacheReferences != nil { + s = append(s, "CacheReferences: "+valueToGoStringMesos(this.CacheReferences, "uint64")+",\n") } - if m.FailoverTimeout != nil { - n += 9 + if this.CacheMisses != nil { + s = append(s, "CacheMisses: "+valueToGoStringMesos(this.CacheMisses, "uint64")+",\n") } - if m.Checkpoint != nil { - n += 2 + if this.Branches != nil { + s = append(s, "Branches: "+valueToGoStringMesos(this.Branches, "uint64")+",\n") } - if m.Role != nil { - l = len(*m.Role) - n += 1 + l + sovMesos(uint64(l)) + if this.BranchMisses != nil { + s = append(s, "BranchMisses: "+valueToGoStringMesos(this.BranchMisses, "uint64")+",\n") } - if m.Hostname != nil { - l = len(*m.Hostname) - n += 1 + l + sovMesos(uint64(l)) + if this.BusCycles != nil { + s = append(s, "BusCycles: "+valueToGoStringMesos(this.BusCycles, "uint64")+",\n") } - if m.Principal != nil { - l = len(*m.Principal) - n += 1 + l + sovMesos(uint64(l)) + if this.RefCycles != nil { + s = append(s, "RefCycles: "+valueToGoStringMesos(this.RefCycles, "uint64")+",\n") } - if m.WebuiUrl != nil { - l = len(*m.WebuiUrl) - n += 1 + l + sovMesos(uint64(l)) + if this.CpuClock != nil { + s = append(s, "CpuClock: "+valueToGoStringMesos(this.CpuClock, "float64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.TaskClock != nil { + s = append(s, "TaskClock: "+valueToGoStringMesos(this.TaskClock, "float64")+",\n") } - return n -} - -func (m *HealthCheck) Size() (n int) { - var l int - _ = l - if m.Http != nil { - l = m.Http.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.PageFaults != nil { + s = append(s, "PageFaults: "+valueToGoStringMesos(this.PageFaults, "uint64")+",\n") } - if m.DelaySeconds != nil { - n += 9 + if this.MinorFaults != nil { + s = append(s, "MinorFaults: "+valueToGoStringMesos(this.MinorFaults, "uint64")+",\n") } - if m.IntervalSeconds != nil { - n += 9 + if this.MajorFaults != nil { + s = append(s, "MajorFaults: "+valueToGoStringMesos(this.MajorFaults, "uint64")+",\n") } - if m.TimeoutSeconds != nil { - n += 9 + if this.ContextSwitches != nil { + s = append(s, "ContextSwitches: "+valueToGoStringMesos(this.ContextSwitches, "uint64")+",\n") } - if m.ConsecutiveFailures != nil { - n += 1 + sovMesos(uint64(*m.ConsecutiveFailures)) + if this.CpuMigrations != nil { + s = append(s, "CpuMigrations: "+valueToGoStringMesos(this.CpuMigrations, "uint64")+",\n") } - if m.GracePeriodSeconds != nil { - n += 9 + if this.AlignmentFaults != nil { + s = append(s, "AlignmentFaults: "+valueToGoStringMesos(this.AlignmentFaults, "uint64")+",\n") } - if m.Command != nil { - l = m.Command.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.EmulationFaults != nil { + s = append(s, "EmulationFaults: "+valueToGoStringMesos(this.EmulationFaults, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.L1DcacheLoads != nil { + s = append(s, "L1DcacheLoads: "+valueToGoStringMesos(this.L1DcacheLoads, "uint64")+",\n") } - return n -} - -func (m *HealthCheck_HTTP) Size() (n int) { - var l int - _ = l - if m.Port != nil { - n += 1 + sovMesos(uint64(*m.Port)) + if this.L1DcacheLoadMisses != nil { + s = append(s, "L1DcacheLoadMisses: "+valueToGoStringMesos(this.L1DcacheLoadMisses, "uint64")+",\n") } - if m.Path != nil { - l = len(*m.Path) - n += 1 + l + sovMesos(uint64(l)) + if this.L1DcacheStores != nil { + s = append(s, "L1DcacheStores: "+valueToGoStringMesos(this.L1DcacheStores, "uint64")+",\n") } - if len(m.Statuses) > 0 { - for _, e := range m.Statuses { - n += 1 + sovMesos(uint64(e)) - } + if this.L1DcacheStoreMisses != nil { + s = append(s, "L1DcacheStoreMisses: "+valueToGoStringMesos(this.L1DcacheStoreMisses, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.L1DcachePrefetches != nil { + s = append(s, "L1DcachePrefetches: "+valueToGoStringMesos(this.L1DcachePrefetches, "uint64")+",\n") } - return n -} - -func (m *CommandInfo) Size() (n int) { - var l int - _ = l - if m.Container != nil { - l = m.Container.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.L1DcachePrefetchMisses != nil { + s = append(s, "L1DcachePrefetchMisses: "+valueToGoStringMesos(this.L1DcachePrefetchMisses, "uint64")+",\n") } - if len(m.Uris) > 0 { - for _, e := range m.Uris { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if this.L1IcacheLoads != nil { + s = append(s, "L1IcacheLoads: "+valueToGoStringMesos(this.L1IcacheLoads, "uint64")+",\n") } - if m.Environment != nil { - l = m.Environment.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.L1IcacheLoadMisses != nil { + s = append(s, "L1IcacheLoadMisses: "+valueToGoStringMesos(this.L1IcacheLoadMisses, "uint64")+",\n") } - if m.Shell != nil { - n += 2 + if this.L1IcachePrefetches != nil { + s = append(s, "L1IcachePrefetches: "+valueToGoStringMesos(this.L1IcachePrefetches, "uint64")+",\n") } - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) + if this.L1IcachePrefetchMisses != nil { + s = append(s, "L1IcachePrefetchMisses: "+valueToGoStringMesos(this.L1IcachePrefetchMisses, "uint64")+",\n") } - if len(m.Arguments) > 0 { - for _, s := range m.Arguments { - l = len(s) - n += 1 + l + sovMesos(uint64(l)) - } + if this.LlcLoads != nil { + s = append(s, "LlcLoads: "+valueToGoStringMesos(this.LlcLoads, "uint64")+",\n") } - if m.User != nil { - l = len(*m.User) - n += 1 + l + sovMesos(uint64(l)) + if this.LlcLoadMisses != nil { + s = append(s, "LlcLoadMisses: "+valueToGoStringMesos(this.LlcLoadMisses, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.LlcStores != nil { + s = append(s, "LlcStores: "+valueToGoStringMesos(this.LlcStores, "uint64")+",\n") } - return n -} - -func (m *CommandInfo_URI) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) + if this.LlcStoreMisses != nil { + s = append(s, "LlcStoreMisses: "+valueToGoStringMesos(this.LlcStoreMisses, "uint64")+",\n") } - if m.Executable != nil { - n += 2 + if this.LlcPrefetches != nil { + s = append(s, "LlcPrefetches: "+valueToGoStringMesos(this.LlcPrefetches, "uint64")+",\n") } - if m.Extract != nil { - n += 2 + if this.LlcPrefetchMisses != nil { + s = append(s, "LlcPrefetchMisses: "+valueToGoStringMesos(this.LlcPrefetchMisses, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.DtlbLoads != nil { + s = append(s, "DtlbLoads: "+valueToGoStringMesos(this.DtlbLoads, "uint64")+",\n") } - return n -} - -func (m *CommandInfo_ContainerInfo) Size() (n int) { - var l int - _ = l - if m.Image != nil { - l = len(*m.Image) - n += 1 + l + sovMesos(uint64(l)) + if this.DtlbLoadMisses != nil { + s = append(s, "DtlbLoadMisses: "+valueToGoStringMesos(this.DtlbLoadMisses, "uint64")+",\n") } - if len(m.Options) > 0 { - for _, s := range m.Options { - l = len(s) - n += 1 + l + sovMesos(uint64(l)) - } + if this.DtlbStores != nil { + s = append(s, "DtlbStores: "+valueToGoStringMesos(this.DtlbStores, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.DtlbStoreMisses != nil { + s = append(s, "DtlbStoreMisses: "+valueToGoStringMesos(this.DtlbStoreMisses, "uint64")+",\n") } - return n -} - -func (m *ExecutorInfo) Size() (n int) { - var l int - _ = l - if m.ExecutorId != nil { - l = m.ExecutorId.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.DtlbPrefetches != nil { + s = append(s, "DtlbPrefetches: "+valueToGoStringMesos(this.DtlbPrefetches, "uint64")+",\n") } - if m.FrameworkId != nil { - l = m.FrameworkId.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.DtlbPrefetchMisses != nil { + s = append(s, "DtlbPrefetchMisses: "+valueToGoStringMesos(this.DtlbPrefetchMisses, "uint64")+",\n") } - if m.Command != nil { - l = m.Command.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.ItlbLoads != nil { + s = append(s, "ItlbLoads: "+valueToGoStringMesos(this.ItlbLoads, "uint64")+",\n") } - if m.Container != nil { - l = m.Container.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.ItlbLoadMisses != nil { + s = append(s, "ItlbLoadMisses: "+valueToGoStringMesos(this.ItlbLoadMisses, "uint64")+",\n") } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if this.BranchLoads != nil { + s = append(s, "BranchLoads: "+valueToGoStringMesos(this.BranchLoads, "uint64")+",\n") } - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMesos(uint64(l)) + if this.BranchLoadMisses != nil { + s = append(s, "BranchLoadMisses: "+valueToGoStringMesos(this.BranchLoadMisses, "uint64")+",\n") } - if m.Source != nil { - l = len(*m.Source) - n += 1 + l + sovMesos(uint64(l)) + if this.NodeLoads != nil { + s = append(s, "NodeLoads: "+valueToGoStringMesos(this.NodeLoads, "uint64")+",\n") } - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovMesos(uint64(l)) + if this.NodeLoadMisses != nil { + s = append(s, "NodeLoadMisses: "+valueToGoStringMesos(this.NodeLoadMisses, "uint64")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.NodeStores != nil { + s = append(s, "NodeStores: "+valueToGoStringMesos(this.NodeStores, "uint64")+",\n") } - return n -} - -func (m *MasterInfo) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = len(*m.Id) - n += 1 + l + sovMesos(uint64(l)) + if this.NodeStoreMisses != nil { + s = append(s, "NodeStoreMisses: "+valueToGoStringMesos(this.NodeStoreMisses, "uint64")+",\n") } - if m.Ip != nil { - n += 1 + sovMesos(uint64(*m.Ip)) + if this.NodePrefetches != nil { + s = append(s, "NodePrefetches: "+valueToGoStringMesos(this.NodePrefetches, "uint64")+",\n") } - if m.Port != nil { - n += 1 + sovMesos(uint64(*m.Port)) + if this.NodePrefetchMisses != nil { + s = append(s, "NodePrefetchMisses: "+valueToGoStringMesos(this.NodePrefetchMisses, "uint64")+",\n") } - if m.Pid != nil { - l = len(*m.Pid) - n += 1 + l + sovMesos(uint64(l)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.Hostname != nil { - l = len(*m.Hostname) - n += 1 + l + sovMesos(uint64(l)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Request) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Request{") + if this.SlaveId != nil { + s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } - return n + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *SlaveInfo) Size() (n int) { - var l int - _ = l - if m.Hostname != nil { - l = len(*m.Hostname) - n += 1 + l + sovMesos(uint64(l)) +func (this *Offer) GoString() string { + if this == nil { + return "nil" } - if m.Port != nil { - n += 1 + sovMesos(uint64(*m.Port)) + s := make([]string, 0, 11) + s = append(s, "&mesosproto.Offer{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if this.FrameworkId != nil { + s = append(s, "FrameworkId: "+fmt.Sprintf("%#v", this.FrameworkId)+",\n") } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if this.SlaveId != nil { + s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") } - if m.Checkpoint != nil { - n += 2 + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Attributes != nil { + s = append(s, "Attributes: "+fmt.Sprintf("%#v", this.Attributes)+",\n") } - return n + if this.ExecutorIds != nil { + s = append(s, "ExecutorIds: "+fmt.Sprintf("%#v", this.ExecutorIds)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *Value) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) +func (this *Offer_Operation) GoString() string { + if this == nil { + return "nil" } - if m.Scalar != nil { - l = m.Scalar.Size() - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 10) + s = append(s, "&mesosproto.Offer_Operation{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.Offer_Operation_Type")+",\n") + } + if this.Launch != nil { + s = append(s, "Launch: "+fmt.Sprintf("%#v", this.Launch)+",\n") } - if m.Ranges != nil { - l = m.Ranges.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Reserve != nil { + s = append(s, "Reserve: "+fmt.Sprintf("%#v", this.Reserve)+",\n") } - if m.Set != nil { - l = m.Set.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Unreserve != nil { + s = append(s, "Unreserve: "+fmt.Sprintf("%#v", this.Unreserve)+",\n") } - if m.Text != nil { - l = m.Text.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Create != nil { + s = append(s, "Create: "+fmt.Sprintf("%#v", this.Create)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Destroy != nil { + s = append(s, "Destroy: "+fmt.Sprintf("%#v", this.Destroy)+",\n") } - return n + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *Value_Scalar) Size() (n int) { - var l int - _ = l - if m.Value != nil { - n += 9 +func (this *Offer_Operation_Launch) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Offer_Operation_Launch{") + if this.TaskInfos != nil { + s = append(s, "TaskInfos: "+fmt.Sprintf("%#v", this.TaskInfos)+",\n") } - return n + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *Value_Range) Size() (n int) { - var l int - _ = l - if m.Begin != nil { - n += 1 + sovMesos(uint64(*m.Begin)) +func (this *Offer_Operation_Reserve) GoString() string { + if this == nil { + return "nil" } - if m.End != nil { - n += 1 + sovMesos(uint64(*m.End)) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Offer_Operation_Reserve{") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *Value_Ranges) Size() (n int) { - var l int - _ = l - if len(m.Range) > 0 { - for _, e := range m.Range { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } +func (this *Offer_Operation_Unreserve) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Offer_Operation_Unreserve{") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") } - return n + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *Value_Set) Size() (n int) { - var l int - _ = l - if len(m.Item) > 0 { - for _, s := range m.Item { - l = len(s) - n += 1 + l + sovMesos(uint64(l)) - } +func (this *Offer_Operation_Create) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Offer_Operation_Create{") + if this.Volumes != nil { + s = append(s, "Volumes: "+fmt.Sprintf("%#v", this.Volumes)+",\n") } - return n + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *Value_Text) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) +func (this *Offer_Operation_Destroy) GoString() string { + if this == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Offer_Operation_Destroy{") + if this.Volumes != nil { + s = append(s, "Volumes: "+fmt.Sprintf("%#v", this.Volumes)+",\n") } - return n -} - -func (m *Attribute) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMesos(uint64(l)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TaskInfo) GoString() string { + if this == nil { + return "nil" } - if m.Scalar != nil { - l = m.Scalar.Size() - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 15) + s = append(s, "&mesosproto.TaskInfo{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") } - if m.Ranges != nil { - l = m.Ranges.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.TaskId != nil { + s = append(s, "TaskId: "+fmt.Sprintf("%#v", this.TaskId)+",\n") } - if m.Set != nil { - l = m.Set.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.SlaveId != nil { + s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } - if m.Text != nil { - l = m.Text.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Executor != nil { + s = append(s, "Executor: "+fmt.Sprintf("%#v", this.Executor)+",\n") } - return n -} - -func (m *Resource) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMesos(uint64(l)) + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") } - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") } - if m.Scalar != nil { - l = m.Scalar.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMesos(this.Data, "byte")+",\n") } - if m.Ranges != nil { - l = m.Ranges.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.HealthCheck != nil { + s = append(s, "HealthCheck: "+fmt.Sprintf("%#v", this.HealthCheck)+",\n") } - if m.Set != nil { - l = m.Set.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } - if m.Role != nil { - l = len(*m.Role) - n += 1 + l + sovMesos(uint64(l)) + if this.Discovery != nil { + s = append(s, "Discovery: "+fmt.Sprintf("%#v", this.Discovery)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *ResourceStatistics) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - n += 9 +func (this *TaskStatus) GoString() string { + if this == nil { + return "nil" } - if m.CpusUserTimeSecs != nil { - n += 9 + s := make([]string, 0, 15) + s = append(s, "&mesosproto.TaskStatus{") + if this.TaskId != nil { + s = append(s, "TaskId: "+fmt.Sprintf("%#v", this.TaskId)+",\n") } - if m.CpusSystemTimeSecs != nil { - n += 9 + if this.State != nil { + s = append(s, "State: "+valueToGoStringMesos(this.State, "mesosproto.TaskState")+",\n") } - if m.CpusLimit != nil { - n += 9 + if this.Message != nil { + s = append(s, "Message: "+valueToGoStringMesos(this.Message, "string")+",\n") } - if m.CpusNrPeriods != nil { - n += 1 + sovMesos(uint64(*m.CpusNrPeriods)) + if this.Source != nil { + s = append(s, "Source: "+valueToGoStringMesos(this.Source, "mesosproto.TaskStatus_Source")+",\n") } - if m.CpusNrThrottled != nil { - n += 1 + sovMesos(uint64(*m.CpusNrThrottled)) + if this.Reason != nil { + s = append(s, "Reason: "+valueToGoStringMesos(this.Reason, "mesosproto.TaskStatus_Reason")+",\n") } - if m.CpusThrottledTimeSecs != nil { - n += 9 + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMesos(this.Data, "byte")+",\n") } - if m.MemRssBytes != nil { - n += 1 + sovMesos(uint64(*m.MemRssBytes)) + if this.SlaveId != nil { + s = append(s, "SlaveId: "+fmt.Sprintf("%#v", this.SlaveId)+",\n") } - if m.MemLimitBytes != nil { - n += 1 + sovMesos(uint64(*m.MemLimitBytes)) + if this.ExecutorId != nil { + s = append(s, "ExecutorId: "+fmt.Sprintf("%#v", this.ExecutorId)+",\n") } - if m.MemFileBytes != nil { - n += 1 + sovMesos(uint64(*m.MemFileBytes)) + if this.Timestamp != nil { + s = append(s, "Timestamp: "+valueToGoStringMesos(this.Timestamp, "float64")+",\n") } - if m.MemAnonBytes != nil { - n += 1 + sovMesos(uint64(*m.MemAnonBytes)) + if this.Uuid != nil { + s = append(s, "Uuid: "+valueToGoStringMesos(this.Uuid, "byte")+",\n") } - if m.MemMappedFileBytes != nil { - n += 1 + sovMesos(uint64(*m.MemMappedFileBytes)) + if this.Healthy != nil { + s = append(s, "Healthy: "+valueToGoStringMesos(this.Healthy, "bool")+",\n") } - if m.Perf != nil { - l = m.Perf.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.NetRxPackets != nil { - n += 1 + sovMesos(uint64(*m.NetRxPackets)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Filters) GoString() string { + if this == nil { + return "nil" } - if m.NetRxBytes != nil { - n += 1 + sovMesos(uint64(*m.NetRxBytes)) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Filters{") + if this.RefuseSeconds != nil { + s = append(s, "RefuseSeconds: "+valueToGoStringMesos(this.RefuseSeconds, "float64")+",\n") } - if m.NetRxErrors != nil { - n += 2 + sovMesos(uint64(*m.NetRxErrors)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.NetRxDropped != nil { - n += 2 + sovMesos(uint64(*m.NetRxDropped)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Environment) GoString() string { + if this == nil { + return "nil" } - if m.NetTxPackets != nil { - n += 2 + sovMesos(uint64(*m.NetTxPackets)) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Environment{") + if this.Variables != nil { + s = append(s, "Variables: "+fmt.Sprintf("%#v", this.Variables)+",\n") } - if m.NetTxBytes != nil { - n += 2 + sovMesos(uint64(*m.NetTxBytes)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.NetTxErrors != nil { - n += 2 + sovMesos(uint64(*m.NetTxErrors)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Environment_Variable) GoString() string { + if this == nil { + return "nil" } - if m.NetTxDropped != nil { - n += 2 + sovMesos(uint64(*m.NetTxDropped)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Environment_Variable{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") } - if m.NetTcpRttMicrosecsP50 != nil { - n += 10 + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") } - if m.NetTcpRttMicrosecsP90 != nil { - n += 10 + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.NetTcpRttMicrosecsP95 != nil { - n += 10 + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Parameter) GoString() string { + if this == nil { + return "nil" } - if m.NetTcpRttMicrosecsP99 != nil { - n += 10 + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Parameter{") + if this.Key != nil { + s = append(s, "Key: "+valueToGoStringMesos(this.Key, "string")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") } - return n + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } - -func (m *ResourceUsage) Size() (n int) { - var l int - _ = l - if m.SlaveId != nil { - l = m.SlaveId.Size() - n += 1 + l + sovMesos(uint64(l)) +func (this *Parameters) GoString() string { + if this == nil { + return "nil" } - if m.FrameworkId != nil { - l = m.FrameworkId.Size() - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Parameters{") + if this.Parameter != nil { + s = append(s, "Parameter: "+fmt.Sprintf("%#v", this.Parameter)+",\n") } - if m.ExecutorId != nil { - l = m.ExecutorId.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.ExecutorName != nil { - l = len(*m.ExecutorName) - n += 1 + l + sovMesos(uint64(l)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Credential) GoString() string { + if this == nil { + return "nil" } - if m.TaskId != nil { - l = m.TaskId.Size() - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Credential{") + if this.Principal != nil { + s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") } - if m.Statistics != nil { - l = m.Statistics.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Secret != nil { + s = append(s, "Secret: "+valueToGoStringMesos(this.Secret, "byte")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *PerfStatistics) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - n += 9 - } - if m.Duration != nil { - n += 9 +func (this *Credentials) GoString() string { + if this == nil { + return "nil" } - if m.Cycles != nil { - n += 1 + sovMesos(uint64(*m.Cycles)) + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Credentials{") + if this.Credentials != nil { + s = append(s, "Credentials: "+fmt.Sprintf("%#v", this.Credentials)+",\n") } - if m.StalledCyclesFrontend != nil { - n += 1 + sovMesos(uint64(*m.StalledCyclesFrontend)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.StalledCyclesBackend != nil { - n += 1 + sovMesos(uint64(*m.StalledCyclesBackend)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ACL) GoString() string { + if this == nil { + return "nil" } - if m.Instructions != nil { - n += 1 + sovMesos(uint64(*m.Instructions)) + s := make([]string, 0, 4) + s = append(s, "&mesosproto.ACL{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.CacheReferences != nil { - n += 1 + sovMesos(uint64(*m.CacheReferences)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ACL_Entity) GoString() string { + if this == nil { + return "nil" } - if m.CacheMisses != nil { - n += 1 + sovMesos(uint64(*m.CacheMisses)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.ACL_Entity{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.ACL_Entity_Type")+",\n") } - if m.Branches != nil { - n += 1 + sovMesos(uint64(*m.Branches)) + if this.Values != nil { + s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n") } - if m.BranchMisses != nil { - n += 1 + sovMesos(uint64(*m.BranchMisses)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.BusCycles != nil { - n += 1 + sovMesos(uint64(*m.BusCycles)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ACL_RegisterFramework) GoString() string { + if this == nil { + return "nil" } - if m.RefCycles != nil { - n += 1 + sovMesos(uint64(*m.RefCycles)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.ACL_RegisterFramework{") + if this.Principals != nil { + s = append(s, "Principals: "+fmt.Sprintf("%#v", this.Principals)+",\n") } - if m.CpuClock != nil { - n += 9 + if this.Roles != nil { + s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") } - if m.TaskClock != nil { - n += 9 + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.PageFaults != nil { - n += 1 + sovMesos(uint64(*m.PageFaults)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ACL_RunTask) GoString() string { + if this == nil { + return "nil" } - if m.MinorFaults != nil { - n += 2 + sovMesos(uint64(*m.MinorFaults)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.ACL_RunTask{") + if this.Principals != nil { + s = append(s, "Principals: "+fmt.Sprintf("%#v", this.Principals)+",\n") } - if m.MajorFaults != nil { - n += 2 + sovMesos(uint64(*m.MajorFaults)) + if this.Users != nil { + s = append(s, "Users: "+fmt.Sprintf("%#v", this.Users)+",\n") } - if m.ContextSwitches != nil { - n += 2 + sovMesos(uint64(*m.ContextSwitches)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.CpuMigrations != nil { - n += 2 + sovMesos(uint64(*m.CpuMigrations)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ACL_ShutdownFramework) GoString() string { + if this == nil { + return "nil" } - if m.AlignmentFaults != nil { - n += 2 + sovMesos(uint64(*m.AlignmentFaults)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.ACL_ShutdownFramework{") + if this.Principals != nil { + s = append(s, "Principals: "+fmt.Sprintf("%#v", this.Principals)+",\n") } - if m.EmulationFaults != nil { - n += 2 + sovMesos(uint64(*m.EmulationFaults)) + if this.FrameworkPrincipals != nil { + s = append(s, "FrameworkPrincipals: "+fmt.Sprintf("%#v", this.FrameworkPrincipals)+",\n") } - if m.L1DcacheLoads != nil { - n += 2 + sovMesos(uint64(*m.L1DcacheLoads)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.L1DcacheLoadMisses != nil { - n += 2 + sovMesos(uint64(*m.L1DcacheLoadMisses)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ACLs) GoString() string { + if this == nil { + return "nil" } - if m.L1DcacheStores != nil { - n += 2 + sovMesos(uint64(*m.L1DcacheStores)) + s := make([]string, 0, 8) + s = append(s, "&mesosproto.ACLs{") + if this.Permissive != nil { + s = append(s, "Permissive: "+valueToGoStringMesos(this.Permissive, "bool")+",\n") } - if m.L1DcacheStoreMisses != nil { - n += 2 + sovMesos(uint64(*m.L1DcacheStoreMisses)) + if this.RegisterFrameworks != nil { + s = append(s, "RegisterFrameworks: "+fmt.Sprintf("%#v", this.RegisterFrameworks)+",\n") } - if m.L1DcachePrefetches != nil { - n += 2 + sovMesos(uint64(*m.L1DcachePrefetches)) + if this.RunTasks != nil { + s = append(s, "RunTasks: "+fmt.Sprintf("%#v", this.RunTasks)+",\n") } - if m.L1DcachePrefetchMisses != nil { - n += 2 + sovMesos(uint64(*m.L1DcachePrefetchMisses)) + if this.ShutdownFrameworks != nil { + s = append(s, "ShutdownFrameworks: "+fmt.Sprintf("%#v", this.ShutdownFrameworks)+",\n") } - if m.L1IcacheLoads != nil { - n += 2 + sovMesos(uint64(*m.L1IcacheLoads)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.L1IcacheLoadMisses != nil { - n += 2 + sovMesos(uint64(*m.L1IcacheLoadMisses)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RateLimit) GoString() string { + if this == nil { + return "nil" } - if m.L1IcachePrefetches != nil { - n += 2 + sovMesos(uint64(*m.L1IcachePrefetches)) + s := make([]string, 0, 7) + s = append(s, "&mesosproto.RateLimit{") + if this.Qps != nil { + s = append(s, "Qps: "+valueToGoStringMesos(this.Qps, "float64")+",\n") } - if m.L1IcachePrefetchMisses != nil { - n += 2 + sovMesos(uint64(*m.L1IcachePrefetchMisses)) + if this.Principal != nil { + s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") } - if m.LlcLoads != nil { - n += 2 + sovMesos(uint64(*m.LlcLoads)) + if this.Capacity != nil { + s = append(s, "Capacity: "+valueToGoStringMesos(this.Capacity, "uint64")+",\n") } - if m.LlcLoadMisses != nil { - n += 2 + sovMesos(uint64(*m.LlcLoadMisses)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.LlcStores != nil { - n += 2 + sovMesos(uint64(*m.LlcStores)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RateLimits) GoString() string { + if this == nil { + return "nil" } - if m.LlcStoreMisses != nil { - n += 2 + sovMesos(uint64(*m.LlcStoreMisses)) + s := make([]string, 0, 7) + s = append(s, "&mesosproto.RateLimits{") + if this.Limits != nil { + s = append(s, "Limits: "+fmt.Sprintf("%#v", this.Limits)+",\n") } - if m.LlcPrefetches != nil { - n += 2 + sovMesos(uint64(*m.LlcPrefetches)) + if this.AggregateDefaultQps != nil { + s = append(s, "AggregateDefaultQps: "+valueToGoStringMesos(this.AggregateDefaultQps, "float64")+",\n") } - if m.LlcPrefetchMisses != nil { - n += 2 + sovMesos(uint64(*m.LlcPrefetchMisses)) + if this.AggregateDefaultCapacity != nil { + s = append(s, "AggregateDefaultCapacity: "+valueToGoStringMesos(this.AggregateDefaultCapacity, "uint64")+",\n") } - if m.DtlbLoads != nil { - n += 2 + sovMesos(uint64(*m.DtlbLoads)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.DtlbLoadMisses != nil { - n += 2 + sovMesos(uint64(*m.DtlbLoadMisses)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Volume) GoString() string { + if this == nil { + return "nil" } - if m.DtlbStores != nil { - n += 2 + sovMesos(uint64(*m.DtlbStores)) + s := make([]string, 0, 7) + s = append(s, "&mesosproto.Volume{") + if this.ContainerPath != nil { + s = append(s, "ContainerPath: "+valueToGoStringMesos(this.ContainerPath, "string")+",\n") } - if m.DtlbStoreMisses != nil { - n += 2 + sovMesos(uint64(*m.DtlbStoreMisses)) + if this.HostPath != nil { + s = append(s, "HostPath: "+valueToGoStringMesos(this.HostPath, "string")+",\n") } - if m.DtlbPrefetches != nil { - n += 2 + sovMesos(uint64(*m.DtlbPrefetches)) + if this.Mode != nil { + s = append(s, "Mode: "+valueToGoStringMesos(this.Mode, "mesosproto.Volume_Mode")+",\n") } - if m.DtlbPrefetchMisses != nil { - n += 2 + sovMesos(uint64(*m.DtlbPrefetchMisses)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.ItlbLoads != nil { - n += 2 + sovMesos(uint64(*m.ItlbLoads)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerInfo) GoString() string { + if this == nil { + return "nil" } - if m.ItlbLoadMisses != nil { - n += 2 + sovMesos(uint64(*m.ItlbLoadMisses)) + s := make([]string, 0, 8) + s = append(s, "&mesosproto.ContainerInfo{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesosproto.ContainerInfo_Type")+",\n") } - if m.BranchLoads != nil { - n += 2 + sovMesos(uint64(*m.BranchLoads)) + if this.Volumes != nil { + s = append(s, "Volumes: "+fmt.Sprintf("%#v", this.Volumes)+",\n") } - if m.BranchLoadMisses != nil { - n += 2 + sovMesos(uint64(*m.BranchLoadMisses)) + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") } - if m.NodeLoads != nil { - n += 2 + sovMesos(uint64(*m.NodeLoads)) + if this.Docker != nil { + s = append(s, "Docker: "+fmt.Sprintf("%#v", this.Docker)+",\n") } - if m.NodeLoadMisses != nil { - n += 2 + sovMesos(uint64(*m.NodeLoadMisses)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.NodeStores != nil { - n += 2 + sovMesos(uint64(*m.NodeStores)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerInfo_DockerInfo) GoString() string { + if this == nil { + return "nil" } - if m.NodeStoreMisses != nil { - n += 2 + sovMesos(uint64(*m.NodeStoreMisses)) + s := make([]string, 0, 10) + s = append(s, "&mesosproto.ContainerInfo_DockerInfo{") + if this.Image != nil { + s = append(s, "Image: "+valueToGoStringMesos(this.Image, "string")+",\n") } - if m.NodePrefetches != nil { - n += 2 + sovMesos(uint64(*m.NodePrefetches)) + if this.Network != nil { + s = append(s, "Network: "+valueToGoStringMesos(this.Network, "mesosproto.ContainerInfo_DockerInfo_Network")+",\n") } - if m.NodePrefetchMisses != nil { - n += 2 + sovMesos(uint64(*m.NodePrefetchMisses)) + if this.PortMappings != nil { + s = append(s, "PortMappings: "+fmt.Sprintf("%#v", this.PortMappings)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.Privileged != nil { + s = append(s, "Privileged: "+valueToGoStringMesos(this.Privileged, "bool")+",\n") } - return n -} - -func (m *Request) Size() (n int) { - var l int - _ = l - if m.SlaveId != nil { - l = m.SlaveId.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Parameters != nil { + s = append(s, "Parameters: "+fmt.Sprintf("%#v", this.Parameters)+",\n") } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if this.ForcePullImage != nil { + s = append(s, "ForcePullImage: "+valueToGoStringMesos(this.ForcePullImage, "bool")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *Offer) Size() (n int) { - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovMesos(uint64(l)) +func (this *ContainerInfo_DockerInfo_PortMapping) GoString() string { + if this == nil { + return "nil" } - if m.FrameworkId != nil { - l = m.FrameworkId.Size() - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 7) + s = append(s, "&mesosproto.ContainerInfo_DockerInfo_PortMapping{") + if this.HostPort != nil { + s = append(s, "HostPort: "+valueToGoStringMesos(this.HostPort, "uint32")+",\n") } - if m.SlaveId != nil { - l = m.SlaveId.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.ContainerPort != nil { + s = append(s, "ContainerPort: "+valueToGoStringMesos(this.ContainerPort, "uint32")+",\n") } - if m.Hostname != nil { - l = len(*m.Hostname) - n += 1 + l + sovMesos(uint64(l)) + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "string")+",\n") } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Labels) GoString() string { + if this == nil { + return "nil" } - if len(m.ExecutorIds) > 0 { - for _, e := range m.ExecutorIds { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Labels{") + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *TaskInfo) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMesos(uint64(l)) - } - if m.TaskId != nil { - l = m.TaskId.Size() - n += 1 + l + sovMesos(uint64(l)) +func (this *Label) GoString() string { + if this == nil { + return "nil" } - if m.SlaveId != nil { - l = m.SlaveId.Size() - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 6) + s = append(s, "&mesosproto.Label{") + if this.Key != nil { + s = append(s, "Key: "+valueToGoStringMesos(this.Key, "string")+",\n") } - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") } - if m.Executor != nil { - l = m.Executor.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.Command != nil { - l = m.Command.Size() - n += 1 + l + sovMesos(uint64(l)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Port) GoString() string { + if this == nil { + return "nil" } - if m.Container != nil { - l = m.Container.Size() - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 7) + s = append(s, "&mesosproto.Port{") + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringMesos(this.Number, "uint32")+",\n") } - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovMesos(uint64(l)) + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") } - if m.HealthCheck != nil { - l = m.HealthCheck.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "string")+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *TaskStatus) Size() (n int) { - var l int - _ = l - if m.TaskId != nil { - l = m.TaskId.Size() - n += 1 + l + sovMesos(uint64(l)) +func (this *Ports) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Ports{") + if this.Ports != nil { + s = append(s, "Ports: "+fmt.Sprintf("%#v", this.Ports)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.State != nil { - n += 1 + sovMesos(uint64(*m.State)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DiscoveryInfo) GoString() string { + if this == nil { + return "nil" } - if m.Message != nil { - l = len(*m.Message) - n += 1 + l + sovMesos(uint64(l)) + s := make([]string, 0, 11) + s = append(s, "&mesosproto.DiscoveryInfo{") + if this.Visibility != nil { + s = append(s, "Visibility: "+valueToGoStringMesos(this.Visibility, "mesosproto.DiscoveryInfo_Visibility")+",\n") } - if m.Source != nil { - n += 1 + sovMesos(uint64(*m.Source)) + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") } - if m.Reason != nil { - n += 1 + sovMesos(uint64(*m.Reason)) + if this.Environment != nil { + s = append(s, "Environment: "+valueToGoStringMesos(this.Environment, "string")+",\n") } - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovMesos(uint64(l)) + if this.Location != nil { + s = append(s, "Location: "+valueToGoStringMesos(this.Location, "string")+",\n") } - if m.SlaveId != nil { - l = m.SlaveId.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Version != nil { + s = append(s, "Version: "+valueToGoStringMesos(this.Version, "string")+",\n") } - if m.ExecutorId != nil { - l = m.ExecutorId.Size() - n += 1 + l + sovMesos(uint64(l)) + if this.Ports != nil { + s = append(s, "Ports: "+fmt.Sprintf("%#v", this.Ports)+",\n") } - if m.Timestamp != nil { - n += 9 + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } - if m.Healthy != nil { - n += 2 + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMesos(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" } - return n + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) } - -func (m *Filters) Size() (n int) { - var l int - _ = l - if m.RefuseSeconds != nil { - n += 9 +func extensionToGoStringMesos(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s := "map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) } - return n -} - -func (m *Environment) Size() (n int) { - var l int - _ = l - if len(m.Variables) > 0 { - for _, e := range m.Variables { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + s += strings.Join(ss, ",") + "}" + return s +} +func (m *FrameworkID) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return n + return data[:n], nil } -func (m *Environment_Variable) Size() (n int) { +func (m *FrameworkID) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMesos(uint64(l)) - } - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *Parameter) Size() (n int) { - var l int - _ = l - if m.Key != nil { - l = len(*m.Key) - n += 1 + l + sovMesos(uint64(l)) - } - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMesos(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *OfferID) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return n + return data[:n], nil } -func (m *Parameters) Size() (n int) { +func (m *OfferID) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if len(m.Parameter) > 0 { - for _, e := range m.Parameter { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *Credential) Size() (n int) { - var l int - _ = l - if m.Principal != nil { - l = len(*m.Principal) - n += 1 + l + sovMesos(uint64(l)) - } - if m.Secret != nil { - l = len(m.Secret) - n += 1 + l + sovMesos(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *SlaveID) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return n + return data[:n], nil } -func (m *Credentials) Size() (n int) { +func (m *SlaveID) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if len(m.Credentials) > 0 { - for _, e := range m.Credentials { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *ACL) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *TaskID) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return n + return data[:n], nil } -func (m *ACL_Entity) Size() (n int) { +func (m *TaskID) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) - } - if len(m.Values) > 0 { - for _, s := range m.Values { - l = len(s) - n += 1 + l + sovMesos(uint64(l)) - } + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *ACL_RegisterFramework) Size() (n int) { - var l int - _ = l - if m.Principals != nil { - l = m.Principals.Size() - n += 1 + l + sovMesos(uint64(l)) - } - if m.Roles != nil { - l = m.Roles.Size() - n += 1 + l + sovMesos(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *ExecutorID) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return n + return data[:n], nil } -func (m *ACL_RunTask) Size() (n int) { +func (m *ExecutorID) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.Principals != nil { - l = m.Principals.Size() - n += 1 + l + sovMesos(uint64(l)) - } - if m.Users != nil { - l = m.Users.Size() - n += 1 + l + sovMesos(uint64(l)) + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *ACL_ShutdownFramework) Size() (n int) { - var l int - _ = l - if m.Principals != nil { - l = m.Principals.Size() - n += 1 + l + sovMesos(uint64(l)) +func (m *ContainerID) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if m.FrameworkPrincipals != nil { - l = m.FrameworkPrincipals.Size() - n += 1 + l + sovMesos(uint64(l)) + return data[:n], nil +} + +func (m *ContainerID) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *ACLs) Size() (n int) { +func (m *FrameworkInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FrameworkInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.Permissive != nil { - n += 2 + if m.User == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("user") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.User))) + i += copy(data[i:], *m.User) } - if len(m.RegisterFrameworks) > 0 { - for _, e := range m.RegisterFrameworks { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - if len(m.RunTasks) > 0 { - for _, e := range m.RunTasks { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) + if m.Id != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.Id.Size())) + n1, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n1 } - if len(m.ShutdownFrameworks) > 0 { - for _, e := range m.ShutdownFrameworks { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) + if m.FailoverTimeout != nil { + data[i] = 0x21 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.FailoverTimeout))) + } + if m.Checkpoint != nil { + data[i] = 0x28 + i++ + if *m.Checkpoint { + data[i] = 1 + } else { + data[i] = 0 } + i++ } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if m.Role != nil { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Role))) + i += copy(data[i:], *m.Role) } - return n -} - -func (m *RateLimit) Size() (n int) { - var l int - _ = l - if m.Qps != nil { - n += 9 + if m.Hostname != nil { + data[i] = 0x3a + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) + i += copy(data[i:], *m.Hostname) } if m.Principal != nil { - l = len(*m.Principal) - n += 1 + l + sovMesos(uint64(l)) + data[i] = 0x42 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Principal))) + i += copy(data[i:], *m.Principal) } - if m.Capacity != nil { - n += 1 + sovMesos(uint64(*m.Capacity)) + if m.WebuiUrl != nil { + data[i] = 0x4a + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.WebuiUrl))) + i += copy(data[i:], *m.WebuiUrl) + } + if len(m.Capabilities) > 0 { + for _, msg := range m.Capabilities { + data[i] = 0x52 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *RateLimits) Size() (n int) { - var l int - _ = l - if len(m.Limits) > 0 { - for _, e := range m.Limits { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } - } - if m.AggregateDefaultQps != nil { - n += 9 - } - if m.AggregateDefaultCapacity != nil { - n += 1 + sovMesos(uint64(*m.AggregateDefaultCapacity)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *FrameworkInfo_Capability) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return n + return data[:n], nil } -func (m *Volume) Size() (n int) { +func (m *FrameworkInfo_Capability) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.ContainerPath != nil { - l = len(*m.ContainerPath) - n += 1 + l + sovMesos(uint64(l)) - } - if m.HostPath != nil { - l = len(*m.HostPath) - n += 1 + l + sovMesos(uint64(l)) - } - if m.Mode != nil { - n += 1 + sovMesos(uint64(*m.Mode)) + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Type)) } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *ContainerInfo) Size() (n int) { +func (m *HealthCheck) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HealthCheck) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) - } - if len(m.Volumes) > 0 { - for _, e := range m.Volumes { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) + if m.Http != nil { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.Http.Size())) + n2, err := m.Http.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n2 } - if m.Hostname != nil { - l = len(*m.Hostname) - n += 1 + l + sovMesos(uint64(l)) + if m.DelaySeconds != nil { + data[i] = 0x11 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.DelaySeconds))) } - if m.Docker != nil { - l = m.Docker.Size() - n += 1 + l + sovMesos(uint64(l)) + if m.IntervalSeconds != nil { + data[i] = 0x19 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.IntervalSeconds))) + } + if m.TimeoutSeconds != nil { + data[i] = 0x21 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.TimeoutSeconds))) + } + if m.ConsecutiveFailures != nil { + data[i] = 0x28 + i++ + i = encodeVarintMesos(data, i, uint64(*m.ConsecutiveFailures)) + } + if m.GracePeriodSeconds != nil { + data[i] = 0x31 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.GracePeriodSeconds))) + } + if m.Command != nil { + data[i] = 0x3a + i++ + i = encodeVarintMesos(data, i, uint64(m.Command.Size())) + n3, err := m.Command.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *ContainerInfo_DockerInfo) Size() (n int) { +func (m *HealthCheck_HTTP) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *HealthCheck_HTTP) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.Image != nil { - l = len(*m.Image) - n += 1 + l + sovMesos(uint64(l)) - } - if m.Network != nil { - n += 1 + sovMesos(uint64(*m.Network)) - } - if len(m.PortMappings) > 0 { - for _, e := range m.PortMappings { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) - } - } - if m.Privileged != nil { - n += 2 + if m.Port == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } else { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Port)) } - if len(m.Parameters) > 0 { - for _, e := range m.Parameters { - l = e.Size() - n += 1 + l + sovMesos(uint64(l)) + if m.Path != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Path))) + i += copy(data[i:], *m.Path) + } + if len(m.Statuses) > 0 { + for _, num := range m.Statuses { + data[i] = 0x20 + i++ + i = encodeVarintMesos(data, i, uint64(num)) } } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i += copy(data[i:], m.XXX_unrecognized) } - return n + return i, nil } -func (m *ContainerInfo_DockerInfo_PortMapping) Size() (n int) { +func (m *CommandInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CommandInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i var l int _ = l - if m.HostPort != nil { - n += 1 + sovMesos(uint64(*m.HostPort)) - } - if m.ContainerPort != nil { - n += 1 + sovMesos(uint64(*m.ContainerPort)) + if len(m.Uris) > 0 { + for _, msg := range m.Uris { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.Protocol != nil { - l = len(*m.Protocol) - n += 1 + l + sovMesos(uint64(l)) + if m.Environment != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Environment.Size())) + n4, err := m.Environment.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if m.Value != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } - return n -} - -func sovMesos(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break + if m.Container != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.Container.Size())) + n5, err := m.Container.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n5 } - return n -} -func sozMesos(x uint64) (n int) { - return sovMesos(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func NewPopulatedFrameworkID(r randyMesos, easy bool) *FrameworkID { - this := &FrameworkID{} - v1 := randStringMesos(r) - this.Value = &v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if m.User != nil { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.User))) + i += copy(data[i:], *m.User) } - return this -} - -func NewPopulatedOfferID(r randyMesos, easy bool) *OfferID { - this := &OfferID{} - v2 := randStringMesos(r) - this.Value = &v2 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if m.Shell != nil { + data[i] = 0x30 + i++ + if *m.Shell { + data[i] = 1 + } else { + data[i] = 0 + } + i++ } - return this -} - -func NewPopulatedSlaveID(r randyMesos, easy bool) *SlaveID { - this := &SlaveID{} - v3 := randStringMesos(r) - this.Value = &v3 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if len(m.Arguments) > 0 { + for _, s := range m.Arguments { + data[i] = 0x3a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } } - return this -} - -func NewPopulatedTaskID(r randyMesos, easy bool) *TaskID { - this := &TaskID{} - v4 := randStringMesos(r) - this.Value = &v4 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedExecutorID(r randyMesos, easy bool) *ExecutorID { - this := &ExecutorID{} - v5 := randStringMesos(r) - this.Value = &v5 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) +func (m *CommandInfo_URI) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedContainerID(r randyMesos, easy bool) *ContainerID { - this := &ContainerID{} - v6 := randStringMesos(r) - this.Value = &v6 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) +func (m *CommandInfo_URI) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } - return this -} - -func NewPopulatedFrameworkInfo(r randyMesos, easy bool) *FrameworkInfo { - this := &FrameworkInfo{} - v7 := randStringMesos(r) - this.User = &v7 - v8 := randStringMesos(r) - this.Name = &v8 - if r.Intn(10) != 0 { - this.Id = NewPopulatedFrameworkID(r, easy) + if m.Executable != nil { + data[i] = 0x10 + i++ + if *m.Executable { + data[i] = 1 + } else { + data[i] = 0 + } + i++ } - if r.Intn(10) != 0 { - v9 := r.Float64() - if r.Intn(2) == 0 { - v9 *= -1 + if m.Extract != nil { + data[i] = 0x18 + i++ + if *m.Extract { + data[i] = 1 + } else { + data[i] = 0 } - this.FailoverTimeout = &v9 + i++ } - if r.Intn(10) != 0 { - v10 := bool(r.Intn(2) == 0) - this.Checkpoint = &v10 + if m.Cache != nil { + data[i] = 0x20 + i++ + if *m.Cache { + data[i] = 1 + } else { + data[i] = 0 + } + i++ } - if r.Intn(10) != 0 { - v11 := randStringMesos(r) - this.Role = &v11 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if r.Intn(10) != 0 { - v12 := randStringMesos(r) - this.Hostname = &v12 + return i, nil +} + +func (m *CommandInfo_ContainerInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v13 := randStringMesos(r) - this.Principal = &v13 + return data[:n], nil +} + +func (m *CommandInfo_ContainerInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("image") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Image))) + i += copy(data[i:], *m.Image) } - if r.Intn(10) != 0 { - v14 := randStringMesos(r) - this.WebuiUrl = &v14 + if len(m.Options) > 0 { + for _, s := range m.Options { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 10) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedHealthCheck(r randyMesos, easy bool) *HealthCheck { - this := &HealthCheck{} - if r.Intn(10) != 0 { - this.Http = NewPopulatedHealthCheck_HTTP(r, easy) +func (m *ExecutorInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v15 := r.Float64() - if r.Intn(2) == 0 { - v15 *= -1 + return data[:n], nil +} + +func (m *ExecutorInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ExecutorId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_id") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.ExecutorId.Size())) + n6, err := m.ExecutorId.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.DelaySeconds = &v15 + i += n6 } - if r.Intn(10) != 0 { - v16 := r.Float64() - if r.Intn(2) == 0 { - v16 *= -1 - } - this.IntervalSeconds = &v16 + if m.Data != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) } - if r.Intn(10) != 0 { - v17 := r.Float64() - if r.Intn(2) == 0 { - v17 *= -1 + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } - this.TimeoutSeconds = &v17 } - if r.Intn(10) != 0 { - v18 := r.Uint32() - this.ConsecutiveFailures = &v18 + if m.Command == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("command") + } else { + data[i] = 0x3a + i++ + i = encodeVarintMesos(data, i, uint64(m.Command.Size())) + n7, err := m.Command.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 } - if r.Intn(10) != 0 { - v19 := r.Float64() - if r.Intn(2) == 0 { - v19 *= -1 + if m.FrameworkId != nil { + data[i] = 0x42 + i++ + i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) + n8, err := m.FrameworkId.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.GracePeriodSeconds = &v19 + i += n8 } - if r.Intn(10) != 0 { - this.Command = NewPopulatedCommandInfo(r, easy) + if m.Name != nil { + data[i] = 0x4a + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 8) + if m.Source != nil { + data[i] = 0x52 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Source))) + i += copy(data[i:], *m.Source) } - return this -} - -func NewPopulatedHealthCheck_HTTP(r randyMesos, easy bool) *HealthCheck_HTTP { - this := &HealthCheck_HTTP{} - v20 := r.Uint32() - this.Port = &v20 - if r.Intn(10) != 0 { - v21 := randStringMesos(r) - this.Path = &v21 + if m.Container != nil { + data[i] = 0x5a + i++ + i = encodeVarintMesos(data, i, uint64(m.Container.Size())) + n9, err := m.Container.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 } - if r.Intn(10) != 0 { - v22 := r.Intn(100) - this.Statuses = make([]uint32, v22) - for i := 0; i < v22; i++ { - this.Statuses[i] = r.Uint32() + if m.Discovery != nil { + data[i] = 0x62 + i++ + i = encodeVarintMesos(data, i, uint64(m.Discovery.Size())) + n10, err := m.Discovery.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n10 } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 5) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedCommandInfo(r randyMesos, easy bool) *CommandInfo { - this := &CommandInfo{} - if r.Intn(10) != 0 { - this.Container = NewPopulatedCommandInfo_ContainerInfo(r, easy) - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.Uris = make([]*CommandInfo_URI, v23) - for i := 0; i < v23; i++ { - this.Uris[i] = NewPopulatedCommandInfo_URI(r, easy) - } - } - if r.Intn(10) != 0 { - this.Environment = NewPopulatedEnvironment(r, easy) - } - if r.Intn(10) != 0 { - v24 := bool(r.Intn(2) == 0) - this.Shell = &v24 +func (m *MasterInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v25 := randStringMesos(r) - this.Value = &v25 + return data[:n], nil +} + +func (m *MasterInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Id))) + i += copy(data[i:], *m.Id) } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.Arguments = make([]string, v26) - for i := 0; i < v26; i++ { - this.Arguments[i] = randStringMesos(r) - } + if m.Ip == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("ip") + } else { + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Ip)) } - if r.Intn(10) != 0 { - v27 := randStringMesos(r) - this.User = &v27 + if m.Port == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } else { + data[i] = 0x18 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Port)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 8) + if m.Pid != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Pid))) + i += copy(data[i:], *m.Pid) } - return this -} - -func NewPopulatedCommandInfo_URI(r randyMesos, easy bool) *CommandInfo_URI { - this := &CommandInfo_URI{} - v28 := randStringMesos(r) - this.Value = &v28 - if r.Intn(10) != 0 { - v29 := bool(r.Intn(2) == 0) - this.Executable = &v29 + if m.Hostname != nil { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) + i += copy(data[i:], *m.Hostname) } - if r.Intn(10) != 0 { - v30 := bool(r.Intn(2) == 0) - this.Extract = &v30 + if m.Version != nil { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Version))) + i += copy(data[i:], *m.Version) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedCommandInfo_ContainerInfo(r randyMesos, easy bool) *CommandInfo_ContainerInfo { - this := &CommandInfo_ContainerInfo{} - v31 := randStringMesos(r) - this.Image = &v31 - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.Options = make([]string, v32) - for i := 0; i < v32; i++ { - this.Options[i] = randStringMesos(r) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) +func (m *SlaveInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { - this := &ExecutorInfo{} - this.ExecutorId = NewPopulatedExecutorID(r, easy) - if r.Intn(10) != 0 { - this.FrameworkId = NewPopulatedFrameworkID(r, easy) - } - this.Command = NewPopulatedCommandInfo(r, easy) - if r.Intn(10) != 0 { - this.Container = NewPopulatedContainerInfo(r, easy) +func (m *SlaveInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Hostname == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) + i += copy(data[i:], *m.Hostname) } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.Resources = make([]*Resource, v33) - for i := 0; i < v33; i++ { - this.Resources[i] = NewPopulatedResource(r, easy) + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } } - if r.Intn(10) != 0 { - v34 := randStringMesos(r) - this.Name = &v34 + if len(m.Attributes) > 0 { + for _, msg := range m.Attributes { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if r.Intn(10) != 0 { - v35 := randStringMesos(r) - this.Source = &v35 + if m.Id != nil { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(m.Id.Size())) + n11, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 } - if r.Intn(10) != 0 { - v36 := r.Intn(100) - this.Data = make([]byte, v36) - for i := 0; i < v36; i++ { - this.Data[i] = byte(r.Intn(256)) + if m.Checkpoint != nil { + data[i] = 0x38 + i++ + if *m.Checkpoint { + data[i] = 1 + } else { + data[i] = 0 } + i++ } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 12) + if m.Port != nil { + data[i] = 0x40 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Port)) } - return this + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil } -func NewPopulatedMasterInfo(r randyMesos, easy bool) *MasterInfo { - this := &MasterInfo{} - v37 := randStringMesos(r) - this.Id = &v37 - v38 := r.Uint32() - this.Ip = &v38 - v39 := r.Uint32() - this.Port = &v39 - if r.Intn(10) != 0 { - v40 := randStringMesos(r) - this.Pid = &v40 - } - if r.Intn(10) != 0 { - v41 := randStringMesos(r) - this.Hostname = &v41 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 6) +func (m *Value) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedSlaveInfo(r randyMesos, easy bool) *SlaveInfo { - this := &SlaveInfo{} - v42 := randStringMesos(r) - this.Hostname = &v42 - if r.Intn(10) != 0 { - v43 := r.Int31() - if r.Intn(2) == 0 { - v43 *= -1 - } - this.Port = &v43 +func (m *Value) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Type)) } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Resources = make([]*Resource, v44) - for i := 0; i < v44; i++ { - this.Resources[i] = NewPopulatedResource(r, easy) + if m.Scalar != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) + n12, err := m.Scalar.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n12 } - if r.Intn(10) != 0 { - v45 := r.Intn(10) - this.Attributes = make([]*Attribute, v45) - for i := 0; i < v45; i++ { - this.Attributes[i] = NewPopulatedAttribute(r, easy) + if m.Ranges != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) + n13, err := m.Ranges.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n13 } - if r.Intn(10) != 0 { - this.Id = NewPopulatedSlaveID(r, easy) + if m.Set != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.Set.Size())) + n14, err := m.Set.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n14 } - if r.Intn(10) != 0 { - v46 := bool(r.Intn(2) == 0) - this.Checkpoint = &v46 + if m.Text != nil { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(m.Text.Size())) + n15, err := m.Text.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n15 } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 9) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedValue(r randyMesos, easy bool) *Value { - this := &Value{} - v47 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v47 - if r.Intn(10) != 0 { - this.Scalar = NewPopulatedValue_Scalar(r, easy) - } - if r.Intn(10) != 0 { - this.Ranges = NewPopulatedValue_Ranges(r, easy) - } - if r.Intn(10) != 0 { - this.Set = NewPopulatedValue_Set(r, easy) - } - if r.Intn(10) != 0 { - this.Text = NewPopulatedValue_Text(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 6) +func (m *Value_Scalar) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedValue_Scalar(r randyMesos, easy bool) *Value_Scalar { - this := &Value_Scalar{} - v48 := r.Float64() - if r.Intn(2) == 0 { - v48 *= -1 +func (m *Value_Scalar) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0x9 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.Value))) } - this.Value = &v48 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedValue_Range(r randyMesos, easy bool) *Value_Range { - this := &Value_Range{} - v49 := uint64(r.Uint32()) - this.Begin = &v49 - v50 := uint64(r.Uint32()) - this.End = &v50 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) +func (m *Value_Range) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedValue_Ranges(r randyMesos, easy bool) *Value_Ranges { - this := &Value_Ranges{} - if r.Intn(10) != 0 { - v51 := r.Intn(10) - this.Range = make([]*Value_Range, v51) - for i := 0; i < v51; i++ { - this.Range[i] = NewPopulatedValue_Range(r, easy) - } +func (m *Value_Range) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Begin == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("begin") + } else { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Begin)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if m.End == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("end") + } else { + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(*m.End)) } - return this + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil } -func NewPopulatedValue_Set(r randyMesos, easy bool) *Value_Set { - this := &Value_Set{} - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Item = make([]string, v52) - for i := 0; i < v52; i++ { - this.Item[i] = randStringMesos(r) +func (m *Value_Ranges) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Value_Ranges) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Range) > 0 { + for _, msg := range m.Range { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedValue_Text(r randyMesos, easy bool) *Value_Text { - this := &Value_Text{} - v53 := randStringMesos(r) - this.Value = &v53 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) +func (m *Value_Set) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedAttribute(r randyMesos, easy bool) *Attribute { - this := &Attribute{} - v54 := randStringMesos(r) - this.Name = &v54 - v55 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v55 - if r.Intn(10) != 0 { - this.Scalar = NewPopulatedValue_Scalar(r, easy) - } - if r.Intn(10) != 0 { - this.Ranges = NewPopulatedValue_Ranges(r, easy) - } - if r.Intn(10) != 0 { - this.Set = NewPopulatedValue_Set(r, easy) +func (m *Value_Set) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Item) > 0 { + for _, s := range m.Item { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } } - if r.Intn(10) != 0 { - this.Text = NewPopulatedValue_Text(r, easy) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 7) + return i, nil +} + +func (m *Value_Text) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedResource(r randyMesos, easy bool) *Resource { - this := &Resource{} - v56 := randStringMesos(r) - this.Name = &v56 - v57 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v57 - if r.Intn(10) != 0 { - this.Scalar = NewPopulatedValue_Scalar(r, easy) - } - if r.Intn(10) != 0 { - this.Ranges = NewPopulatedValue_Ranges(r, easy) - } - if r.Intn(10) != 0 { - this.Set = NewPopulatedValue_Set(r, easy) +func (m *Value_Text) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } - if r.Intn(10) != 0 { - v58 := randStringMesos(r) - this.Role = &v58 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 7) + return i, nil +} + +func (m *Attribute) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedResourceStatistics(r randyMesos, easy bool) *ResourceStatistics { - this := &ResourceStatistics{} - v59 := r.Float64() - if r.Intn(2) == 0 { - v59 *= -1 +func (m *Attribute) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - this.Timestamp = &v59 - if r.Intn(10) != 0 { - v60 := r.Float64() - if r.Intn(2) == 0 { - v60 *= -1 - } - this.CpusUserTimeSecs = &v60 + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Type)) } - if r.Intn(10) != 0 { - v61 := r.Float64() - if r.Intn(2) == 0 { - v61 *= -1 + if m.Scalar != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) + n16, err := m.Scalar.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.CpusSystemTimeSecs = &v61 + i += n16 } - if r.Intn(10) != 0 { - v62 := r.Float64() - if r.Intn(2) == 0 { - v62 *= -1 + if m.Ranges != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) + n17, err := m.Ranges.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.CpusLimit = &v62 - } - if r.Intn(10) != 0 { - v63 := r.Uint32() - this.CpusNrPeriods = &v63 - } - if r.Intn(10) != 0 { - v64 := r.Uint32() - this.CpusNrThrottled = &v64 + i += n17 } - if r.Intn(10) != 0 { - v65 := r.Float64() - if r.Intn(2) == 0 { - v65 *= -1 + if m.Text != nil { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(m.Text.Size())) + n18, err := m.Text.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.CpusThrottledTimeSecs = &v65 - } - if r.Intn(10) != 0 { - v66 := uint64(r.Uint32()) - this.MemRssBytes = &v66 - } - if r.Intn(10) != 0 { - v67 := uint64(r.Uint32()) - this.MemLimitBytes = &v67 - } - if r.Intn(10) != 0 { - v68 := uint64(r.Uint32()) - this.MemFileBytes = &v68 - } - if r.Intn(10) != 0 { - v69 := uint64(r.Uint32()) - this.MemAnonBytes = &v69 - } - if r.Intn(10) != 0 { - v70 := uint64(r.Uint32()) - this.MemMappedFileBytes = &v70 - } - if r.Intn(10) != 0 { - this.Perf = NewPopulatedPerfStatistics(r, easy) - } - if r.Intn(10) != 0 { - v71 := uint64(r.Uint32()) - this.NetRxPackets = &v71 + i += n18 } - if r.Intn(10) != 0 { - v72 := uint64(r.Uint32()) - this.NetRxBytes = &v72 + if m.Set != nil { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(m.Set.Size())) + n19, err := m.Set.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n19 } - if r.Intn(10) != 0 { - v73 := uint64(r.Uint32()) - this.NetRxErrors = &v73 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if r.Intn(10) != 0 { - v74 := uint64(r.Uint32()) - this.NetRxDropped = &v74 + return i, nil +} + +func (m *Resource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v75 := uint64(r.Uint32()) - this.NetTxPackets = &v75 + return data[:n], nil +} + +func (m *Resource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - if r.Intn(10) != 0 { - v76 := uint64(r.Uint32()) - this.NetTxBytes = &v76 + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Type)) } - if r.Intn(10) != 0 { - v77 := uint64(r.Uint32()) - this.NetTxErrors = &v77 + if m.Scalar != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) + n20, err := m.Scalar.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n20 } - if r.Intn(10) != 0 { - v78 := uint64(r.Uint32()) - this.NetTxDropped = &v78 + if m.Ranges != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) + n21, err := m.Ranges.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n21 } - if r.Intn(10) != 0 { - v79 := r.Float64() - if r.Intn(2) == 0 { - v79 *= -1 + if m.Set != nil { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(m.Set.Size())) + n22, err := m.Set.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.NetTcpRttMicrosecsP50 = &v79 + i += n22 } - if r.Intn(10) != 0 { - v80 := r.Float64() - if r.Intn(2) == 0 { - v80 *= -1 + if m.Role != nil { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Role))) + i += copy(data[i:], *m.Role) + } + if m.Disk != nil { + data[i] = 0x3a + i++ + i = encodeVarintMesos(data, i, uint64(m.Disk.Size())) + n23, err := m.Disk.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.NetTcpRttMicrosecsP90 = &v80 + i += n23 } - if r.Intn(10) != 0 { - v81 := r.Float64() - if r.Intn(2) == 0 { - v81 *= -1 + if m.Reservation != nil { + data[i] = 0x42 + i++ + i = encodeVarintMesos(data, i, uint64(m.Reservation.Size())) + n24, err := m.Reservation.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.NetTcpRttMicrosecsP95 = &v81 + i += n24 } - if r.Intn(10) != 0 { - v82 := r.Float64() - if r.Intn(2) == 0 { - v82 *= -1 + if m.Revocable != nil { + data[i] = 0x4a + i++ + i = encodeVarintMesos(data, i, uint64(m.Revocable.Size())) + n25, err := m.Revocable.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.NetTcpRttMicrosecsP99 = &v82 + i += n25 } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 26) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedResourceUsage(r randyMesos, easy bool) *ResourceUsage { - this := &ResourceUsage{} - this.SlaveId = NewPopulatedSlaveID(r, easy) - this.FrameworkId = NewPopulatedFrameworkID(r, easy) - if r.Intn(10) != 0 { - this.ExecutorId = NewPopulatedExecutorID(r, easy) - } - if r.Intn(10) != 0 { - v83 := randStringMesos(r) - this.ExecutorName = &v83 - } - if r.Intn(10) != 0 { - this.TaskId = NewPopulatedTaskID(r, easy) - } - if r.Intn(10) != 0 { - this.Statistics = NewPopulatedResourceStatistics(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 7) +func (m *Resource_ReservationInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedPerfStatistics(r randyMesos, easy bool) *PerfStatistics { - this := &PerfStatistics{} - v84 := r.Float64() - if r.Intn(2) == 0 { - v84 *= -1 - } - this.Timestamp = &v84 - v85 := r.Float64() - if r.Intn(2) == 0 { - v85 *= -1 - } - this.Duration = &v85 - if r.Intn(10) != 0 { - v86 := uint64(r.Uint32()) - this.Cycles = &v86 - } - if r.Intn(10) != 0 { - v87 := uint64(r.Uint32()) - this.StalledCyclesFrontend = &v87 - } - if r.Intn(10) != 0 { - v88 := uint64(r.Uint32()) - this.StalledCyclesBackend = &v88 - } - if r.Intn(10) != 0 { - v89 := uint64(r.Uint32()) - this.Instructions = &v89 - } - if r.Intn(10) != 0 { - v90 := uint64(r.Uint32()) - this.CacheReferences = &v90 - } - if r.Intn(10) != 0 { - v91 := uint64(r.Uint32()) - this.CacheMisses = &v91 - } - if r.Intn(10) != 0 { - v92 := uint64(r.Uint32()) - this.Branches = &v92 - } - if r.Intn(10) != 0 { - v93 := uint64(r.Uint32()) - this.BranchMisses = &v93 +func (m *Resource_ReservationInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Principal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Principal))) + i += copy(data[i:], *m.Principal) } - if r.Intn(10) != 0 { - v94 := uint64(r.Uint32()) - this.BusCycles = &v94 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if r.Intn(10) != 0 { - v95 := uint64(r.Uint32()) - this.RefCycles = &v95 + return i, nil +} + +func (m *Resource_DiskInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v96 := r.Float64() - if r.Intn(2) == 0 { - v96 *= -1 + return data[:n], nil +} + +func (m *Resource_DiskInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Persistence != nil { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.Persistence.Size())) + n26, err := m.Persistence.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.CpuClock = &v96 + i += n26 } - if r.Intn(10) != 0 { - v97 := r.Float64() - if r.Intn(2) == 0 { - v97 *= -1 + if m.Volume != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Volume.Size())) + n27, err := m.Volume.MarshalTo(data[i:]) + if err != nil { + return 0, err } - this.TaskClock = &v97 - } - if r.Intn(10) != 0 { - v98 := uint64(r.Uint32()) - this.PageFaults = &v98 - } - if r.Intn(10) != 0 { - v99 := uint64(r.Uint32()) - this.MinorFaults = &v99 - } - if r.Intn(10) != 0 { - v100 := uint64(r.Uint32()) - this.MajorFaults = &v100 - } - if r.Intn(10) != 0 { - v101 := uint64(r.Uint32()) - this.ContextSwitches = &v101 + i += n27 } - if r.Intn(10) != 0 { - v102 := uint64(r.Uint32()) - this.CpuMigrations = &v102 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if r.Intn(10) != 0 { - v103 := uint64(r.Uint32()) - this.AlignmentFaults = &v103 + return i, nil +} + +func (m *Resource_DiskInfo_Persistence) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v104 := uint64(r.Uint32()) - this.EmulationFaults = &v104 + return data[:n], nil +} + +func (m *Resource_DiskInfo_Persistence) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Id))) + i += copy(data[i:], *m.Id) } - if r.Intn(10) != 0 { - v105 := uint64(r.Uint32()) - this.L1DcacheLoads = &v105 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if r.Intn(10) != 0 { - v106 := uint64(r.Uint32()) - this.L1DcacheLoadMisses = &v106 + return i, nil +} + +func (m *Resource_RevocableInfo) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v107 := uint64(r.Uint32()) - this.L1DcacheStores = &v107 + return data[:n], nil +} + +func (m *Resource_RevocableInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if r.Intn(10) != 0 { - v108 := uint64(r.Uint32()) - this.L1DcacheStoreMisses = &v108 + return i, nil +} + +func (m *TrafficControlStatistics) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v109 := uint64(r.Uint32()) - this.L1DcachePrefetches = &v109 + return data[:n], nil +} + +func (m *TrafficControlStatistics) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Id))) + i += copy(data[i:], *m.Id) } - if r.Intn(10) != 0 { - v110 := uint64(r.Uint32()) - this.L1DcachePrefetchMisses = &v110 + if m.Backlog != nil { + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Backlog)) } - if r.Intn(10) != 0 { - v111 := uint64(r.Uint32()) - this.L1IcacheLoads = &v111 + if m.Bytes != nil { + data[i] = 0x18 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Bytes)) } - if r.Intn(10) != 0 { - v112 := uint64(r.Uint32()) - this.L1IcacheLoadMisses = &v112 + if m.Drops != nil { + data[i] = 0x20 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Drops)) } - if r.Intn(10) != 0 { - v113 := uint64(r.Uint32()) - this.L1IcachePrefetches = &v113 + if m.Overlimits != nil { + data[i] = 0x28 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Overlimits)) } - if r.Intn(10) != 0 { - v114 := uint64(r.Uint32()) - this.L1IcachePrefetchMisses = &v114 + if m.Packets != nil { + data[i] = 0x30 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Packets)) } - if r.Intn(10) != 0 { - v115 := uint64(r.Uint32()) - this.LlcLoads = &v115 + if m.Qlen != nil { + data[i] = 0x38 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Qlen)) } - if r.Intn(10) != 0 { - v116 := uint64(r.Uint32()) - this.LlcLoadMisses = &v116 + if m.Ratebps != nil { + data[i] = 0x40 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Ratebps)) } - if r.Intn(10) != 0 { - v117 := uint64(r.Uint32()) - this.LlcStores = &v117 + if m.Ratepps != nil { + data[i] = 0x48 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Ratepps)) } - if r.Intn(10) != 0 { - v118 := uint64(r.Uint32()) - this.LlcStoreMisses = &v118 + if m.Requeues != nil { + data[i] = 0x50 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Requeues)) } - if r.Intn(10) != 0 { - v119 := uint64(r.Uint32()) - this.LlcPrefetches = &v119 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if r.Intn(10) != 0 { - v120 := uint64(r.Uint32()) - this.LlcPrefetchMisses = &v120 + return i, nil +} + +func (m *ResourceStatistics) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if r.Intn(10) != 0 { - v121 := uint64(r.Uint32()) - this.DtlbLoads = &v121 + return data[:n], nil +} + +func (m *ResourceStatistics) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Timestamp == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") + } else { + data[i] = 0x9 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.Timestamp))) } - if r.Intn(10) != 0 { - v122 := uint64(r.Uint32()) - this.DtlbLoadMisses = &v122 + if m.CpusUserTimeSecs != nil { + data[i] = 0x11 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.CpusUserTimeSecs))) } - if r.Intn(10) != 0 { - v123 := uint64(r.Uint32()) - this.DtlbStores = &v123 + if m.CpusSystemTimeSecs != nil { + data[i] = 0x19 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.CpusSystemTimeSecs))) } - if r.Intn(10) != 0 { - v124 := uint64(r.Uint32()) - this.DtlbStoreMisses = &v124 + if m.CpusLimit != nil { + data[i] = 0x21 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.CpusLimit))) } - if r.Intn(10) != 0 { - v125 := uint64(r.Uint32()) - this.DtlbPrefetches = &v125 + if m.MemRssBytes != nil { + data[i] = 0x28 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemRssBytes)) } - if r.Intn(10) != 0 { - v126 := uint64(r.Uint32()) - this.DtlbPrefetchMisses = &v126 + if m.MemLimitBytes != nil { + data[i] = 0x30 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemLimitBytes)) } - if r.Intn(10) != 0 { - v127 := uint64(r.Uint32()) - this.ItlbLoads = &v127 + if m.CpusNrPeriods != nil { + data[i] = 0x38 + i++ + i = encodeVarintMesos(data, i, uint64(*m.CpusNrPeriods)) } - if r.Intn(10) != 0 { - v128 := uint64(r.Uint32()) - this.ItlbLoadMisses = &v128 + if m.CpusNrThrottled != nil { + data[i] = 0x40 + i++ + i = encodeVarintMesos(data, i, uint64(*m.CpusNrThrottled)) } - if r.Intn(10) != 0 { - v129 := uint64(r.Uint32()) - this.BranchLoads = &v129 + if m.CpusThrottledTimeSecs != nil { + data[i] = 0x49 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.CpusThrottledTimeSecs))) } - if r.Intn(10) != 0 { - v130 := uint64(r.Uint32()) - this.BranchLoadMisses = &v130 + if m.MemFileBytes != nil { + data[i] = 0x50 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemFileBytes)) } - if r.Intn(10) != 0 { - v131 := uint64(r.Uint32()) - this.NodeLoads = &v131 + if m.MemAnonBytes != nil { + data[i] = 0x58 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemAnonBytes)) } - if r.Intn(10) != 0 { - v132 := uint64(r.Uint32()) - this.NodeLoadMisses = &v132 + if m.MemMappedFileBytes != nil { + data[i] = 0x60 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemMappedFileBytes)) } - if r.Intn(10) != 0 { - v133 := uint64(r.Uint32()) - this.NodeStores = &v133 + if m.Perf != nil { + data[i] = 0x6a + i++ + i = encodeVarintMesos(data, i, uint64(m.Perf.Size())) + n28, err := m.Perf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n28 } - if r.Intn(10) != 0 { - v134 := uint64(r.Uint32()) - this.NodeStoreMisses = &v134 + if m.NetRxPackets != nil { + data[i] = 0x70 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetRxPackets)) } - if r.Intn(10) != 0 { - v135 := uint64(r.Uint32()) - this.NodePrefetches = &v135 + if m.NetRxBytes != nil { + data[i] = 0x78 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetRxBytes)) } - if r.Intn(10) != 0 { - v136 := uint64(r.Uint32()) - this.NodePrefetchMisses = &v136 + if m.NetRxErrors != nil { + data[i] = 0x80 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetRxErrors)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 54) + if m.NetRxDropped != nil { + data[i] = 0x88 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetRxDropped)) } - return this -} - -func NewPopulatedRequest(r randyMesos, easy bool) *Request { - this := &Request{} - if r.Intn(10) != 0 { - this.SlaveId = NewPopulatedSlaveID(r, easy) + if m.NetTxPackets != nil { + data[i] = 0x90 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetTxPackets)) } - if r.Intn(10) != 0 { - v137 := r.Intn(10) - this.Resources = make([]*Resource, v137) - for i := 0; i < v137; i++ { - this.Resources[i] = NewPopulatedResource(r, easy) - } + if m.NetTxBytes != nil { + data[i] = 0x98 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetTxBytes)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + if m.NetTxErrors != nil { + data[i] = 0xa0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetTxErrors)) } - return this -} - -func NewPopulatedOffer(r randyMesos, easy bool) *Offer { - this := &Offer{} - this.Id = NewPopulatedOfferID(r, easy) - this.FrameworkId = NewPopulatedFrameworkID(r, easy) - this.SlaveId = NewPopulatedSlaveID(r, easy) - v138 := randStringMesos(r) - this.Hostname = &v138 - if r.Intn(10) != 0 { - v139 := r.Intn(10) - this.Resources = make([]*Resource, v139) - for i := 0; i < v139; i++ { - this.Resources[i] = NewPopulatedResource(r, easy) - } + if m.NetTxDropped != nil { + data[i] = 0xa8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NetTxDropped)) } - if r.Intn(10) != 0 { - v140 := r.Intn(10) - this.Attributes = make([]*Attribute, v140) - for i := 0; i < v140; i++ { - this.Attributes[i] = NewPopulatedAttribute(r, easy) - } + if m.NetTcpRttMicrosecsP50 != nil { + data[i] = 0xb1 + i++ + data[i] = 0x1 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.NetTcpRttMicrosecsP50))) } - if r.Intn(10) != 0 { - v141 := r.Intn(10) - this.ExecutorIds = make([]*ExecutorID, v141) - for i := 0; i < v141; i++ { - this.ExecutorIds[i] = NewPopulatedExecutorID(r, easy) - } + if m.NetTcpRttMicrosecsP90 != nil { + data[i] = 0xb9 + i++ + data[i] = 0x1 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.NetTcpRttMicrosecsP90))) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 8) + if m.NetTcpRttMicrosecsP95 != nil { + data[i] = 0xc1 + i++ + data[i] = 0x1 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.NetTcpRttMicrosecsP95))) } - return this -} - -func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { - this := &TaskInfo{} - v142 := randStringMesos(r) - this.Name = &v142 - this.TaskId = NewPopulatedTaskID(r, easy) - this.SlaveId = NewPopulatedSlaveID(r, easy) - if r.Intn(10) != 0 { - v143 := r.Intn(10) - this.Resources = make([]*Resource, v143) - for i := 0; i < v143; i++ { - this.Resources[i] = NewPopulatedResource(r, easy) - } + if m.NetTcpRttMicrosecsP99 != nil { + data[i] = 0xc9 + i++ + data[i] = 0x1 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.NetTcpRttMicrosecsP99))) } - if r.Intn(10) != 0 { - this.Executor = NewPopulatedExecutorInfo(r, easy) + if m.DiskLimitBytes != nil { + data[i] = 0xd0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DiskLimitBytes)) } - if r.Intn(10) != 0 { - this.Command = NewPopulatedCommandInfo(r, easy) + if m.DiskUsedBytes != nil { + data[i] = 0xd8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DiskUsedBytes)) } - if r.Intn(10) != 0 { - this.Container = NewPopulatedContainerInfo(r, easy) + if m.NetTcpActiveConnections != nil { + data[i] = 0xe1 + i++ + data[i] = 0x1 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.NetTcpActiveConnections))) } - if r.Intn(10) != 0 { - v144 := r.Intn(100) - this.Data = make([]byte, v144) - for i := 0; i < v144; i++ { - this.Data[i] = byte(r.Intn(256)) - } + if m.NetTcpTimeWaitConnections != nil { + data[i] = 0xe9 + i++ + data[i] = 0x1 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.NetTcpTimeWaitConnections))) } - if r.Intn(10) != 0 { - this.HealthCheck = NewPopulatedHealthCheck(r, easy) + if m.Processes != nil { + data[i] = 0xf0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Processes)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 10) + if m.Threads != nil { + data[i] = 0xf8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Threads)) } - return this -} - -func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { - this := &TaskStatus{} - this.TaskId = NewPopulatedTaskID(r, easy) - v145 := TaskState([]int32{6, 0, 1, 2, 3, 4, 5, 7}[r.Intn(8)]) - this.State = &v145 - if r.Intn(10) != 0 { - v146 := randStringMesos(r) - this.Message = &v146 + if m.MemLowPressureCounter != nil { + data[i] = 0x80 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemLowPressureCounter)) } - if r.Intn(10) != 0 { - v147 := TaskStatus_Source([]int32{0, 1, 2}[r.Intn(3)]) - this.Source = &v147 + if m.MemMediumPressureCounter != nil { + data[i] = 0x88 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemMediumPressureCounter)) } - if r.Intn(10) != 0 { - v148 := TaskStatus_Reason([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(17)]) - this.Reason = &v148 + if m.MemCriticalPressureCounter != nil { + data[i] = 0x90 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemCriticalPressureCounter)) } - if r.Intn(10) != 0 { - v149 := r.Intn(100) - this.Data = make([]byte, v149) - for i := 0; i < v149; i++ { - this.Data[i] = byte(r.Intn(256)) + if len(m.NetTrafficControlStatistics) > 0 { + for _, msg := range m.NetTrafficControlStatistics { + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } } - if r.Intn(10) != 0 { - this.SlaveId = NewPopulatedSlaveID(r, easy) + if m.MemTotalBytes != nil { + data[i] = 0xa0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemTotalBytes)) } - if r.Intn(10) != 0 { - this.ExecutorId = NewPopulatedExecutorID(r, easy) + if m.MemTotalMemswBytes != nil { + data[i] = 0xa8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemTotalMemswBytes)) } - if r.Intn(10) != 0 { - v150 := r.Float64() - if r.Intn(2) == 0 { - v150 *= -1 - } - this.Timestamp = &v150 + if m.MemSoftLimitBytes != nil { + data[i] = 0xb0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemSoftLimitBytes)) } - if r.Intn(10) != 0 { - v151 := bool(r.Intn(2) == 0) - this.Healthy = &v151 + if m.MemCacheBytes != nil { + data[i] = 0xb8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemCacheBytes)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 11) + if m.MemSwapBytes != nil { + data[i] = 0xc0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MemSwapBytes)) } - return this + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil } -func NewPopulatedFilters(r randyMesos, easy bool) *Filters { - this := &Filters{} - if r.Intn(10) != 0 { - v152 := r.Float64() - if r.Intn(2) == 0 { - v152 *= -1 - } - this.RefuseSeconds = &v152 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) +func (m *ResourceUsage) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedEnvironment(r randyMesos, easy bool) *Environment { - this := &Environment{} - if r.Intn(10) != 0 { - v153 := r.Intn(10) - this.Variables = make([]*Environment_Variable, v153) - for i := 0; i < v153; i++ { - this.Variables[i] = NewPopulatedEnvironment_Variable(r, easy) +func (m *ResourceUsage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Executors) > 0 { + for _, msg := range m.Executors { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) - } - return this -} - -func NewPopulatedEnvironment_Variable(r randyMesos, easy bool) *Environment_Variable { - this := &Environment_Variable{} - v154 := randStringMesos(r) - this.Name = &v154 - v155 := randStringMesos(r) - this.Value = &v155 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedParameter(r randyMesos, easy bool) *Parameter { - this := &Parameter{} - v156 := randStringMesos(r) - this.Key = &v156 - v157 := randStringMesos(r) - this.Value = &v157 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) +func (m *ResourceUsage_Executor) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedParameters(r randyMesos, easy bool) *Parameters { - this := &Parameters{} - if r.Intn(10) != 0 { - v158 := r.Intn(10) - this.Parameter = make([]*Parameter, v158) - for i := 0; i < v158; i++ { - this.Parameter[i] = NewPopulatedParameter(r, easy) +func (m *ResourceUsage_Executor) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ExecutorInfo == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_info") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.ExecutorInfo.Size())) + n29, err := m.ExecutorInfo.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n29 } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) - } - return this -} - -func NewPopulatedCredential(r randyMesos, easy bool) *Credential { - this := &Credential{} - v159 := randStringMesos(r) - this.Principal = &v159 - if r.Intn(10) != 0 { - v160 := r.Intn(100) - this.Secret = make([]byte, v160) - for i := 0; i < v160; i++ { - this.Secret[i] = byte(r.Intn(256)) + if len(m.Allocated) > 0 { + for _, msg := range m.Allocated { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) - } - return this -} - -func NewPopulatedCredentials(r randyMesos, easy bool) *Credentials { - this := &Credentials{} - if r.Intn(10) != 0 { - v161 := r.Intn(10) - this.Credentials = make([]*Credential, v161) - for i := 0; i < v161; i++ { - this.Credentials[i] = NewPopulatedCredential(r, easy) + if m.Statistics != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.Statistics.Size())) + n30, err := m.Statistics.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n30 } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - return this + return i, nil } -func NewPopulatedACL(r randyMesos, easy bool) *ACL { - this := &ACL{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 1) +func (m *PerfStatistics) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - return this + return data[:n], nil } -func NewPopulatedACL_Entity(r randyMesos, easy bool) *ACL_Entity { - this := &ACL_Entity{} - if r.Intn(10) != 0 { - v162 := ACL_Entity_Type([]int32{0, 1, 2}[r.Intn(3)]) - this.Type = &v162 +func (m *PerfStatistics) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Timestamp == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") + } else { + data[i] = 0x9 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.Timestamp))) } - if r.Intn(10) != 0 { - v163 := r.Intn(10) - this.Values = make([]string, v163) - for i := 0; i < v163; i++ { - this.Values[i] = randStringMesos(r) - } + if m.Duration == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("duration") + } else { + data[i] = 0x11 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.Duration))) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + if m.Cycles != nil { + data[i] = 0x18 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Cycles)) } - return this -} - -func NewPopulatedACL_RegisterFramework(r randyMesos, easy bool) *ACL_RegisterFramework { - this := &ACL_RegisterFramework{} - this.Principals = NewPopulatedACL_Entity(r, easy) - this.Roles = NewPopulatedACL_Entity(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + if m.StalledCyclesFrontend != nil { + data[i] = 0x20 + i++ + i = encodeVarintMesos(data, i, uint64(*m.StalledCyclesFrontend)) } - return this -} - -func NewPopulatedACL_RunTask(r randyMesos, easy bool) *ACL_RunTask { - this := &ACL_RunTask{} - this.Principals = NewPopulatedACL_Entity(r, easy) - this.Users = NewPopulatedACL_Entity(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + if m.StalledCyclesBackend != nil { + data[i] = 0x28 + i++ + i = encodeVarintMesos(data, i, uint64(*m.StalledCyclesBackend)) } - return this -} - -func NewPopulatedACL_ShutdownFramework(r randyMesos, easy bool) *ACL_ShutdownFramework { - this := &ACL_ShutdownFramework{} - this.Principals = NewPopulatedACL_Entity(r, easy) - this.FrameworkPrincipals = NewPopulatedACL_Entity(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + if m.Instructions != nil { + data[i] = 0x30 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Instructions)) } - return this -} - -func NewPopulatedACLs(r randyMesos, easy bool) *ACLs { - this := &ACLs{} - if r.Intn(10) != 0 { - v164 := bool(r.Intn(2) == 0) - this.Permissive = &v164 + if m.CacheReferences != nil { + data[i] = 0x38 + i++ + i = encodeVarintMesos(data, i, uint64(*m.CacheReferences)) } - if r.Intn(10) != 0 { - v165 := r.Intn(10) - this.RegisterFrameworks = make([]*ACL_RegisterFramework, v165) - for i := 0; i < v165; i++ { - this.RegisterFrameworks[i] = NewPopulatedACL_RegisterFramework(r, easy) - } + if m.CacheMisses != nil { + data[i] = 0x40 + i++ + i = encodeVarintMesos(data, i, uint64(*m.CacheMisses)) } - if r.Intn(10) != 0 { - v166 := r.Intn(10) - this.RunTasks = make([]*ACL_RunTask, v166) - for i := 0; i < v166; i++ { - this.RunTasks[i] = NewPopulatedACL_RunTask(r, easy) - } + if m.Branches != nil { + data[i] = 0x48 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Branches)) } - if r.Intn(10) != 0 { - v167 := r.Intn(10) - this.ShutdownFrameworks = make([]*ACL_ShutdownFramework, v167) - for i := 0; i < v167; i++ { - this.ShutdownFrameworks[i] = NewPopulatedACL_ShutdownFramework(r, easy) - } + if m.BranchMisses != nil { + data[i] = 0x50 + i++ + i = encodeVarintMesos(data, i, uint64(*m.BranchMisses)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 5) + if m.BusCycles != nil { + data[i] = 0x58 + i++ + i = encodeVarintMesos(data, i, uint64(*m.BusCycles)) } - return this -} - -func NewPopulatedRateLimit(r randyMesos, easy bool) *RateLimit { - this := &RateLimit{} - if r.Intn(10) != 0 { - v168 := r.Float64() - if r.Intn(2) == 0 { - v168 *= -1 - } - this.Qps = &v168 + if m.RefCycles != nil { + data[i] = 0x60 + i++ + i = encodeVarintMesos(data, i, uint64(*m.RefCycles)) } - v169 := randStringMesos(r) - this.Principal = &v169 - if r.Intn(10) != 0 { - v170 := uint64(r.Uint32()) - this.Capacity = &v170 + if m.CpuClock != nil { + data[i] = 0x69 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.CpuClock))) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + if m.TaskClock != nil { + data[i] = 0x71 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.TaskClock))) } - return this -} - -func NewPopulatedRateLimits(r randyMesos, easy bool) *RateLimits { - this := &RateLimits{} - if r.Intn(10) != 0 { - v171 := r.Intn(10) - this.Limits = make([]*RateLimit, v171) - for i := 0; i < v171; i++ { - this.Limits[i] = NewPopulatedRateLimit(r, easy) - } + if m.PageFaults != nil { + data[i] = 0x78 + i++ + i = encodeVarintMesos(data, i, uint64(*m.PageFaults)) } - if r.Intn(10) != 0 { - v172 := r.Float64() - if r.Intn(2) == 0 { - v172 *= -1 - } - this.AggregateDefaultQps = &v172 + if m.MinorFaults != nil { + data[i] = 0x80 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MinorFaults)) } - if r.Intn(10) != 0 { - v173 := uint64(r.Uint32()) - this.AggregateDefaultCapacity = &v173 + if m.MajorFaults != nil { + data[i] = 0x88 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.MajorFaults)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + if m.ContextSwitches != nil { + data[i] = 0x90 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.ContextSwitches)) } - return this -} - -func NewPopulatedVolume(r randyMesos, easy bool) *Volume { - this := &Volume{} - v174 := randStringMesos(r) - this.ContainerPath = &v174 - if r.Intn(10) != 0 { - v175 := randStringMesos(r) - this.HostPath = &v175 + if m.CpuMigrations != nil { + data[i] = 0x98 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.CpuMigrations)) } - v176 := Volume_Mode([]int32{1, 2}[r.Intn(2)]) - this.Mode = &v176 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + if m.AlignmentFaults != nil { + data[i] = 0xa0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.AlignmentFaults)) } - return this -} - -func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { - this := &ContainerInfo{} - v177 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) - this.Type = &v177 - if r.Intn(10) != 0 { - v178 := r.Intn(10) - this.Volumes = make([]*Volume, v178) - for i := 0; i < v178; i++ { - this.Volumes[i] = NewPopulatedVolume(r, easy) - } + if m.EmulationFaults != nil { + data[i] = 0xa8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.EmulationFaults)) } - if r.Intn(10) != 0 { - v179 := randStringMesos(r) - this.Hostname = &v179 + if m.L1DcacheLoads != nil { + data[i] = 0xb0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1DcacheLoads)) } - if r.Intn(10) != 0 { - this.Docker = NewPopulatedContainerInfo_DockerInfo(r, easy) + if m.L1DcacheLoadMisses != nil { + data[i] = 0xb8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1DcacheLoadMisses)) + } + if m.L1DcacheStores != nil { + data[i] = 0xc0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1DcacheStores)) + } + if m.L1DcacheStoreMisses != nil { + data[i] = 0xc8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1DcacheStoreMisses)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 5) + if m.L1DcachePrefetches != nil { + data[i] = 0xd0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1DcachePrefetches)) } - return this -} - -func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInfo_DockerInfo { - this := &ContainerInfo_DockerInfo{} - v180 := randStringMesos(r) - this.Image = &v180 - if r.Intn(10) != 0 { - v181 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3}[r.Intn(3)]) - this.Network = &v181 + if m.L1DcachePrefetchMisses != nil { + data[i] = 0xd8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1DcachePrefetchMisses)) } - if r.Intn(10) != 0 { - v182 := r.Intn(10) - this.PortMappings = make([]*ContainerInfo_DockerInfo_PortMapping, v182) - for i := 0; i < v182; i++ { - this.PortMappings[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(r, easy) - } + if m.L1IcacheLoads != nil { + data[i] = 0xe0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1IcacheLoads)) } - if r.Intn(10) != 0 { - v183 := bool(r.Intn(2) == 0) - this.Privileged = &v183 + if m.L1IcacheLoadMisses != nil { + data[i] = 0xe8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1IcacheLoadMisses)) } - if r.Intn(10) != 0 { - v184 := r.Intn(10) - this.Parameters = make([]*Parameter, v184) - for i := 0; i < v184; i++ { - this.Parameters[i] = NewPopulatedParameter(r, easy) - } + if m.L1IcachePrefetches != nil { + data[i] = 0xf0 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1IcachePrefetches)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 6) + if m.L1IcachePrefetchMisses != nil { + data[i] = 0xf8 + i++ + data[i] = 0x1 + i++ + i = encodeVarintMesos(data, i, uint64(*m.L1IcachePrefetchMisses)) } - return this -} - -func NewPopulatedContainerInfo_DockerInfo_PortMapping(r randyMesos, easy bool) *ContainerInfo_DockerInfo_PortMapping { - this := &ContainerInfo_DockerInfo_PortMapping{} - v185 := r.Uint32() - this.HostPort = &v185 - v186 := r.Uint32() - this.ContainerPort = &v186 - if r.Intn(10) != 0 { - v187 := randStringMesos(r) - this.Protocol = &v187 + if m.LlcLoads != nil { + data[i] = 0x80 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.LlcLoads)) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + if m.LlcLoadMisses != nil { + data[i] = 0x88 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.LlcLoadMisses)) } - return this -} - -type randyMesos interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMesos(r randyMesos) rune { - res := rune(r.Uint32() % 1112064) - if 55296 <= res { - res += 2047 + if m.LlcStores != nil { + data[i] = 0x90 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.LlcStores)) } - return res -} -func randStringMesos(r randyMesos) string { - v188 := r.Intn(100) - tmps := make([]rune, v188) - for i := 0; i < v188; i++ { - tmps[i] = randUTF8RuneMesos(r) + if m.LlcStoreMisses != nil { + data[i] = 0x98 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.LlcStoreMisses)) } - return string(tmps) -} -func randUnrecognizedMesos(r randyMesos, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldMesos(data, r, fieldNumber, wire) + if m.LlcPrefetches != nil { + data[i] = 0xa0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.LlcPrefetches)) } - return data -} -func randFieldMesos(data []byte, r randyMesos, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateMesos(data, uint64(key)) - v189 := r.Int63() - if r.Intn(2) == 0 { - v189 *= -1 - } - data = encodeVarintPopulateMesos(data, uint64(v189)) - case 1: - data = encodeVarintPopulateMesos(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateMesos(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateMesos(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) - } - default: - data = encodeVarintPopulateMesos(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + if m.LlcPrefetchMisses != nil { + data[i] = 0xa8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.LlcPrefetchMisses)) } - return data -} -func encodeVarintPopulateMesos(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 + if m.DtlbLoads != nil { + data[i] = 0xb0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DtlbLoads)) } - data = append(data, uint8(v)) - return data -} -func (m *FrameworkID) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if m.DtlbLoadMisses != nil { + data[i] = 0xb8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DtlbLoadMisses)) } - return data[:n], nil -} - -func (m *FrameworkID) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa + if m.DtlbStores != nil { + data[i] = 0xc0 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DtlbStores)) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if m.DtlbStoreMisses != nil { + data[i] = 0xc8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DtlbStoreMisses)) } - return i, nil -} - -func (m *OfferID) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if m.DtlbPrefetches != nil { + data[i] = 0xd0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DtlbPrefetches)) } - return data[:n], nil -} - -func (m *OfferID) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa + if m.DtlbPrefetchMisses != nil { + data[i] = 0xd8 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.DtlbPrefetchMisses)) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if m.ItlbLoads != nil { + data[i] = 0xe0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.ItlbLoads)) } - return i, nil -} - -func (m *SlaveID) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if m.ItlbLoadMisses != nil { + data[i] = 0xe8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.ItlbLoadMisses)) } - return data[:n], nil -} - -func (m *SlaveID) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa + if m.BranchLoads != nil { + data[i] = 0xf0 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.BranchLoads)) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if m.BranchLoadMisses != nil { + data[i] = 0xf8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintMesos(data, i, uint64(*m.BranchLoadMisses)) } - return i, nil -} - -func (m *TaskID) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if m.NodeLoads != nil { + data[i] = 0x80 + i++ + data[i] = 0x3 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NodeLoads)) } - return data[:n], nil -} - -func (m *TaskID) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa + if m.NodeLoadMisses != nil { + data[i] = 0x88 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + data[i] = 0x3 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NodeLoadMisses)) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if m.NodeStores != nil { + data[i] = 0x90 + i++ + data[i] = 0x3 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NodeStores)) } - return i, nil -} - -func (m *ExecutorID) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if m.NodeStoreMisses != nil { + data[i] = 0x98 + i++ + data[i] = 0x3 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NodeStoreMisses)) } - return data[:n], nil -} - -func (m *ExecutorID) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Value != nil { - data[i] = 0xa + if m.NodePrefetches != nil { + data[i] = 0xa0 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + data[i] = 0x3 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NodePrefetches)) + } + if m.NodePrefetchMisses != nil { + data[i] = 0xa8 + i++ + data[i] = 0x3 + i++ + i = encodeVarintMesos(data, i, uint64(*m.NodePrefetchMisses)) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -13564,7 +15672,7 @@ func (m *ExecutorID) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *ContainerID) Marshal() (data []byte, err error) { +func (m *Request) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13574,16 +15682,32 @@ func (m *ContainerID) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *ContainerID) MarshalTo(data []byte) (n int, err error) { +func (m *Request) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Value != nil { + if m.SlaveId != nil { data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) + n31, err := m.SlaveId.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n31 + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -13591,7 +15715,7 @@ func (m *ContainerID) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *FrameworkInfo) Marshal() (data []byte, err error) { +func (m *Offer) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13601,71 +15725,90 @@ func (m *FrameworkInfo) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *FrameworkInfo) MarshalTo(data []byte) (n int, err error) { +func (m *Offer) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.User != nil { + if m.Id == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } else { data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(len(*m.User))) - i += copy(data[i:], *m.User) - } - if m.Name != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) - } - if m.Id != nil { - data[i] = 0x1a - i++ i = encodeVarintMesos(data, i, uint64(m.Id.Size())) - n1, err := m.Id.MarshalTo(data[i:]) + n32, err := m.Id.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n1 - } - if m.FailoverTimeout != nil { - data[i] = 0x21 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.FailoverTimeout))) + i += n32 } - if m.Checkpoint != nil { - data[i] = 0x28 + if m.FrameworkId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } else { + data[i] = 0x12 i++ - if *m.Checkpoint { - data[i] = 1 - } else { - data[i] = 0 + i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) + n33, err := m.FrameworkId.MarshalTo(data[i:]) + if err != nil { + return 0, err } - i++ + i += n33 } - if m.Role != nil { - data[i] = 0x32 + if m.SlaveId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") + } else { + data[i] = 0x1a i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Role))) - i += copy(data[i:], *m.Role) + i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) + n34, err := m.SlaveId.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 } - if m.Hostname != nil { - data[i] = 0x3a + if m.Hostname == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") + } else { + data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) i += copy(data[i:], *m.Hostname) } - if m.Principal != nil { - data[i] = 0x42 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Principal))) - i += copy(data[i:], *m.Principal) + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.WebuiUrl != nil { - data[i] = 0x4a - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.WebuiUrl))) - i += copy(data[i:], *m.WebuiUrl) + if len(m.ExecutorIds) > 0 { + for _, msg := range m.ExecutorIds { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Attributes) > 0 { + for _, msg := range m.Attributes { + data[i] = 0x3a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -13673,7 +15816,7 @@ func (m *FrameworkInfo) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *HealthCheck) Marshal() (data []byte, err error) { +func (m *Offer_Operation) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13683,55 +15826,67 @@ func (m *HealthCheck) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *HealthCheck) MarshalTo(data []byte) (n int, err error) { +func (m *Offer_Operation) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Http != nil { - data[i] = 0xa + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + data[i] = 0x8 i++ - i = encodeVarintMesos(data, i, uint64(m.Http.Size())) - n2, err := m.Http.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(*m.Type)) + } + if m.Launch != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Launch.Size())) + n35, err := m.Launch.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n2 - } - if m.DelaySeconds != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.DelaySeconds))) - } - if m.IntervalSeconds != nil { - data[i] = 0x19 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.IntervalSeconds))) + i += n35 } - if m.TimeoutSeconds != nil { - data[i] = 0x21 + if m.Reserve != nil { + data[i] = 0x1a i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.TimeoutSeconds))) + i = encodeVarintMesos(data, i, uint64(m.Reserve.Size())) + n36, err := m.Reserve.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n36 } - if m.ConsecutiveFailures != nil { - data[i] = 0x28 + if m.Unreserve != nil { + data[i] = 0x22 i++ - i = encodeVarintMesos(data, i, uint64(*m.ConsecutiveFailures)) + i = encodeVarintMesos(data, i, uint64(m.Unreserve.Size())) + n37, err := m.Unreserve.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n37 } - if m.GracePeriodSeconds != nil { - data[i] = 0x31 + if m.Create != nil { + data[i] = 0x2a i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.GracePeriodSeconds))) + i = encodeVarintMesos(data, i, uint64(m.Create.Size())) + n38, err := m.Create.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n38 } - if m.Command != nil { - data[i] = 0x3a + if m.Destroy != nil { + data[i] = 0x32 i++ - i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n3, err := m.Command.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.Destroy.Size())) + n39, err := m.Destroy.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n3 + i += n39 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -13739,7 +15894,7 @@ func (m *HealthCheck) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *HealthCheck_HTTP) Marshal() (data []byte, err error) { +func (m *Offer_Operation_Launch) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13749,27 +15904,21 @@ func (m *HealthCheck_HTTP) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *HealthCheck_HTTP) MarshalTo(data []byte) (n int, err error) { +func (m *Offer_Operation_Launch) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Port != nil { - data[i] = 0x8 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Port)) - } - if m.Path != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Path))) - i += copy(data[i:], *m.Path) - } - if len(m.Statuses) > 0 { - for _, num := range m.Statuses { - data[i] = 0x20 + if len(m.TaskInfos) > 0 { + for _, msg := range m.TaskInfos { + data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(num)) + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } } if m.XXX_unrecognized != nil { @@ -13778,7 +15927,7 @@ func (m *HealthCheck_HTTP) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *CommandInfo) Marshal() (data []byte, err error) { +func (m *Offer_Operation_Reserve) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13788,23 +15937,13 @@ func (m *CommandInfo) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *CommandInfo) MarshalTo(data []byte) (n int, err error) { +func (m *Offer_Operation_Reserve) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Container != nil { - data[i] = 0x22 - i++ - i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n4, err := m.Container.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if len(m.Uris) > 0 { - for _, msg := range m.Uris { + if len(m.Resources) > 0 { + for _, msg := range m.Resources { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(msg.Size())) @@ -13815,60 +15954,46 @@ func (m *CommandInfo) MarshalTo(data []byte) (n int, err error) { i += n } } - if m.Environment != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(m.Environment.Size())) - n5, err := m.Environment.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.Shell != nil { - data[i] = 0x30 - i++ - if *m.Shell { - data[i] = 1 - } else { - data[i] = 0 - } - i++ + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if m.Value != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + return i, nil +} + +func (m *Offer_Operation_Unreserve) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if len(m.Arguments) > 0 { - for _, s := range m.Arguments { - data[i] = 0x3a + return data[:n], nil +} + +func (m *Offer_Operation_Unreserve) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + data[i] = 0xa i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) + i += n } } - if m.User != nil { - data[i] = 0x2a - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.User))) - i += copy(data[i:], *m.User) - } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil } -func (m *CommandInfo_URI) Marshal() (data []byte, err error) { +func (m *Offer_Operation_Create) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13878,36 +16003,22 @@ func (m *CommandInfo_URI) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *CommandInfo_URI) MarshalTo(data []byte) (n int, err error) { +func (m *Offer_Operation_Create) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Value != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) - } - if m.Executable != nil { - data[i] = 0x10 - i++ - if *m.Executable { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if m.Extract != nil { - data[i] = 0x18 - i++ - if *m.Extract { - data[i] = 1 - } else { - data[i] = 0 + if len(m.Volumes) > 0 { + for _, msg := range m.Volumes { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } - i++ } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -13915,7 +16026,7 @@ func (m *CommandInfo_URI) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *CommandInfo_ContainerInfo) Marshal() (data []byte, err error) { +func (m *Offer_Operation_Destroy) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13925,30 +16036,21 @@ func (m *CommandInfo_ContainerInfo) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *CommandInfo_ContainerInfo) MarshalTo(data []byte) (n int, err error) { +func (m *Offer_Operation_Destroy) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Image != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Image))) - i += copy(data[i:], *m.Image) - } - if len(m.Options) > 0 { - for _, s := range m.Options { - data[i] = 0x12 + if len(m.Volumes) > 0 { + for _, msg := range m.Volumes { + data[i] = 0xa i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) + i += n } } if m.XXX_unrecognized != nil { @@ -13957,7 +16059,7 @@ func (m *CommandInfo_ContainerInfo) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *ExecutorInfo) Marshal() (data []byte, err error) { +func (m *TaskInfo) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -13967,54 +16069,46 @@ func (m *ExecutorInfo) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *ExecutorInfo) MarshalTo(data []byte) (n int, err error) { +func (m *TaskInfo) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.ExecutorId != nil { + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(m.ExecutorId.Size())) - n6, err := m.ExecutorId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.FrameworkId != nil { - data[i] = 0x42 - i++ - i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) - n7, err := m.FrameworkId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - if m.Command != nil { - data[i] = 0x3a + if m.TaskId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") + } else { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n8, err := m.Command.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.TaskId.Size())) + n40, err := m.TaskId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n8 + i += n40 } - if m.Container != nil { - data[i] = 0x5a + if m.SlaveId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") + } else { + data[i] = 0x1a i++ - i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n9, err := m.Container.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) + n41, err := m.SlaveId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n9 + i += n41 } if len(m.Resources) > 0 { for _, msg := range m.Resources { - data[i] = 0x2a + data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(msg.Size())) n, err := msg.MarshalTo(data[i:]) @@ -14024,23 +16118,71 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (n int, err error) { i += n } } - if m.Name != nil { + if m.Executor != nil { + data[i] = 0x2a + i++ + i = encodeVarintMesos(data, i, uint64(m.Executor.Size())) + n42, err := m.Executor.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n42 + } + if m.Data != nil { + data[i] = 0x32 + i++ + i = encodeVarintMesos(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if m.Command != nil { + data[i] = 0x3a + i++ + i = encodeVarintMesos(data, i, uint64(m.Command.Size())) + n43, err := m.Command.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.HealthCheck != nil { + data[i] = 0x42 + i++ + i = encodeVarintMesos(data, i, uint64(m.HealthCheck.Size())) + n44, err := m.HealthCheck.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Container != nil { data[i] = 0x4a i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) + i = encodeVarintMesos(data, i, uint64(m.Container.Size())) + n45, err := m.Container.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n45 } - if m.Source != nil { + if m.Labels != nil { data[i] = 0x52 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Source))) - i += copy(data[i:], *m.Source) + i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) + n46, err := m.Labels.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n46 } - if m.Data != nil { - data[i] = 0x22 + if m.Discovery != nil { + data[i] = 0x5a i++ - i = encodeVarintMesos(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) + i = encodeVarintMesos(data, i, uint64(m.Discovery.Size())) + n47, err := m.Discovery.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n47 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14048,7 +16190,7 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *MasterInfo) Marshal() (data []byte, err error) { +func (m *TaskStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14058,122 +16200,100 @@ func (m *MasterInfo) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *MasterInfo) MarshalTo(data []byte) (n int, err error) { +func (m *TaskStatus) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Id != nil { + if m.TaskId == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") + } else { data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Id))) - i += copy(data[i:], *m.Id) + i = encodeVarintMesos(data, i, uint64(m.TaskId.Size())) + n48, err := m.TaskId.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n48 } - if m.Ip != nil { + if m.State == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") + } else { data[i] = 0x10 i++ - i = encodeVarintMesos(data, i, uint64(*m.Ip)) + i = encodeVarintMesos(data, i, uint64(*m.State)) } - if m.Port != nil { - data[i] = 0x18 + if m.Data != nil { + data[i] = 0x1a i++ - i = encodeVarintMesos(data, i, uint64(*m.Port)) + i = encodeVarintMesos(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) } - if m.Pid != nil { + if m.Message != nil { data[i] = 0x22 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Pid))) - i += copy(data[i:], *m.Pid) + i = encodeVarintMesos(data, i, uint64(len(*m.Message))) + i += copy(data[i:], *m.Message) } - if m.Hostname != nil { + if m.SlaveId != nil { data[i] = 0x2a i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) - i += copy(data[i:], *m.Hostname) - } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *SlaveInfo) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *SlaveInfo) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Hostname != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) - i += copy(data[i:], *m.Hostname) - } - if m.Port != nil { - data[i] = 0x40 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Port)) - } - if len(m.Resources) > 0 { - for _, msg := range m.Resources { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n + i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) + n49, err := m.SlaveId.MarshalTo(data[i:]) + if err != nil { + return 0, err } + i += n49 } - if len(m.Attributes) > 0 { - for _, msg := range m.Attributes { - data[i] = 0x2a - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.Timestamp != nil { + data[i] = 0x31 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.Timestamp))) } - if m.Id != nil { - data[i] = 0x32 + if m.ExecutorId != nil { + data[i] = 0x3a i++ - i = encodeVarintMesos(data, i, uint64(m.Id.Size())) - n10, err := m.Id.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.ExecutorId.Size())) + n50, err := m.ExecutorId.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n10 + i += n50 } - if m.Checkpoint != nil { - data[i] = 0x38 + if m.Healthy != nil { + data[i] = 0x40 i++ - if *m.Checkpoint { + if *m.Healthy { data[i] = 1 } else { data[i] = 0 } i++ } + if m.Source != nil { + data[i] = 0x48 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Source)) + } + if m.Reason != nil { + data[i] = 0x50 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Reason)) + } + if m.Uuid != nil { + data[i] = 0x5a + i++ + i = encodeVarintMesos(data, i, uint64(len(m.Uuid))) + i += copy(data[i:], m.Uuid) + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil } -func (m *Value) Marshal() (data []byte, err error) { +func (m *Filters) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14183,55 +16303,15 @@ func (m *Value) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Value) MarshalTo(data []byte) (n int, err error) { +func (m *Filters) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Type != nil { - data[i] = 0x8 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) - } - if m.Scalar != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n11, err := m.Scalar.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.Ranges != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n12, err := m.Ranges.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if m.Set != nil { - data[i] = 0x22 - i++ - i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n13, err := m.Set.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n13 - } - if m.Text != nil { - data[i] = 0x2a + if m.RefuseSeconds != nil { + data[i] = 0x9 i++ - i = encodeVarintMesos(data, i, uint64(m.Text.Size())) - n14, err := m.Text.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n14 + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.RefuseSeconds))) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14239,7 +16319,7 @@ func (m *Value) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Value_Scalar) Marshal() (data []byte, err error) { +func (m *Environment) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14249,15 +16329,22 @@ func (m *Value_Scalar) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Value_Scalar) MarshalTo(data []byte) (n int, err error) { +func (m *Environment) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Value != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.Value))) + if len(m.Variables) > 0 { + for _, msg := range m.Variables { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14265,7 +16352,7 @@ func (m *Value_Scalar) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Value_Range) Marshal() (data []byte, err error) { +func (m *Environment_Variable) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14275,20 +16362,26 @@ func (m *Value_Range) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Value_Range) MarshalTo(data []byte) (n int, err error) { +func (m *Environment_Variable) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Begin != nil { - data[i] = 0x8 + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { + data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(*m.Begin)) + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - if m.End != nil { - data[i] = 0x10 + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(*m.End)) + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14296,7 +16389,7 @@ func (m *Value_Range) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Value_Ranges) Marshal() (data []byte, err error) { +func (m *Parameter) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14306,22 +16399,26 @@ func (m *Value_Ranges) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Value_Ranges) MarshalTo(data []byte) (n int, err error) { +func (m *Parameter) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Range) > 0 { - for _, msg := range m.Range { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.Key == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") + } else { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Key))) + i += copy(data[i:], *m.Key) + } + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14329,7 +16426,7 @@ func (m *Value_Ranges) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Value_Set) Marshal() (data []byte, err error) { +func (m *Parameters) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14339,24 +16436,21 @@ func (m *Value_Set) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Value_Set) MarshalTo(data []byte) (n int, err error) { +func (m *Parameters) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Item) > 0 { - for _, s := range m.Item { + if len(m.Parameter) > 0 { + for _, msg := range m.Parameter { data[i] = 0xa i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) + i += n } } if m.XXX_unrecognized != nil { @@ -14365,7 +16459,7 @@ func (m *Value_Set) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Value_Text) Marshal() (data []byte, err error) { +func (m *Credential) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14375,16 +16469,24 @@ func (m *Value_Text) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Value_Text) MarshalTo(data []byte) (n int, err error) { +func (m *Credential) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Value != nil { + if m.Principal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") + } else { data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + i = encodeVarintMesos(data, i, uint64(len(*m.Principal))) + i += copy(data[i:], *m.Principal) + } + if m.Secret != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(m.Secret))) + i += copy(data[i:], m.Secret) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14392,7 +16494,7 @@ func (m *Value_Text) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Attribute) Marshal() (data []byte, err error) { +func (m *Credentials) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14402,61 +16504,22 @@ func (m *Attribute) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Attribute) MarshalTo(data []byte) (n int, err error) { +func (m *Credentials) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Name != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) - } - if m.Type != nil { - data[i] = 0x10 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) - } - if m.Scalar != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n15, err := m.Scalar.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n15 - } - if m.Ranges != nil { - data[i] = 0x22 - i++ - i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n16, err := m.Ranges.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.Set != nil { - data[i] = 0x32 - i++ - i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n17, err := m.Set.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if m.Text != nil { - data[i] = 0x2a - i++ - i = encodeVarintMesos(data, i, uint64(m.Text.Size())) - n18, err := m.Text.MarshalTo(data[i:]) - if err != nil { - return 0, err + if len(m.Credentials) > 0 { + for _, msg := range m.Credentials { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } - i += n18 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14464,7 +16527,7 @@ func (m *Attribute) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Resource) Marshal() (data []byte, err error) { +func (m *ACL) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14474,65 +16537,18 @@ func (m *Resource) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Resource) MarshalTo(data []byte) (n int, err error) { +func (m *ACL) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Name != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) - } - if m.Type != nil { - data[i] = 0x10 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) - } - if m.Scalar != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n19, err := m.Scalar.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.Ranges != nil { - data[i] = 0x22 - i++ - i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n20, err := m.Ranges.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if m.Set != nil { - data[i] = 0x2a - i++ - i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n21, err := m.Set.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n21 - } - if m.Role != nil { - data[i] = 0x32 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Role))) - i += copy(data[i:], *m.Role) - } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil } -func (m *ResourceStatistics) Marshal() (data []byte, err error) { +func (m *ACL_Entity) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14542,160 +16558,30 @@ func (m *ResourceStatistics) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *ResourceStatistics) MarshalTo(data []byte) (n int, err error) { +func (m *ACL_Entity) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Timestamp != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.Timestamp))) - } - if m.CpusUserTimeSecs != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.CpusUserTimeSecs))) - } - if m.CpusSystemTimeSecs != nil { - data[i] = 0x19 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.CpusSystemTimeSecs))) - } - if m.CpusLimit != nil { - data[i] = 0x21 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.CpusLimit))) - } - if m.CpusNrPeriods != nil { - data[i] = 0x38 - i++ - i = encodeVarintMesos(data, i, uint64(*m.CpusNrPeriods)) - } - if m.CpusNrThrottled != nil { - data[i] = 0x40 - i++ - i = encodeVarintMesos(data, i, uint64(*m.CpusNrThrottled)) - } - if m.CpusThrottledTimeSecs != nil { - data[i] = 0x49 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.CpusThrottledTimeSecs))) - } - if m.MemRssBytes != nil { - data[i] = 0x28 - i++ - i = encodeVarintMesos(data, i, uint64(*m.MemRssBytes)) - } - if m.MemLimitBytes != nil { - data[i] = 0x30 - i++ - i = encodeVarintMesos(data, i, uint64(*m.MemLimitBytes)) - } - if m.MemFileBytes != nil { - data[i] = 0x50 - i++ - i = encodeVarintMesos(data, i, uint64(*m.MemFileBytes)) - } - if m.MemAnonBytes != nil { - data[i] = 0x58 - i++ - i = encodeVarintMesos(data, i, uint64(*m.MemAnonBytes)) - } - if m.MemMappedFileBytes != nil { - data[i] = 0x60 - i++ - i = encodeVarintMesos(data, i, uint64(*m.MemMappedFileBytes)) - } - if m.Perf != nil { - data[i] = 0x6a - i++ - i = encodeVarintMesos(data, i, uint64(m.Perf.Size())) - n22, err := m.Perf.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n22 - } - if m.NetRxPackets != nil { - data[i] = 0x70 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetRxPackets)) - } - if m.NetRxBytes != nil { - data[i] = 0x78 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetRxBytes)) - } - if m.NetRxErrors != nil { - data[i] = 0x80 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetRxErrors)) - } - if m.NetRxDropped != nil { - data[i] = 0x88 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetRxDropped)) - } - if m.NetTxPackets != nil { - data[i] = 0x90 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetTxPackets)) - } - if m.NetTxBytes != nil { - data[i] = 0x98 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetTxBytes)) - } - if m.NetTxErrors != nil { - data[i] = 0xa0 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetTxErrors)) - } - if m.NetTxDropped != nil { - data[i] = 0xa8 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NetTxDropped)) - } - if m.NetTcpRttMicrosecsP50 != nil { - data[i] = 0xb1 - i++ - data[i] = 0x1 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.NetTcpRttMicrosecsP50))) - } - if m.NetTcpRttMicrosecsP90 != nil { - data[i] = 0xb9 - i++ - data[i] = 0x1 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.NetTcpRttMicrosecsP90))) - } - if m.NetTcpRttMicrosecsP95 != nil { - data[i] = 0xc1 - i++ - data[i] = 0x1 + if m.Type != nil { + data[i] = 0x8 i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.NetTcpRttMicrosecsP95))) + i = encodeVarintMesos(data, i, uint64(*m.Type)) } - if m.NetTcpRttMicrosecsP99 != nil { - data[i] = 0xc9 - i++ - data[i] = 0x1 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.NetTcpRttMicrosecsP99))) + if len(m.Values) > 0 { + for _, s := range m.Values { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14703,7 +16589,7 @@ func (m *ResourceStatistics) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *ResourceUsage) Marshal() (data []byte, err error) { +func (m *ACL_RegisterFramework) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14713,66 +16599,79 @@ func (m *ResourceUsage) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *ResourceUsage) MarshalTo(data []byte) (n int, err error) { +func (m *ACL_RegisterFramework) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.SlaveId != nil { + if m.Principals == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") + } else { data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n23, err := m.SlaveId.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.Principals.Size())) + n51, err := m.Principals.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n23 + i += n51 } - if m.FrameworkId != nil { + if m.Roles == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("roles") + } else { data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) - n24, err := m.FrameworkId.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.Roles.Size())) + n52, err := m.Roles.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n24 + i += n52 } - if m.ExecutorId != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(m.ExecutorId.Size())) - n25, err := m.ExecutorId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n25 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if m.ExecutorName != nil { - data[i] = 0x22 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.ExecutorName))) - i += copy(data[i:], *m.ExecutorName) + return i, nil +} + +func (m *ACL_RunTask) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if m.TaskId != nil { - data[i] = 0x2a + return data[:n], nil +} + +func (m *ACL_RunTask) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Principals == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") + } else { + data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(m.TaskId.Size())) - n26, err := m.TaskId.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.Principals.Size())) + n53, err := m.Principals.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n26 + i += n53 } - if m.Statistics != nil { - data[i] = 0x32 + if m.Users == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("users") + } else { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(m.Statistics.Size())) - n27, err := m.Statistics.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.Users.Size())) + n54, err := m.Users.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n27 + i += n54 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -14780,7 +16679,7 @@ func (m *ResourceUsage) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *PerfStatistics) Marshal() (data []byte, err error) { +func (m *ACL_ShutdownFramework) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -14790,351 +16689,225 @@ func (m *PerfStatistics) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *PerfStatistics) MarshalTo(data []byte) (n int, err error) { +func (m *ACL_ShutdownFramework) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Timestamp != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.Timestamp))) - } - if m.Duration != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.Duration))) - } - if m.Cycles != nil { - data[i] = 0x18 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Cycles)) - } - if m.StalledCyclesFrontend != nil { - data[i] = 0x20 - i++ - i = encodeVarintMesos(data, i, uint64(*m.StalledCyclesFrontend)) - } - if m.StalledCyclesBackend != nil { - data[i] = 0x28 - i++ - i = encodeVarintMesos(data, i, uint64(*m.StalledCyclesBackend)) - } - if m.Instructions != nil { - data[i] = 0x30 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Instructions)) - } - if m.CacheReferences != nil { - data[i] = 0x38 - i++ - i = encodeVarintMesos(data, i, uint64(*m.CacheReferences)) - } - if m.CacheMisses != nil { - data[i] = 0x40 - i++ - i = encodeVarintMesos(data, i, uint64(*m.CacheMisses)) - } - if m.Branches != nil { - data[i] = 0x48 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Branches)) - } - if m.BranchMisses != nil { - data[i] = 0x50 - i++ - i = encodeVarintMesos(data, i, uint64(*m.BranchMisses)) - } - if m.BusCycles != nil { - data[i] = 0x58 - i++ - i = encodeVarintMesos(data, i, uint64(*m.BusCycles)) - } - if m.RefCycles != nil { - data[i] = 0x60 - i++ - i = encodeVarintMesos(data, i, uint64(*m.RefCycles)) - } - if m.CpuClock != nil { - data[i] = 0x69 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.CpuClock))) - } - if m.TaskClock != nil { - data[i] = 0x71 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.TaskClock))) - } - if m.PageFaults != nil { - data[i] = 0x78 - i++ - i = encodeVarintMesos(data, i, uint64(*m.PageFaults)) - } - if m.MinorFaults != nil { - data[i] = 0x80 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.MinorFaults)) - } - if m.MajorFaults != nil { - data[i] = 0x88 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.MajorFaults)) - } - if m.ContextSwitches != nil { - data[i] = 0x90 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.ContextSwitches)) - } - if m.CpuMigrations != nil { - data[i] = 0x98 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.CpuMigrations)) - } - if m.AlignmentFaults != nil { - data[i] = 0xa0 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.AlignmentFaults)) - } - if m.EmulationFaults != nil { - data[i] = 0xa8 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.EmulationFaults)) - } - if m.L1DcacheLoads != nil { - data[i] = 0xb0 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1DcacheLoads)) - } - if m.L1DcacheLoadMisses != nil { - data[i] = 0xb8 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1DcacheLoadMisses)) - } - if m.L1DcacheStores != nil { - data[i] = 0xc0 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1DcacheStores)) - } - if m.L1DcacheStoreMisses != nil { - data[i] = 0xc8 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1DcacheStoreMisses)) - } - if m.L1DcachePrefetches != nil { - data[i] = 0xd0 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1DcachePrefetches)) - } - if m.L1DcachePrefetchMisses != nil { - data[i] = 0xd8 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1DcachePrefetchMisses)) - } - if m.L1IcacheLoads != nil { - data[i] = 0xe0 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1IcacheLoads)) - } - if m.L1IcacheLoadMisses != nil { - data[i] = 0xe8 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1IcacheLoadMisses)) - } - if m.L1IcachePrefetches != nil { - data[i] = 0xf0 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1IcachePrefetches)) - } - if m.L1IcachePrefetchMisses != nil { - data[i] = 0xf8 - i++ - data[i] = 0x1 - i++ - i = encodeVarintMesos(data, i, uint64(*m.L1IcachePrefetchMisses)) - } - if m.LlcLoads != nil { - data[i] = 0x80 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.LlcLoads)) - } - if m.LlcLoadMisses != nil { - data[i] = 0x88 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.LlcLoadMisses)) - } - if m.LlcStores != nil { - data[i] = 0x90 - i++ - data[i] = 0x2 + if m.Principals == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") + } else { + data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(*m.LlcStores)) + i = encodeVarintMesos(data, i, uint64(m.Principals.Size())) + n55, err := m.Principals.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n55 } - if m.LlcStoreMisses != nil { - data[i] = 0x98 - i++ - data[i] = 0x2 + if m.FrameworkPrincipals == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_principals") + } else { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(*m.LlcStoreMisses)) + i = encodeVarintMesos(data, i, uint64(m.FrameworkPrincipals.Size())) + n56, err := m.FrameworkPrincipals.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n56 } - if m.LlcPrefetches != nil { - data[i] = 0xa0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.LlcPrefetches)) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if m.LlcPrefetchMisses != nil { - data[i] = 0xa8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.LlcPrefetchMisses)) + return i, nil +} + +func (m *ACLs) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if m.DtlbLoads != nil { - data[i] = 0xb0 + return data[:n], nil +} + +func (m *ACLs) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Permissive != nil { + data[i] = 0x8 i++ - data[i] = 0x2 + if *m.Permissive { + data[i] = 1 + } else { + data[i] = 0 + } i++ - i = encodeVarintMesos(data, i, uint64(*m.DtlbLoads)) } - if m.DtlbLoadMisses != nil { - data[i] = 0xb8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.DtlbLoadMisses)) + if len(m.RegisterFrameworks) > 0 { + for _, msg := range m.RegisterFrameworks { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.DtlbStores != nil { - data[i] = 0xc0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.DtlbStores)) + if len(m.RunTasks) > 0 { + for _, msg := range m.RunTasks { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.DtlbStoreMisses != nil { - data[i] = 0xc8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.DtlbStoreMisses)) + if len(m.ShutdownFrameworks) > 0 { + for _, msg := range m.ShutdownFrameworks { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.DtlbPrefetches != nil { - data[i] = 0xd0 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.DtlbPrefetches)) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if m.DtlbPrefetchMisses != nil { - data[i] = 0xd8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.DtlbPrefetchMisses)) + return i, nil +} + +func (m *RateLimit) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if m.ItlbLoads != nil { - data[i] = 0xe0 - i++ - data[i] = 0x2 + return data[:n], nil +} + +func (m *RateLimit) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Qps != nil { + data[i] = 0x9 i++ - i = encodeVarintMesos(data, i, uint64(*m.ItlbLoads)) + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.Qps))) } - if m.ItlbLoadMisses != nil { - data[i] = 0xe8 - i++ - data[i] = 0x2 + if m.Principal == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") + } else { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(*m.ItlbLoadMisses)) + i = encodeVarintMesos(data, i, uint64(len(*m.Principal))) + i += copy(data[i:], *m.Principal) } - if m.BranchLoads != nil { - data[i] = 0xf0 - i++ - data[i] = 0x2 + if m.Capacity != nil { + data[i] = 0x18 i++ - i = encodeVarintMesos(data, i, uint64(*m.BranchLoads)) + i = encodeVarintMesos(data, i, uint64(*m.Capacity)) } - if m.BranchLoadMisses != nil { - data[i] = 0xf8 - i++ - data[i] = 0x2 - i++ - i = encodeVarintMesos(data, i, uint64(*m.BranchLoadMisses)) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } - if m.NodeLoads != nil { - data[i] = 0x80 - i++ - data[i] = 0x3 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NodeLoads)) + return i, nil +} + +func (m *RateLimits) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err } - if m.NodeLoadMisses != nil { - data[i] = 0x88 - i++ - data[i] = 0x3 - i++ - i = encodeVarintMesos(data, i, uint64(*m.NodeLoadMisses)) + return data[:n], nil +} + +func (m *RateLimits) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Limits) > 0 { + for _, msg := range m.Limits { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } } - if m.NodeStores != nil { - data[i] = 0x90 - i++ - data[i] = 0x3 + if m.AggregateDefaultQps != nil { + data[i] = 0x11 i++ - i = encodeVarintMesos(data, i, uint64(*m.NodeStores)) + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.AggregateDefaultQps))) } - if m.NodeStoreMisses != nil { - data[i] = 0x98 - i++ - data[i] = 0x3 + if m.AggregateDefaultCapacity != nil { + data[i] = 0x18 i++ - i = encodeVarintMesos(data, i, uint64(*m.NodeStoreMisses)) + i = encodeVarintMesos(data, i, uint64(*m.AggregateDefaultCapacity)) } - if m.NodePrefetches != nil { - data[i] = 0xa0 - i++ - data[i] = 0x3 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Volume) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Volume) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ContainerPath == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_path") + } else { + data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(*m.NodePrefetches)) + i = encodeVarintMesos(data, i, uint64(len(*m.ContainerPath))) + i += copy(data[i:], *m.ContainerPath) } - if m.NodePrefetchMisses != nil { - data[i] = 0xa8 + if m.HostPath != nil { + data[i] = 0x12 i++ - data[i] = 0x3 + i = encodeVarintMesos(data, i, uint64(len(*m.HostPath))) + i += copy(data[i:], *m.HostPath) + } + if m.Mode == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("mode") + } else { + data[i] = 0x18 i++ - i = encodeVarintMesos(data, i, uint64(*m.NodePrefetchMisses)) + i = encodeVarintMesos(data, i, uint64(*m.Mode)) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15142,7 +16915,7 @@ func (m *PerfStatistics) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *Request) Marshal() (data []byte, err error) { +func (m *ContainerInfo) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -15152,23 +16925,20 @@ func (m *Request) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Request) MarshalTo(data []byte) (n int, err error) { +func (m *ContainerInfo) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.SlaveId != nil { - data[i] = 0xa + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + data[i] = 0x8 i++ - i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n28, err := m.SlaveId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n28 + i = encodeVarintMesos(data, i, uint64(*m.Type)) } - if len(m.Resources) > 0 { - for _, msg := range m.Resources { + if len(m.Volumes) > 0 { + for _, msg := range m.Volumes { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(msg.Size())) @@ -15179,13 +16949,29 @@ func (m *Request) MarshalTo(data []byte) (n int, err error) { i += n } } + if m.Docker != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.Docker.Size())) + n57, err := m.Docker.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n57 + } + if m.Hostname != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) + i += copy(data[i:], *m.Hostname) + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil } -func (m *Offer) Marshal() (data []byte, err error) { +func (m *ContainerInfo_DockerInfo) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -15195,50 +16981,27 @@ func (m *Offer) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Offer) MarshalTo(data []byte) (n int, err error) { +func (m *ContainerInfo_DockerInfo) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Id != nil { + if m.Image == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("image") + } else { data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(m.Id.Size())) - n29, err := m.Id.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n29 - } - if m.FrameworkId != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(m.FrameworkId.Size())) - n30, err := m.FrameworkId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n30 - } - if m.SlaveId != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n31, err := m.SlaveId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n31 + i = encodeVarintMesos(data, i, uint64(len(*m.Image))) + i += copy(data[i:], *m.Image) } - if m.Hostname != nil { - data[i] = 0x22 + if m.Network != nil { + data[i] = 0x10 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) - i += copy(data[i:], *m.Hostname) + i = encodeVarintMesos(data, i, uint64(*m.Network)) } - if len(m.Resources) > 0 { - for _, msg := range m.Resources { - data[i] = 0x2a + if len(m.PortMappings) > 0 { + for _, msg := range m.PortMappings { + data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(msg.Size())) n, err := msg.MarshalTo(data[i:]) @@ -15248,21 +17011,19 @@ func (m *Offer) MarshalTo(data []byte) (n int, err error) { i += n } } - if len(m.Attributes) > 0 { - for _, msg := range m.Attributes { - data[i] = 0x3a - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n + if m.Privileged != nil { + data[i] = 0x20 + i++ + if *m.Privileged { + data[i] = 1 + } else { + data[i] = 0 } + i++ } - if len(m.ExecutorIds) > 0 { - for _, msg := range m.ExecutorIds { - data[i] = 0x32 + if len(m.Parameters) > 0 { + for _, msg := range m.Parameters { + data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(msg.Size())) n, err := msg.MarshalTo(data[i:]) @@ -15272,13 +17033,23 @@ func (m *Offer) MarshalTo(data []byte) (n int, err error) { i += n } } + if m.ForcePullImage != nil { + data[i] = 0x30 + i++ + if *m.ForcePullImage { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil } -func (m *TaskInfo) Marshal() (data []byte, err error) { +func (m *ContainerInfo_DockerInfo_PortMapping) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -15288,40 +17059,55 @@ func (m *TaskInfo) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *TaskInfo) MarshalTo(data []byte) (n int, err error) { +func (m *ContainerInfo_DockerInfo_PortMapping) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Name != nil { - data[i] = 0xa + if m.HostPort == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("host_port") + } else { + data[i] = 0x8 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) + i = encodeVarintMesos(data, i, uint64(*m.HostPort)) } - if m.TaskId != nil { - data[i] = 0x12 + if m.ContainerPort == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_port") + } else { + data[i] = 0x10 i++ - i = encodeVarintMesos(data, i, uint64(m.TaskId.Size())) - n32, err := m.TaskId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n32 + i = encodeVarintMesos(data, i, uint64(*m.ContainerPort)) } - if m.SlaveId != nil { + if m.Protocol != nil { data[i] = 0x1a i++ - i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n33, err := m.SlaveId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n33 + i = encodeVarintMesos(data, i, uint64(len(*m.Protocol))) + i += copy(data[i:], *m.Protocol) } - if len(m.Resources) > 0 { - for _, msg := range m.Resources { - data[i] = 0x22 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Labels) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Labels) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Labels) > 0 { + for _, msg := range m.Labels { + data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(msg.Size())) n, err := msg.MarshalTo(data[i:]) @@ -15331,51 +17117,113 @@ func (m *TaskInfo) MarshalTo(data []byte) (n int, err error) { i += n } } - if m.Executor != nil { - data[i] = 0x2a + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Label) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Label) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Key == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") + } else { + data[i] = 0xa i++ - i = encodeVarintMesos(data, i, uint64(m.Executor.Size())) - n34, err := m.Executor.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n34 + i = encodeVarintMesos(data, i, uint64(len(*m.Key))) + i += copy(data[i:], *m.Key) } - if m.Command != nil { - data[i] = 0x3a + if m.Value != nil { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n35, err := m.Command.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n35 + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) } - if m.Container != nil { - data[i] = 0x4a + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Port) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Port) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Number == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("number") + } else { + data[i] = 0x8 i++ - i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n36, err := m.Container.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n36 + i = encodeVarintMesos(data, i, uint64(*m.Number)) } - if m.Data != nil { - data[i] = 0x32 + if m.Name != nil { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - if m.HealthCheck != nil { - data[i] = 0x42 + if m.Protocol != nil { + data[i] = 0x1a i++ - i = encodeVarintMesos(data, i, uint64(m.HealthCheck.Size())) - n37, err := m.HealthCheck.MarshalTo(data[i:]) - if err != nil { - return 0, err + i = encodeVarintMesos(data, i, uint64(len(*m.Protocol))) + i += copy(data[i:], *m.Protocol) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Ports) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Ports) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ports) > 0 { + for _, msg := range m.Ports { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n } - i += n37 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) @@ -15383,7 +17231,7 @@ func (m *TaskInfo) MarshalTo(data []byte) (n int, err error) { return i, nil } -func (m *TaskStatus) Marshal() (data []byte, err error) { +func (m *DiscoveryInfo) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) @@ -15393,7515 +17241,14929 @@ func (m *TaskStatus) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *TaskStatus) MarshalTo(data []byte) (n int, err error) { +func (m *DiscoveryInfo) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.TaskId != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(m.TaskId.Size())) - n38, err := m.TaskId.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n38 - } - if m.State != nil { - data[i] = 0x10 + if m.Visibility == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("visibility") + } else { + data[i] = 0x8 i++ - i = encodeVarintMesos(data, i, uint64(*m.State)) + i = encodeVarintMesos(data, i, uint64(*m.Visibility)) } - if m.Message != nil { - data[i] = 0x22 + if m.Name != nil { + data[i] = 0x12 i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Message))) - i += copy(data[i:], *m.Message) + i = encodeVarintMesos(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) } - if m.Source != nil { - data[i] = 0x48 + if m.Environment != nil { + data[i] = 0x1a i++ - i = encodeVarintMesos(data, i, uint64(*m.Source)) + i = encodeVarintMesos(data, i, uint64(len(*m.Environment))) + i += copy(data[i:], *m.Environment) } - if m.Reason != nil { - data[i] = 0x50 + if m.Location != nil { + data[i] = 0x22 i++ - i = encodeVarintMesos(data, i, uint64(*m.Reason)) + i = encodeVarintMesos(data, i, uint64(len(*m.Location))) + i += copy(data[i:], *m.Location) } - if m.Data != nil { - data[i] = 0x1a + if m.Version != nil { + data[i] = 0x2a i++ - i = encodeVarintMesos(data, i, uint64(len(m.Data))) - i += copy(data[i:], m.Data) + i = encodeVarintMesos(data, i, uint64(len(*m.Version))) + i += copy(data[i:], *m.Version) } - if m.SlaveId != nil { - data[i] = 0x2a + if m.Ports != nil { + data[i] = 0x32 i++ - i = encodeVarintMesos(data, i, uint64(m.SlaveId.Size())) - n39, err := m.SlaveId.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.Ports.Size())) + n58, err := m.Ports.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n39 + i += n58 } - if m.ExecutorId != nil { + if m.Labels != nil { data[i] = 0x3a i++ - i = encodeVarintMesos(data, i, uint64(m.ExecutorId.Size())) - n40, err := m.ExecutorId.MarshalTo(data[i:]) + i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) + n59, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n40 + i += n59 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Mesos(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Mesos(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintMesos(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func NewPopulatedFrameworkID(r randyMesos, easy bool) *FrameworkID { + this := &FrameworkID{} + v1 := randStringMesos(r) + this.Value = &v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedOfferID(r randyMesos, easy bool) *OfferID { + this := &OfferID{} + v2 := randStringMesos(r) + this.Value = &v2 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedSlaveID(r randyMesos, easy bool) *SlaveID { + this := &SlaveID{} + v3 := randStringMesos(r) + this.Value = &v3 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedTaskID(r randyMesos, easy bool) *TaskID { + this := &TaskID{} + v4 := randStringMesos(r) + this.Value = &v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedExecutorID(r randyMesos, easy bool) *ExecutorID { + this := &ExecutorID{} + v5 := randStringMesos(r) + this.Value = &v5 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedContainerID(r randyMesos, easy bool) *ContainerID { + this := &ContainerID{} + v6 := randStringMesos(r) + this.Value = &v6 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedFrameworkInfo(r randyMesos, easy bool) *FrameworkInfo { + this := &FrameworkInfo{} + v7 := randStringMesos(r) + this.User = &v7 + v8 := randStringMesos(r) + this.Name = &v8 + if r.Intn(10) != 0 { + this.Id = NewPopulatedFrameworkID(r, easy) + } + if r.Intn(10) != 0 { + v9 := float64(r.Float64()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.FailoverTimeout = &v9 + } + if r.Intn(10) != 0 { + v10 := bool(bool(r.Intn(2) == 0)) + this.Checkpoint = &v10 + } + if r.Intn(10) != 0 { + v11 := randStringMesos(r) + this.Role = &v11 + } + if r.Intn(10) != 0 { + v12 := randStringMesos(r) + this.Hostname = &v12 + } + if r.Intn(10) != 0 { + v13 := randStringMesos(r) + this.Principal = &v13 + } + if r.Intn(10) != 0 { + v14 := randStringMesos(r) + this.WebuiUrl = &v14 + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Capabilities = make([]*FrameworkInfo_Capability, v15) + for i := 0; i < v15; i++ { + this.Capabilities[i] = NewPopulatedFrameworkInfo_Capability(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 11) + } + return this +} + +func NewPopulatedFrameworkInfo_Capability(r randyMesos, easy bool) *FrameworkInfo_Capability { + this := &FrameworkInfo_Capability{} + v16 := FrameworkInfo_Capability_Type([]int32{1}[r.Intn(1)]) + this.Type = &v16 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedHealthCheck(r randyMesos, easy bool) *HealthCheck { + this := &HealthCheck{} + if r.Intn(10) != 0 { + this.Http = NewPopulatedHealthCheck_HTTP(r, easy) + } + if r.Intn(10) != 0 { + v17 := float64(r.Float64()) + if r.Intn(2) == 0 { + v17 *= -1 + } + this.DelaySeconds = &v17 + } + if r.Intn(10) != 0 { + v18 := float64(r.Float64()) + if r.Intn(2) == 0 { + v18 *= -1 + } + this.IntervalSeconds = &v18 + } + if r.Intn(10) != 0 { + v19 := float64(r.Float64()) + if r.Intn(2) == 0 { + v19 *= -1 + } + this.TimeoutSeconds = &v19 + } + if r.Intn(10) != 0 { + v20 := uint32(r.Uint32()) + this.ConsecutiveFailures = &v20 + } + if r.Intn(10) != 0 { + v21 := float64(r.Float64()) + if r.Intn(2) == 0 { + v21 *= -1 + } + this.GracePeriodSeconds = &v21 + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCommandInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 8) + } + return this +} + +func NewPopulatedHealthCheck_HTTP(r randyMesos, easy bool) *HealthCheck_HTTP { + this := &HealthCheck_HTTP{} + v22 := uint32(r.Uint32()) + this.Port = &v22 + if r.Intn(10) != 0 { + v23 := randStringMesos(r) + this.Path = &v23 + } + if r.Intn(10) != 0 { + v24 := r.Intn(100) + this.Statuses = make([]uint32, v24) + for i := 0; i < v24; i++ { + this.Statuses[i] = uint32(r.Uint32()) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 5) + } + return this +} + +func NewPopulatedCommandInfo(r randyMesos, easy bool) *CommandInfo { + this := &CommandInfo{} + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Uris = make([]*CommandInfo_URI, v25) + for i := 0; i < v25; i++ { + this.Uris[i] = NewPopulatedCommandInfo_URI(r, easy) + } + } + if r.Intn(10) != 0 { + this.Environment = NewPopulatedEnvironment(r, easy) } - if m.Timestamp != nil { - data[i] = 0x31 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.Timestamp))) + if r.Intn(10) != 0 { + v26 := randStringMesos(r) + this.Value = &v26 } - if m.Healthy != nil { - data[i] = 0x40 - i++ - if *m.Healthy { - data[i] = 1 - } else { - data[i] = 0 + if r.Intn(10) != 0 { + this.Container = NewPopulatedCommandInfo_ContainerInfo(r, easy) + } + if r.Intn(10) != 0 { + v27 := randStringMesos(r) + this.User = &v27 + } + if r.Intn(10) != 0 { + v28 := bool(bool(r.Intn(2) == 0)) + this.Shell = &v28 + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Arguments = make([]string, v29) + for i := 0; i < v29; i++ { + this.Arguments[i] = randStringMesos(r) } - i++ } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 8) } - return i, nil + return this } -func (m *Filters) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedCommandInfo_URI(r randyMesos, easy bool) *CommandInfo_URI { + this := &CommandInfo_URI{} + v30 := randStringMesos(r) + this.Value = &v30 + if r.Intn(10) != 0 { + v31 := bool(bool(r.Intn(2) == 0)) + this.Executable = &v31 } - return data[:n], nil -} - -func (m *Filters) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.RefuseSeconds != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.RefuseSeconds))) + if r.Intn(10) != 0 { + v32 := bool(bool(r.Intn(2) == 0)) + this.Extract = &v32 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v33 := bool(bool(r.Intn(2) == 0)) + this.Cache = &v33 } - return i, nil -} - -func (m *Environment) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 5) } - return data[:n], nil + return this } -func (m *Environment) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if len(m.Variables) > 0 { - for _, msg := range m.Variables { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n +func NewPopulatedCommandInfo_ContainerInfo(r randyMesos, easy bool) *CommandInfo_ContainerInfo { + this := &CommandInfo_ContainerInfo{} + v34 := randStringMesos(r) + this.Image = &v34 + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Options = make([]string, v35) + for i := 0; i < v35; i++ { + this.Options[i] = randStringMesos(r) } } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - return i, nil + return this } -func (m *Environment_Variable) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { + this := &ExecutorInfo{} + this.ExecutorId = NewPopulatedExecutorID(r, easy) + if r.Intn(10) != 0 { + v36 := r.Intn(100) + this.Data = make([]byte, v36) + for i := 0; i < v36; i++ { + this.Data[i] = byte(r.Intn(256)) + } } - return data[:n], nil -} - -func (m *Environment_Variable) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Name != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Resources = make([]*Resource, v37) + for i := 0; i < v37; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) + } } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + this.Command = NewPopulatedCommandInfo(r, easy) + if r.Intn(10) != 0 { + this.FrameworkId = NewPopulatedFrameworkID(r, easy) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v38 := randStringMesos(r) + this.Name = &v38 } - return i, nil -} - -func (m *Parameter) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + v39 := randStringMesos(r) + this.Source = &v39 } - return data[:n], nil -} - -func (m *Parameter) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Key != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Key))) - i += copy(data[i:], *m.Key) + if r.Intn(10) != 0 { + this.Container = NewPopulatedContainerInfo(r, easy) } - if m.Value != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Value))) - i += copy(data[i:], *m.Value) + if r.Intn(10) != 0 { + this.Discovery = NewPopulatedDiscoveryInfo(r, easy) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 13) } - return i, nil + return this } -func (m *Parameters) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedMasterInfo(r randyMesos, easy bool) *MasterInfo { + this := &MasterInfo{} + v40 := randStringMesos(r) + this.Id = &v40 + v41 := uint32(r.Uint32()) + this.Ip = &v41 + v42 := uint32(r.Uint32()) + this.Port = &v42 + if r.Intn(10) != 0 { + v43 := randStringMesos(r) + this.Pid = &v43 } - return data[:n], nil + if r.Intn(10) != 0 { + v44 := randStringMesos(r) + this.Hostname = &v44 + } + if r.Intn(10) != 0 { + v45 := randStringMesos(r) + this.Version = &v45 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 7) + } + return this } -func (m *Parameters) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if len(m.Parameter) > 0 { - for _, msg := range m.Parameter { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n +func NewPopulatedSlaveInfo(r randyMesos, easy bool) *SlaveInfo { + this := &SlaveInfo{} + v46 := randStringMesos(r) + this.Hostname = &v46 + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Resources = make([]*Resource, v47) + for i := 0; i < v47; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) } } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Attributes = make([]*Attribute, v48) + for i := 0; i < v48; i++ { + this.Attributes[i] = NewPopulatedAttribute(r, easy) + } } - return i, nil -} - -func (m *Credential) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + this.Id = NewPopulatedSlaveID(r, easy) } - return data[:n], nil + if r.Intn(10) != 0 { + v49 := bool(bool(r.Intn(2) == 0)) + this.Checkpoint = &v49 + } + if r.Intn(10) != 0 { + v50 := int32(r.Int31()) + if r.Intn(2) == 0 { + v50 *= -1 + } + this.Port = &v50 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 9) + } + return this } -func (m *Credential) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Principal != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Principal))) - i += copy(data[i:], *m.Principal) +func NewPopulatedValue(r randyMesos, easy bool) *Value { + this := &Value{} + v51 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v51 + if r.Intn(10) != 0 { + this.Scalar = NewPopulatedValue_Scalar(r, easy) } - if m.Secret != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(m.Secret))) - i += copy(data[i:], m.Secret) + if r.Intn(10) != 0 { + this.Ranges = NewPopulatedValue_Ranges(r, easy) + } + if r.Intn(10) != 0 { + this.Set = NewPopulatedValue_Set(r, easy) + } + if r.Intn(10) != 0 { + this.Text = NewPopulatedValue_Text(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 6) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + return this +} + +func NewPopulatedValue_Scalar(r randyMesos, easy bool) *Value_Scalar { + this := &Value_Scalar{} + v52 := float64(r.Float64()) + if r.Intn(2) == 0 { + v52 *= -1 } - return i, nil + this.Value = &v52 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this } -func (m *Credentials) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedValue_Range(r randyMesos, easy bool) *Value_Range { + this := &Value_Range{} + v53 := uint64(uint64(r.Uint32())) + this.Begin = &v53 + v54 := uint64(uint64(r.Uint32())) + this.End = &v54 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - return data[:n], nil + return this } -func (m *Credentials) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if len(m.Credentials) > 0 { - for _, msg := range m.Credentials { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n +func NewPopulatedValue_Ranges(r randyMesos, easy bool) *Value_Ranges { + this := &Value_Ranges{} + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Range = make([]*Value_Range, v55) + for i := 0; i < v55; i++ { + this.Range[i] = NewPopulatedValue_Range(r, easy) } } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return i, nil + return this } -func (m *ACL) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedValue_Set(r randyMesos, easy bool) *Value_Set { + this := &Value_Set{} + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Item = make([]string, v56) + for i := 0; i < v56; i++ { + this.Item[i] = randStringMesos(r) + } } - return data[:n], nil -} - -func (m *ACL) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return i, nil + return this } -func (m *ACL_Entity) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedValue_Text(r randyMesos, easy bool) *Value_Text { + this := &Value_Text{} + v57 := randStringMesos(r) + this.Value = &v57 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return data[:n], nil + return this } -func (m *ACL_Entity) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Type != nil { - data[i] = 0x8 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) +func NewPopulatedAttribute(r randyMesos, easy bool) *Attribute { + this := &Attribute{} + v58 := randStringMesos(r) + this.Name = &v58 + v59 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v59 + if r.Intn(10) != 0 { + this.Scalar = NewPopulatedValue_Scalar(r, easy) } - if len(m.Values) > 0 { - for _, s := range m.Values { - data[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } + if r.Intn(10) != 0 { + this.Ranges = NewPopulatedValue_Ranges(r, easy) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + this.Text = NewPopulatedValue_Text(r, easy) } - return i, nil -} - -func (m *ACL_RegisterFramework) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + this.Set = NewPopulatedValue_Set(r, easy) } - return data[:n], nil + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 7) + } + return this } -func (m *ACL_RegisterFramework) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Principals != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(m.Principals.Size())) - n41, err := m.Principals.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 +func NewPopulatedResource(r randyMesos, easy bool) *Resource { + this := &Resource{} + v60 := randStringMesos(r) + this.Name = &v60 + v61 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v61 + if r.Intn(10) != 0 { + this.Scalar = NewPopulatedValue_Scalar(r, easy) } - if m.Roles != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(m.Roles.Size())) - n42, err := m.Roles.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n42 + if r.Intn(10) != 0 { + this.Ranges = NewPopulatedValue_Ranges(r, easy) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + this.Set = NewPopulatedValue_Set(r, easy) } - return i, nil + if r.Intn(10) != 0 { + v62 := randStringMesos(r) + this.Role = &v62 + } + if r.Intn(10) != 0 { + this.Disk = NewPopulatedResource_DiskInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Reservation = NewPopulatedResource_ReservationInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Revocable = NewPopulatedResource_RevocableInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 10) + } + return this } -func (m *ACL_RunTask) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedResource_ReservationInfo(r randyMesos, easy bool) *Resource_ReservationInfo { + this := &Resource_ReservationInfo{} + v63 := randStringMesos(r) + this.Principal = &v63 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return data[:n], nil + return this } -func (m *ACL_RunTask) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Principals != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(m.Principals.Size())) - n43, err := m.Principals.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n43 +func NewPopulatedResource_DiskInfo(r randyMesos, easy bool) *Resource_DiskInfo { + this := &Resource_DiskInfo{} + if r.Intn(10) != 0 { + this.Persistence = NewPopulatedResource_DiskInfo_Persistence(r, easy) } - if m.Users != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(m.Users.Size())) - n44, err := m.Users.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n44 + if r.Intn(10) != 0 { + this.Volume = NewPopulatedVolume(r, easy) } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - return i, nil + return this } -func (m *ACL_ShutdownFramework) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedResource_DiskInfo_Persistence(r randyMesos, easy bool) *Resource_DiskInfo_Persistence { + this := &Resource_DiskInfo_Persistence{} + v64 := randStringMesos(r) + this.Id = &v64 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return data[:n], nil + return this } -func (m *ACL_ShutdownFramework) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Principals != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(m.Principals.Size())) - n45, err := m.Principals.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n45 +func NewPopulatedResource_RevocableInfo(r randyMesos, easy bool) *Resource_RevocableInfo { + this := &Resource_RevocableInfo{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 1) + } + return this +} + +func NewPopulatedTrafficControlStatistics(r randyMesos, easy bool) *TrafficControlStatistics { + this := &TrafficControlStatistics{} + v65 := randStringMesos(r) + this.Id = &v65 + if r.Intn(10) != 0 { + v66 := uint64(uint64(r.Uint32())) + this.Backlog = &v66 + } + if r.Intn(10) != 0 { + v67 := uint64(uint64(r.Uint32())) + this.Bytes = &v67 + } + if r.Intn(10) != 0 { + v68 := uint64(uint64(r.Uint32())) + this.Drops = &v68 + } + if r.Intn(10) != 0 { + v69 := uint64(uint64(r.Uint32())) + this.Overlimits = &v69 + } + if r.Intn(10) != 0 { + v70 := uint64(uint64(r.Uint32())) + this.Packets = &v70 + } + if r.Intn(10) != 0 { + v71 := uint64(uint64(r.Uint32())) + this.Qlen = &v71 + } + if r.Intn(10) != 0 { + v72 := uint64(uint64(r.Uint32())) + this.Ratebps = &v72 } - if m.FrameworkPrincipals != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(m.FrameworkPrincipals.Size())) - n46, err := m.FrameworkPrincipals.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n46 + if r.Intn(10) != 0 { + v73 := uint64(uint64(r.Uint32())) + this.Ratepps = &v73 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v74 := uint64(uint64(r.Uint32())) + this.Requeues = &v74 } - return i, nil -} - -func (m *ACLs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 11) } - return data[:n], nil + return this } -func (m *ACLs) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Permissive != nil { - data[i] = 0x8 - i++ - if *m.Permissive { - data[i] = 1 - } else { - data[i] = 0 +func NewPopulatedResourceStatistics(r randyMesos, easy bool) *ResourceStatistics { + this := &ResourceStatistics{} + v75 := float64(r.Float64()) + if r.Intn(2) == 0 { + v75 *= -1 + } + this.Timestamp = &v75 + if r.Intn(10) != 0 { + v76 := float64(r.Float64()) + if r.Intn(2) == 0 { + v76 *= -1 } - i++ + this.CpusUserTimeSecs = &v76 } - if len(m.RegisterFrameworks) > 0 { - for _, msg := range m.RegisterFrameworks { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n + if r.Intn(10) != 0 { + v77 := float64(r.Float64()) + if r.Intn(2) == 0 { + v77 *= -1 } + this.CpusSystemTimeSecs = &v77 } - if len(m.RunTasks) > 0 { - for _, msg := range m.RunTasks { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n + if r.Intn(10) != 0 { + v78 := float64(r.Float64()) + if r.Intn(2) == 0 { + v78 *= -1 } + this.CpusLimit = &v78 } - if len(m.ShutdownFrameworks) > 0 { - for _, msg := range m.ShutdownFrameworks { - data[i] = 0x22 - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n + if r.Intn(10) != 0 { + v79 := uint64(uint64(r.Uint32())) + this.MemRssBytes = &v79 + } + if r.Intn(10) != 0 { + v80 := uint64(uint64(r.Uint32())) + this.MemLimitBytes = &v80 + } + if r.Intn(10) != 0 { + v81 := uint32(r.Uint32()) + this.CpusNrPeriods = &v81 + } + if r.Intn(10) != 0 { + v82 := uint32(r.Uint32()) + this.CpusNrThrottled = &v82 + } + if r.Intn(10) != 0 { + v83 := float64(r.Float64()) + if r.Intn(2) == 0 { + v83 *= -1 } + this.CpusThrottledTimeSecs = &v83 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v84 := uint64(uint64(r.Uint32())) + this.MemFileBytes = &v84 } - return i, nil -} - -func (m *RateLimit) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + v85 := uint64(uint64(r.Uint32())) + this.MemAnonBytes = &v85 } - return data[:n], nil -} - -func (m *RateLimit) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Qps != nil { - data[i] = 0x9 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.Qps))) + if r.Intn(10) != 0 { + v86 := uint64(uint64(r.Uint32())) + this.MemMappedFileBytes = &v86 } - if m.Principal != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Principal))) - i += copy(data[i:], *m.Principal) + if r.Intn(10) != 0 { + this.Perf = NewPopulatedPerfStatistics(r, easy) } - if m.Capacity != nil { - data[i] = 0x18 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Capacity)) + if r.Intn(10) != 0 { + v87 := uint64(uint64(r.Uint32())) + this.NetRxPackets = &v87 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v88 := uint64(uint64(r.Uint32())) + this.NetRxBytes = &v88 } - return i, nil -} - -func (m *RateLimits) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + v89 := uint64(uint64(r.Uint32())) + this.NetRxErrors = &v89 } - return data[:n], nil -} - -func (m *RateLimits) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if len(m.Limits) > 0 { - for _, msg := range m.Limits { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } + if r.Intn(10) != 0 { + v90 := uint64(uint64(r.Uint32())) + this.NetRxDropped = &v90 } - if m.AggregateDefaultQps != nil { - data[i] = 0x11 - i++ - i = encodeFixed64Mesos(data, i, uint64(math2.Float64bits(*m.AggregateDefaultQps))) + if r.Intn(10) != 0 { + v91 := uint64(uint64(r.Uint32())) + this.NetTxPackets = &v91 } - if m.AggregateDefaultCapacity != nil { - data[i] = 0x18 - i++ - i = encodeVarintMesos(data, i, uint64(*m.AggregateDefaultCapacity)) + if r.Intn(10) != 0 { + v92 := uint64(uint64(r.Uint32())) + this.NetTxBytes = &v92 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v93 := uint64(uint64(r.Uint32())) + this.NetTxErrors = &v93 } - return i, nil -} - -func (m *Volume) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + v94 := uint64(uint64(r.Uint32())) + this.NetTxDropped = &v94 } - return data[:n], nil -} - -func (m *Volume) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.ContainerPath != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.ContainerPath))) - i += copy(data[i:], *m.ContainerPath) + if r.Intn(10) != 0 { + v95 := float64(r.Float64()) + if r.Intn(2) == 0 { + v95 *= -1 + } + this.NetTcpRttMicrosecsP50 = &v95 } - if m.HostPath != nil { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.HostPath))) - i += copy(data[i:], *m.HostPath) + if r.Intn(10) != 0 { + v96 := float64(r.Float64()) + if r.Intn(2) == 0 { + v96 *= -1 + } + this.NetTcpRttMicrosecsP90 = &v96 } - if m.Mode != nil { - data[i] = 0x18 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Mode)) + if r.Intn(10) != 0 { + v97 := float64(r.Float64()) + if r.Intn(2) == 0 { + v97 *= -1 + } + this.NetTcpRttMicrosecsP95 = &v97 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v98 := float64(r.Float64()) + if r.Intn(2) == 0 { + v98 *= -1 + } + this.NetTcpRttMicrosecsP99 = &v98 } - return i, nil -} - -func (m *ContainerInfo) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + v99 := uint64(uint64(r.Uint32())) + this.DiskLimitBytes = &v99 } - return data[:n], nil -} - -func (m *ContainerInfo) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Type != nil { - data[i] = 0x8 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) + if r.Intn(10) != 0 { + v100 := uint64(uint64(r.Uint32())) + this.DiskUsedBytes = &v100 } - if len(m.Volumes) > 0 { - for _, msg := range m.Volumes { - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n + if r.Intn(10) != 0 { + v101 := float64(r.Float64()) + if r.Intn(2) == 0 { + v101 *= -1 } + this.NetTcpActiveConnections = &v101 + } + if r.Intn(10) != 0 { + v102 := float64(r.Float64()) + if r.Intn(2) == 0 { + v102 *= -1 + } + this.NetTcpTimeWaitConnections = &v102 + } + if r.Intn(10) != 0 { + v103 := uint32(r.Uint32()) + this.Processes = &v103 + } + if r.Intn(10) != 0 { + v104 := uint32(r.Uint32()) + this.Threads = &v104 } - if m.Hostname != nil { - data[i] = 0x22 - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Hostname))) - i += copy(data[i:], *m.Hostname) + if r.Intn(10) != 0 { + v105 := uint64(uint64(r.Uint32())) + this.MemLowPressureCounter = &v105 } - if m.Docker != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(m.Docker.Size())) - n47, err := m.Docker.MarshalTo(data[i:]) - if err != nil { - return 0, err + if r.Intn(10) != 0 { + v106 := uint64(uint64(r.Uint32())) + this.MemMediumPressureCounter = &v106 + } + if r.Intn(10) != 0 { + v107 := uint64(uint64(r.Uint32())) + this.MemCriticalPressureCounter = &v107 + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.NetTrafficControlStatistics = make([]*TrafficControlStatistics, v108) + for i := 0; i < v108; i++ { + this.NetTrafficControlStatistics[i] = NewPopulatedTrafficControlStatistics(r, easy) } - i += n47 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v109 := uint64(uint64(r.Uint32())) + this.MemTotalBytes = &v109 } - return i, nil -} - -func (m *ContainerInfo_DockerInfo) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err + if r.Intn(10) != 0 { + v110 := uint64(uint64(r.Uint32())) + this.MemTotalMemswBytes = &v110 } - return data[:n], nil -} - -func (m *ContainerInfo_DockerInfo) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Image != nil { - data[i] = 0xa - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Image))) - i += copy(data[i:], *m.Image) + if r.Intn(10) != 0 { + v111 := uint64(uint64(r.Uint32())) + this.MemSoftLimitBytes = &v111 } - if m.Network != nil { - data[i] = 0x10 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Network)) + if r.Intn(10) != 0 { + v112 := uint64(uint64(r.Uint32())) + this.MemCacheBytes = &v112 } - if len(m.PortMappings) > 0 { - for _, msg := range m.PortMappings { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } + if r.Intn(10) != 0 { + v113 := uint64(uint64(r.Uint32())) + this.MemSwapBytes = &v113 } - if m.Privileged != nil { - data[i] = 0x20 - i++ - if *m.Privileged { - data[i] = 1 - } else { - data[i] = 0 - } - i++ + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 41) } - if len(m.Parameters) > 0 { - for _, msg := range m.Parameters { - data[i] = 0x2a - i++ - i = encodeVarintMesos(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n + return this +} + +func NewPopulatedResourceUsage(r randyMesos, easy bool) *ResourceUsage { + this := &ResourceUsage{} + if r.Intn(10) != 0 { + v114 := r.Intn(10) + this.Executors = make([]*ResourceUsage_Executor, v114) + for i := 0; i < v114; i++ { + this.Executors[i] = NewPopulatedResourceUsage_Executor(r, easy) } } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return i, nil + return this } -func (m *ContainerInfo_DockerInfo_PortMapping) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func NewPopulatedResourceUsage_Executor(r randyMesos, easy bool) *ResourceUsage_Executor { + this := &ResourceUsage_Executor{} + this.ExecutorInfo = NewPopulatedExecutorInfo(r, easy) + if r.Intn(10) != 0 { + v115 := r.Intn(10) + this.Allocated = make([]*Resource, v115) + for i := 0; i < v115; i++ { + this.Allocated[i] = NewPopulatedResource(r, easy) + } } - return data[:n], nil + if r.Intn(10) != 0 { + this.Statistics = NewPopulatedResourceStatistics(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + } + return this } -func (m *ContainerInfo_DockerInfo_PortMapping) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.HostPort != nil { - data[i] = 0x8 - i++ - i = encodeVarintMesos(data, i, uint64(*m.HostPort)) +func NewPopulatedPerfStatistics(r randyMesos, easy bool) *PerfStatistics { + this := &PerfStatistics{} + v116 := float64(r.Float64()) + if r.Intn(2) == 0 { + v116 *= -1 } - if m.ContainerPort != nil { - data[i] = 0x10 - i++ - i = encodeVarintMesos(data, i, uint64(*m.ContainerPort)) + this.Timestamp = &v116 + v117 := float64(r.Float64()) + if r.Intn(2) == 0 { + v117 *= -1 } - if m.Protocol != nil { - data[i] = 0x1a - i++ - i = encodeVarintMesos(data, i, uint64(len(*m.Protocol))) - i += copy(data[i:], *m.Protocol) + this.Duration = &v117 + if r.Intn(10) != 0 { + v118 := uint64(uint64(r.Uint32())) + this.Cycles = &v118 } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if r.Intn(10) != 0 { + v119 := uint64(uint64(r.Uint32())) + this.StalledCyclesFrontend = &v119 } - return i, nil -} - -func encodeFixed64Mesos(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mesos(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMesos(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ + if r.Intn(10) != 0 { + v120 := uint64(uint64(r.Uint32())) + this.StalledCyclesBackend = &v120 } - data[offset] = uint8(v) - return offset + 1 -} -func (this *FrameworkID) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v121 := uint64(uint64(r.Uint32())) + this.Instructions = &v121 } - s := strings1.Join([]string{`&mesosproto.FrameworkID{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *OfferID) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v122 := uint64(uint64(r.Uint32())) + this.CacheReferences = &v122 } - s := strings1.Join([]string{`&mesosproto.OfferID{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *SlaveID) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v123 := uint64(uint64(r.Uint32())) + this.CacheMisses = &v123 } - s := strings1.Join([]string{`&mesosproto.SlaveID{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *TaskID) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v124 := uint64(uint64(r.Uint32())) + this.Branches = &v124 } - s := strings1.Join([]string{`&mesosproto.TaskID{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ExecutorID) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v125 := uint64(uint64(r.Uint32())) + this.BranchMisses = &v125 } - s := strings1.Join([]string{`&mesosproto.ExecutorID{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ContainerID) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v126 := uint64(uint64(r.Uint32())) + this.BusCycles = &v126 } - s := strings1.Join([]string{`&mesosproto.ContainerID{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *FrameworkInfo) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v127 := uint64(uint64(r.Uint32())) + this.RefCycles = &v127 } - s := strings1.Join([]string{`&mesosproto.FrameworkInfo{` + - `User:` + valueToGoStringMesos(this.User, "string"), - `Name:` + valueToGoStringMesos(this.Name, "string"), - `Id:` + fmt2.Sprintf("%#v", this.Id), - `FailoverTimeout:` + valueToGoStringMesos(this.FailoverTimeout, "float64"), - `Checkpoint:` + valueToGoStringMesos(this.Checkpoint, "bool"), - `Role:` + valueToGoStringMesos(this.Role, "string"), - `Hostname:` + valueToGoStringMesos(this.Hostname, "string"), - `Principal:` + valueToGoStringMesos(this.Principal, "string"), - `WebuiUrl:` + valueToGoStringMesos(this.WebuiUrl, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *HealthCheck) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v128 := float64(r.Float64()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.CpuClock = &v128 } - s := strings1.Join([]string{`&mesosproto.HealthCheck{` + - `Http:` + fmt2.Sprintf("%#v", this.Http), - `DelaySeconds:` + valueToGoStringMesos(this.DelaySeconds, "float64"), - `IntervalSeconds:` + valueToGoStringMesos(this.IntervalSeconds, "float64"), - `TimeoutSeconds:` + valueToGoStringMesos(this.TimeoutSeconds, "float64"), - `ConsecutiveFailures:` + valueToGoStringMesos(this.ConsecutiveFailures, "uint32"), - `GracePeriodSeconds:` + valueToGoStringMesos(this.GracePeriodSeconds, "float64"), - `Command:` + fmt2.Sprintf("%#v", this.Command), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *HealthCheck_HTTP) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v129 := float64(r.Float64()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.TaskClock = &v129 } - s := strings1.Join([]string{`&mesosproto.HealthCheck_HTTP{` + - `Port:` + valueToGoStringMesos(this.Port, "uint32"), - `Path:` + valueToGoStringMesos(this.Path, "string"), - `Statuses:` + fmt2.Sprintf("%#v", this.Statuses), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *CommandInfo) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v130 := uint64(uint64(r.Uint32())) + this.PageFaults = &v130 } - s := strings1.Join([]string{`&mesosproto.CommandInfo{` + - `Container:` + fmt2.Sprintf("%#v", this.Container), - `Uris:` + fmt2.Sprintf("%#v", this.Uris), - `Environment:` + fmt2.Sprintf("%#v", this.Environment), - `Shell:` + valueToGoStringMesos(this.Shell, "bool"), - `Value:` + valueToGoStringMesos(this.Value, "string"), - `Arguments:` + fmt2.Sprintf("%#v", this.Arguments), - `User:` + valueToGoStringMesos(this.User, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *CommandInfo_URI) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v131 := uint64(uint64(r.Uint32())) + this.MinorFaults = &v131 } - s := strings1.Join([]string{`&mesosproto.CommandInfo_URI{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `Executable:` + valueToGoStringMesos(this.Executable, "bool"), - `Extract:` + valueToGoStringMesos(this.Extract, "bool"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *CommandInfo_ContainerInfo) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v132 := uint64(uint64(r.Uint32())) + this.MajorFaults = &v132 + } + if r.Intn(10) != 0 { + v133 := uint64(uint64(r.Uint32())) + this.ContextSwitches = &v133 + } + if r.Intn(10) != 0 { + v134 := uint64(uint64(r.Uint32())) + this.CpuMigrations = &v134 + } + if r.Intn(10) != 0 { + v135 := uint64(uint64(r.Uint32())) + this.AlignmentFaults = &v135 + } + if r.Intn(10) != 0 { + v136 := uint64(uint64(r.Uint32())) + this.EmulationFaults = &v136 + } + if r.Intn(10) != 0 { + v137 := uint64(uint64(r.Uint32())) + this.L1DcacheLoads = &v137 + } + if r.Intn(10) != 0 { + v138 := uint64(uint64(r.Uint32())) + this.L1DcacheLoadMisses = &v138 + } + if r.Intn(10) != 0 { + v139 := uint64(uint64(r.Uint32())) + this.L1DcacheStores = &v139 + } + if r.Intn(10) != 0 { + v140 := uint64(uint64(r.Uint32())) + this.L1DcacheStoreMisses = &v140 + } + if r.Intn(10) != 0 { + v141 := uint64(uint64(r.Uint32())) + this.L1DcachePrefetches = &v141 } - s := strings1.Join([]string{`&mesosproto.CommandInfo_ContainerInfo{` + - `Image:` + valueToGoStringMesos(this.Image, "string"), - `Options:` + fmt2.Sprintf("%#v", this.Options), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ExecutorInfo) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v142 := uint64(uint64(r.Uint32())) + this.L1DcachePrefetchMisses = &v142 } - s := strings1.Join([]string{`&mesosproto.ExecutorInfo{` + - `ExecutorId:` + fmt2.Sprintf("%#v", this.ExecutorId), - `FrameworkId:` + fmt2.Sprintf("%#v", this.FrameworkId), - `Command:` + fmt2.Sprintf("%#v", this.Command), - `Container:` + fmt2.Sprintf("%#v", this.Container), - `Resources:` + fmt2.Sprintf("%#v", this.Resources), - `Name:` + valueToGoStringMesos(this.Name, "string"), - `Source:` + valueToGoStringMesos(this.Source, "string"), - `Data:` + valueToGoStringMesos(this.Data, "byte"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *MasterInfo) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v143 := uint64(uint64(r.Uint32())) + this.L1IcacheLoads = &v143 } - s := strings1.Join([]string{`&mesosproto.MasterInfo{` + - `Id:` + valueToGoStringMesos(this.Id, "string"), - `Ip:` + valueToGoStringMesos(this.Ip, "uint32"), - `Port:` + valueToGoStringMesos(this.Port, "uint32"), - `Pid:` + valueToGoStringMesos(this.Pid, "string"), - `Hostname:` + valueToGoStringMesos(this.Hostname, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *SlaveInfo) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v144 := uint64(uint64(r.Uint32())) + this.L1IcacheLoadMisses = &v144 } - s := strings1.Join([]string{`&mesosproto.SlaveInfo{` + - `Hostname:` + valueToGoStringMesos(this.Hostname, "string"), - `Port:` + valueToGoStringMesos(this.Port, "int32"), - `Resources:` + fmt2.Sprintf("%#v", this.Resources), - `Attributes:` + fmt2.Sprintf("%#v", this.Attributes), - `Id:` + fmt2.Sprintf("%#v", this.Id), - `Checkpoint:` + valueToGoStringMesos(this.Checkpoint, "bool"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Value) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v145 := uint64(uint64(r.Uint32())) + this.L1IcachePrefetches = &v145 } - s := strings1.Join([]string{`&mesosproto.Value{` + - `Type:` + valueToGoStringMesos(this.Type, "mesosproto.Value_Type"), - `Scalar:` + fmt2.Sprintf("%#v", this.Scalar), - `Ranges:` + fmt2.Sprintf("%#v", this.Ranges), - `Set:` + fmt2.Sprintf("%#v", this.Set), - `Text:` + fmt2.Sprintf("%#v", this.Text), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Value_Scalar) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v146 := uint64(uint64(r.Uint32())) + this.L1IcachePrefetchMisses = &v146 } - s := strings1.Join([]string{`&mesosproto.Value_Scalar{` + - `Value:` + valueToGoStringMesos(this.Value, "float64"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Value_Range) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v147 := uint64(uint64(r.Uint32())) + this.LlcLoads = &v147 } - s := strings1.Join([]string{`&mesosproto.Value_Range{` + - `Begin:` + valueToGoStringMesos(this.Begin, "uint64"), - `End:` + valueToGoStringMesos(this.End, "uint64"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Value_Ranges) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v148 := uint64(uint64(r.Uint32())) + this.LlcLoadMisses = &v148 } - s := strings1.Join([]string{`&mesosproto.Value_Ranges{` + - `Range:` + fmt2.Sprintf("%#v", this.Range), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Value_Set) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v149 := uint64(uint64(r.Uint32())) + this.LlcStores = &v149 } - s := strings1.Join([]string{`&mesosproto.Value_Set{` + - `Item:` + fmt2.Sprintf("%#v", this.Item), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Value_Text) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v150 := uint64(uint64(r.Uint32())) + this.LlcStoreMisses = &v150 } - s := strings1.Join([]string{`&mesosproto.Value_Text{` + - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Attribute) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v151 := uint64(uint64(r.Uint32())) + this.LlcPrefetches = &v151 } - s := strings1.Join([]string{`&mesosproto.Attribute{` + - `Name:` + valueToGoStringMesos(this.Name, "string"), - `Type:` + valueToGoStringMesos(this.Type, "mesosproto.Value_Type"), - `Scalar:` + fmt2.Sprintf("%#v", this.Scalar), - `Ranges:` + fmt2.Sprintf("%#v", this.Ranges), - `Set:` + fmt2.Sprintf("%#v", this.Set), - `Text:` + fmt2.Sprintf("%#v", this.Text), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Resource) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v152 := uint64(uint64(r.Uint32())) + this.LlcPrefetchMisses = &v152 } - s := strings1.Join([]string{`&mesosproto.Resource{` + - `Name:` + valueToGoStringMesos(this.Name, "string"), - `Type:` + valueToGoStringMesos(this.Type, "mesosproto.Value_Type"), - `Scalar:` + fmt2.Sprintf("%#v", this.Scalar), - `Ranges:` + fmt2.Sprintf("%#v", this.Ranges), - `Set:` + fmt2.Sprintf("%#v", this.Set), - `Role:` + valueToGoStringMesos(this.Role, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ResourceStatistics) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v153 := uint64(uint64(r.Uint32())) + this.DtlbLoads = &v153 } - s := strings1.Join([]string{`&mesosproto.ResourceStatistics{` + - `Timestamp:` + valueToGoStringMesos(this.Timestamp, "float64"), - `CpusUserTimeSecs:` + valueToGoStringMesos(this.CpusUserTimeSecs, "float64"), - `CpusSystemTimeSecs:` + valueToGoStringMesos(this.CpusSystemTimeSecs, "float64"), - `CpusLimit:` + valueToGoStringMesos(this.CpusLimit, "float64"), - `CpusNrPeriods:` + valueToGoStringMesos(this.CpusNrPeriods, "uint32"), - `CpusNrThrottled:` + valueToGoStringMesos(this.CpusNrThrottled, "uint32"), - `CpusThrottledTimeSecs:` + valueToGoStringMesos(this.CpusThrottledTimeSecs, "float64"), - `MemRssBytes:` + valueToGoStringMesos(this.MemRssBytes, "uint64"), - `MemLimitBytes:` + valueToGoStringMesos(this.MemLimitBytes, "uint64"), - `MemFileBytes:` + valueToGoStringMesos(this.MemFileBytes, "uint64"), - `MemAnonBytes:` + valueToGoStringMesos(this.MemAnonBytes, "uint64"), - `MemMappedFileBytes:` + valueToGoStringMesos(this.MemMappedFileBytes, "uint64"), - `Perf:` + fmt2.Sprintf("%#v", this.Perf), - `NetRxPackets:` + valueToGoStringMesos(this.NetRxPackets, "uint64"), - `NetRxBytes:` + valueToGoStringMesos(this.NetRxBytes, "uint64"), - `NetRxErrors:` + valueToGoStringMesos(this.NetRxErrors, "uint64"), - `NetRxDropped:` + valueToGoStringMesos(this.NetRxDropped, "uint64"), - `NetTxPackets:` + valueToGoStringMesos(this.NetTxPackets, "uint64"), - `NetTxBytes:` + valueToGoStringMesos(this.NetTxBytes, "uint64"), - `NetTxErrors:` + valueToGoStringMesos(this.NetTxErrors, "uint64"), - `NetTxDropped:` + valueToGoStringMesos(this.NetTxDropped, "uint64"), - `NetTcpRttMicrosecsP50:` + valueToGoStringMesos(this.NetTcpRttMicrosecsP50, "float64"), - `NetTcpRttMicrosecsP90:` + valueToGoStringMesos(this.NetTcpRttMicrosecsP90, "float64"), - `NetTcpRttMicrosecsP95:` + valueToGoStringMesos(this.NetTcpRttMicrosecsP95, "float64"), - `NetTcpRttMicrosecsP99:` + valueToGoStringMesos(this.NetTcpRttMicrosecsP99, "float64"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ResourceUsage) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v154 := uint64(uint64(r.Uint32())) + this.DtlbLoadMisses = &v154 } - s := strings1.Join([]string{`&mesosproto.ResourceUsage{` + - `SlaveId:` + fmt2.Sprintf("%#v", this.SlaveId), - `FrameworkId:` + fmt2.Sprintf("%#v", this.FrameworkId), - `ExecutorId:` + fmt2.Sprintf("%#v", this.ExecutorId), - `ExecutorName:` + valueToGoStringMesos(this.ExecutorName, "string"), - `TaskId:` + fmt2.Sprintf("%#v", this.TaskId), - `Statistics:` + fmt2.Sprintf("%#v", this.Statistics), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *PerfStatistics) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v155 := uint64(uint64(r.Uint32())) + this.DtlbStores = &v155 } - s := strings1.Join([]string{`&mesosproto.PerfStatistics{` + - `Timestamp:` + valueToGoStringMesos(this.Timestamp, "float64"), - `Duration:` + valueToGoStringMesos(this.Duration, "float64"), - `Cycles:` + valueToGoStringMesos(this.Cycles, "uint64"), - `StalledCyclesFrontend:` + valueToGoStringMesos(this.StalledCyclesFrontend, "uint64"), - `StalledCyclesBackend:` + valueToGoStringMesos(this.StalledCyclesBackend, "uint64"), - `Instructions:` + valueToGoStringMesos(this.Instructions, "uint64"), - `CacheReferences:` + valueToGoStringMesos(this.CacheReferences, "uint64"), - `CacheMisses:` + valueToGoStringMesos(this.CacheMisses, "uint64"), - `Branches:` + valueToGoStringMesos(this.Branches, "uint64"), - `BranchMisses:` + valueToGoStringMesos(this.BranchMisses, "uint64"), - `BusCycles:` + valueToGoStringMesos(this.BusCycles, "uint64"), - `RefCycles:` + valueToGoStringMesos(this.RefCycles, "uint64"), - `CpuClock:` + valueToGoStringMesos(this.CpuClock, "float64"), - `TaskClock:` + valueToGoStringMesos(this.TaskClock, "float64"), - `PageFaults:` + valueToGoStringMesos(this.PageFaults, "uint64"), - `MinorFaults:` + valueToGoStringMesos(this.MinorFaults, "uint64"), - `MajorFaults:` + valueToGoStringMesos(this.MajorFaults, "uint64"), - `ContextSwitches:` + valueToGoStringMesos(this.ContextSwitches, "uint64"), - `CpuMigrations:` + valueToGoStringMesos(this.CpuMigrations, "uint64"), - `AlignmentFaults:` + valueToGoStringMesos(this.AlignmentFaults, "uint64"), - `EmulationFaults:` + valueToGoStringMesos(this.EmulationFaults, "uint64"), - `L1DcacheLoads:` + valueToGoStringMesos(this.L1DcacheLoads, "uint64"), - `L1DcacheLoadMisses:` + valueToGoStringMesos(this.L1DcacheLoadMisses, "uint64"), - `L1DcacheStores:` + valueToGoStringMesos(this.L1DcacheStores, "uint64"), - `L1DcacheStoreMisses:` + valueToGoStringMesos(this.L1DcacheStoreMisses, "uint64"), - `L1DcachePrefetches:` + valueToGoStringMesos(this.L1DcachePrefetches, "uint64"), - `L1DcachePrefetchMisses:` + valueToGoStringMesos(this.L1DcachePrefetchMisses, "uint64"), - `L1IcacheLoads:` + valueToGoStringMesos(this.L1IcacheLoads, "uint64"), - `L1IcacheLoadMisses:` + valueToGoStringMesos(this.L1IcacheLoadMisses, "uint64"), - `L1IcachePrefetches:` + valueToGoStringMesos(this.L1IcachePrefetches, "uint64"), - `L1IcachePrefetchMisses:` + valueToGoStringMesos(this.L1IcachePrefetchMisses, "uint64"), - `LlcLoads:` + valueToGoStringMesos(this.LlcLoads, "uint64"), - `LlcLoadMisses:` + valueToGoStringMesos(this.LlcLoadMisses, "uint64"), - `LlcStores:` + valueToGoStringMesos(this.LlcStores, "uint64"), - `LlcStoreMisses:` + valueToGoStringMesos(this.LlcStoreMisses, "uint64"), - `LlcPrefetches:` + valueToGoStringMesos(this.LlcPrefetches, "uint64"), - `LlcPrefetchMisses:` + valueToGoStringMesos(this.LlcPrefetchMisses, "uint64"), - `DtlbLoads:` + valueToGoStringMesos(this.DtlbLoads, "uint64"), - `DtlbLoadMisses:` + valueToGoStringMesos(this.DtlbLoadMisses, "uint64"), - `DtlbStores:` + valueToGoStringMesos(this.DtlbStores, "uint64"), - `DtlbStoreMisses:` + valueToGoStringMesos(this.DtlbStoreMisses, "uint64"), - `DtlbPrefetches:` + valueToGoStringMesos(this.DtlbPrefetches, "uint64"), - `DtlbPrefetchMisses:` + valueToGoStringMesos(this.DtlbPrefetchMisses, "uint64"), - `ItlbLoads:` + valueToGoStringMesos(this.ItlbLoads, "uint64"), - `ItlbLoadMisses:` + valueToGoStringMesos(this.ItlbLoadMisses, "uint64"), - `BranchLoads:` + valueToGoStringMesos(this.BranchLoads, "uint64"), - `BranchLoadMisses:` + valueToGoStringMesos(this.BranchLoadMisses, "uint64"), - `NodeLoads:` + valueToGoStringMesos(this.NodeLoads, "uint64"), - `NodeLoadMisses:` + valueToGoStringMesos(this.NodeLoadMisses, "uint64"), - `NodeStores:` + valueToGoStringMesos(this.NodeStores, "uint64"), - `NodeStoreMisses:` + valueToGoStringMesos(this.NodeStoreMisses, "uint64"), - `NodePrefetches:` + valueToGoStringMesos(this.NodePrefetches, "uint64"), - `NodePrefetchMisses:` + valueToGoStringMesos(this.NodePrefetchMisses, "uint64"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Request) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v156 := uint64(uint64(r.Uint32())) + this.DtlbStoreMisses = &v156 } - s := strings1.Join([]string{`&mesosproto.Request{` + - `SlaveId:` + fmt2.Sprintf("%#v", this.SlaveId), - `Resources:` + fmt2.Sprintf("%#v", this.Resources), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Offer) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v157 := uint64(uint64(r.Uint32())) + this.DtlbPrefetches = &v157 } - s := strings1.Join([]string{`&mesosproto.Offer{` + - `Id:` + fmt2.Sprintf("%#v", this.Id), - `FrameworkId:` + fmt2.Sprintf("%#v", this.FrameworkId), - `SlaveId:` + fmt2.Sprintf("%#v", this.SlaveId), - `Hostname:` + valueToGoStringMesos(this.Hostname, "string"), - `Resources:` + fmt2.Sprintf("%#v", this.Resources), - `Attributes:` + fmt2.Sprintf("%#v", this.Attributes), - `ExecutorIds:` + fmt2.Sprintf("%#v", this.ExecutorIds), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *TaskInfo) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v158 := uint64(uint64(r.Uint32())) + this.DtlbPrefetchMisses = &v158 } - s := strings1.Join([]string{`&mesosproto.TaskInfo{` + - `Name:` + valueToGoStringMesos(this.Name, "string"), - `TaskId:` + fmt2.Sprintf("%#v", this.TaskId), - `SlaveId:` + fmt2.Sprintf("%#v", this.SlaveId), - `Resources:` + fmt2.Sprintf("%#v", this.Resources), - `Executor:` + fmt2.Sprintf("%#v", this.Executor), - `Command:` + fmt2.Sprintf("%#v", this.Command), - `Container:` + fmt2.Sprintf("%#v", this.Container), - `Data:` + valueToGoStringMesos(this.Data, "byte"), - `HealthCheck:` + fmt2.Sprintf("%#v", this.HealthCheck), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *TaskStatus) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v159 := uint64(uint64(r.Uint32())) + this.ItlbLoads = &v159 } - s := strings1.Join([]string{`&mesosproto.TaskStatus{` + - `TaskId:` + fmt2.Sprintf("%#v", this.TaskId), - `State:` + valueToGoStringMesos(this.State, "mesosproto.TaskState"), - `Message:` + valueToGoStringMesos(this.Message, "string"), - `Source:` + valueToGoStringMesos(this.Source, "mesosproto.TaskStatus_Source"), - `Reason:` + valueToGoStringMesos(this.Reason, "mesosproto.TaskStatus_Reason"), - `Data:` + valueToGoStringMesos(this.Data, "byte"), - `SlaveId:` + fmt2.Sprintf("%#v", this.SlaveId), - `ExecutorId:` + fmt2.Sprintf("%#v", this.ExecutorId), - `Timestamp:` + valueToGoStringMesos(this.Timestamp, "float64"), - `Healthy:` + valueToGoStringMesos(this.Healthy, "bool"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Filters) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v160 := uint64(uint64(r.Uint32())) + this.ItlbLoadMisses = &v160 } - s := strings1.Join([]string{`&mesosproto.Filters{` + - `RefuseSeconds:` + valueToGoStringMesos(this.RefuseSeconds, "float64"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Environment) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v161 := uint64(uint64(r.Uint32())) + this.BranchLoads = &v161 } - s := strings1.Join([]string{`&mesosproto.Environment{` + - `Variables:` + fmt2.Sprintf("%#v", this.Variables), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Environment_Variable) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v162 := uint64(uint64(r.Uint32())) + this.BranchLoadMisses = &v162 } - s := strings1.Join([]string{`&mesosproto.Environment_Variable{` + - `Name:` + valueToGoStringMesos(this.Name, "string"), - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Parameter) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v163 := uint64(uint64(r.Uint32())) + this.NodeLoads = &v163 } - s := strings1.Join([]string{`&mesosproto.Parameter{` + - `Key:` + valueToGoStringMesos(this.Key, "string"), - `Value:` + valueToGoStringMesos(this.Value, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Parameters) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v164 := uint64(uint64(r.Uint32())) + this.NodeLoadMisses = &v164 } - s := strings1.Join([]string{`&mesosproto.Parameters{` + - `Parameter:` + fmt2.Sprintf("%#v", this.Parameter), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Credential) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v165 := uint64(uint64(r.Uint32())) + this.NodeStores = &v165 } - s := strings1.Join([]string{`&mesosproto.Credential{` + - `Principal:` + valueToGoStringMesos(this.Principal, "string"), - `Secret:` + valueToGoStringMesos(this.Secret, "byte"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Credentials) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v166 := uint64(uint64(r.Uint32())) + this.NodeStoreMisses = &v166 } - s := strings1.Join([]string{`&mesosproto.Credentials{` + - `Credentials:` + fmt2.Sprintf("%#v", this.Credentials), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ACL) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v167 := uint64(uint64(r.Uint32())) + this.NodePrefetches = &v167 } - s := strings1.Join([]string{`&mesosproto.ACL{` + - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ACL_Entity) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v168 := uint64(uint64(r.Uint32())) + this.NodePrefetchMisses = &v168 } - s := strings1.Join([]string{`&mesosproto.ACL_Entity{` + - `Type:` + valueToGoStringMesos(this.Type, "mesosproto.ACL_Entity_Type"), - `Values:` + fmt2.Sprintf("%#v", this.Values), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ACL_RegisterFramework) GoString() string { - if this == nil { - return "nil" + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 54) } - s := strings1.Join([]string{`&mesosproto.ACL_RegisterFramework{` + - `Principals:` + fmt2.Sprintf("%#v", this.Principals), - `Roles:` + fmt2.Sprintf("%#v", this.Roles), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *ACL_RunTask) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedRequest(r randyMesos, easy bool) *Request { + this := &Request{} + if r.Intn(10) != 0 { + this.SlaveId = NewPopulatedSlaveID(r, easy) } - s := strings1.Join([]string{`&mesosproto.ACL_RunTask{` + - `Principals:` + fmt2.Sprintf("%#v", this.Principals), - `Users:` + fmt2.Sprintf("%#v", this.Users), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ACL_ShutdownFramework) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v169 := r.Intn(10) + this.Resources = make([]*Resource, v169) + for i := 0; i < v169; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) + } } - s := strings1.Join([]string{`&mesosproto.ACL_ShutdownFramework{` + - `Principals:` + fmt2.Sprintf("%#v", this.Principals), - `FrameworkPrincipals:` + fmt2.Sprintf("%#v", this.FrameworkPrincipals), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ACLs) GoString() string { - if this == nil { - return "nil" + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - s := strings1.Join([]string{`&mesosproto.ACLs{` + - `Permissive:` + valueToGoStringMesos(this.Permissive, "bool"), - `RegisterFrameworks:` + fmt2.Sprintf("%#v", this.RegisterFrameworks), - `RunTasks:` + fmt2.Sprintf("%#v", this.RunTasks), - `ShutdownFrameworks:` + fmt2.Sprintf("%#v", this.ShutdownFrameworks), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *RateLimit) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedOffer(r randyMesos, easy bool) *Offer { + this := &Offer{} + this.Id = NewPopulatedOfferID(r, easy) + this.FrameworkId = NewPopulatedFrameworkID(r, easy) + this.SlaveId = NewPopulatedSlaveID(r, easy) + v170 := randStringMesos(r) + this.Hostname = &v170 + if r.Intn(10) != 0 { + v171 := r.Intn(10) + this.Resources = make([]*Resource, v171) + for i := 0; i < v171; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) + } } - s := strings1.Join([]string{`&mesosproto.RateLimit{` + - `Qps:` + valueToGoStringMesos(this.Qps, "float64"), - `Principal:` + valueToGoStringMesos(this.Principal, "string"), - `Capacity:` + valueToGoStringMesos(this.Capacity, "uint64"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *RateLimits) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v172 := r.Intn(10) + this.ExecutorIds = make([]*ExecutorID, v172) + for i := 0; i < v172; i++ { + this.ExecutorIds[i] = NewPopulatedExecutorID(r, easy) + } } - s := strings1.Join([]string{`&mesosproto.RateLimits{` + - `Limits:` + fmt2.Sprintf("%#v", this.Limits), - `AggregateDefaultQps:` + valueToGoStringMesos(this.AggregateDefaultQps, "float64"), - `AggregateDefaultCapacity:` + valueToGoStringMesos(this.AggregateDefaultCapacity, "uint64"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Volume) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + v173 := r.Intn(10) + this.Attributes = make([]*Attribute, v173) + for i := 0; i < v173; i++ { + this.Attributes[i] = NewPopulatedAttribute(r, easy) + } } - s := strings1.Join([]string{`&mesosproto.Volume{` + - `ContainerPath:` + valueToGoStringMesos(this.ContainerPath, "string"), - `HostPath:` + valueToGoStringMesos(this.HostPath, "string"), - `Mode:` + valueToGoStringMesos(this.Mode, "mesosproto.Volume_Mode"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ContainerInfo) GoString() string { - if this == nil { - return "nil" + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 8) } - s := strings1.Join([]string{`&mesosproto.ContainerInfo{` + - `Type:` + valueToGoStringMesos(this.Type, "mesosproto.ContainerInfo_Type"), - `Volumes:` + fmt2.Sprintf("%#v", this.Volumes), - `Hostname:` + valueToGoStringMesos(this.Hostname, "string"), - `Docker:` + fmt2.Sprintf("%#v", this.Docker), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func (this *ContainerInfo_DockerInfo) GoString() string { - if this == nil { - return "nil" + +func NewPopulatedOffer_Operation(r randyMesos, easy bool) *Offer_Operation { + this := &Offer_Operation{} + v174 := Offer_Operation_Type([]int32{1, 2, 3, 4, 5}[r.Intn(5)]) + this.Type = &v174 + if r.Intn(10) != 0 { + this.Launch = NewPopulatedOffer_Operation_Launch(r, easy) } - s := strings1.Join([]string{`&mesosproto.ContainerInfo_DockerInfo{` + - `Image:` + valueToGoStringMesos(this.Image, "string"), - `Network:` + valueToGoStringMesos(this.Network, "mesosproto.ContainerInfo_DockerInfo_Network"), - `PortMappings:` + fmt2.Sprintf("%#v", this.PortMappings), - `Privileged:` + valueToGoStringMesos(this.Privileged, "bool"), - `Parameters:` + fmt2.Sprintf("%#v", this.Parameters), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *ContainerInfo_DockerInfo_PortMapping) GoString() string { - if this == nil { - return "nil" + if r.Intn(10) != 0 { + this.Reserve = NewPopulatedOffer_Operation_Reserve(r, easy) } - s := strings1.Join([]string{`&mesosproto.ContainerInfo_DockerInfo_PortMapping{` + - `HostPort:` + valueToGoStringMesos(this.HostPort, "uint32"), - `ContainerPort:` + valueToGoStringMesos(this.ContainerPort, "uint32"), - `Protocol:` + valueToGoStringMesos(this.Protocol, "string"), - `XXX_unrecognized:` + fmt2.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func valueToGoStringMesos(v interface{}, typ string) string { - rv := reflect1.ValueOf(v) - if rv.IsNil() { - return "nil" + if r.Intn(10) != 0 { + this.Unreserve = NewPopulatedOffer_Operation_Unreserve(r, easy) } - pv := reflect1.Indirect(rv).Interface() - return fmt2.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringMesos(e map[int32]github_com_gogo_protobuf_proto1.Extension) string { - if e == nil { - return "nil" + if r.Intn(10) != 0 { + this.Create = NewPopulatedOffer_Operation_Create(r, easy) } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) + if r.Intn(10) != 0 { + this.Destroy = NewPopulatedOffer_Operation_Destroy(r, easy) } - sort.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 7) } - s += strings1.Join(ss, ",") + "}" - return s + return this } -func (this *FrameworkID) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*FrameworkID) - if !ok { - return fmt3.Errorf("that is not of type *FrameworkID") - } - if that1 == nil { - if this == nil { - return nil +func NewPopulatedOffer_Operation_Launch(r randyMesos, easy bool) *Offer_Operation_Launch { + this := &Offer_Operation_Launch{} + if r.Intn(10) != 0 { + v175 := r.Intn(10) + this.TaskInfos = make([]*TaskInfo, v175) + for i := 0; i < v175; i++ { + this.TaskInfos[i] = NewPopulatedTaskInfo(r, easy) } - return fmt3.Errorf("that is type *FrameworkID but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *FrameworkIDbut is not nil && this == nil") } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedOffer_Operation_Reserve(r randyMesos, easy bool) *Offer_Operation_Reserve { + this := &Offer_Operation_Reserve{} + if r.Intn(10) != 0 { + v176 := r.Intn(10) + this.Resources = make([]*Resource, v176) + for i := 0; i < v176; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return nil + return this } -func (this *FrameworkID) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + +func NewPopulatedOffer_Operation_Unreserve(r randyMesos, easy bool) *Offer_Operation_Unreserve { + this := &Offer_Operation_Unreserve{} + if r.Intn(10) != 0 { + v177 := r.Intn(10) + this.Resources = make([]*Resource, v177) + for i := 0; i < v177; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) } - return false } - - that1, ok := that.(*FrameworkID) - if !ok { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - if that1 == nil { - if this == nil { - return true + return this +} + +func NewPopulatedOffer_Operation_Create(r randyMesos, easy bool) *Offer_Operation_Create { + this := &Offer_Operation_Create{} + if r.Intn(10) != 0 { + v178 := r.Intn(10) + this.Volumes = make([]*Resource, v178) + for i := 0; i < v178; i++ { + this.Volumes[i] = NewPopulatedResource(r, easy) } - return false - } else if this == nil { - return false } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} + +func NewPopulatedOffer_Operation_Destroy(r randyMesos, easy bool) *Offer_Operation_Destroy { + this := &Offer_Operation_Destroy{} + if r.Intn(10) != 0 { + v179 := r.Intn(10) + this.Volumes = make([]*Resource, v179) + for i := 0; i < v179; i++ { + this.Volumes[i] = NewPopulatedResource(r, easy) } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return true + return this } -func (this *OfferID) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + +func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { + this := &TaskInfo{} + v180 := randStringMesos(r) + this.Name = &v180 + this.TaskId = NewPopulatedTaskID(r, easy) + this.SlaveId = NewPopulatedSlaveID(r, easy) + if r.Intn(10) != 0 { + v181 := r.Intn(10) + this.Resources = make([]*Resource, v181) + for i := 0; i < v181; i++ { + this.Resources[i] = NewPopulatedResource(r, easy) } - return fmt3.Errorf("that == nil && this != nil") } - - that1, ok := that.(*OfferID) - if !ok { - return fmt3.Errorf("that is not of type *OfferID") + if r.Intn(10) != 0 { + this.Executor = NewPopulatedExecutorInfo(r, easy) } - if that1 == nil { - if this == nil { - return nil + if r.Intn(10) != 0 { + v182 := r.Intn(100) + this.Data = make([]byte, v182) + for i := 0; i < v182; i++ { + this.Data[i] = byte(r.Intn(256)) } - return fmt3.Errorf("that is type *OfferID but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *OfferIDbut is not nil && this == nil") } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) - } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + if r.Intn(10) != 0 { + this.Command = NewPopulatedCommandInfo(r, easy) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if r.Intn(10) != 0 { + this.HealthCheck = NewPopulatedHealthCheck(r, easy) } - return nil + if r.Intn(10) != 0 { + this.Container = NewPopulatedContainerInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + this.Discovery = NewPopulatedDiscoveryInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 12) + } + return this } -func (this *OfferID) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + +func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { + this := &TaskStatus{} + this.TaskId = NewPopulatedTaskID(r, easy) + v183 := TaskState([]int32{6, 0, 1, 2, 3, 4, 5, 7}[r.Intn(8)]) + this.State = &v183 + if r.Intn(10) != 0 { + v184 := r.Intn(100) + this.Data = make([]byte, v184) + for i := 0; i < v184; i++ { + this.Data[i] = byte(r.Intn(256)) } - return false } - - that1, ok := that.(*OfferID) - if !ok { - return false + if r.Intn(10) != 0 { + v185 := randStringMesos(r) + this.Message = &v185 } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if r.Intn(10) != 0 { + this.SlaveId = NewPopulatedSlaveID(r, easy) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false + if r.Intn(10) != 0 { + v186 := float64(r.Float64()) + if r.Intn(2) == 0 { + v186 *= -1 } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + this.Timestamp = &v186 } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if r.Intn(10) != 0 { + this.ExecutorId = NewPopulatedExecutorID(r, easy) } - return true -} -func (this *SlaveID) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if r.Intn(10) != 0 { + v187 := bool(bool(r.Intn(2) == 0)) + this.Healthy = &v187 } - - that1, ok := that.(*SlaveID) - if !ok { - return fmt3.Errorf("that is not of type *SlaveID") + if r.Intn(10) != 0 { + v188 := TaskStatus_Source([]int32{0, 1, 2}[r.Intn(3)]) + this.Source = &v188 } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *SlaveID but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *SlaveIDbut is not nil && this == nil") + if r.Intn(10) != 0 { + v189 := TaskStatus_Reason([]int32{0, 17, 1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 10, 11, 12, 13, 14, 15, 16}[r.Intn(19)]) + this.Reason = &v189 } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + if r.Intn(10) != 0 { + v190 := r.Intn(100) + this.Uuid = make([]byte, v190) + for i := 0; i < v190; i++ { + this.Uuid[i] = byte(r.Intn(256)) } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 12) } - return nil + return this } -func (this *SlaveID) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + +func NewPopulatedFilters(r randyMesos, easy bool) *Filters { + this := &Filters{} + if r.Intn(10) != 0 { + v191 := float64(r.Float64()) + if r.Intn(2) == 0 { + v191 *= -1 } - return false + this.RefuseSeconds = &v191 } - - that1, ok := that.(*SlaveID) - if !ok { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - if that1 == nil { - if this == nil { - return true + return this +} + +func NewPopulatedEnvironment(r randyMesos, easy bool) *Environment { + this := &Environment{} + if r.Intn(10) != 0 { + v192 := r.Intn(10) + this.Variables = make([]*Environment_Variable, v192) + for i := 0; i < v192; i++ { + this.Variables[i] = NewPopulatedEnvironment_Variable(r, easy) } - return false - } else if this == nil { - return false } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + return this +} + +func NewPopulatedEnvironment_Variable(r randyMesos, easy bool) *Environment_Variable { + this := &Environment_Variable{} + v193 := randStringMesos(r) + this.Name = &v193 + v194 := randStringMesos(r) + this.Value = &v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + } + return this +} + +func NewPopulatedParameter(r randyMesos, easy bool) *Parameter { + this := &Parameter{} + v195 := randStringMesos(r) + this.Key = &v195 + v196 := randStringMesos(r) + this.Value = &v196 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - return true + return this } -func (this *TaskID) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + +func NewPopulatedParameters(r randyMesos, easy bool) *Parameters { + this := &Parameters{} + if r.Intn(10) != 0 { + v197 := r.Intn(10) + this.Parameter = make([]*Parameter, v197) + for i := 0; i < v197; i++ { + this.Parameter[i] = NewPopulatedParameter(r, easy) } - return fmt3.Errorf("that == nil && this != nil") } - - that1, ok := that.(*TaskID) - if !ok { - return fmt3.Errorf("that is not of type *TaskID") + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - if that1 == nil { - if this == nil { - return nil + return this +} + +func NewPopulatedCredential(r randyMesos, easy bool) *Credential { + this := &Credential{} + v198 := randStringMesos(r) + this.Principal = &v198 + if r.Intn(10) != 0 { + v199 := r.Intn(100) + this.Secret = make([]byte, v199) + for i := 0; i < v199; i++ { + this.Secret[i] = byte(r.Intn(256)) } - return fmt3.Errorf("that is type *TaskID but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *TaskIDbut is not nil && this == nil") } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) + } + return this +} + +func NewPopulatedCredentials(r randyMesos, easy bool) *Credentials { + this := &Credentials{} + if r.Intn(10) != 0 { + v200 := r.Intn(10) + this.Credentials = make([]*Credential, v200) + for i := 0; i < v200; i++ { + this.Credentials[i] = NewPopulatedCredential(r, easy) } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - return nil + return this } -func (this *TaskID) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + +func NewPopulatedACL(r randyMesos, easy bool) *ACL { + this := &ACL{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 1) } + return this +} - that1, ok := that.(*TaskID) - if !ok { - return false +func NewPopulatedACL_Entity(r randyMesos, easy bool) *ACL_Entity { + this := &ACL_Entity{} + if r.Intn(10) != 0 { + v201 := ACL_Entity_Type([]int32{0, 1, 2}[r.Intn(3)]) + this.Type = &v201 } - if that1 == nil { - if this == nil { - return true + if r.Intn(10) != 0 { + v202 := r.Intn(10) + this.Values = make([]string, v202) + for i := 0; i < v202; i++ { + this.Values[i] = randStringMesos(r) } - return false - } else if this == nil { - return false } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + return this +} + +func NewPopulatedACL_RegisterFramework(r randyMesos, easy bool) *ACL_RegisterFramework { + this := &ACL_RegisterFramework{} + this.Principals = NewPopulatedACL_Entity(r, easy) + this.Roles = NewPopulatedACL_Entity(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - return true + return this } -func (this *ExecutorID) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + +func NewPopulatedACL_RunTask(r randyMesos, easy bool) *ACL_RunTask { + this := &ACL_RunTask{} + this.Principals = NewPopulatedACL_Entity(r, easy) + this.Users = NewPopulatedACL_Entity(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } + return this +} - that1, ok := that.(*ExecutorID) - if !ok { - return fmt3.Errorf("that is not of type *ExecutorID") +func NewPopulatedACL_ShutdownFramework(r randyMesos, easy bool) *ACL_ShutdownFramework { + this := &ACL_ShutdownFramework{} + this.Principals = NewPopulatedACL_Entity(r, easy) + this.FrameworkPrincipals = NewPopulatedACL_Entity(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ExecutorID but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ExecutorIDbut is not nil && this == nil") + return this +} + +func NewPopulatedACLs(r randyMesos, easy bool) *ACLs { + this := &ACLs{} + if r.Intn(10) != 0 { + v203 := bool(bool(r.Intn(2) == 0)) + this.Permissive = &v203 } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + if r.Intn(10) != 0 { + v204 := r.Intn(10) + this.RegisterFrameworks = make([]*ACL_RegisterFramework, v204) + for i := 0; i < v204; i++ { + this.RegisterFrameworks[i] = NewPopulatedACL_RegisterFramework(r, easy) } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if r.Intn(10) != 0 { + v205 := r.Intn(10) + this.RunTasks = make([]*ACL_RunTask, v205) + for i := 0; i < v205; i++ { + this.RunTasks[i] = NewPopulatedACL_RunTask(r, easy) + } } - return nil -} -func (this *ExecutorID) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + if r.Intn(10) != 0 { + v206 := r.Intn(10) + this.ShutdownFrameworks = make([]*ACL_ShutdownFramework, v206) + for i := 0; i < v206; i++ { + this.ShutdownFrameworks[i] = NewPopulatedACL_ShutdownFramework(r, easy) } - return false } - - that1, ok := that.(*ExecutorID) - if !ok { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 5) } - if that1 == nil { - if this == nil { - return true + return this +} + +func NewPopulatedRateLimit(r randyMesos, easy bool) *RateLimit { + this := &RateLimit{} + if r.Intn(10) != 0 { + v207 := float64(r.Float64()) + if r.Intn(2) == 0 { + v207 *= -1 } - return false - } else if this == nil { - return false + this.Qps = &v207 } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + v208 := randStringMesos(r) + this.Principal = &v208 + if r.Intn(10) != 0 { + v209 := uint64(uint64(r.Uint32())) + this.Capacity = &v209 } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 4) } - return true + return this } -func (this *ContainerID) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*ContainerID) - if !ok { - return fmt3.Errorf("that is not of type *ContainerID") - } - if that1 == nil { - if this == nil { - return nil +func NewPopulatedRateLimits(r randyMesos, easy bool) *RateLimits { + this := &RateLimits{} + if r.Intn(10) != 0 { + v210 := r.Intn(10) + this.Limits = make([]*RateLimit, v210) + for i := 0; i < v210; i++ { + this.Limits[i] = NewPopulatedRateLimit(r, easy) } - return fmt3.Errorf("that is type *ContainerID but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ContainerIDbut is not nil && this == nil") } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + if r.Intn(10) != 0 { + v211 := float64(r.Float64()) + if r.Intn(2) == 0 { + v211 *= -1 } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + this.AggregateDefaultQps = &v211 } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if r.Intn(10) != 0 { + v212 := uint64(uint64(r.Uint32())) + this.AggregateDefaultCapacity = &v212 } - return nil -} -func (this *ContainerID) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 4) } + return this +} - that1, ok := that.(*ContainerID) - if !ok { - return false +func NewPopulatedVolume(r randyMesos, easy bool) *Volume { + this := &Volume{} + v213 := randStringMesos(r) + this.ContainerPath = &v213 + if r.Intn(10) != 0 { + v214 := randStringMesos(r) + this.HostPath = &v214 } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + v215 := Volume_Mode([]int32{1, 2}[r.Intn(2)]) + this.Mode = &v215 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 4) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false + return this +} + +func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { + this := &ContainerInfo{} + v216 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v216 + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.Volumes = make([]*Volume, v217) + for i := 0; i < v217; i++ { + this.Volumes[i] = NewPopulatedVolume(r, easy) } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if r.Intn(10) != 0 { + this.Docker = NewPopulatedContainerInfo_DockerInfo(r, easy) + } + if r.Intn(10) != 0 { + v218 := randStringMesos(r) + this.Hostname = &v218 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 5) } - return true + return this } -func (this *FrameworkInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*FrameworkInfo) - if !ok { - return fmt3.Errorf("that is not of type *FrameworkInfo") +func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInfo_DockerInfo { + this := &ContainerInfo_DockerInfo{} + v219 := randStringMesos(r) + this.Image = &v219 + if r.Intn(10) != 0 { + v220 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3}[r.Intn(3)]) + this.Network = &v220 } - if that1 == nil { - if this == nil { - return nil + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.PortMappings = make([]*ContainerInfo_DockerInfo_PortMapping, v221) + for i := 0; i < v221; i++ { + this.PortMappings[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(r, easy) } - return fmt3.Errorf("that is type *FrameworkInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *FrameworkInfobut is not nil && this == nil") } - if this.User != nil && that1.User != nil { - if *this.User != *that1.User { - return fmt3.Errorf("User this(%v) Not Equal that(%v)", *this.User, *that1.User) - } - } else if this.User != nil { - return fmt3.Errorf("this.User == nil && that.User != nil") - } else if that1.User != nil { - return fmt3.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) + if r.Intn(10) != 0 { + v222 := bool(bool(r.Intn(2) == 0)) + this.Privileged = &v222 } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.Parameters = make([]*Parameter, v223) + for i := 0; i < v223; i++ { + this.Parameters[i] = NewPopulatedParameter(r, easy) } - } else if this.Name != nil { - return fmt3.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) } - if !this.Id.Equal(that1.Id) { - return fmt3.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + if r.Intn(10) != 0 { + v224 := bool(bool(r.Intn(2) == 0)) + this.ForcePullImage = &v224 } - if this.FailoverTimeout != nil && that1.FailoverTimeout != nil { - if *this.FailoverTimeout != *that1.FailoverTimeout { - return fmt3.Errorf("FailoverTimeout this(%v) Not Equal that(%v)", *this.FailoverTimeout, *that1.FailoverTimeout) - } - } else if this.FailoverTimeout != nil { - return fmt3.Errorf("this.FailoverTimeout == nil && that.FailoverTimeout != nil") - } else if that1.FailoverTimeout != nil { - return fmt3.Errorf("FailoverTimeout this(%v) Not Equal that(%v)", this.FailoverTimeout, that1.FailoverTimeout) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 7) } - if this.Checkpoint != nil && that1.Checkpoint != nil { - if *this.Checkpoint != *that1.Checkpoint { - return fmt3.Errorf("Checkpoint this(%v) Not Equal that(%v)", *this.Checkpoint, *that1.Checkpoint) - } - } else if this.Checkpoint != nil { - return fmt3.Errorf("this.Checkpoint == nil && that.Checkpoint != nil") - } else if that1.Checkpoint != nil { - return fmt3.Errorf("Checkpoint this(%v) Not Equal that(%v)", this.Checkpoint, that1.Checkpoint) + return this +} + +func NewPopulatedContainerInfo_DockerInfo_PortMapping(r randyMesos, easy bool) *ContainerInfo_DockerInfo_PortMapping { + this := &ContainerInfo_DockerInfo_PortMapping{} + v225 := uint32(r.Uint32()) + this.HostPort = &v225 + v226 := uint32(r.Uint32()) + this.ContainerPort = &v226 + if r.Intn(10) != 0 { + v227 := randStringMesos(r) + this.Protocol = &v227 } - if this.Role != nil && that1.Role != nil { - if *this.Role != *that1.Role { - return fmt3.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) - } - } else if this.Role != nil { - return fmt3.Errorf("this.Role == nil && that.Role != nil") - } else if that1.Role != nil { - return fmt3.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 4) } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + return this +} + +func NewPopulatedLabels(r randyMesos, easy bool) *Labels { + this := &Labels{} + if r.Intn(10) != 0 { + v228 := r.Intn(10) + this.Labels = make([]*Label, v228) + for i := 0; i < v228; i++ { + this.Labels[i] = NewPopulatedLabel(r, easy) } - } else if this.Hostname != nil { - return fmt3.Errorf("this.Hostname == nil && that.Hostname != nil") - } else if that1.Hostname != nil { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) } - if this.Principal != nil && that1.Principal != nil { - if *this.Principal != *that1.Principal { - return fmt3.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) - } - } else if this.Principal != nil { - return fmt3.Errorf("this.Principal == nil && that.Principal != nil") - } else if that1.Principal != nil { - return fmt3.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) } - if this.WebuiUrl != nil && that1.WebuiUrl != nil { - if *this.WebuiUrl != *that1.WebuiUrl { - return fmt3.Errorf("WebuiUrl this(%v) Not Equal that(%v)", *this.WebuiUrl, *that1.WebuiUrl) - } - } else if this.WebuiUrl != nil { - return fmt3.Errorf("this.WebuiUrl == nil && that.WebuiUrl != nil") - } else if that1.WebuiUrl != nil { - return fmt3.Errorf("WebuiUrl this(%v) Not Equal that(%v)", this.WebuiUrl, that1.WebuiUrl) + return this +} + +func NewPopulatedLabel(r randyMesos, easy bool) *Label { + this := &Label{} + v229 := randStringMesos(r) + this.Key = &v229 + if r.Intn(10) != 0 { + v230 := randStringMesos(r) + this.Value = &v230 } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 3) } - return nil + return this } -func (this *FrameworkInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + +func NewPopulatedPort(r randyMesos, easy bool) *Port { + this := &Port{} + v231 := uint32(r.Uint32()) + this.Number = &v231 + if r.Intn(10) != 0 { + v232 := randStringMesos(r) + this.Name = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringMesos(r) + this.Protocol = &v233 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 4) + } + return this +} + +func NewPopulatedPorts(r randyMesos, easy bool) *Ports { + this := &Ports{} + if r.Intn(10) != 0 { + v234 := r.Intn(10) + this.Ports = make([]*Port, v234) + for i := 0; i < v234; i++ { + this.Ports[i] = NewPopulatedPort(r, easy) } - return false } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 2) + } + return this +} - that1, ok := that.(*FrameworkInfo) - if !ok { - return false +func NewPopulatedDiscoveryInfo(r randyMesos, easy bool) *DiscoveryInfo { + this := &DiscoveryInfo{} + v235 := DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) + this.Visibility = &v235 + if r.Intn(10) != 0 { + v236 := randStringMesos(r) + this.Name = &v236 } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if r.Intn(10) != 0 { + v237 := randStringMesos(r) + this.Environment = &v237 } - if this.User != nil && that1.User != nil { - if *this.User != *that1.User { - return false - } - } else if this.User != nil { - return false - } else if that1.User != nil { - return false + if r.Intn(10) != 0 { + v238 := randStringMesos(r) + this.Location = &v238 } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false - } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false + if r.Intn(10) != 0 { + v239 := randStringMesos(r) + this.Version = &v239 } - if !this.Id.Equal(that1.Id) { - return false + if r.Intn(10) != 0 { + this.Ports = NewPopulatedPorts(r, easy) } - if this.FailoverTimeout != nil && that1.FailoverTimeout != nil { - if *this.FailoverTimeout != *that1.FailoverTimeout { - return false - } - } else if this.FailoverTimeout != nil { - return false - } else if that1.FailoverTimeout != nil { - return false + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) } - if this.Checkpoint != nil && that1.Checkpoint != nil { - if *this.Checkpoint != *that1.Checkpoint { - return false - } - } else if this.Checkpoint != nil { - return false - } else if that1.Checkpoint != nil { - return false + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMesos(r, 8) } - if this.Role != nil && that1.Role != nil { - if *this.Role != *that1.Role { - return false - } - } else if this.Role != nil { - return false - } else if that1.Role != nil { - return false + return this +} + +type randyMesos interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMesos(r randyMesos) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return false - } - } else if this.Hostname != nil { - return false - } else if that1.Hostname != nil { - return false + return rune(ru + 61) +} +func randStringMesos(r randyMesos) string { + v240 := r.Intn(100) + tmps := make([]rune, v240) + for i := 0; i < v240; i++ { + tmps[i] = randUTF8RuneMesos(r) } - if this.Principal != nil && that1.Principal != nil { - if *this.Principal != *that1.Principal { - return false + return string(tmps) +} +func randUnrecognizedMesos(r randyMesos, maxFieldNumber int) (data []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 } - } else if this.Principal != nil { - return false - } else if that1.Principal != nil { - return false + fieldNumber := maxFieldNumber + r.Intn(100) + data = randFieldMesos(data, r, fieldNumber, wire) } - if this.WebuiUrl != nil && that1.WebuiUrl != nil { - if *this.WebuiUrl != *that1.WebuiUrl { - return false + return data +} +func randFieldMesos(data []byte, r randyMesos, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMesos(data, uint64(key)) + v241 := r.Int63() + if r.Intn(2) == 0 { + v241 *= -1 } - } else if this.WebuiUrl != nil { - return false - } else if that1.WebuiUrl != nil { - return false + data = encodeVarintPopulateMesos(data, uint64(v241)) + case 1: + data = encodeVarintPopulateMesos(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + data = encodeVarintPopulateMesos(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMesos(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMesos(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return data +} +func encodeVarintPopulateMesos(data []byte, v uint64) []byte { + for v >= 1<<7 { + data = append(data, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + data = append(data, uint8(v)) + return data +} +func (m *FrameworkID) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *HealthCheck) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*HealthCheck) - if !ok { - return fmt3.Errorf("that is not of type *HealthCheck") +func (m *OfferID) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *HealthCheck but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *HealthCheckbut is not nil && this == nil") + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Http.Equal(that1.Http) { - return fmt3.Errorf("Http this(%v) Not Equal that(%v)", this.Http, that1.Http) + return n +} + +func (m *SlaveID) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if this.DelaySeconds != nil && that1.DelaySeconds != nil { - if *this.DelaySeconds != *that1.DelaySeconds { - return fmt3.Errorf("DelaySeconds this(%v) Not Equal that(%v)", *this.DelaySeconds, *that1.DelaySeconds) - } - } else if this.DelaySeconds != nil { - return fmt3.Errorf("this.DelaySeconds == nil && that.DelaySeconds != nil") - } else if that1.DelaySeconds != nil { - return fmt3.Errorf("DelaySeconds this(%v) Not Equal that(%v)", this.DelaySeconds, that1.DelaySeconds) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { - if *this.IntervalSeconds != *that1.IntervalSeconds { - return fmt3.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", *this.IntervalSeconds, *that1.IntervalSeconds) - } - } else if this.IntervalSeconds != nil { - return fmt3.Errorf("this.IntervalSeconds == nil && that.IntervalSeconds != nil") - } else if that1.IntervalSeconds != nil { - return fmt3.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", this.IntervalSeconds, that1.IntervalSeconds) + return n +} + +func (m *TaskID) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { - if *this.TimeoutSeconds != *that1.TimeoutSeconds { - return fmt3.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", *this.TimeoutSeconds, *that1.TimeoutSeconds) - } - } else if this.TimeoutSeconds != nil { - return fmt3.Errorf("this.TimeoutSeconds == nil && that.TimeoutSeconds != nil") - } else if that1.TimeoutSeconds != nil { - return fmt3.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", this.TimeoutSeconds, that1.TimeoutSeconds) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.ConsecutiveFailures != nil && that1.ConsecutiveFailures != nil { - if *this.ConsecutiveFailures != *that1.ConsecutiveFailures { - return fmt3.Errorf("ConsecutiveFailures this(%v) Not Equal that(%v)", *this.ConsecutiveFailures, *that1.ConsecutiveFailures) - } - } else if this.ConsecutiveFailures != nil { - return fmt3.Errorf("this.ConsecutiveFailures == nil && that.ConsecutiveFailures != nil") - } else if that1.ConsecutiveFailures != nil { - return fmt3.Errorf("ConsecutiveFailures this(%v) Not Equal that(%v)", this.ConsecutiveFailures, that1.ConsecutiveFailures) + return n +} + +func (m *ExecutorID) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if this.GracePeriodSeconds != nil && that1.GracePeriodSeconds != nil { - if *this.GracePeriodSeconds != *that1.GracePeriodSeconds { - return fmt3.Errorf("GracePeriodSeconds this(%v) Not Equal that(%v)", *this.GracePeriodSeconds, *that1.GracePeriodSeconds) - } - } else if this.GracePeriodSeconds != nil { - return fmt3.Errorf("this.GracePeriodSeconds == nil && that.GracePeriodSeconds != nil") - } else if that1.GracePeriodSeconds != nil { - return fmt3.Errorf("GracePeriodSeconds this(%v) Not Equal that(%v)", this.GracePeriodSeconds, that1.GracePeriodSeconds) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Command.Equal(that1.Command) { - return fmt3.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + return n +} + +func (m *ContainerID) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *HealthCheck) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*HealthCheck) - if !ok { - return false +func (m *FrameworkInfo) Size() (n int) { + var l int + _ = l + if m.User != nil { + l = len(*m.User) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if !this.Http.Equal(that1.Http) { - return false + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.DelaySeconds != nil && that1.DelaySeconds != nil { - if *this.DelaySeconds != *that1.DelaySeconds { - return false - } - } else if this.DelaySeconds != nil { - return false - } else if that1.DelaySeconds != nil { - return false + if m.FailoverTimeout != nil { + n += 9 } - if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { - if *this.IntervalSeconds != *that1.IntervalSeconds { - return false - } - } else if this.IntervalSeconds != nil { - return false - } else if that1.IntervalSeconds != nil { - return false + if m.Checkpoint != nil { + n += 2 } - if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { - if *this.TimeoutSeconds != *that1.TimeoutSeconds { - return false - } - } else if this.TimeoutSeconds != nil { - return false - } else if that1.TimeoutSeconds != nil { - return false + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) } - if this.ConsecutiveFailures != nil && that1.ConsecutiveFailures != nil { - if *this.ConsecutiveFailures != *that1.ConsecutiveFailures { - return false - } - } else if this.ConsecutiveFailures != nil { - return false - } else if that1.ConsecutiveFailures != nil { - return false + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) } - if this.GracePeriodSeconds != nil && that1.GracePeriodSeconds != nil { - if *this.GracePeriodSeconds != *that1.GracePeriodSeconds { - return false - } - } else if this.GracePeriodSeconds != nil { - return false - } else if that1.GracePeriodSeconds != nil { - return false + if m.Principal != nil { + l = len(*m.Principal) + n += 1 + l + sovMesos(uint64(l)) } - if !this.Command.Equal(that1.Command) { - return false + if m.WebuiUrl != nil { + l = len(*m.WebuiUrl) + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if len(m.Capabilities) > 0 { + for _, e := range m.Capabilities { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } } - return true + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n } -func (this *HealthCheck_HTTP) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + +func (m *FrameworkInfo_Capability) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*HealthCheck_HTTP) - if !ok { - return fmt3.Errorf("that is not of type *HealthCheck_HTTP") +func (m *HealthCheck) Size() (n int) { + var l int + _ = l + if m.Http != nil { + l = m.Http.Size() + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *HealthCheck_HTTP but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *HealthCheck_HTTPbut is not nil && this == nil") + if m.DelaySeconds != nil { + n += 9 } - if this.Port != nil && that1.Port != nil { - if *this.Port != *that1.Port { - return fmt3.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) - } - } else if this.Port != nil { - return fmt3.Errorf("this.Port == nil && that.Port != nil") - } else if that1.Port != nil { - return fmt3.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + if m.IntervalSeconds != nil { + n += 9 + } + if m.TimeoutSeconds != nil { + n += 9 + } + if m.ConsecutiveFailures != nil { + n += 1 + sovMesos(uint64(*m.ConsecutiveFailures)) + } + if m.GracePeriodSeconds != nil { + n += 9 + } + if m.Command != nil { + l = m.Command.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Path != nil && that1.Path != nil { - if *this.Path != *that1.Path { - return fmt3.Errorf("Path this(%v) Not Equal that(%v)", *this.Path, *that1.Path) - } - } else if this.Path != nil { - return fmt3.Errorf("this.Path == nil && that.Path != nil") - } else if that1.Path != nil { - return fmt3.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + return n +} + +func (m *HealthCheck_HTTP) Size() (n int) { + var l int + _ = l + if m.Port != nil { + n += 1 + sovMesos(uint64(*m.Port)) } - if len(this.Statuses) != len(that1.Statuses) { - return fmt3.Errorf("Statuses this(%v) Not Equal that(%v)", len(this.Statuses), len(that1.Statuses)) + if m.Path != nil { + l = len(*m.Path) + n += 1 + l + sovMesos(uint64(l)) } - for i := range this.Statuses { - if this.Statuses[i] != that1.Statuses[i] { - return fmt3.Errorf("Statuses this[%v](%v) Not Equal that[%v](%v)", i, this.Statuses[i], i, that1.Statuses[i]) + if len(m.Statuses) > 0 { + for _, e := range m.Statuses { + n += 1 + sovMesos(uint64(e)) } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *HealthCheck_HTTP) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + +func (m *CommandInfo) Size() (n int) { + var l int + _ = l + if len(m.Uris) > 0 { + for _, e := range m.Uris { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return false } - - that1, ok := that.(*HealthCheck_HTTP) - if !ok { - return false + if m.Environment != nil { + l = m.Environment.Size() + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if this.Port != nil && that1.Port != nil { - if *this.Port != *that1.Port { - return false - } - } else if this.Port != nil { - return false - } else if that1.Port != nil { - return false + if m.Container != nil { + l = m.Container.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Path != nil && that1.Path != nil { - if *this.Path != *that1.Path { - return false - } - } else if this.Path != nil { - return false - } else if that1.Path != nil { - return false + if m.User != nil { + l = len(*m.User) + n += 1 + l + sovMesos(uint64(l)) } - if len(this.Statuses) != len(that1.Statuses) { - return false + if m.Shell != nil { + n += 2 } - for i := range this.Statuses { - if this.Statuses[i] != that1.Statuses[i] { - return false + if len(m.Arguments) > 0 { + for _, s := range m.Arguments { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *CommandInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*CommandInfo) - if !ok { - return fmt3.Errorf("that is not of type *CommandInfo") +func (m *CommandInfo_URI) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *CommandInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *CommandInfobut is not nil && this == nil") + if m.Executable != nil { + n += 2 } - if !this.Container.Equal(that1.Container) { - return fmt3.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + if m.Extract != nil { + n += 2 } - if len(this.Uris) != len(that1.Uris) { - return fmt3.Errorf("Uris this(%v) Not Equal that(%v)", len(this.Uris), len(that1.Uris)) + if m.Cache != nil { + n += 2 } - for i := range this.Uris { - if !this.Uris[i].Equal(that1.Uris[i]) { - return fmt3.Errorf("Uris this[%v](%v) Not Equal that[%v](%v)", i, this.Uris[i], i, that1.Uris[i]) - } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Environment.Equal(that1.Environment) { - return fmt3.Errorf("Environment this(%v) Not Equal that(%v)", this.Environment, that1.Environment) + return n +} + +func (m *CommandInfo_ContainerInfo) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = len(*m.Image) + n += 1 + l + sovMesos(uint64(l)) } - if this.Shell != nil && that1.Shell != nil { - if *this.Shell != *that1.Shell { - return fmt3.Errorf("Shell this(%v) Not Equal that(%v)", *this.Shell, *that1.Shell) + if len(m.Options) > 0 { + for _, s := range m.Options { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Shell != nil { - return fmt3.Errorf("this.Shell == nil && that.Shell != nil") - } else if that1.Shell != nil { - return fmt3.Errorf("Shell this(%v) Not Equal that(%v)", this.Shell, that1.Shell) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) - } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if len(this.Arguments) != len(that1.Arguments) { - return fmt3.Errorf("Arguments this(%v) Not Equal that(%v)", len(this.Arguments), len(that1.Arguments)) + return n +} + +func (m *ExecutorInfo) Size() (n int) { + var l int + _ = l + if m.ExecutorId != nil { + l = m.ExecutorId.Size() + n += 1 + l + sovMesos(uint64(l)) } - for i := range this.Arguments { - if this.Arguments[i] != that1.Arguments[i] { - return fmt3.Errorf("Arguments this[%v](%v) Not Equal that[%v](%v)", i, this.Arguments[i], i, that1.Arguments[i]) - } + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMesos(uint64(l)) } - if this.User != nil && that1.User != nil { - if *this.User != *that1.User { - return fmt3.Errorf("User this(%v) Not Equal that(%v)", *this.User, *that1.User) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.User != nil { - return fmt3.Errorf("this.User == nil && that.User != nil") - } else if that1.User != nil { - return fmt3.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *CommandInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.Command != nil { + l = m.Command.Size() + n += 1 + l + sovMesos(uint64(l)) } - - that1, ok := that.(*CommandInfo) - if !ok { - return false + if m.FrameworkId != nil { + l = m.FrameworkId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if !this.Container.Equal(that1.Container) { - return false + if m.Source != nil { + l = len(*m.Source) + n += 1 + l + sovMesos(uint64(l)) } - if len(this.Uris) != len(that1.Uris) { - return false + if m.Container != nil { + l = m.Container.Size() + n += 1 + l + sovMesos(uint64(l)) } - for i := range this.Uris { - if !this.Uris[i].Equal(that1.Uris[i]) { - return false - } + if m.Discovery != nil { + l = m.Discovery.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Environment.Equal(that1.Environment) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Shell != nil && that1.Shell != nil { - if *this.Shell != *that1.Shell { - return false - } - } else if this.Shell != nil { - return false - } else if that1.Shell != nil { - return false + return n +} + +func (m *MasterInfo) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = len(*m.Id) + n += 1 + l + sovMesos(uint64(l)) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + if m.Ip != nil { + n += 1 + sovMesos(uint64(*m.Ip)) } - if len(this.Arguments) != len(that1.Arguments) { - return false + if m.Port != nil { + n += 1 + sovMesos(uint64(*m.Port)) } - for i := range this.Arguments { - if this.Arguments[i] != that1.Arguments[i] { - return false - } + if m.Pid != nil { + l = len(*m.Pid) + n += 1 + l + sovMesos(uint64(l)) } - if this.User != nil && that1.User != nil { - if *this.User != *that1.User { - return false - } - } else if this.User != nil { - return false - } else if that1.User != nil { - return false + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.Version != nil { + l = len(*m.Version) + n += 1 + l + sovMesos(uint64(l)) } - return true -} -func (this *CommandInfo_URI) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*CommandInfo_URI) - if !ok { - return fmt3.Errorf("that is not of type *CommandInfo_URI") +func (m *SlaveInfo) Size() (n int) { + var l int + _ = l + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return fmt3.Errorf("that is type *CommandInfo_URI but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *CommandInfo_URIbut is not nil && this == nil") } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) } - if this.Executable != nil && that1.Executable != nil { - if *this.Executable != *that1.Executable { - return fmt3.Errorf("Executable this(%v) Not Equal that(%v)", *this.Executable, *that1.Executable) - } - } else if this.Executable != nil { - return fmt3.Errorf("this.Executable == nil && that.Executable != nil") - } else if that1.Executable != nil { - return fmt3.Errorf("Executable this(%v) Not Equal that(%v)", this.Executable, that1.Executable) + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Extract != nil && that1.Extract != nil { - if *this.Extract != *that1.Extract { - return fmt3.Errorf("Extract this(%v) Not Equal that(%v)", *this.Extract, *that1.Extract) - } - } else if this.Extract != nil { - return fmt3.Errorf("this.Extract == nil && that.Extract != nil") - } else if that1.Extract != nil { - return fmt3.Errorf("Extract this(%v) Not Equal that(%v)", this.Extract, that1.Extract) + if m.Checkpoint != nil { + n += 2 } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.Port != nil { + n += 1 + sovMesos(uint64(*m.Port)) } - return nil -} -func (this *CommandInfo_URI) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*CommandInfo_URI) - if !ok { - return false +func (m *Value) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Scalar != nil { + l = m.Scalar.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + if m.Ranges != nil { + l = m.Ranges.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Executable != nil && that1.Executable != nil { - if *this.Executable != *that1.Executable { - return false - } - } else if this.Executable != nil { - return false - } else if that1.Executable != nil { - return false + if m.Set != nil { + l = m.Set.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Extract != nil && that1.Extract != nil { - if *this.Extract != *that1.Extract { - return false - } - } else if this.Extract != nil { - return false - } else if that1.Extract != nil { - return false + if m.Text != nil { + l = m.Text.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *CommandInfo_ContainerInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + +func (m *Value_Scalar) Size() (n int) { + var l int + _ = l + if m.Value != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*CommandInfo_ContainerInfo) - if !ok { - return fmt3.Errorf("that is not of type *CommandInfo_ContainerInfo") +func (m *Value_Range) Size() (n int) { + var l int + _ = l + if m.Begin != nil { + n += 1 + sovMesos(uint64(*m.Begin)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *CommandInfo_ContainerInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *CommandInfo_ContainerInfobut is not nil && this == nil") + if m.End != nil { + n += 1 + sovMesos(uint64(*m.End)) } - if this.Image != nil && that1.Image != nil { - if *this.Image != *that1.Image { - return fmt3.Errorf("Image this(%v) Not Equal that(%v)", *this.Image, *that1.Image) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Value_Ranges) Size() (n int) { + var l int + _ = l + if len(m.Range) > 0 { + for _, e := range m.Range { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Image != nil { - return fmt3.Errorf("this.Image == nil && that.Image != nil") - } else if that1.Image != nil { - return fmt3.Errorf("Image this(%v) Not Equal that(%v)", this.Image, that1.Image) } - if len(this.Options) != len(that1.Options) { - return fmt3.Errorf("Options this(%v) Not Equal that(%v)", len(this.Options), len(that1.Options)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - for i := range this.Options { - if this.Options[i] != that1.Options[i] { - return fmt3.Errorf("Options this[%v](%v) Not Equal that[%v](%v)", i, this.Options[i], i, that1.Options[i]) + return n +} + +func (m *Value_Set) Size() (n int) { + var l int + _ = l + if len(m.Item) > 0 { + for _, s := range m.Item { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *CommandInfo_ContainerInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + +func (m *Value_Text) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*CommandInfo_ContainerInfo) - if !ok { - return false +func (m *Attribute) Size() (n int) { + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) } - if this.Image != nil && that1.Image != nil { - if *this.Image != *that1.Image { - return false - } - } else if this.Image != nil { - return false - } else if that1.Image != nil { - return false + if m.Scalar != nil { + l = m.Scalar.Size() + n += 1 + l + sovMesos(uint64(l)) } - if len(this.Options) != len(that1.Options) { - return false + if m.Ranges != nil { + l = m.Ranges.Size() + n += 1 + l + sovMesos(uint64(l)) } - for i := range this.Options { - if this.Options[i] != that1.Options[i] { - return false - } + if m.Text != nil { + l = m.Text.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.Set != nil { + l = m.Set.Size() + n += 1 + l + sovMesos(uint64(l)) } - return true -} -func (this *ExecutorInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*ExecutorInfo) - if !ok { - return fmt3.Errorf("that is not of type *ExecutorInfo") +func (m *Resource) Size() (n int) { + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ExecutorInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ExecutorInfobut is not nil && this == nil") + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) } - if !this.ExecutorId.Equal(that1.ExecutorId) { - return fmt3.Errorf("ExecutorId this(%v) Not Equal that(%v)", this.ExecutorId, that1.ExecutorId) + if m.Scalar != nil { + l = m.Scalar.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.FrameworkId.Equal(that1.FrameworkId) { - return fmt3.Errorf("FrameworkId this(%v) Not Equal that(%v)", this.FrameworkId, that1.FrameworkId) + if m.Ranges != nil { + l = m.Ranges.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Command.Equal(that1.Command) { - return fmt3.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + if m.Set != nil { + l = m.Set.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Container.Equal(that1.Container) { - return fmt3.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) } - if len(this.Resources) != len(that1.Resources) { - return fmt3.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + if m.Disk != nil { + l = m.Disk.Size() + n += 1 + l + sovMesos(uint64(l)) } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return fmt3.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) - } + if m.Reservation != nil { + l = m.Reservation.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) - } - } else if this.Name != nil { - return fmt3.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + if m.Revocable != nil { + l = m.Revocable.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Source != nil && that1.Source != nil { - if *this.Source != *that1.Source { - return fmt3.Errorf("Source this(%v) Not Equal that(%v)", *this.Source, *that1.Source) - } - } else if this.Source != nil { - return fmt3.Errorf("this.Source == nil && that.Source != nil") - } else if that1.Source != nil { - return fmt3.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !bytes.Equal(this.Data, that1.Data) { - return fmt3.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + return n +} + +func (m *Resource_ReservationInfo) Size() (n int) { + var l int + _ = l + if m.Principal != nil { + l = len(*m.Principal) + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *ExecutorInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + +func (m *Resource_DiskInfo) Size() (n int) { + var l int + _ = l + if m.Persistence != nil { + l = m.Persistence.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Volume != nil { + l = m.Volume.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*ExecutorInfo) - if !ok { - return false +func (m *Resource_DiskInfo_Persistence) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = len(*m.Id) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.ExecutorId.Equal(that1.ExecutorId) { - return false + return n +} + +func (m *Resource_RevocableInfo) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.FrameworkId.Equal(that1.FrameworkId) { - return false + return n +} + +func (m *TrafficControlStatistics) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = len(*m.Id) + n += 1 + l + sovMesos(uint64(l)) } - if !this.Command.Equal(that1.Command) { - return false + if m.Backlog != nil { + n += 1 + sovMesos(uint64(*m.Backlog)) } - if !this.Container.Equal(that1.Container) { - return false + if m.Bytes != nil { + n += 1 + sovMesos(uint64(*m.Bytes)) } - if len(this.Resources) != len(that1.Resources) { - return false + if m.Drops != nil { + n += 1 + sovMesos(uint64(*m.Drops)) } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return false - } + if m.Overlimits != nil { + n += 1 + sovMesos(uint64(*m.Overlimits)) } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false - } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false + if m.Packets != nil { + n += 1 + sovMesos(uint64(*m.Packets)) } - if this.Source != nil && that1.Source != nil { - if *this.Source != *that1.Source { - return false - } - } else if this.Source != nil { - return false - } else if that1.Source != nil { - return false + if m.Qlen != nil { + n += 1 + sovMesos(uint64(*m.Qlen)) } - if !bytes.Equal(this.Data, that1.Data) { - return false + if m.Ratebps != nil { + n += 1 + sovMesos(uint64(*m.Ratebps)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.Ratepps != nil { + n += 1 + sovMesos(uint64(*m.Ratepps)) } - return true -} -func (this *MasterInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.Requeues != nil { + n += 1 + sovMesos(uint64(*m.Requeues)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*MasterInfo) - if !ok { - return fmt3.Errorf("that is not of type *MasterInfo") +func (m *ResourceStatistics) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + n += 9 } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *MasterInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *MasterInfobut is not nil && this == nil") + if m.CpusUserTimeSecs != nil { + n += 9 } - if this.Id != nil && that1.Id != nil { - if *this.Id != *that1.Id { - return fmt3.Errorf("Id this(%v) Not Equal that(%v)", *this.Id, *that1.Id) - } - } else if this.Id != nil { - return fmt3.Errorf("this.Id == nil && that.Id != nil") - } else if that1.Id != nil { - return fmt3.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + if m.CpusSystemTimeSecs != nil { + n += 9 } - if this.Ip != nil && that1.Ip != nil { - if *this.Ip != *that1.Ip { - return fmt3.Errorf("Ip this(%v) Not Equal that(%v)", *this.Ip, *that1.Ip) - } - } else if this.Ip != nil { - return fmt3.Errorf("this.Ip == nil && that.Ip != nil") - } else if that1.Ip != nil { - return fmt3.Errorf("Ip this(%v) Not Equal that(%v)", this.Ip, that1.Ip) + if m.CpusLimit != nil { + n += 9 } - if this.Port != nil && that1.Port != nil { - if *this.Port != *that1.Port { - return fmt3.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) - } - } else if this.Port != nil { - return fmt3.Errorf("this.Port == nil && that.Port != nil") - } else if that1.Port != nil { - return fmt3.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + if m.MemRssBytes != nil { + n += 1 + sovMesos(uint64(*m.MemRssBytes)) } - if this.Pid != nil && that1.Pid != nil { - if *this.Pid != *that1.Pid { - return fmt3.Errorf("Pid this(%v) Not Equal that(%v)", *this.Pid, *that1.Pid) - } - } else if this.Pid != nil { - return fmt3.Errorf("this.Pid == nil && that.Pid != nil") - } else if that1.Pid != nil { - return fmt3.Errorf("Pid this(%v) Not Equal that(%v)", this.Pid, that1.Pid) + if m.MemLimitBytes != nil { + n += 1 + sovMesos(uint64(*m.MemLimitBytes)) } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) - } - } else if this.Hostname != nil { - return fmt3.Errorf("this.Hostname == nil && that.Hostname != nil") - } else if that1.Hostname != nil { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + if m.CpusNrPeriods != nil { + n += 1 + sovMesos(uint64(*m.CpusNrPeriods)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.CpusNrThrottled != nil { + n += 1 + sovMesos(uint64(*m.CpusNrThrottled)) } - return nil -} -func (this *MasterInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.CpusThrottledTimeSecs != nil { + n += 9 + } + if m.MemFileBytes != nil { + n += 1 + sovMesos(uint64(*m.MemFileBytes)) + } + if m.MemAnonBytes != nil { + n += 1 + sovMesos(uint64(*m.MemAnonBytes)) } - - that1, ok := that.(*MasterInfo) - if !ok { - return false + if m.MemMappedFileBytes != nil { + n += 1 + sovMesos(uint64(*m.MemMappedFileBytes)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Perf != nil { + l = m.Perf.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Id != nil && that1.Id != nil { - if *this.Id != *that1.Id { - return false - } - } else if this.Id != nil { - return false - } else if that1.Id != nil { - return false + if m.NetRxPackets != nil { + n += 1 + sovMesos(uint64(*m.NetRxPackets)) } - if this.Ip != nil && that1.Ip != nil { - if *this.Ip != *that1.Ip { - return false - } - } else if this.Ip != nil { - return false - } else if that1.Ip != nil { - return false + if m.NetRxBytes != nil { + n += 1 + sovMesos(uint64(*m.NetRxBytes)) } - if this.Port != nil && that1.Port != nil { - if *this.Port != *that1.Port { - return false - } - } else if this.Port != nil { - return false - } else if that1.Port != nil { - return false + if m.NetRxErrors != nil { + n += 2 + sovMesos(uint64(*m.NetRxErrors)) } - if this.Pid != nil && that1.Pid != nil { - if *this.Pid != *that1.Pid { - return false - } - } else if this.Pid != nil { - return false - } else if that1.Pid != nil { - return false + if m.NetRxDropped != nil { + n += 2 + sovMesos(uint64(*m.NetRxDropped)) } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return false - } - } else if this.Hostname != nil { - return false - } else if that1.Hostname != nil { - return false + if m.NetTxPackets != nil { + n += 2 + sovMesos(uint64(*m.NetTxPackets)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.NetTxBytes != nil { + n += 2 + sovMesos(uint64(*m.NetTxBytes)) } - return true -} -func (this *SlaveInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.NetTxErrors != nil { + n += 2 + sovMesos(uint64(*m.NetTxErrors)) } - - that1, ok := that.(*SlaveInfo) - if !ok { - return fmt3.Errorf("that is not of type *SlaveInfo") + if m.NetTxDropped != nil { + n += 2 + sovMesos(uint64(*m.NetTxDropped)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *SlaveInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *SlaveInfobut is not nil && this == nil") + if m.NetTcpRttMicrosecsP50 != nil { + n += 10 } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) - } - } else if this.Hostname != nil { - return fmt3.Errorf("this.Hostname == nil && that.Hostname != nil") - } else if that1.Hostname != nil { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + if m.NetTcpRttMicrosecsP90 != nil { + n += 10 } - if this.Port != nil && that1.Port != nil { - if *this.Port != *that1.Port { - return fmt3.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) - } - } else if this.Port != nil { - return fmt3.Errorf("this.Port == nil && that.Port != nil") - } else if that1.Port != nil { - return fmt3.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + if m.NetTcpRttMicrosecsP95 != nil { + n += 10 } - if len(this.Resources) != len(that1.Resources) { - return fmt3.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + if m.NetTcpRttMicrosecsP99 != nil { + n += 10 } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return fmt3.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) - } + if m.DiskLimitBytes != nil { + n += 2 + sovMesos(uint64(*m.DiskLimitBytes)) } - if len(this.Attributes) != len(that1.Attributes) { - return fmt3.Errorf("Attributes this(%v) Not Equal that(%v)", len(this.Attributes), len(that1.Attributes)) + if m.DiskUsedBytes != nil { + n += 2 + sovMesos(uint64(*m.DiskUsedBytes)) } - for i := range this.Attributes { - if !this.Attributes[i].Equal(that1.Attributes[i]) { - return fmt3.Errorf("Attributes this[%v](%v) Not Equal that[%v](%v)", i, this.Attributes[i], i, that1.Attributes[i]) - } + if m.NetTcpActiveConnections != nil { + n += 10 } - if !this.Id.Equal(that1.Id) { - return fmt3.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + if m.NetTcpTimeWaitConnections != nil { + n += 10 } - if this.Checkpoint != nil && that1.Checkpoint != nil { - if *this.Checkpoint != *that1.Checkpoint { - return fmt3.Errorf("Checkpoint this(%v) Not Equal that(%v)", *this.Checkpoint, *that1.Checkpoint) - } - } else if this.Checkpoint != nil { - return fmt3.Errorf("this.Checkpoint == nil && that.Checkpoint != nil") - } else if that1.Checkpoint != nil { - return fmt3.Errorf("Checkpoint this(%v) Not Equal that(%v)", this.Checkpoint, that1.Checkpoint) + if m.Processes != nil { + n += 2 + sovMesos(uint64(*m.Processes)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.Threads != nil { + n += 2 + sovMesos(uint64(*m.Threads)) } - return nil -} -func (this *SlaveInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.MemLowPressureCounter != nil { + n += 2 + sovMesos(uint64(*m.MemLowPressureCounter)) } - - that1, ok := that.(*SlaveInfo) - if !ok { - return false + if m.MemMediumPressureCounter != nil { + n += 2 + sovMesos(uint64(*m.MemMediumPressureCounter)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.MemCriticalPressureCounter != nil { + n += 2 + sovMesos(uint64(*m.MemCriticalPressureCounter)) } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return false + if len(m.NetTrafficControlStatistics) > 0 { + for _, e := range m.NetTrafficControlStatistics { + l = e.Size() + n += 2 + l + sovMesos(uint64(l)) } - } else if this.Hostname != nil { - return false - } else if that1.Hostname != nil { - return false } - if this.Port != nil && that1.Port != nil { - if *this.Port != *that1.Port { - return false - } - } else if this.Port != nil { - return false - } else if that1.Port != nil { - return false + if m.MemTotalBytes != nil { + n += 2 + sovMesos(uint64(*m.MemTotalBytes)) } - if len(this.Resources) != len(that1.Resources) { - return false + if m.MemTotalMemswBytes != nil { + n += 2 + sovMesos(uint64(*m.MemTotalMemswBytes)) } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return false - } + if m.MemSoftLimitBytes != nil { + n += 2 + sovMesos(uint64(*m.MemSoftLimitBytes)) } - if len(this.Attributes) != len(that1.Attributes) { - return false + if m.MemCacheBytes != nil { + n += 2 + sovMesos(uint64(*m.MemCacheBytes)) } - for i := range this.Attributes { - if !this.Attributes[i].Equal(that1.Attributes[i]) { - return false - } + if m.MemSwapBytes != nil { + n += 2 + sovMesos(uint64(*m.MemSwapBytes)) } - if !this.Id.Equal(that1.Id) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Checkpoint != nil && that1.Checkpoint != nil { - if *this.Checkpoint != *that1.Checkpoint { - return false + return n +} + +func (m *ResourceUsage) Size() (n int) { + var l int + _ = l + if len(m.Executors) > 0 { + for _, e := range m.Executors { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Checkpoint != nil { - return false - } else if that1.Checkpoint != nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Value) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Value) - if !ok { - return fmt3.Errorf("that is not of type *Value") +func (m *ResourceUsage_Executor) Size() (n int) { + var l int + _ = l + if m.ExecutorInfo != nil { + l = m.ExecutorInfo.Size() + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil + if len(m.Allocated) > 0 { + for _, e := range m.Allocated { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return fmt3.Errorf("that is type *Value but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Valuebut is not nil && this == nil") } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) - } - } else if this.Type != nil { - return fmt3.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + if m.Statistics != nil { + l = m.Statistics.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Scalar.Equal(that1.Scalar) { - return fmt3.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Ranges.Equal(that1.Ranges) { - return fmt3.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + return n +} + +func (m *PerfStatistics) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + n += 9 } - if !this.Set.Equal(that1.Set) { - return fmt3.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + if m.Duration != nil { + n += 9 } - if !this.Text.Equal(that1.Text) { - return fmt3.Errorf("Text this(%v) Not Equal that(%v)", this.Text, that1.Text) + if m.Cycles != nil { + n += 1 + sovMesos(uint64(*m.Cycles)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.StalledCyclesFrontend != nil { + n += 1 + sovMesos(uint64(*m.StalledCyclesFrontend)) } - return nil -} -func (this *Value) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.StalledCyclesBackend != nil { + n += 1 + sovMesos(uint64(*m.StalledCyclesBackend)) } - - that1, ok := that.(*Value) - if !ok { - return false + if m.Instructions != nil { + n += 1 + sovMesos(uint64(*m.Instructions)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.CacheReferences != nil { + n += 1 + sovMesos(uint64(*m.CacheReferences)) } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false - } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false + if m.CacheMisses != nil { + n += 1 + sovMesos(uint64(*m.CacheMisses)) } - if !this.Scalar.Equal(that1.Scalar) { - return false + if m.Branches != nil { + n += 1 + sovMesos(uint64(*m.Branches)) } - if !this.Ranges.Equal(that1.Ranges) { - return false + if m.BranchMisses != nil { + n += 1 + sovMesos(uint64(*m.BranchMisses)) } - if !this.Set.Equal(that1.Set) { - return false + if m.BusCycles != nil { + n += 1 + sovMesos(uint64(*m.BusCycles)) } - if !this.Text.Equal(that1.Text) { - return false + if m.RefCycles != nil { + n += 1 + sovMesos(uint64(*m.RefCycles)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.CpuClock != nil { + n += 9 } - return true -} -func (this *Value_Scalar) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.TaskClock != nil { + n += 9 } - - that1, ok := that.(*Value_Scalar) - if !ok { - return fmt3.Errorf("that is not of type *Value_Scalar") + if m.PageFaults != nil { + n += 1 + sovMesos(uint64(*m.PageFaults)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Value_Scalar but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Value_Scalarbut is not nil && this == nil") + if m.MinorFaults != nil { + n += 2 + sovMesos(uint64(*m.MinorFaults)) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) - } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + if m.MajorFaults != nil { + n += 2 + sovMesos(uint64(*m.MajorFaults)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.ContextSwitches != nil { + n += 2 + sovMesos(uint64(*m.ContextSwitches)) } - return nil -} -func (this *Value_Scalar) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.CpuMigrations != nil { + n += 2 + sovMesos(uint64(*m.CpuMigrations)) } - - that1, ok := that.(*Value_Scalar) - if !ok { - return false + if m.AlignmentFaults != nil { + n += 2 + sovMesos(uint64(*m.AlignmentFaults)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.EmulationFaults != nil { + n += 2 + sovMesos(uint64(*m.EmulationFaults)) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + if m.L1DcacheLoads != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheLoads)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.L1DcacheLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheLoadMisses)) } - return true -} -func (this *Value_Range) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.L1DcacheStores != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheStores)) } - - that1, ok := that.(*Value_Range) - if !ok { - return fmt3.Errorf("that is not of type *Value_Range") + if m.L1DcacheStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheStoreMisses)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Value_Range but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Value_Rangebut is not nil && this == nil") + if m.L1DcachePrefetches != nil { + n += 2 + sovMesos(uint64(*m.L1DcachePrefetches)) } - if this.Begin != nil && that1.Begin != nil { - if *this.Begin != *that1.Begin { - return fmt3.Errorf("Begin this(%v) Not Equal that(%v)", *this.Begin, *that1.Begin) - } - } else if this.Begin != nil { - return fmt3.Errorf("this.Begin == nil && that.Begin != nil") - } else if that1.Begin != nil { - return fmt3.Errorf("Begin this(%v) Not Equal that(%v)", this.Begin, that1.Begin) + if m.L1DcachePrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.L1DcachePrefetchMisses)) } - if this.End != nil && that1.End != nil { - if *this.End != *that1.End { - return fmt3.Errorf("End this(%v) Not Equal that(%v)", *this.End, *that1.End) - } - } else if this.End != nil { - return fmt3.Errorf("this.End == nil && that.End != nil") - } else if that1.End != nil { - return fmt3.Errorf("End this(%v) Not Equal that(%v)", this.End, that1.End) + if m.L1IcacheLoads != nil { + n += 2 + sovMesos(uint64(*m.L1IcacheLoads)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.L1IcacheLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.L1IcacheLoadMisses)) } - return nil -} -func (this *Value_Range) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.L1IcachePrefetches != nil { + n += 2 + sovMesos(uint64(*m.L1IcachePrefetches)) } - - that1, ok := that.(*Value_Range) - if !ok { - return false + if m.L1IcachePrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.L1IcachePrefetchMisses)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.LlcLoads != nil { + n += 2 + sovMesos(uint64(*m.LlcLoads)) } - if this.Begin != nil && that1.Begin != nil { - if *this.Begin != *that1.Begin { - return false - } - } else if this.Begin != nil { - return false - } else if that1.Begin != nil { - return false + if m.LlcLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.LlcLoadMisses)) } - if this.End != nil && that1.End != nil { - if *this.End != *that1.End { - return false - } - } else if this.End != nil { - return false - } else if that1.End != nil { - return false + if m.LlcStores != nil { + n += 2 + sovMesos(uint64(*m.LlcStores)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.LlcStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.LlcStoreMisses)) } - return true -} -func (this *Value_Ranges) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.LlcPrefetches != nil { + n += 2 + sovMesos(uint64(*m.LlcPrefetches)) } - - that1, ok := that.(*Value_Ranges) - if !ok { - return fmt3.Errorf("that is not of type *Value_Ranges") + if m.LlcPrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.LlcPrefetchMisses)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Value_Ranges but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Value_Rangesbut is not nil && this == nil") + if m.DtlbLoads != nil { + n += 2 + sovMesos(uint64(*m.DtlbLoads)) } - if len(this.Range) != len(that1.Range) { - return fmt3.Errorf("Range this(%v) Not Equal that(%v)", len(this.Range), len(that1.Range)) + if m.DtlbLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.DtlbLoadMisses)) } - for i := range this.Range { - if !this.Range[i].Equal(that1.Range[i]) { - return fmt3.Errorf("Range this[%v](%v) Not Equal that[%v](%v)", i, this.Range[i], i, that1.Range[i]) - } + if m.DtlbStores != nil { + n += 2 + sovMesos(uint64(*m.DtlbStores)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.DtlbStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.DtlbStoreMisses)) } - return nil -} -func (this *Value_Ranges) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.DtlbPrefetches != nil { + n += 2 + sovMesos(uint64(*m.DtlbPrefetches)) } - - that1, ok := that.(*Value_Ranges) - if !ok { - return false + if m.DtlbPrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.DtlbPrefetchMisses)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.ItlbLoads != nil { + n += 2 + sovMesos(uint64(*m.ItlbLoads)) + } + if m.ItlbLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.ItlbLoadMisses)) } - if len(this.Range) != len(that1.Range) { - return false + if m.BranchLoads != nil { + n += 2 + sovMesos(uint64(*m.BranchLoads)) } - for i := range this.Range { - if !this.Range[i].Equal(that1.Range[i]) { - return false - } + if m.BranchLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.BranchLoadMisses)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.NodeLoads != nil { + n += 2 + sovMesos(uint64(*m.NodeLoads)) } - return true -} -func (this *Value_Set) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.NodeLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.NodeLoadMisses)) } - - that1, ok := that.(*Value_Set) - if !ok { - return fmt3.Errorf("that is not of type *Value_Set") + if m.NodeStores != nil { + n += 2 + sovMesos(uint64(*m.NodeStores)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Value_Set but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Value_Setbut is not nil && this == nil") + if m.NodeStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.NodeStoreMisses)) } - if len(this.Item) != len(that1.Item) { - return fmt3.Errorf("Item this(%v) Not Equal that(%v)", len(this.Item), len(that1.Item)) + if m.NodePrefetches != nil { + n += 2 + sovMesos(uint64(*m.NodePrefetches)) } - for i := range this.Item { - if this.Item[i] != that1.Item[i] { - return fmt3.Errorf("Item this[%v](%v) Not Equal that[%v](%v)", i, this.Item[i], i, that1.Item[i]) - } + if m.NodePrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.NodePrefetchMisses)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *Value_Set) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*Value_Set) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Item) != len(that1.Item) { - return false +func (m *Request) Size() (n int) { + var l int + _ = l + if m.SlaveId != nil { + l = m.SlaveId.Size() + n += 1 + l + sovMesos(uint64(l)) } - for i := range this.Item { - if this.Item[i] != that1.Item[i] { - return false + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Value_Text) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Value_Text) - if !ok { - return fmt3.Errorf("that is not of type *Value_Text") +func (m *Offer) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Value_Text but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Value_Textbut is not nil && this == nil") + if m.FrameworkId != nil { + l = m.FrameworkId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) - } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + if m.SlaveId != nil { + l = m.SlaveId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) } - return nil -} -func (this *Value_Text) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return false - } - - that1, ok := that.(*Value_Text) - if !ok { - return false } - if that1 == nil { - if this == nil { - return true + if len(m.ExecutorIds) > 0 { + for _, e := range m.ExecutorIds { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return false - } else if this == nil { - return false } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Attribute) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Attribute) - if !ok { - return fmt3.Errorf("that is not of type *Attribute") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Attribute but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Attributebut is not nil && this == nil") - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) - } - } else if this.Name != nil { - return fmt3.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) +func (m *Offer_Operation) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) - } - } else if this.Type != nil { - return fmt3.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + if m.Launch != nil { + l = m.Launch.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Scalar.Equal(that1.Scalar) { - return fmt3.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + if m.Reserve != nil { + l = m.Reserve.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Ranges.Equal(that1.Ranges) { - return fmt3.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + if m.Unreserve != nil { + l = m.Unreserve.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Set.Equal(that1.Set) { - return fmt3.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + if m.Create != nil { + l = m.Create.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Text.Equal(that1.Text) { - return fmt3.Errorf("Text this(%v) Not Equal that(%v)", this.Text, that1.Text) + if m.Destroy != nil { + l = m.Destroy.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *Attribute) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*Attribute) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true +func (m *Offer_Operation_Launch) Size() (n int) { + var l int + _ = l + if len(m.TaskInfos) > 0 { + for _, e := range m.TaskInfos { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return false - } else if this == nil { - return false } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false - } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false - } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false + return n +} + +func (m *Offer_Operation_Reserve) Size() (n int) { + var l int + _ = l + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } } - if !this.Scalar.Equal(that1.Scalar) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Ranges.Equal(that1.Ranges) { - return false + return n +} + +func (m *Offer_Operation_Unreserve) Size() (n int) { + var l int + _ = l + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } } - if !this.Set.Equal(that1.Set) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Text.Equal(that1.Text) { - return false + return n +} + +func (m *Offer_Operation_Create) Size() (n int) { + var l int + _ = l + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Resource) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + +func (m *Offer_Operation_Destroy) Size() (n int) { + var l int + _ = l + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return fmt3.Errorf("that == nil && this != nil") } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} - that1, ok := that.(*Resource) - if !ok { - return fmt3.Errorf("that is not of type *Resource") +func (m *TaskInfo) Size() (n int) { + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Resource but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Resourcebut is not nil && this == nil") + if m.TaskId != nil { + l = m.TaskId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) - } - } else if this.Name != nil { - return fmt3.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + if m.SlaveId != nil { + l = m.SlaveId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Type != nil { - return fmt3.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } - if !this.Scalar.Equal(that1.Scalar) { - return fmt3.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + if m.Executor != nil { + l = m.Executor.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Ranges.Equal(that1.Ranges) { - return fmt3.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMesos(uint64(l)) } - if !this.Set.Equal(that1.Set) { - return fmt3.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + if m.Command != nil { + l = m.Command.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Role != nil && that1.Role != nil { - if *this.Role != *that1.Role { - return fmt3.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) - } - } else if this.Role != nil { - return fmt3.Errorf("this.Role == nil && that.Role != nil") - } else if that1.Role != nil { - return fmt3.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + if m.HealthCheck != nil { + l = m.HealthCheck.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.Container != nil { + l = m.Container.Size() + n += 1 + l + sovMesos(uint64(l)) } - return nil -} -func (this *Resource) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false + if m.Labels != nil { + l = m.Labels.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Discovery != nil { + l = m.Discovery.Size() + n += 1 + l + sovMesos(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} - that1, ok := that.(*Resource) - if !ok { - return false +func (m *TaskStatus) Size() (n int) { + var l int + _ = l + if m.TaskId != nil { + l = m.TaskId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.State != nil { + n += 1 + sovMesos(uint64(*m.State)) } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false - } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMesos(uint64(l)) } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false - } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false + if m.Message != nil { + l = len(*m.Message) + n += 1 + l + sovMesos(uint64(l)) } - if !this.Scalar.Equal(that1.Scalar) { - return false + if m.SlaveId != nil { + l = m.SlaveId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !this.Ranges.Equal(that1.Ranges) { - return false + if m.Timestamp != nil { + n += 9 } - if !this.Set.Equal(that1.Set) { - return false + if m.ExecutorId != nil { + l = m.ExecutorId.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.Role != nil && that1.Role != nil { - if *this.Role != *that1.Role { - return false - } - } else if this.Role != nil { - return false - } else if that1.Role != nil { - return false + if m.Healthy != nil { + n += 2 } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.Source != nil { + n += 1 + sovMesos(uint64(*m.Source)) } - return true -} -func (this *ResourceStatistics) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.Reason != nil { + n += 1 + sovMesos(uint64(*m.Reason)) + } + if m.Uuid != nil { + l = len(m.Uuid) + n += 1 + l + sovMesos(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} - that1, ok := that.(*ResourceStatistics) - if !ok { - return fmt3.Errorf("that is not of type *ResourceStatistics") +func (m *Filters) Size() (n int) { + var l int + _ = l + if m.RefuseSeconds != nil { + n += 9 } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ResourceStatistics but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ResourceStatisticsbut is not nil && this == nil") + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.Timestamp != nil && that1.Timestamp != nil { - if *this.Timestamp != *that1.Timestamp { - return fmt3.Errorf("Timestamp this(%v) Not Equal that(%v)", *this.Timestamp, *that1.Timestamp) + return n +} + +func (m *Environment) Size() (n int) { + var l int + _ = l + if len(m.Variables) > 0 { + for _, e := range m.Variables { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Timestamp != nil { - return fmt3.Errorf("this.Timestamp == nil && that.Timestamp != nil") - } else if that1.Timestamp != nil { - return fmt3.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) } - if this.CpusUserTimeSecs != nil && that1.CpusUserTimeSecs != nil { - if *this.CpusUserTimeSecs != *that1.CpusUserTimeSecs { - return fmt3.Errorf("CpusUserTimeSecs this(%v) Not Equal that(%v)", *this.CpusUserTimeSecs, *that1.CpusUserTimeSecs) - } - } else if this.CpusUserTimeSecs != nil { - return fmt3.Errorf("this.CpusUserTimeSecs == nil && that.CpusUserTimeSecs != nil") - } else if that1.CpusUserTimeSecs != nil { - return fmt3.Errorf("CpusUserTimeSecs this(%v) Not Equal that(%v)", this.CpusUserTimeSecs, that1.CpusUserTimeSecs) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Environment_Variable) Size() (n int) { + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if this.CpusSystemTimeSecs != nil && that1.CpusSystemTimeSecs != nil { - if *this.CpusSystemTimeSecs != *that1.CpusSystemTimeSecs { - return fmt3.Errorf("CpusSystemTimeSecs this(%v) Not Equal that(%v)", *this.CpusSystemTimeSecs, *that1.CpusSystemTimeSecs) - } - } else if this.CpusSystemTimeSecs != nil { - return fmt3.Errorf("this.CpusSystemTimeSecs == nil && that.CpusSystemTimeSecs != nil") - } else if that1.CpusSystemTimeSecs != nil { - return fmt3.Errorf("CpusSystemTimeSecs this(%v) Not Equal that(%v)", this.CpusSystemTimeSecs, that1.CpusSystemTimeSecs) + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if this.CpusLimit != nil && that1.CpusLimit != nil { - if *this.CpusLimit != *that1.CpusLimit { - return fmt3.Errorf("CpusLimit this(%v) Not Equal that(%v)", *this.CpusLimit, *that1.CpusLimit) - } - } else if this.CpusLimit != nil { - return fmt3.Errorf("this.CpusLimit == nil && that.CpusLimit != nil") - } else if that1.CpusLimit != nil { - return fmt3.Errorf("CpusLimit this(%v) Not Equal that(%v)", this.CpusLimit, that1.CpusLimit) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.CpusNrPeriods != nil && that1.CpusNrPeriods != nil { - if *this.CpusNrPeriods != *that1.CpusNrPeriods { - return fmt3.Errorf("CpusNrPeriods this(%v) Not Equal that(%v)", *this.CpusNrPeriods, *that1.CpusNrPeriods) - } - } else if this.CpusNrPeriods != nil { - return fmt3.Errorf("this.CpusNrPeriods == nil && that.CpusNrPeriods != nil") - } else if that1.CpusNrPeriods != nil { - return fmt3.Errorf("CpusNrPeriods this(%v) Not Equal that(%v)", this.CpusNrPeriods, that1.CpusNrPeriods) + return n +} + +func (m *Parameter) Size() (n int) { + var l int + _ = l + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovMesos(uint64(l)) } - if this.CpusNrThrottled != nil && that1.CpusNrThrottled != nil { - if *this.CpusNrThrottled != *that1.CpusNrThrottled { - return fmt3.Errorf("CpusNrThrottled this(%v) Not Equal that(%v)", *this.CpusNrThrottled, *that1.CpusNrThrottled) - } - } else if this.CpusNrThrottled != nil { - return fmt3.Errorf("this.CpusNrThrottled == nil && that.CpusNrThrottled != nil") - } else if that1.CpusNrThrottled != nil { - return fmt3.Errorf("CpusNrThrottled this(%v) Not Equal that(%v)", this.CpusNrThrottled, that1.CpusNrThrottled) + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if this.CpusThrottledTimeSecs != nil && that1.CpusThrottledTimeSecs != nil { - if *this.CpusThrottledTimeSecs != *that1.CpusThrottledTimeSecs { - return fmt3.Errorf("CpusThrottledTimeSecs this(%v) Not Equal that(%v)", *this.CpusThrottledTimeSecs, *that1.CpusThrottledTimeSecs) - } - } else if this.CpusThrottledTimeSecs != nil { - return fmt3.Errorf("this.CpusThrottledTimeSecs == nil && that.CpusThrottledTimeSecs != nil") - } else if that1.CpusThrottledTimeSecs != nil { - return fmt3.Errorf("CpusThrottledTimeSecs this(%v) Not Equal that(%v)", this.CpusThrottledTimeSecs, that1.CpusThrottledTimeSecs) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.MemRssBytes != nil && that1.MemRssBytes != nil { - if *this.MemRssBytes != *that1.MemRssBytes { - return fmt3.Errorf("MemRssBytes this(%v) Not Equal that(%v)", *this.MemRssBytes, *that1.MemRssBytes) + return n +} + +func (m *Parameters) Size() (n int) { + var l int + _ = l + if len(m.Parameter) > 0 { + for _, e := range m.Parameter { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.MemRssBytes != nil { - return fmt3.Errorf("this.MemRssBytes == nil && that.MemRssBytes != nil") - } else if that1.MemRssBytes != nil { - return fmt3.Errorf("MemRssBytes this(%v) Not Equal that(%v)", this.MemRssBytes, that1.MemRssBytes) } - if this.MemLimitBytes != nil && that1.MemLimitBytes != nil { - if *this.MemLimitBytes != *that1.MemLimitBytes { - return fmt3.Errorf("MemLimitBytes this(%v) Not Equal that(%v)", *this.MemLimitBytes, *that1.MemLimitBytes) - } - } else if this.MemLimitBytes != nil { - return fmt3.Errorf("this.MemLimitBytes == nil && that.MemLimitBytes != nil") - } else if that1.MemLimitBytes != nil { - return fmt3.Errorf("MemLimitBytes this(%v) Not Equal that(%v)", this.MemLimitBytes, that1.MemLimitBytes) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.MemFileBytes != nil && that1.MemFileBytes != nil { - if *this.MemFileBytes != *that1.MemFileBytes { - return fmt3.Errorf("MemFileBytes this(%v) Not Equal that(%v)", *this.MemFileBytes, *that1.MemFileBytes) - } - } else if this.MemFileBytes != nil { - return fmt3.Errorf("this.MemFileBytes == nil && that.MemFileBytes != nil") - } else if that1.MemFileBytes != nil { - return fmt3.Errorf("MemFileBytes this(%v) Not Equal that(%v)", this.MemFileBytes, that1.MemFileBytes) + return n +} + +func (m *Credential) Size() (n int) { + var l int + _ = l + if m.Principal != nil { + l = len(*m.Principal) + n += 1 + l + sovMesos(uint64(l)) } - if this.MemAnonBytes != nil && that1.MemAnonBytes != nil { - if *this.MemAnonBytes != *that1.MemAnonBytes { - return fmt3.Errorf("MemAnonBytes this(%v) Not Equal that(%v)", *this.MemAnonBytes, *that1.MemAnonBytes) - } - } else if this.MemAnonBytes != nil { - return fmt3.Errorf("this.MemAnonBytes == nil && that.MemAnonBytes != nil") - } else if that1.MemAnonBytes != nil { - return fmt3.Errorf("MemAnonBytes this(%v) Not Equal that(%v)", this.MemAnonBytes, that1.MemAnonBytes) + if m.Secret != nil { + l = len(m.Secret) + n += 1 + l + sovMesos(uint64(l)) } - if this.MemMappedFileBytes != nil && that1.MemMappedFileBytes != nil { - if *this.MemMappedFileBytes != *that1.MemMappedFileBytes { - return fmt3.Errorf("MemMappedFileBytes this(%v) Not Equal that(%v)", *this.MemMappedFileBytes, *that1.MemMappedFileBytes) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Credentials) Size() (n int) { + var l int + _ = l + if len(m.Credentials) > 0 { + for _, e := range m.Credentials { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.MemMappedFileBytes != nil { - return fmt3.Errorf("this.MemMappedFileBytes == nil && that.MemMappedFileBytes != nil") - } else if that1.MemMappedFileBytes != nil { - return fmt3.Errorf("MemMappedFileBytes this(%v) Not Equal that(%v)", this.MemMappedFileBytes, that1.MemMappedFileBytes) } - if !this.Perf.Equal(that1.Perf) { - return fmt3.Errorf("Perf this(%v) Not Equal that(%v)", this.Perf, that1.Perf) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.NetRxPackets != nil && that1.NetRxPackets != nil { - if *this.NetRxPackets != *that1.NetRxPackets { - return fmt3.Errorf("NetRxPackets this(%v) Not Equal that(%v)", *this.NetRxPackets, *that1.NetRxPackets) - } - } else if this.NetRxPackets != nil { - return fmt3.Errorf("this.NetRxPackets == nil && that.NetRxPackets != nil") - } else if that1.NetRxPackets != nil { - return fmt3.Errorf("NetRxPackets this(%v) Not Equal that(%v)", this.NetRxPackets, that1.NetRxPackets) + return n +} + +func (m *ACL) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.NetRxBytes != nil && that1.NetRxBytes != nil { - if *this.NetRxBytes != *that1.NetRxBytes { - return fmt3.Errorf("NetRxBytes this(%v) Not Equal that(%v)", *this.NetRxBytes, *that1.NetRxBytes) - } - } else if this.NetRxBytes != nil { - return fmt3.Errorf("this.NetRxBytes == nil && that.NetRxBytes != nil") - } else if that1.NetRxBytes != nil { - return fmt3.Errorf("NetRxBytes this(%v) Not Equal that(%v)", this.NetRxBytes, that1.NetRxBytes) + return n +} + +func (m *ACL_Entity) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) } - if this.NetRxErrors != nil && that1.NetRxErrors != nil { - if *this.NetRxErrors != *that1.NetRxErrors { - return fmt3.Errorf("NetRxErrors this(%v) Not Equal that(%v)", *this.NetRxErrors, *that1.NetRxErrors) + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) } - } else if this.NetRxErrors != nil { - return fmt3.Errorf("this.NetRxErrors == nil && that.NetRxErrors != nil") - } else if that1.NetRxErrors != nil { - return fmt3.Errorf("NetRxErrors this(%v) Not Equal that(%v)", this.NetRxErrors, that1.NetRxErrors) } - if this.NetRxDropped != nil && that1.NetRxDropped != nil { - if *this.NetRxDropped != *that1.NetRxDropped { - return fmt3.Errorf("NetRxDropped this(%v) Not Equal that(%v)", *this.NetRxDropped, *that1.NetRxDropped) - } - } else if this.NetRxDropped != nil { - return fmt3.Errorf("this.NetRxDropped == nil && that.NetRxDropped != nil") - } else if that1.NetRxDropped != nil { - return fmt3.Errorf("NetRxDropped this(%v) Not Equal that(%v)", this.NetRxDropped, that1.NetRxDropped) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.NetTxPackets != nil && that1.NetTxPackets != nil { - if *this.NetTxPackets != *that1.NetTxPackets { - return fmt3.Errorf("NetTxPackets this(%v) Not Equal that(%v)", *this.NetTxPackets, *that1.NetTxPackets) - } - } else if this.NetTxPackets != nil { - return fmt3.Errorf("this.NetTxPackets == nil && that.NetTxPackets != nil") - } else if that1.NetTxPackets != nil { - return fmt3.Errorf("NetTxPackets this(%v) Not Equal that(%v)", this.NetTxPackets, that1.NetTxPackets) + return n +} + +func (m *ACL_RegisterFramework) Size() (n int) { + var l int + _ = l + if m.Principals != nil { + l = m.Principals.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTxBytes != nil && that1.NetTxBytes != nil { - if *this.NetTxBytes != *that1.NetTxBytes { - return fmt3.Errorf("NetTxBytes this(%v) Not Equal that(%v)", *this.NetTxBytes, *that1.NetTxBytes) - } - } else if this.NetTxBytes != nil { - return fmt3.Errorf("this.NetTxBytes == nil && that.NetTxBytes != nil") - } else if that1.NetTxBytes != nil { - return fmt3.Errorf("NetTxBytes this(%v) Not Equal that(%v)", this.NetTxBytes, that1.NetTxBytes) + if m.Roles != nil { + l = m.Roles.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTxErrors != nil && that1.NetTxErrors != nil { - if *this.NetTxErrors != *that1.NetTxErrors { - return fmt3.Errorf("NetTxErrors this(%v) Not Equal that(%v)", *this.NetTxErrors, *that1.NetTxErrors) - } - } else if this.NetTxErrors != nil { - return fmt3.Errorf("this.NetTxErrors == nil && that.NetTxErrors != nil") - } else if that1.NetTxErrors != nil { - return fmt3.Errorf("NetTxErrors this(%v) Not Equal that(%v)", this.NetTxErrors, that1.NetTxErrors) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.NetTxDropped != nil && that1.NetTxDropped != nil { - if *this.NetTxDropped != *that1.NetTxDropped { - return fmt3.Errorf("NetTxDropped this(%v) Not Equal that(%v)", *this.NetTxDropped, *that1.NetTxDropped) - } - } else if this.NetTxDropped != nil { - return fmt3.Errorf("this.NetTxDropped == nil && that.NetTxDropped != nil") - } else if that1.NetTxDropped != nil { - return fmt3.Errorf("NetTxDropped this(%v) Not Equal that(%v)", this.NetTxDropped, that1.NetTxDropped) + return n +} + +func (m *ACL_RunTask) Size() (n int) { + var l int + _ = l + if m.Principals != nil { + l = m.Principals.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTcpRttMicrosecsP50 != nil && that1.NetTcpRttMicrosecsP50 != nil { - if *this.NetTcpRttMicrosecsP50 != *that1.NetTcpRttMicrosecsP50 { - return fmt3.Errorf("NetTcpRttMicrosecsP50 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP50, *that1.NetTcpRttMicrosecsP50) - } - } else if this.NetTcpRttMicrosecsP50 != nil { - return fmt3.Errorf("this.NetTcpRttMicrosecsP50 == nil && that.NetTcpRttMicrosecsP50 != nil") - } else if that1.NetTcpRttMicrosecsP50 != nil { - return fmt3.Errorf("NetTcpRttMicrosecsP50 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP50, that1.NetTcpRttMicrosecsP50) + if m.Users != nil { + l = m.Users.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTcpRttMicrosecsP90 != nil && that1.NetTcpRttMicrosecsP90 != nil { - if *this.NetTcpRttMicrosecsP90 != *that1.NetTcpRttMicrosecsP90 { - return fmt3.Errorf("NetTcpRttMicrosecsP90 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP90, *that1.NetTcpRttMicrosecsP90) - } - } else if this.NetTcpRttMicrosecsP90 != nil { - return fmt3.Errorf("this.NetTcpRttMicrosecsP90 == nil && that.NetTcpRttMicrosecsP90 != nil") - } else if that1.NetTcpRttMicrosecsP90 != nil { - return fmt3.Errorf("NetTcpRttMicrosecsP90 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP90, that1.NetTcpRttMicrosecsP90) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.NetTcpRttMicrosecsP95 != nil && that1.NetTcpRttMicrosecsP95 != nil { - if *this.NetTcpRttMicrosecsP95 != *that1.NetTcpRttMicrosecsP95 { - return fmt3.Errorf("NetTcpRttMicrosecsP95 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP95, *that1.NetTcpRttMicrosecsP95) - } - } else if this.NetTcpRttMicrosecsP95 != nil { - return fmt3.Errorf("this.NetTcpRttMicrosecsP95 == nil && that.NetTcpRttMicrosecsP95 != nil") - } else if that1.NetTcpRttMicrosecsP95 != nil { - return fmt3.Errorf("NetTcpRttMicrosecsP95 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP95, that1.NetTcpRttMicrosecsP95) + return n +} + +func (m *ACL_ShutdownFramework) Size() (n int) { + var l int + _ = l + if m.Principals != nil { + l = m.Principals.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTcpRttMicrosecsP99 != nil && that1.NetTcpRttMicrosecsP99 != nil { - if *this.NetTcpRttMicrosecsP99 != *that1.NetTcpRttMicrosecsP99 { - return fmt3.Errorf("NetTcpRttMicrosecsP99 this(%v) Not Equal that(%v)", *this.NetTcpRttMicrosecsP99, *that1.NetTcpRttMicrosecsP99) - } - } else if this.NetTcpRttMicrosecsP99 != nil { - return fmt3.Errorf("this.NetTcpRttMicrosecsP99 == nil && that.NetTcpRttMicrosecsP99 != nil") - } else if that1.NetTcpRttMicrosecsP99 != nil { - return fmt3.Errorf("NetTcpRttMicrosecsP99 this(%v) Not Equal that(%v)", this.NetTcpRttMicrosecsP99, that1.NetTcpRttMicrosecsP99) + if m.FrameworkPrincipals != nil { + l = m.FrameworkPrincipals.Size() + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *ResourceStatistics) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*ResourceStatistics) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false +func (m *ACLs) Size() (n int) { + var l int + _ = l + if m.Permissive != nil { + n += 2 } - if this.Timestamp != nil && that1.Timestamp != nil { - if *this.Timestamp != *that1.Timestamp { - return false + if len(m.RegisterFrameworks) > 0 { + for _, e := range m.RegisterFrameworks { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.Timestamp != nil { - return false - } else if that1.Timestamp != nil { - return false } - if this.CpusUserTimeSecs != nil && that1.CpusUserTimeSecs != nil { - if *this.CpusUserTimeSecs != *that1.CpusUserTimeSecs { - return false + if len(m.RunTasks) > 0 { + for _, e := range m.RunTasks { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.CpusUserTimeSecs != nil { - return false - } else if that1.CpusUserTimeSecs != nil { - return false } - if this.CpusSystemTimeSecs != nil && that1.CpusSystemTimeSecs != nil { - if *this.CpusSystemTimeSecs != *that1.CpusSystemTimeSecs { - return false + if len(m.ShutdownFrameworks) > 0 { + for _, e := range m.ShutdownFrameworks { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.CpusSystemTimeSecs != nil { - return false - } else if that1.CpusSystemTimeSecs != nil { - return false } - if this.CpusLimit != nil && that1.CpusLimit != nil { - if *this.CpusLimit != *that1.CpusLimit { - return false - } - } else if this.CpusLimit != nil { - return false - } else if that1.CpusLimit != nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.CpusNrPeriods != nil && that1.CpusNrPeriods != nil { - if *this.CpusNrPeriods != *that1.CpusNrPeriods { - return false - } - } else if this.CpusNrPeriods != nil { - return false - } else if that1.CpusNrPeriods != nil { - return false + return n +} + +func (m *RateLimit) Size() (n int) { + var l int + _ = l + if m.Qps != nil { + n += 9 } - if this.CpusNrThrottled != nil && that1.CpusNrThrottled != nil { - if *this.CpusNrThrottled != *that1.CpusNrThrottled { - return false - } - } else if this.CpusNrThrottled != nil { - return false - } else if that1.CpusNrThrottled != nil { - return false + if m.Principal != nil { + l = len(*m.Principal) + n += 1 + l + sovMesos(uint64(l)) } - if this.CpusThrottledTimeSecs != nil && that1.CpusThrottledTimeSecs != nil { - if *this.CpusThrottledTimeSecs != *that1.CpusThrottledTimeSecs { - return false - } - } else if this.CpusThrottledTimeSecs != nil { - return false - } else if that1.CpusThrottledTimeSecs != nil { - return false + if m.Capacity != nil { + n += 1 + sovMesos(uint64(*m.Capacity)) } - if this.MemRssBytes != nil && that1.MemRssBytes != nil { - if *this.MemRssBytes != *that1.MemRssBytes { - return false - } - } else if this.MemRssBytes != nil { - return false - } else if that1.MemRssBytes != nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.MemLimitBytes != nil && that1.MemLimitBytes != nil { - if *this.MemLimitBytes != *that1.MemLimitBytes { - return false + return n +} + +func (m *RateLimits) Size() (n int) { + var l int + _ = l + if len(m.Limits) > 0 { + for _, e := range m.Limits { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.MemLimitBytes != nil { - return false - } else if that1.MemLimitBytes != nil { - return false } - if this.MemFileBytes != nil && that1.MemFileBytes != nil { - if *this.MemFileBytes != *that1.MemFileBytes { - return false - } - } else if this.MemFileBytes != nil { - return false - } else if that1.MemFileBytes != nil { - return false + if m.AggregateDefaultQps != nil { + n += 9 } - if this.MemAnonBytes != nil && that1.MemAnonBytes != nil { - if *this.MemAnonBytes != *that1.MemAnonBytes { - return false - } - } else if this.MemAnonBytes != nil { - return false - } else if that1.MemAnonBytes != nil { - return false + if m.AggregateDefaultCapacity != nil { + n += 1 + sovMesos(uint64(*m.AggregateDefaultCapacity)) } - if this.MemMappedFileBytes != nil && that1.MemMappedFileBytes != nil { - if *this.MemMappedFileBytes != *that1.MemMappedFileBytes { - return false - } - } else if this.MemMappedFileBytes != nil { - return false - } else if that1.MemMappedFileBytes != nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Perf.Equal(that1.Perf) { - return false + return n +} + +func (m *Volume) Size() (n int) { + var l int + _ = l + if m.ContainerPath != nil { + l = len(*m.ContainerPath) + n += 1 + l + sovMesos(uint64(l)) } - if this.NetRxPackets != nil && that1.NetRxPackets != nil { - if *this.NetRxPackets != *that1.NetRxPackets { - return false - } - } else if this.NetRxPackets != nil { - return false - } else if that1.NetRxPackets != nil { - return false + if m.HostPath != nil { + l = len(*m.HostPath) + n += 1 + l + sovMesos(uint64(l)) } - if this.NetRxBytes != nil && that1.NetRxBytes != nil { - if *this.NetRxBytes != *that1.NetRxBytes { - return false - } - } else if this.NetRxBytes != nil { - return false - } else if that1.NetRxBytes != nil { - return false + if m.Mode != nil { + n += 1 + sovMesos(uint64(*m.Mode)) } - if this.NetRxErrors != nil && that1.NetRxErrors != nil { - if *this.NetRxErrors != *that1.NetRxErrors { - return false - } - } else if this.NetRxErrors != nil { - return false - } else if that1.NetRxErrors != nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.NetRxDropped != nil && that1.NetRxDropped != nil { - if *this.NetRxDropped != *that1.NetRxDropped { - return false - } - } else if this.NetRxDropped != nil { - return false - } else if that1.NetRxDropped != nil { - return false + return n +} + +func (m *ContainerInfo) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) } - if this.NetTxPackets != nil && that1.NetTxPackets != nil { - if *this.NetTxPackets != *that1.NetTxPackets { - return false + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.NetTxPackets != nil { - return false - } else if that1.NetTxPackets != nil { - return false } - if this.NetTxBytes != nil && that1.NetTxBytes != nil { - if *this.NetTxBytes != *that1.NetTxBytes { - return false - } - } else if this.NetTxBytes != nil { - return false - } else if that1.NetTxBytes != nil { - return false + if m.Docker != nil { + l = m.Docker.Size() + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTxErrors != nil && that1.NetTxErrors != nil { - if *this.NetTxErrors != *that1.NetTxErrors { - return false - } - } else if this.NetTxErrors != nil { - return false - } else if that1.NetTxErrors != nil { - return false + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTxDropped != nil && that1.NetTxDropped != nil { - if *this.NetTxDropped != *that1.NetTxDropped { - return false - } - } else if this.NetTxDropped != nil { - return false - } else if that1.NetTxDropped != nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if this.NetTcpRttMicrosecsP50 != nil && that1.NetTcpRttMicrosecsP50 != nil { - if *this.NetTcpRttMicrosecsP50 != *that1.NetTcpRttMicrosecsP50 { - return false - } - } else if this.NetTcpRttMicrosecsP50 != nil { - return false - } else if that1.NetTcpRttMicrosecsP50 != nil { - return false + return n +} + +func (m *ContainerInfo_DockerInfo) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = len(*m.Image) + n += 1 + l + sovMesos(uint64(l)) } - if this.NetTcpRttMicrosecsP90 != nil && that1.NetTcpRttMicrosecsP90 != nil { - if *this.NetTcpRttMicrosecsP90 != *that1.NetTcpRttMicrosecsP90 { - return false - } - } else if this.NetTcpRttMicrosecsP90 != nil { - return false - } else if that1.NetTcpRttMicrosecsP90 != nil { - return false + if m.Network != nil { + n += 1 + sovMesos(uint64(*m.Network)) } - if this.NetTcpRttMicrosecsP95 != nil && that1.NetTcpRttMicrosecsP95 != nil { - if *this.NetTcpRttMicrosecsP95 != *that1.NetTcpRttMicrosecsP95 { - return false + if len(m.PortMappings) > 0 { + for _, e := range m.PortMappings { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.NetTcpRttMicrosecsP95 != nil { - return false - } else if that1.NetTcpRttMicrosecsP95 != nil { - return false } - if this.NetTcpRttMicrosecsP99 != nil && that1.NetTcpRttMicrosecsP99 != nil { - if *this.NetTcpRttMicrosecsP99 != *that1.NetTcpRttMicrosecsP99 { - return false + if m.Privileged != nil { + n += 2 + } + if len(m.Parameters) > 0 { + for _, e := range m.Parameters { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - } else if this.NetTcpRttMicrosecsP99 != nil { - return false - } else if that1.NetTcpRttMicrosecsP99 != nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.ForcePullImage != nil { + n += 2 } - return true -} -func (this *ResourceUsage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } + return n +} - that1, ok := that.(*ResourceUsage) - if !ok { - return fmt3.Errorf("that is not of type *ResourceUsage") +func (m *ContainerInfo_DockerInfo_PortMapping) Size() (n int) { + var l int + _ = l + if m.HostPort != nil { + n += 1 + sovMesos(uint64(*m.HostPort)) } - if that1 == nil { - if this == nil { - return nil + if m.ContainerPort != nil { + n += 1 + sovMesos(uint64(*m.ContainerPort)) + } + if m.Protocol != nil { + l = len(*m.Protocol) + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Labels) Size() (n int) { + var l int + _ = l + if len(m.Labels) > 0 { + for _, e := range m.Labels { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return fmt3.Errorf("that is type *ResourceUsage but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ResourceUsagebut is not nil && this == nil") } - if !this.SlaveId.Equal(that1.SlaveId) { - return fmt3.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.FrameworkId.Equal(that1.FrameworkId) { - return fmt3.Errorf("FrameworkId this(%v) Not Equal that(%v)", this.FrameworkId, that1.FrameworkId) + return n +} + +func (m *Label) Size() (n int) { + var l int + _ = l + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovMesos(uint64(l)) } - if !this.ExecutorId.Equal(that1.ExecutorId) { - return fmt3.Errorf("ExecutorId this(%v) Not Equal that(%v)", this.ExecutorId, that1.ExecutorId) + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) } - if this.ExecutorName != nil && that1.ExecutorName != nil { - if *this.ExecutorName != *that1.ExecutorName { - return fmt3.Errorf("ExecutorName this(%v) Not Equal that(%v)", *this.ExecutorName, *that1.ExecutorName) - } - } else if this.ExecutorName != nil { - return fmt3.Errorf("this.ExecutorName == nil && that.ExecutorName != nil") - } else if that1.ExecutorName != nil { - return fmt3.Errorf("ExecutorName this(%v) Not Equal that(%v)", this.ExecutorName, that1.ExecutorName) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.TaskId.Equal(that1.TaskId) { - return fmt3.Errorf("TaskId this(%v) Not Equal that(%v)", this.TaskId, that1.TaskId) + return n +} + +func (m *Port) Size() (n int) { + var l int + _ = l + if m.Number != nil { + n += 1 + sovMesos(uint64(*m.Number)) } - if !this.Statistics.Equal(that1.Statistics) { - return fmt3.Errorf("Statistics this(%v) Not Equal that(%v)", this.Statistics, that1.Statistics) + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.Protocol != nil { + l = len(*m.Protocol) + n += 1 + l + sovMesos(uint64(l)) } - return nil + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n } -func (this *ResourceUsage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + +func (m *Ports) Size() (n int) { + var l int + _ = l + if len(m.Ports) > 0 { + for _, e := range m.Ports { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) } - return false } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} - that1, ok := that.(*ResourceUsage) - if !ok { - return false +func (m *DiscoveryInfo) Size() (n int) { + var l int + _ = l + if m.Visibility != nil { + n += 1 + sovMesos(uint64(*m.Visibility)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) } - if !this.SlaveId.Equal(that1.SlaveId) { - return false + if m.Environment != nil { + l = len(*m.Environment) + n += 1 + l + sovMesos(uint64(l)) } - if !this.FrameworkId.Equal(that1.FrameworkId) { - return false + if m.Location != nil { + l = len(*m.Location) + n += 1 + l + sovMesos(uint64(l)) } - if !this.ExecutorId.Equal(that1.ExecutorId) { - return false + if m.Version != nil { + l = len(*m.Version) + n += 1 + l + sovMesos(uint64(l)) } - if this.ExecutorName != nil && that1.ExecutorName != nil { - if *this.ExecutorName != *that1.ExecutorName { - return false + if m.Ports != nil { + l = m.Ports.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMesos(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break } - } else if this.ExecutorName != nil { - return false - } else if that1.ExecutorName != nil { - return false } - if !this.TaskId.Equal(that1.TaskId) { - return false + return n +} +func sozMesos(x uint64) (n int) { + return sovMesos(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FrameworkID) String() string { + if this == nil { + return "nil" } - if !this.Statistics.Equal(that1.Statistics) { - return false + s := strings.Join([]string{`&FrameworkID{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OfferID) String() string { + if this == nil { + return "nil" } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + s := strings.Join([]string{`&OfferID{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SlaveID) String() string { + if this == nil { + return "nil" } - return true + s := strings.Join([]string{`&SlaveID{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s } -func (this *PerfStatistics) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") +func (this *TaskID) String() string { + if this == nil { + return "nil" } - - that1, ok := that.(*PerfStatistics) - if !ok { - return fmt3.Errorf("that is not of type *PerfStatistics") + s := strings.Join([]string{`&TaskID{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ExecutorID) String() string { + if this == nil { + return "nil" } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *PerfStatistics but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *PerfStatisticsbut is not nil && this == nil") + s := strings.Join([]string{`&ExecutorID{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerID) String() string { + if this == nil { + return "nil" } - if this.Timestamp != nil && that1.Timestamp != nil { - if *this.Timestamp != *that1.Timestamp { - return fmt3.Errorf("Timestamp this(%v) Not Equal that(%v)", *this.Timestamp, *that1.Timestamp) - } - } else if this.Timestamp != nil { - return fmt3.Errorf("this.Timestamp == nil && that.Timestamp != nil") - } else if that1.Timestamp != nil { - return fmt3.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + s := strings.Join([]string{`&ContainerID{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FrameworkInfo) String() string { + if this == nil { + return "nil" } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return fmt3.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) - } - } else if this.Duration != nil { - return fmt3.Errorf("this.Duration == nil && that.Duration != nil") - } else if that1.Duration != nil { - return fmt3.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + s := strings.Join([]string{`&FrameworkInfo{`, + `User:` + valueToStringMesos(this.User) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Id:` + strings.Replace(fmt.Sprintf("%v", this.Id), "FrameworkID", "FrameworkID", 1) + `,`, + `FailoverTimeout:` + valueToStringMesos(this.FailoverTimeout) + `,`, + `Checkpoint:` + valueToStringMesos(this.Checkpoint) + `,`, + `Role:` + valueToStringMesos(this.Role) + `,`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Principal:` + valueToStringMesos(this.Principal) + `,`, + `WebuiUrl:` + valueToStringMesos(this.WebuiUrl) + `,`, + `Capabilities:` + strings.Replace(fmt.Sprintf("%v", this.Capabilities), "FrameworkInfo_Capability", "FrameworkInfo_Capability", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FrameworkInfo_Capability) String() string { + if this == nil { + return "nil" } - if this.Cycles != nil && that1.Cycles != nil { - if *this.Cycles != *that1.Cycles { - return fmt3.Errorf("Cycles this(%v) Not Equal that(%v)", *this.Cycles, *that1.Cycles) - } - } else if this.Cycles != nil { - return fmt3.Errorf("this.Cycles == nil && that.Cycles != nil") - } else if that1.Cycles != nil { - return fmt3.Errorf("Cycles this(%v) Not Equal that(%v)", this.Cycles, that1.Cycles) + s := strings.Join([]string{`&FrameworkInfo_Capability{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *HealthCheck) String() string { + if this == nil { + return "nil" } - if this.StalledCyclesFrontend != nil && that1.StalledCyclesFrontend != nil { - if *this.StalledCyclesFrontend != *that1.StalledCyclesFrontend { - return fmt3.Errorf("StalledCyclesFrontend this(%v) Not Equal that(%v)", *this.StalledCyclesFrontend, *that1.StalledCyclesFrontend) - } - } else if this.StalledCyclesFrontend != nil { - return fmt3.Errorf("this.StalledCyclesFrontend == nil && that.StalledCyclesFrontend != nil") - } else if that1.StalledCyclesFrontend != nil { - return fmt3.Errorf("StalledCyclesFrontend this(%v) Not Equal that(%v)", this.StalledCyclesFrontend, that1.StalledCyclesFrontend) + s := strings.Join([]string{`&HealthCheck{`, + `Http:` + strings.Replace(fmt.Sprintf("%v", this.Http), "HealthCheck_HTTP", "HealthCheck_HTTP", 1) + `,`, + `DelaySeconds:` + valueToStringMesos(this.DelaySeconds) + `,`, + `IntervalSeconds:` + valueToStringMesos(this.IntervalSeconds) + `,`, + `TimeoutSeconds:` + valueToStringMesos(this.TimeoutSeconds) + `,`, + `ConsecutiveFailures:` + valueToStringMesos(this.ConsecutiveFailures) + `,`, + `GracePeriodSeconds:` + valueToStringMesos(this.GracePeriodSeconds) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *HealthCheck_HTTP) String() string { + if this == nil { + return "nil" } - if this.StalledCyclesBackend != nil && that1.StalledCyclesBackend != nil { - if *this.StalledCyclesBackend != *that1.StalledCyclesBackend { - return fmt3.Errorf("StalledCyclesBackend this(%v) Not Equal that(%v)", *this.StalledCyclesBackend, *that1.StalledCyclesBackend) - } - } else if this.StalledCyclesBackend != nil { - return fmt3.Errorf("this.StalledCyclesBackend == nil && that.StalledCyclesBackend != nil") - } else if that1.StalledCyclesBackend != nil { - return fmt3.Errorf("StalledCyclesBackend this(%v) Not Equal that(%v)", this.StalledCyclesBackend, that1.StalledCyclesBackend) + s := strings.Join([]string{`&HealthCheck_HTTP{`, + `Port:` + valueToStringMesos(this.Port) + `,`, + `Path:` + valueToStringMesos(this.Path) + `,`, + `Statuses:` + fmt.Sprintf("%v", this.Statuses) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CommandInfo) String() string { + if this == nil { + return "nil" } - if this.Instructions != nil && that1.Instructions != nil { - if *this.Instructions != *that1.Instructions { - return fmt3.Errorf("Instructions this(%v) Not Equal that(%v)", *this.Instructions, *that1.Instructions) - } - } else if this.Instructions != nil { - return fmt3.Errorf("this.Instructions == nil && that.Instructions != nil") - } else if that1.Instructions != nil { - return fmt3.Errorf("Instructions this(%v) Not Equal that(%v)", this.Instructions, that1.Instructions) + s := strings.Join([]string{`&CommandInfo{`, + `Uris:` + strings.Replace(fmt.Sprintf("%v", this.Uris), "CommandInfo_URI", "CommandInfo_URI", 1) + `,`, + `Environment:` + strings.Replace(fmt.Sprintf("%v", this.Environment), "Environment", "Environment", 1) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "CommandInfo_ContainerInfo", "CommandInfo_ContainerInfo", 1) + `,`, + `User:` + valueToStringMesos(this.User) + `,`, + `Shell:` + valueToStringMesos(this.Shell) + `,`, + `Arguments:` + fmt.Sprintf("%v", this.Arguments) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CommandInfo_URI) String() string { + if this == nil { + return "nil" } - if this.CacheReferences != nil && that1.CacheReferences != nil { - if *this.CacheReferences != *that1.CacheReferences { - return fmt3.Errorf("CacheReferences this(%v) Not Equal that(%v)", *this.CacheReferences, *that1.CacheReferences) - } - } else if this.CacheReferences != nil { - return fmt3.Errorf("this.CacheReferences == nil && that.CacheReferences != nil") - } else if that1.CacheReferences != nil { - return fmt3.Errorf("CacheReferences this(%v) Not Equal that(%v)", this.CacheReferences, that1.CacheReferences) + s := strings.Join([]string{`&CommandInfo_URI{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `Executable:` + valueToStringMesos(this.Executable) + `,`, + `Extract:` + valueToStringMesos(this.Extract) + `,`, + `Cache:` + valueToStringMesos(this.Cache) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CommandInfo_ContainerInfo) String() string { + if this == nil { + return "nil" } - if this.CacheMisses != nil && that1.CacheMisses != nil { - if *this.CacheMisses != *that1.CacheMisses { - return fmt3.Errorf("CacheMisses this(%v) Not Equal that(%v)", *this.CacheMisses, *that1.CacheMisses) - } - } else if this.CacheMisses != nil { - return fmt3.Errorf("this.CacheMisses == nil && that.CacheMisses != nil") - } else if that1.CacheMisses != nil { - return fmt3.Errorf("CacheMisses this(%v) Not Equal that(%v)", this.CacheMisses, that1.CacheMisses) + s := strings.Join([]string{`&CommandInfo_ContainerInfo{`, + `Image:` + valueToStringMesos(this.Image) + `,`, + `Options:` + fmt.Sprintf("%v", this.Options) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ExecutorInfo) String() string { + if this == nil { + return "nil" } - if this.Branches != nil && that1.Branches != nil { - if *this.Branches != *that1.Branches { - return fmt3.Errorf("Branches this(%v) Not Equal that(%v)", *this.Branches, *that1.Branches) - } - } else if this.Branches != nil { - return fmt3.Errorf("this.Branches == nil && that.Branches != nil") - } else if that1.Branches != nil { - return fmt3.Errorf("Branches this(%v) Not Equal that(%v)", this.Branches, that1.Branches) + s := strings.Join([]string{`&ExecutorInfo{`, + `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, + `Data:` + valueToStringMesos(this.Data) + `,`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, + `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Source:` + valueToStringMesos(this.Source) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, + `Discovery:` + strings.Replace(fmt.Sprintf("%v", this.Discovery), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MasterInfo) String() string { + if this == nil { + return "nil" } - if this.BranchMisses != nil && that1.BranchMisses != nil { - if *this.BranchMisses != *that1.BranchMisses { - return fmt3.Errorf("BranchMisses this(%v) Not Equal that(%v)", *this.BranchMisses, *that1.BranchMisses) - } - } else if this.BranchMisses != nil { - return fmt3.Errorf("this.BranchMisses == nil && that.BranchMisses != nil") - } else if that1.BranchMisses != nil { - return fmt3.Errorf("BranchMisses this(%v) Not Equal that(%v)", this.BranchMisses, that1.BranchMisses) + s := strings.Join([]string{`&MasterInfo{`, + `Id:` + valueToStringMesos(this.Id) + `,`, + `Ip:` + valueToStringMesos(this.Ip) + `,`, + `Port:` + valueToStringMesos(this.Port) + `,`, + `Pid:` + valueToStringMesos(this.Pid) + `,`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Version:` + valueToStringMesos(this.Version) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SlaveInfo) String() string { + if this == nil { + return "nil" } - if this.BusCycles != nil && that1.BusCycles != nil { - if *this.BusCycles != *that1.BusCycles { - return fmt3.Errorf("BusCycles this(%v) Not Equal that(%v)", *this.BusCycles, *that1.BusCycles) - } - } else if this.BusCycles != nil { - return fmt3.Errorf("this.BusCycles == nil && that.BusCycles != nil") - } else if that1.BusCycles != nil { - return fmt3.Errorf("BusCycles this(%v) Not Equal that(%v)", this.BusCycles, that1.BusCycles) + s := strings.Join([]string{`&SlaveInfo{`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `Attributes:` + strings.Replace(fmt.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1) + `,`, + `Id:` + strings.Replace(fmt.Sprintf("%v", this.Id), "SlaveID", "SlaveID", 1) + `,`, + `Checkpoint:` + valueToStringMesos(this.Checkpoint) + `,`, + `Port:` + valueToStringMesos(this.Port) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value) String() string { + if this == nil { + return "nil" } - if this.RefCycles != nil && that1.RefCycles != nil { - if *this.RefCycles != *that1.RefCycles { - return fmt3.Errorf("RefCycles this(%v) Not Equal that(%v)", *this.RefCycles, *that1.RefCycles) - } - } else if this.RefCycles != nil { - return fmt3.Errorf("this.RefCycles == nil && that.RefCycles != nil") - } else if that1.RefCycles != nil { - return fmt3.Errorf("RefCycles this(%v) Not Equal that(%v)", this.RefCycles, that1.RefCycles) + s := strings.Join([]string{`&Value{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Scalar:` + strings.Replace(fmt.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, + `Ranges:` + strings.Replace(fmt.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, + `Set:` + strings.Replace(fmt.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, + `Text:` + strings.Replace(fmt.Sprintf("%v", this.Text), "Value_Text", "Value_Text", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Scalar) String() string { + if this == nil { + return "nil" } - if this.CpuClock != nil && that1.CpuClock != nil { - if *this.CpuClock != *that1.CpuClock { - return fmt3.Errorf("CpuClock this(%v) Not Equal that(%v)", *this.CpuClock, *that1.CpuClock) - } - } else if this.CpuClock != nil { - return fmt3.Errorf("this.CpuClock == nil && that.CpuClock != nil") - } else if that1.CpuClock != nil { - return fmt3.Errorf("CpuClock this(%v) Not Equal that(%v)", this.CpuClock, that1.CpuClock) + s := strings.Join([]string{`&Value_Scalar{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Range) String() string { + if this == nil { + return "nil" } - if this.TaskClock != nil && that1.TaskClock != nil { - if *this.TaskClock != *that1.TaskClock { - return fmt3.Errorf("TaskClock this(%v) Not Equal that(%v)", *this.TaskClock, *that1.TaskClock) - } - } else if this.TaskClock != nil { - return fmt3.Errorf("this.TaskClock == nil && that.TaskClock != nil") - } else if that1.TaskClock != nil { - return fmt3.Errorf("TaskClock this(%v) Not Equal that(%v)", this.TaskClock, that1.TaskClock) + s := strings.Join([]string{`&Value_Range{`, + `Begin:` + valueToStringMesos(this.Begin) + `,`, + `End:` + valueToStringMesos(this.End) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Ranges) String() string { + if this == nil { + return "nil" } - if this.PageFaults != nil && that1.PageFaults != nil { - if *this.PageFaults != *that1.PageFaults { - return fmt3.Errorf("PageFaults this(%v) Not Equal that(%v)", *this.PageFaults, *that1.PageFaults) - } - } else if this.PageFaults != nil { - return fmt3.Errorf("this.PageFaults == nil && that.PageFaults != nil") - } else if that1.PageFaults != nil { - return fmt3.Errorf("PageFaults this(%v) Not Equal that(%v)", this.PageFaults, that1.PageFaults) + s := strings.Join([]string{`&Value_Ranges{`, + `Range:` + strings.Replace(fmt.Sprintf("%v", this.Range), "Value_Range", "Value_Range", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Set) String() string { + if this == nil { + return "nil" } - if this.MinorFaults != nil && that1.MinorFaults != nil { - if *this.MinorFaults != *that1.MinorFaults { - return fmt3.Errorf("MinorFaults this(%v) Not Equal that(%v)", *this.MinorFaults, *that1.MinorFaults) - } - } else if this.MinorFaults != nil { - return fmt3.Errorf("this.MinorFaults == nil && that.MinorFaults != nil") - } else if that1.MinorFaults != nil { - return fmt3.Errorf("MinorFaults this(%v) Not Equal that(%v)", this.MinorFaults, that1.MinorFaults) + s := strings.Join([]string{`&Value_Set{`, + `Item:` + fmt.Sprintf("%v", this.Item) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Text) String() string { + if this == nil { + return "nil" } - if this.MajorFaults != nil && that1.MajorFaults != nil { - if *this.MajorFaults != *that1.MajorFaults { - return fmt3.Errorf("MajorFaults this(%v) Not Equal that(%v)", *this.MajorFaults, *that1.MajorFaults) - } - } else if this.MajorFaults != nil { - return fmt3.Errorf("this.MajorFaults == nil && that.MajorFaults != nil") - } else if that1.MajorFaults != nil { - return fmt3.Errorf("MajorFaults this(%v) Not Equal that(%v)", this.MajorFaults, that1.MajorFaults) + s := strings.Join([]string{`&Value_Text{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Attribute) String() string { + if this == nil { + return "nil" } - if this.ContextSwitches != nil && that1.ContextSwitches != nil { - if *this.ContextSwitches != *that1.ContextSwitches { - return fmt3.Errorf("ContextSwitches this(%v) Not Equal that(%v)", *this.ContextSwitches, *that1.ContextSwitches) - } - } else if this.ContextSwitches != nil { - return fmt3.Errorf("this.ContextSwitches == nil && that.ContextSwitches != nil") - } else if that1.ContextSwitches != nil { - return fmt3.Errorf("ContextSwitches this(%v) Not Equal that(%v)", this.ContextSwitches, that1.ContextSwitches) + s := strings.Join([]string{`&Attribute{`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Scalar:` + strings.Replace(fmt.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, + `Ranges:` + strings.Replace(fmt.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, + `Text:` + strings.Replace(fmt.Sprintf("%v", this.Text), "Value_Text", "Value_Text", 1) + `,`, + `Set:` + strings.Replace(fmt.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Resource) String() string { + if this == nil { + return "nil" } - if this.CpuMigrations != nil && that1.CpuMigrations != nil { - if *this.CpuMigrations != *that1.CpuMigrations { - return fmt3.Errorf("CpuMigrations this(%v) Not Equal that(%v)", *this.CpuMigrations, *that1.CpuMigrations) - } - } else if this.CpuMigrations != nil { - return fmt3.Errorf("this.CpuMigrations == nil && that.CpuMigrations != nil") - } else if that1.CpuMigrations != nil { - return fmt3.Errorf("CpuMigrations this(%v) Not Equal that(%v)", this.CpuMigrations, that1.CpuMigrations) + s := strings.Join([]string{`&Resource{`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Scalar:` + strings.Replace(fmt.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, + `Ranges:` + strings.Replace(fmt.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, + `Set:` + strings.Replace(fmt.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, + `Role:` + valueToStringMesos(this.Role) + `,`, + `Disk:` + strings.Replace(fmt.Sprintf("%v", this.Disk), "Resource_DiskInfo", "Resource_DiskInfo", 1) + `,`, + `Reservation:` + strings.Replace(fmt.Sprintf("%v", this.Reservation), "Resource_ReservationInfo", "Resource_ReservationInfo", 1) + `,`, + `Revocable:` + strings.Replace(fmt.Sprintf("%v", this.Revocable), "Resource_RevocableInfo", "Resource_RevocableInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_ReservationInfo) String() string { + if this == nil { + return "nil" } - if this.AlignmentFaults != nil && that1.AlignmentFaults != nil { - if *this.AlignmentFaults != *that1.AlignmentFaults { - return fmt3.Errorf("AlignmentFaults this(%v) Not Equal that(%v)", *this.AlignmentFaults, *that1.AlignmentFaults) - } - } else if this.AlignmentFaults != nil { - return fmt3.Errorf("this.AlignmentFaults == nil && that.AlignmentFaults != nil") - } else if that1.AlignmentFaults != nil { - return fmt3.Errorf("AlignmentFaults this(%v) Not Equal that(%v)", this.AlignmentFaults, that1.AlignmentFaults) + s := strings.Join([]string{`&Resource_ReservationInfo{`, + `Principal:` + valueToStringMesos(this.Principal) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_DiskInfo) String() string { + if this == nil { + return "nil" } - if this.EmulationFaults != nil && that1.EmulationFaults != nil { - if *this.EmulationFaults != *that1.EmulationFaults { - return fmt3.Errorf("EmulationFaults this(%v) Not Equal that(%v)", *this.EmulationFaults, *that1.EmulationFaults) - } - } else if this.EmulationFaults != nil { - return fmt3.Errorf("this.EmulationFaults == nil && that.EmulationFaults != nil") - } else if that1.EmulationFaults != nil { - return fmt3.Errorf("EmulationFaults this(%v) Not Equal that(%v)", this.EmulationFaults, that1.EmulationFaults) + s := strings.Join([]string{`&Resource_DiskInfo{`, + `Persistence:` + strings.Replace(fmt.Sprintf("%v", this.Persistence), "Resource_DiskInfo_Persistence", "Resource_DiskInfo_Persistence", 1) + `,`, + `Volume:` + strings.Replace(fmt.Sprintf("%v", this.Volume), "Volume", "Volume", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_DiskInfo_Persistence) String() string { + if this == nil { + return "nil" } - if this.L1DcacheLoads != nil && that1.L1DcacheLoads != nil { - if *this.L1DcacheLoads != *that1.L1DcacheLoads { - return fmt3.Errorf("L1DcacheLoads this(%v) Not Equal that(%v)", *this.L1DcacheLoads, *that1.L1DcacheLoads) - } - } else if this.L1DcacheLoads != nil { - return fmt3.Errorf("this.L1DcacheLoads == nil && that.L1DcacheLoads != nil") - } else if that1.L1DcacheLoads != nil { - return fmt3.Errorf("L1DcacheLoads this(%v) Not Equal that(%v)", this.L1DcacheLoads, that1.L1DcacheLoads) + s := strings.Join([]string{`&Resource_DiskInfo_Persistence{`, + `Id:` + valueToStringMesos(this.Id) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_RevocableInfo) String() string { + if this == nil { + return "nil" } - if this.L1DcacheLoadMisses != nil && that1.L1DcacheLoadMisses != nil { - if *this.L1DcacheLoadMisses != *that1.L1DcacheLoadMisses { - return fmt3.Errorf("L1DcacheLoadMisses this(%v) Not Equal that(%v)", *this.L1DcacheLoadMisses, *that1.L1DcacheLoadMisses) - } - } else if this.L1DcacheLoadMisses != nil { - return fmt3.Errorf("this.L1DcacheLoadMisses == nil && that.L1DcacheLoadMisses != nil") - } else if that1.L1DcacheLoadMisses != nil { - return fmt3.Errorf("L1DcacheLoadMisses this(%v) Not Equal that(%v)", this.L1DcacheLoadMisses, that1.L1DcacheLoadMisses) + s := strings.Join([]string{`&Resource_RevocableInfo{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TrafficControlStatistics) String() string { + if this == nil { + return "nil" } - if this.L1DcacheStores != nil && that1.L1DcacheStores != nil { - if *this.L1DcacheStores != *that1.L1DcacheStores { - return fmt3.Errorf("L1DcacheStores this(%v) Not Equal that(%v)", *this.L1DcacheStores, *that1.L1DcacheStores) - } - } else if this.L1DcacheStores != nil { - return fmt3.Errorf("this.L1DcacheStores == nil && that.L1DcacheStores != nil") - } else if that1.L1DcacheStores != nil { - return fmt3.Errorf("L1DcacheStores this(%v) Not Equal that(%v)", this.L1DcacheStores, that1.L1DcacheStores) + s := strings.Join([]string{`&TrafficControlStatistics{`, + `Id:` + valueToStringMesos(this.Id) + `,`, + `Backlog:` + valueToStringMesos(this.Backlog) + `,`, + `Bytes:` + valueToStringMesos(this.Bytes) + `,`, + `Drops:` + valueToStringMesos(this.Drops) + `,`, + `Overlimits:` + valueToStringMesos(this.Overlimits) + `,`, + `Packets:` + valueToStringMesos(this.Packets) + `,`, + `Qlen:` + valueToStringMesos(this.Qlen) + `,`, + `Ratebps:` + valueToStringMesos(this.Ratebps) + `,`, + `Ratepps:` + valueToStringMesos(this.Ratepps) + `,`, + `Requeues:` + valueToStringMesos(this.Requeues) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceStatistics) String() string { + if this == nil { + return "nil" } - if this.L1DcacheStoreMisses != nil && that1.L1DcacheStoreMisses != nil { - if *this.L1DcacheStoreMisses != *that1.L1DcacheStoreMisses { - return fmt3.Errorf("L1DcacheStoreMisses this(%v) Not Equal that(%v)", *this.L1DcacheStoreMisses, *that1.L1DcacheStoreMisses) - } - } else if this.L1DcacheStoreMisses != nil { - return fmt3.Errorf("this.L1DcacheStoreMisses == nil && that.L1DcacheStoreMisses != nil") - } else if that1.L1DcacheStoreMisses != nil { - return fmt3.Errorf("L1DcacheStoreMisses this(%v) Not Equal that(%v)", this.L1DcacheStoreMisses, that1.L1DcacheStoreMisses) + s := strings.Join([]string{`&ResourceStatistics{`, + `Timestamp:` + valueToStringMesos(this.Timestamp) + `,`, + `CpusUserTimeSecs:` + valueToStringMesos(this.CpusUserTimeSecs) + `,`, + `CpusSystemTimeSecs:` + valueToStringMesos(this.CpusSystemTimeSecs) + `,`, + `CpusLimit:` + valueToStringMesos(this.CpusLimit) + `,`, + `MemRssBytes:` + valueToStringMesos(this.MemRssBytes) + `,`, + `MemLimitBytes:` + valueToStringMesos(this.MemLimitBytes) + `,`, + `CpusNrPeriods:` + valueToStringMesos(this.CpusNrPeriods) + `,`, + `CpusNrThrottled:` + valueToStringMesos(this.CpusNrThrottled) + `,`, + `CpusThrottledTimeSecs:` + valueToStringMesos(this.CpusThrottledTimeSecs) + `,`, + `MemFileBytes:` + valueToStringMesos(this.MemFileBytes) + `,`, + `MemAnonBytes:` + valueToStringMesos(this.MemAnonBytes) + `,`, + `MemMappedFileBytes:` + valueToStringMesos(this.MemMappedFileBytes) + `,`, + `Perf:` + strings.Replace(fmt.Sprintf("%v", this.Perf), "PerfStatistics", "PerfStatistics", 1) + `,`, + `NetRxPackets:` + valueToStringMesos(this.NetRxPackets) + `,`, + `NetRxBytes:` + valueToStringMesos(this.NetRxBytes) + `,`, + `NetRxErrors:` + valueToStringMesos(this.NetRxErrors) + `,`, + `NetRxDropped:` + valueToStringMesos(this.NetRxDropped) + `,`, + `NetTxPackets:` + valueToStringMesos(this.NetTxPackets) + `,`, + `NetTxBytes:` + valueToStringMesos(this.NetTxBytes) + `,`, + `NetTxErrors:` + valueToStringMesos(this.NetTxErrors) + `,`, + `NetTxDropped:` + valueToStringMesos(this.NetTxDropped) + `,`, + `NetTcpRttMicrosecsP50:` + valueToStringMesos(this.NetTcpRttMicrosecsP50) + `,`, + `NetTcpRttMicrosecsP90:` + valueToStringMesos(this.NetTcpRttMicrosecsP90) + `,`, + `NetTcpRttMicrosecsP95:` + valueToStringMesos(this.NetTcpRttMicrosecsP95) + `,`, + `NetTcpRttMicrosecsP99:` + valueToStringMesos(this.NetTcpRttMicrosecsP99) + `,`, + `DiskLimitBytes:` + valueToStringMesos(this.DiskLimitBytes) + `,`, + `DiskUsedBytes:` + valueToStringMesos(this.DiskUsedBytes) + `,`, + `NetTcpActiveConnections:` + valueToStringMesos(this.NetTcpActiveConnections) + `,`, + `NetTcpTimeWaitConnections:` + valueToStringMesos(this.NetTcpTimeWaitConnections) + `,`, + `Processes:` + valueToStringMesos(this.Processes) + `,`, + `Threads:` + valueToStringMesos(this.Threads) + `,`, + `MemLowPressureCounter:` + valueToStringMesos(this.MemLowPressureCounter) + `,`, + `MemMediumPressureCounter:` + valueToStringMesos(this.MemMediumPressureCounter) + `,`, + `MemCriticalPressureCounter:` + valueToStringMesos(this.MemCriticalPressureCounter) + `,`, + `NetTrafficControlStatistics:` + strings.Replace(fmt.Sprintf("%v", this.NetTrafficControlStatistics), "TrafficControlStatistics", "TrafficControlStatistics", 1) + `,`, + `MemTotalBytes:` + valueToStringMesos(this.MemTotalBytes) + `,`, + `MemTotalMemswBytes:` + valueToStringMesos(this.MemTotalMemswBytes) + `,`, + `MemSoftLimitBytes:` + valueToStringMesos(this.MemSoftLimitBytes) + `,`, + `MemCacheBytes:` + valueToStringMesos(this.MemCacheBytes) + `,`, + `MemSwapBytes:` + valueToStringMesos(this.MemSwapBytes) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceUsage) String() string { + if this == nil { + return "nil" } - if this.L1DcachePrefetches != nil && that1.L1DcachePrefetches != nil { - if *this.L1DcachePrefetches != *that1.L1DcachePrefetches { - return fmt3.Errorf("L1DcachePrefetches this(%v) Not Equal that(%v)", *this.L1DcachePrefetches, *that1.L1DcachePrefetches) - } - } else if this.L1DcachePrefetches != nil { - return fmt3.Errorf("this.L1DcachePrefetches == nil && that.L1DcachePrefetches != nil") - } else if that1.L1DcachePrefetches != nil { - return fmt3.Errorf("L1DcachePrefetches this(%v) Not Equal that(%v)", this.L1DcachePrefetches, that1.L1DcachePrefetches) + s := strings.Join([]string{`&ResourceUsage{`, + `Executors:` + strings.Replace(fmt.Sprintf("%v", this.Executors), "ResourceUsage_Executor", "ResourceUsage_Executor", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceUsage_Executor) String() string { + if this == nil { + return "nil" } - if this.L1DcachePrefetchMisses != nil && that1.L1DcachePrefetchMisses != nil { - if *this.L1DcachePrefetchMisses != *that1.L1DcachePrefetchMisses { - return fmt3.Errorf("L1DcachePrefetchMisses this(%v) Not Equal that(%v)", *this.L1DcachePrefetchMisses, *that1.L1DcachePrefetchMisses) - } - } else if this.L1DcachePrefetchMisses != nil { - return fmt3.Errorf("this.L1DcachePrefetchMisses == nil && that.L1DcachePrefetchMisses != nil") - } else if that1.L1DcachePrefetchMisses != nil { - return fmt3.Errorf("L1DcachePrefetchMisses this(%v) Not Equal that(%v)", this.L1DcachePrefetchMisses, that1.L1DcachePrefetchMisses) + s := strings.Join([]string{`&ResourceUsage_Executor{`, + `ExecutorInfo:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorInfo), "ExecutorInfo", "ExecutorInfo", 1) + `,`, + `Allocated:` + strings.Replace(fmt.Sprintf("%v", this.Allocated), "Resource", "Resource", 1) + `,`, + `Statistics:` + strings.Replace(fmt.Sprintf("%v", this.Statistics), "ResourceStatistics", "ResourceStatistics", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *PerfStatistics) String() string { + if this == nil { + return "nil" } - if this.L1IcacheLoads != nil && that1.L1IcacheLoads != nil { - if *this.L1IcacheLoads != *that1.L1IcacheLoads { - return fmt3.Errorf("L1IcacheLoads this(%v) Not Equal that(%v)", *this.L1IcacheLoads, *that1.L1IcacheLoads) - } - } else if this.L1IcacheLoads != nil { - return fmt3.Errorf("this.L1IcacheLoads == nil && that.L1IcacheLoads != nil") - } else if that1.L1IcacheLoads != nil { - return fmt3.Errorf("L1IcacheLoads this(%v) Not Equal that(%v)", this.L1IcacheLoads, that1.L1IcacheLoads) + s := strings.Join([]string{`&PerfStatistics{`, + `Timestamp:` + valueToStringMesos(this.Timestamp) + `,`, + `Duration:` + valueToStringMesos(this.Duration) + `,`, + `Cycles:` + valueToStringMesos(this.Cycles) + `,`, + `StalledCyclesFrontend:` + valueToStringMesos(this.StalledCyclesFrontend) + `,`, + `StalledCyclesBackend:` + valueToStringMesos(this.StalledCyclesBackend) + `,`, + `Instructions:` + valueToStringMesos(this.Instructions) + `,`, + `CacheReferences:` + valueToStringMesos(this.CacheReferences) + `,`, + `CacheMisses:` + valueToStringMesos(this.CacheMisses) + `,`, + `Branches:` + valueToStringMesos(this.Branches) + `,`, + `BranchMisses:` + valueToStringMesos(this.BranchMisses) + `,`, + `BusCycles:` + valueToStringMesos(this.BusCycles) + `,`, + `RefCycles:` + valueToStringMesos(this.RefCycles) + `,`, + `CpuClock:` + valueToStringMesos(this.CpuClock) + `,`, + `TaskClock:` + valueToStringMesos(this.TaskClock) + `,`, + `PageFaults:` + valueToStringMesos(this.PageFaults) + `,`, + `MinorFaults:` + valueToStringMesos(this.MinorFaults) + `,`, + `MajorFaults:` + valueToStringMesos(this.MajorFaults) + `,`, + `ContextSwitches:` + valueToStringMesos(this.ContextSwitches) + `,`, + `CpuMigrations:` + valueToStringMesos(this.CpuMigrations) + `,`, + `AlignmentFaults:` + valueToStringMesos(this.AlignmentFaults) + `,`, + `EmulationFaults:` + valueToStringMesos(this.EmulationFaults) + `,`, + `L1DcacheLoads:` + valueToStringMesos(this.L1DcacheLoads) + `,`, + `L1DcacheLoadMisses:` + valueToStringMesos(this.L1DcacheLoadMisses) + `,`, + `L1DcacheStores:` + valueToStringMesos(this.L1DcacheStores) + `,`, + `L1DcacheStoreMisses:` + valueToStringMesos(this.L1DcacheStoreMisses) + `,`, + `L1DcachePrefetches:` + valueToStringMesos(this.L1DcachePrefetches) + `,`, + `L1DcachePrefetchMisses:` + valueToStringMesos(this.L1DcachePrefetchMisses) + `,`, + `L1IcacheLoads:` + valueToStringMesos(this.L1IcacheLoads) + `,`, + `L1IcacheLoadMisses:` + valueToStringMesos(this.L1IcacheLoadMisses) + `,`, + `L1IcachePrefetches:` + valueToStringMesos(this.L1IcachePrefetches) + `,`, + `L1IcachePrefetchMisses:` + valueToStringMesos(this.L1IcachePrefetchMisses) + `,`, + `LlcLoads:` + valueToStringMesos(this.LlcLoads) + `,`, + `LlcLoadMisses:` + valueToStringMesos(this.LlcLoadMisses) + `,`, + `LlcStores:` + valueToStringMesos(this.LlcStores) + `,`, + `LlcStoreMisses:` + valueToStringMesos(this.LlcStoreMisses) + `,`, + `LlcPrefetches:` + valueToStringMesos(this.LlcPrefetches) + `,`, + `LlcPrefetchMisses:` + valueToStringMesos(this.LlcPrefetchMisses) + `,`, + `DtlbLoads:` + valueToStringMesos(this.DtlbLoads) + `,`, + `DtlbLoadMisses:` + valueToStringMesos(this.DtlbLoadMisses) + `,`, + `DtlbStores:` + valueToStringMesos(this.DtlbStores) + `,`, + `DtlbStoreMisses:` + valueToStringMesos(this.DtlbStoreMisses) + `,`, + `DtlbPrefetches:` + valueToStringMesos(this.DtlbPrefetches) + `,`, + `DtlbPrefetchMisses:` + valueToStringMesos(this.DtlbPrefetchMisses) + `,`, + `ItlbLoads:` + valueToStringMesos(this.ItlbLoads) + `,`, + `ItlbLoadMisses:` + valueToStringMesos(this.ItlbLoadMisses) + `,`, + `BranchLoads:` + valueToStringMesos(this.BranchLoads) + `,`, + `BranchLoadMisses:` + valueToStringMesos(this.BranchLoadMisses) + `,`, + `NodeLoads:` + valueToStringMesos(this.NodeLoads) + `,`, + `NodeLoadMisses:` + valueToStringMesos(this.NodeLoadMisses) + `,`, + `NodeStores:` + valueToStringMesos(this.NodeStores) + `,`, + `NodeStoreMisses:` + valueToStringMesos(this.NodeStoreMisses) + `,`, + `NodePrefetches:` + valueToStringMesos(this.NodePrefetches) + `,`, + `NodePrefetchMisses:` + valueToStringMesos(this.NodePrefetchMisses) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Request) String() string { + if this == nil { + return "nil" } - if this.L1IcacheLoadMisses != nil && that1.L1IcacheLoadMisses != nil { - if *this.L1IcacheLoadMisses != *that1.L1IcacheLoadMisses { - return fmt3.Errorf("L1IcacheLoadMisses this(%v) Not Equal that(%v)", *this.L1IcacheLoadMisses, *that1.L1IcacheLoadMisses) - } - } else if this.L1IcacheLoadMisses != nil { - return fmt3.Errorf("this.L1IcacheLoadMisses == nil && that.L1IcacheLoadMisses != nil") - } else if that1.L1IcacheLoadMisses != nil { - return fmt3.Errorf("L1IcacheLoadMisses this(%v) Not Equal that(%v)", this.L1IcacheLoadMisses, that1.L1IcacheLoadMisses) + s := strings.Join([]string{`&Request{`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Offer) String() string { + if this == nil { + return "nil" } - if this.L1IcachePrefetches != nil && that1.L1IcachePrefetches != nil { - if *this.L1IcachePrefetches != *that1.L1IcachePrefetches { - return fmt3.Errorf("L1IcachePrefetches this(%v) Not Equal that(%v)", *this.L1IcachePrefetches, *that1.L1IcachePrefetches) - } - } else if this.L1IcachePrefetches != nil { - return fmt3.Errorf("this.L1IcachePrefetches == nil && that.L1IcachePrefetches != nil") - } else if that1.L1IcachePrefetches != nil { - return fmt3.Errorf("L1IcachePrefetches this(%v) Not Equal that(%v)", this.L1IcachePrefetches, that1.L1IcachePrefetches) + s := strings.Join([]string{`&Offer{`, + `Id:` + strings.Replace(fmt.Sprintf("%v", this.Id), "OfferID", "OfferID", 1) + `,`, + `FrameworkId:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkId), "FrameworkID", "FrameworkID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `ExecutorIds:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorIds), "ExecutorID", "ExecutorID", 1) + `,`, + `Attributes:` + strings.Replace(fmt.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation) String() string { + if this == nil { + return "nil" } - if this.L1IcachePrefetchMisses != nil && that1.L1IcachePrefetchMisses != nil { - if *this.L1IcachePrefetchMisses != *that1.L1IcachePrefetchMisses { - return fmt3.Errorf("L1IcachePrefetchMisses this(%v) Not Equal that(%v)", *this.L1IcachePrefetchMisses, *that1.L1IcachePrefetchMisses) - } - } else if this.L1IcachePrefetchMisses != nil { - return fmt3.Errorf("this.L1IcachePrefetchMisses == nil && that.L1IcachePrefetchMisses != nil") - } else if that1.L1IcachePrefetchMisses != nil { - return fmt3.Errorf("L1IcachePrefetchMisses this(%v) Not Equal that(%v)", this.L1IcachePrefetchMisses, that1.L1IcachePrefetchMisses) + s := strings.Join([]string{`&Offer_Operation{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Launch:` + strings.Replace(fmt.Sprintf("%v", this.Launch), "Offer_Operation_Launch", "Offer_Operation_Launch", 1) + `,`, + `Reserve:` + strings.Replace(fmt.Sprintf("%v", this.Reserve), "Offer_Operation_Reserve", "Offer_Operation_Reserve", 1) + `,`, + `Unreserve:` + strings.Replace(fmt.Sprintf("%v", this.Unreserve), "Offer_Operation_Unreserve", "Offer_Operation_Unreserve", 1) + `,`, + `Create:` + strings.Replace(fmt.Sprintf("%v", this.Create), "Offer_Operation_Create", "Offer_Operation_Create", 1) + `,`, + `Destroy:` + strings.Replace(fmt.Sprintf("%v", this.Destroy), "Offer_Operation_Destroy", "Offer_Operation_Destroy", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Launch) String() string { + if this == nil { + return "nil" } - if this.LlcLoads != nil && that1.LlcLoads != nil { - if *this.LlcLoads != *that1.LlcLoads { - return fmt3.Errorf("LlcLoads this(%v) Not Equal that(%v)", *this.LlcLoads, *that1.LlcLoads) - } - } else if this.LlcLoads != nil { - return fmt3.Errorf("this.LlcLoads == nil && that.LlcLoads != nil") - } else if that1.LlcLoads != nil { - return fmt3.Errorf("LlcLoads this(%v) Not Equal that(%v)", this.LlcLoads, that1.LlcLoads) + s := strings.Join([]string{`&Offer_Operation_Launch{`, + `TaskInfos:` + strings.Replace(fmt.Sprintf("%v", this.TaskInfos), "TaskInfo", "TaskInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Reserve) String() string { + if this == nil { + return "nil" } - if this.LlcLoadMisses != nil && that1.LlcLoadMisses != nil { - if *this.LlcLoadMisses != *that1.LlcLoadMisses { - return fmt3.Errorf("LlcLoadMisses this(%v) Not Equal that(%v)", *this.LlcLoadMisses, *that1.LlcLoadMisses) - } - } else if this.LlcLoadMisses != nil { - return fmt3.Errorf("this.LlcLoadMisses == nil && that.LlcLoadMisses != nil") - } else if that1.LlcLoadMisses != nil { - return fmt3.Errorf("LlcLoadMisses this(%v) Not Equal that(%v)", this.LlcLoadMisses, that1.LlcLoadMisses) + s := strings.Join([]string{`&Offer_Operation_Reserve{`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Unreserve) String() string { + if this == nil { + return "nil" } - if this.LlcStores != nil && that1.LlcStores != nil { - if *this.LlcStores != *that1.LlcStores { - return fmt3.Errorf("LlcStores this(%v) Not Equal that(%v)", *this.LlcStores, *that1.LlcStores) - } - } else if this.LlcStores != nil { - return fmt3.Errorf("this.LlcStores == nil && that.LlcStores != nil") - } else if that1.LlcStores != nil { - return fmt3.Errorf("LlcStores this(%v) Not Equal that(%v)", this.LlcStores, that1.LlcStores) + s := strings.Join([]string{`&Offer_Operation_Unreserve{`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Create) String() string { + if this == nil { + return "nil" } - if this.LlcStoreMisses != nil && that1.LlcStoreMisses != nil { - if *this.LlcStoreMisses != *that1.LlcStoreMisses { - return fmt3.Errorf("LlcStoreMisses this(%v) Not Equal that(%v)", *this.LlcStoreMisses, *that1.LlcStoreMisses) - } - } else if this.LlcStoreMisses != nil { - return fmt3.Errorf("this.LlcStoreMisses == nil && that.LlcStoreMisses != nil") - } else if that1.LlcStoreMisses != nil { - return fmt3.Errorf("LlcStoreMisses this(%v) Not Equal that(%v)", this.LlcStoreMisses, that1.LlcStoreMisses) + s := strings.Join([]string{`&Offer_Operation_Create{`, + `Volumes:` + strings.Replace(fmt.Sprintf("%v", this.Volumes), "Resource", "Resource", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Destroy) String() string { + if this == nil { + return "nil" } - if this.LlcPrefetches != nil && that1.LlcPrefetches != nil { - if *this.LlcPrefetches != *that1.LlcPrefetches { - return fmt3.Errorf("LlcPrefetches this(%v) Not Equal that(%v)", *this.LlcPrefetches, *that1.LlcPrefetches) - } - } else if this.LlcPrefetches != nil { - return fmt3.Errorf("this.LlcPrefetches == nil && that.LlcPrefetches != nil") - } else if that1.LlcPrefetches != nil { - return fmt3.Errorf("LlcPrefetches this(%v) Not Equal that(%v)", this.LlcPrefetches, that1.LlcPrefetches) + s := strings.Join([]string{`&Offer_Operation_Destroy{`, + `Volumes:` + strings.Replace(fmt.Sprintf("%v", this.Volumes), "Resource", "Resource", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TaskInfo) String() string { + if this == nil { + return "nil" } - if this.LlcPrefetchMisses != nil && that1.LlcPrefetchMisses != nil { - if *this.LlcPrefetchMisses != *that1.LlcPrefetchMisses { - return fmt3.Errorf("LlcPrefetchMisses this(%v) Not Equal that(%v)", *this.LlcPrefetchMisses, *that1.LlcPrefetchMisses) - } - } else if this.LlcPrefetchMisses != nil { - return fmt3.Errorf("this.LlcPrefetchMisses == nil && that.LlcPrefetchMisses != nil") - } else if that1.LlcPrefetchMisses != nil { - return fmt3.Errorf("LlcPrefetchMisses this(%v) Not Equal that(%v)", this.LlcPrefetchMisses, that1.LlcPrefetchMisses) + s := strings.Join([]string{`&TaskInfo{`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1) + `,`, + `Executor:` + strings.Replace(fmt.Sprintf("%v", this.Executor), "ExecutorInfo", "ExecutorInfo", 1) + `,`, + `Data:` + valueToStringMesos(this.Data) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, + `HealthCheck:` + strings.Replace(fmt.Sprintf("%v", this.HealthCheck), "HealthCheck", "HealthCheck", 1) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `Discovery:` + strings.Replace(fmt.Sprintf("%v", this.Discovery), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TaskStatus) String() string { + if this == nil { + return "nil" } - if this.DtlbLoads != nil && that1.DtlbLoads != nil { - if *this.DtlbLoads != *that1.DtlbLoads { - return fmt3.Errorf("DtlbLoads this(%v) Not Equal that(%v)", *this.DtlbLoads, *that1.DtlbLoads) - } - } else if this.DtlbLoads != nil { - return fmt3.Errorf("this.DtlbLoads == nil && that.DtlbLoads != nil") - } else if that1.DtlbLoads != nil { - return fmt3.Errorf("DtlbLoads this(%v) Not Equal that(%v)", this.DtlbLoads, that1.DtlbLoads) + s := strings.Join([]string{`&TaskStatus{`, + `TaskId:` + strings.Replace(fmt.Sprintf("%v", this.TaskId), "TaskID", "TaskID", 1) + `,`, + `State:` + valueToStringMesos(this.State) + `,`, + `Data:` + valueToStringMesos(this.Data) + `,`, + `Message:` + valueToStringMesos(this.Message) + `,`, + `SlaveId:` + strings.Replace(fmt.Sprintf("%v", this.SlaveId), "SlaveID", "SlaveID", 1) + `,`, + `Timestamp:` + valueToStringMesos(this.Timestamp) + `,`, + `ExecutorId:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorId), "ExecutorID", "ExecutorID", 1) + `,`, + `Healthy:` + valueToStringMesos(this.Healthy) + `,`, + `Source:` + valueToStringMesos(this.Source) + `,`, + `Reason:` + valueToStringMesos(this.Reason) + `,`, + `Uuid:` + valueToStringMesos(this.Uuid) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Filters) String() string { + if this == nil { + return "nil" } - if this.DtlbLoadMisses != nil && that1.DtlbLoadMisses != nil { - if *this.DtlbLoadMisses != *that1.DtlbLoadMisses { - return fmt3.Errorf("DtlbLoadMisses this(%v) Not Equal that(%v)", *this.DtlbLoadMisses, *that1.DtlbLoadMisses) - } - } else if this.DtlbLoadMisses != nil { - return fmt3.Errorf("this.DtlbLoadMisses == nil && that.DtlbLoadMisses != nil") - } else if that1.DtlbLoadMisses != nil { - return fmt3.Errorf("DtlbLoadMisses this(%v) Not Equal that(%v)", this.DtlbLoadMisses, that1.DtlbLoadMisses) + s := strings.Join([]string{`&Filters{`, + `RefuseSeconds:` + valueToStringMesos(this.RefuseSeconds) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Environment) String() string { + if this == nil { + return "nil" } - if this.DtlbStores != nil && that1.DtlbStores != nil { - if *this.DtlbStores != *that1.DtlbStores { - return fmt3.Errorf("DtlbStores this(%v) Not Equal that(%v)", *this.DtlbStores, *that1.DtlbStores) - } - } else if this.DtlbStores != nil { - return fmt3.Errorf("this.DtlbStores == nil && that.DtlbStores != nil") - } else if that1.DtlbStores != nil { - return fmt3.Errorf("DtlbStores this(%v) Not Equal that(%v)", this.DtlbStores, that1.DtlbStores) + s := strings.Join([]string{`&Environment{`, + `Variables:` + strings.Replace(fmt.Sprintf("%v", this.Variables), "Environment_Variable", "Environment_Variable", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Environment_Variable) String() string { + if this == nil { + return "nil" } - if this.DtlbStoreMisses != nil && that1.DtlbStoreMisses != nil { - if *this.DtlbStoreMisses != *that1.DtlbStoreMisses { - return fmt3.Errorf("DtlbStoreMisses this(%v) Not Equal that(%v)", *this.DtlbStoreMisses, *that1.DtlbStoreMisses) - } - } else if this.DtlbStoreMisses != nil { - return fmt3.Errorf("this.DtlbStoreMisses == nil && that.DtlbStoreMisses != nil") - } else if that1.DtlbStoreMisses != nil { - return fmt3.Errorf("DtlbStoreMisses this(%v) Not Equal that(%v)", this.DtlbStoreMisses, that1.DtlbStoreMisses) + s := strings.Join([]string{`&Environment_Variable{`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Parameter) String() string { + if this == nil { + return "nil" } - if this.DtlbPrefetches != nil && that1.DtlbPrefetches != nil { - if *this.DtlbPrefetches != *that1.DtlbPrefetches { - return fmt3.Errorf("DtlbPrefetches this(%v) Not Equal that(%v)", *this.DtlbPrefetches, *that1.DtlbPrefetches) - } - } else if this.DtlbPrefetches != nil { - return fmt3.Errorf("this.DtlbPrefetches == nil && that.DtlbPrefetches != nil") - } else if that1.DtlbPrefetches != nil { - return fmt3.Errorf("DtlbPrefetches this(%v) Not Equal that(%v)", this.DtlbPrefetches, that1.DtlbPrefetches) + s := strings.Join([]string{`&Parameter{`, + `Key:` + valueToStringMesos(this.Key) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Parameters) String() string { + if this == nil { + return "nil" } - if this.DtlbPrefetchMisses != nil && that1.DtlbPrefetchMisses != nil { - if *this.DtlbPrefetchMisses != *that1.DtlbPrefetchMisses { - return fmt3.Errorf("DtlbPrefetchMisses this(%v) Not Equal that(%v)", *this.DtlbPrefetchMisses, *that1.DtlbPrefetchMisses) - } - } else if this.DtlbPrefetchMisses != nil { - return fmt3.Errorf("this.DtlbPrefetchMisses == nil && that.DtlbPrefetchMisses != nil") - } else if that1.DtlbPrefetchMisses != nil { - return fmt3.Errorf("DtlbPrefetchMisses this(%v) Not Equal that(%v)", this.DtlbPrefetchMisses, that1.DtlbPrefetchMisses) + s := strings.Join([]string{`&Parameters{`, + `Parameter:` + strings.Replace(fmt.Sprintf("%v", this.Parameter), "Parameter", "Parameter", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Credential) String() string { + if this == nil { + return "nil" } - if this.ItlbLoads != nil && that1.ItlbLoads != nil { - if *this.ItlbLoads != *that1.ItlbLoads { - return fmt3.Errorf("ItlbLoads this(%v) Not Equal that(%v)", *this.ItlbLoads, *that1.ItlbLoads) - } - } else if this.ItlbLoads != nil { - return fmt3.Errorf("this.ItlbLoads == nil && that.ItlbLoads != nil") - } else if that1.ItlbLoads != nil { - return fmt3.Errorf("ItlbLoads this(%v) Not Equal that(%v)", this.ItlbLoads, that1.ItlbLoads) + s := strings.Join([]string{`&Credential{`, + `Principal:` + valueToStringMesos(this.Principal) + `,`, + `Secret:` + valueToStringMesos(this.Secret) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Credentials) String() string { + if this == nil { + return "nil" } - if this.ItlbLoadMisses != nil && that1.ItlbLoadMisses != nil { - if *this.ItlbLoadMisses != *that1.ItlbLoadMisses { - return fmt3.Errorf("ItlbLoadMisses this(%v) Not Equal that(%v)", *this.ItlbLoadMisses, *that1.ItlbLoadMisses) - } - } else if this.ItlbLoadMisses != nil { - return fmt3.Errorf("this.ItlbLoadMisses == nil && that.ItlbLoadMisses != nil") - } else if that1.ItlbLoadMisses != nil { - return fmt3.Errorf("ItlbLoadMisses this(%v) Not Equal that(%v)", this.ItlbLoadMisses, that1.ItlbLoadMisses) + s := strings.Join([]string{`&Credentials{`, + `Credentials:` + strings.Replace(fmt.Sprintf("%v", this.Credentials), "Credential", "Credential", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ACL) String() string { + if this == nil { + return "nil" } - if this.BranchLoads != nil && that1.BranchLoads != nil { - if *this.BranchLoads != *that1.BranchLoads { - return fmt3.Errorf("BranchLoads this(%v) Not Equal that(%v)", *this.BranchLoads, *that1.BranchLoads) - } - } else if this.BranchLoads != nil { - return fmt3.Errorf("this.BranchLoads == nil && that.BranchLoads != nil") - } else if that1.BranchLoads != nil { - return fmt3.Errorf("BranchLoads this(%v) Not Equal that(%v)", this.BranchLoads, that1.BranchLoads) + s := strings.Join([]string{`&ACL{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ACL_Entity) String() string { + if this == nil { + return "nil" } - if this.BranchLoadMisses != nil && that1.BranchLoadMisses != nil { - if *this.BranchLoadMisses != *that1.BranchLoadMisses { - return fmt3.Errorf("BranchLoadMisses this(%v) Not Equal that(%v)", *this.BranchLoadMisses, *that1.BranchLoadMisses) - } - } else if this.BranchLoadMisses != nil { - return fmt3.Errorf("this.BranchLoadMisses == nil && that.BranchLoadMisses != nil") - } else if that1.BranchLoadMisses != nil { - return fmt3.Errorf("BranchLoadMisses this(%v) Not Equal that(%v)", this.BranchLoadMisses, that1.BranchLoadMisses) + s := strings.Join([]string{`&ACL_Entity{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Values:` + fmt.Sprintf("%v", this.Values) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ACL_RegisterFramework) String() string { + if this == nil { + return "nil" } - if this.NodeLoads != nil && that1.NodeLoads != nil { - if *this.NodeLoads != *that1.NodeLoads { - return fmt3.Errorf("NodeLoads this(%v) Not Equal that(%v)", *this.NodeLoads, *that1.NodeLoads) - } - } else if this.NodeLoads != nil { - return fmt3.Errorf("this.NodeLoads == nil && that.NodeLoads != nil") - } else if that1.NodeLoads != nil { - return fmt3.Errorf("NodeLoads this(%v) Not Equal that(%v)", this.NodeLoads, that1.NodeLoads) + s := strings.Join([]string{`&ACL_RegisterFramework{`, + `Principals:` + strings.Replace(fmt.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, + `Roles:` + strings.Replace(fmt.Sprintf("%v", this.Roles), "ACL_Entity", "ACL_Entity", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ACL_RunTask) String() string { + if this == nil { + return "nil" } - if this.NodeLoadMisses != nil && that1.NodeLoadMisses != nil { - if *this.NodeLoadMisses != *that1.NodeLoadMisses { - return fmt3.Errorf("NodeLoadMisses this(%v) Not Equal that(%v)", *this.NodeLoadMisses, *that1.NodeLoadMisses) - } - } else if this.NodeLoadMisses != nil { - return fmt3.Errorf("this.NodeLoadMisses == nil && that.NodeLoadMisses != nil") - } else if that1.NodeLoadMisses != nil { - return fmt3.Errorf("NodeLoadMisses this(%v) Not Equal that(%v)", this.NodeLoadMisses, that1.NodeLoadMisses) + s := strings.Join([]string{`&ACL_RunTask{`, + `Principals:` + strings.Replace(fmt.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, + `Users:` + strings.Replace(fmt.Sprintf("%v", this.Users), "ACL_Entity", "ACL_Entity", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ACL_ShutdownFramework) String() string { + if this == nil { + return "nil" } - if this.NodeStores != nil && that1.NodeStores != nil { - if *this.NodeStores != *that1.NodeStores { - return fmt3.Errorf("NodeStores this(%v) Not Equal that(%v)", *this.NodeStores, *that1.NodeStores) - } - } else if this.NodeStores != nil { - return fmt3.Errorf("this.NodeStores == nil && that.NodeStores != nil") - } else if that1.NodeStores != nil { - return fmt3.Errorf("NodeStores this(%v) Not Equal that(%v)", this.NodeStores, that1.NodeStores) + s := strings.Join([]string{`&ACL_ShutdownFramework{`, + `Principals:` + strings.Replace(fmt.Sprintf("%v", this.Principals), "ACL_Entity", "ACL_Entity", 1) + `,`, + `FrameworkPrincipals:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkPrincipals), "ACL_Entity", "ACL_Entity", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ACLs) String() string { + if this == nil { + return "nil" } - if this.NodeStoreMisses != nil && that1.NodeStoreMisses != nil { - if *this.NodeStoreMisses != *that1.NodeStoreMisses { - return fmt3.Errorf("NodeStoreMisses this(%v) Not Equal that(%v)", *this.NodeStoreMisses, *that1.NodeStoreMisses) - } - } else if this.NodeStoreMisses != nil { - return fmt3.Errorf("this.NodeStoreMisses == nil && that.NodeStoreMisses != nil") - } else if that1.NodeStoreMisses != nil { - return fmt3.Errorf("NodeStoreMisses this(%v) Not Equal that(%v)", this.NodeStoreMisses, that1.NodeStoreMisses) + s := strings.Join([]string{`&ACLs{`, + `Permissive:` + valueToStringMesos(this.Permissive) + `,`, + `RegisterFrameworks:` + strings.Replace(fmt.Sprintf("%v", this.RegisterFrameworks), "ACL_RegisterFramework", "ACL_RegisterFramework", 1) + `,`, + `RunTasks:` + strings.Replace(fmt.Sprintf("%v", this.RunTasks), "ACL_RunTask", "ACL_RunTask", 1) + `,`, + `ShutdownFrameworks:` + strings.Replace(fmt.Sprintf("%v", this.ShutdownFrameworks), "ACL_ShutdownFramework", "ACL_ShutdownFramework", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *RateLimit) String() string { + if this == nil { + return "nil" } - if this.NodePrefetches != nil && that1.NodePrefetches != nil { - if *this.NodePrefetches != *that1.NodePrefetches { - return fmt3.Errorf("NodePrefetches this(%v) Not Equal that(%v)", *this.NodePrefetches, *that1.NodePrefetches) - } - } else if this.NodePrefetches != nil { - return fmt3.Errorf("this.NodePrefetches == nil && that.NodePrefetches != nil") - } else if that1.NodePrefetches != nil { - return fmt3.Errorf("NodePrefetches this(%v) Not Equal that(%v)", this.NodePrefetches, that1.NodePrefetches) + s := strings.Join([]string{`&RateLimit{`, + `Qps:` + valueToStringMesos(this.Qps) + `,`, + `Principal:` + valueToStringMesos(this.Principal) + `,`, + `Capacity:` + valueToStringMesos(this.Capacity) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *RateLimits) String() string { + if this == nil { + return "nil" } - if this.NodePrefetchMisses != nil && that1.NodePrefetchMisses != nil { - if *this.NodePrefetchMisses != *that1.NodePrefetchMisses { - return fmt3.Errorf("NodePrefetchMisses this(%v) Not Equal that(%v)", *this.NodePrefetchMisses, *that1.NodePrefetchMisses) - } - } else if this.NodePrefetchMisses != nil { - return fmt3.Errorf("this.NodePrefetchMisses == nil && that.NodePrefetchMisses != nil") - } else if that1.NodePrefetchMisses != nil { - return fmt3.Errorf("NodePrefetchMisses this(%v) Not Equal that(%v)", this.NodePrefetchMisses, that1.NodePrefetchMisses) + s := strings.Join([]string{`&RateLimits{`, + `Limits:` + strings.Replace(fmt.Sprintf("%v", this.Limits), "RateLimit", "RateLimit", 1) + `,`, + `AggregateDefaultQps:` + valueToStringMesos(this.AggregateDefaultQps) + `,`, + `AggregateDefaultCapacity:` + valueToStringMesos(this.AggregateDefaultCapacity) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Volume) String() string { + if this == nil { + return "nil" } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + s := strings.Join([]string{`&Volume{`, + `ContainerPath:` + valueToStringMesos(this.ContainerPath) + `,`, + `HostPath:` + valueToStringMesos(this.HostPath) + `,`, + `Mode:` + valueToStringMesos(this.Mode) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerInfo) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&ContainerInfo{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Volumes:` + strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "Volume", 1) + `,`, + `Docker:` + strings.Replace(fmt.Sprintf("%v", this.Docker), "ContainerInfo_DockerInfo", "ContainerInfo_DockerInfo", 1) + `,`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s } -func (this *PerfStatistics) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false +func (this *ContainerInfo_DockerInfo) String() string { + if this == nil { + return "nil" } - - that1, ok := that.(*PerfStatistics) - if !ok { - return false + s := strings.Join([]string{`&ContainerInfo_DockerInfo{`, + `Image:` + valueToStringMesos(this.Image) + `,`, + `Network:` + valueToStringMesos(this.Network) + `,`, + `PortMappings:` + strings.Replace(fmt.Sprintf("%v", this.PortMappings), "ContainerInfo_DockerInfo_PortMapping", "ContainerInfo_DockerInfo_PortMapping", 1) + `,`, + `Privileged:` + valueToStringMesos(this.Privileged) + `,`, + `Parameters:` + strings.Replace(fmt.Sprintf("%v", this.Parameters), "Parameter", "Parameter", 1) + `,`, + `ForcePullImage:` + valueToStringMesos(this.ForcePullImage) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerInfo_DockerInfo_PortMapping) String() string { + if this == nil { + return "nil" } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + s := strings.Join([]string{`&ContainerInfo_DockerInfo_PortMapping{`, + `HostPort:` + valueToStringMesos(this.HostPort) + `,`, + `ContainerPort:` + valueToStringMesos(this.ContainerPort) + `,`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Labels) String() string { + if this == nil { + return "nil" } - if this.Timestamp != nil && that1.Timestamp != nil { - if *this.Timestamp != *that1.Timestamp { - return false - } - } else if this.Timestamp != nil { - return false - } else if that1.Timestamp != nil { - return false + s := strings.Join([]string{`&Labels{`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Label", "Label", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Label) String() string { + if this == nil { + return "nil" } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return false - } - } else if this.Duration != nil { - return false - } else if that1.Duration != nil { - return false + s := strings.Join([]string{`&Label{`, + `Key:` + valueToStringMesos(this.Key) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Port) String() string { + if this == nil { + return "nil" } - if this.Cycles != nil && that1.Cycles != nil { - if *this.Cycles != *that1.Cycles { - return false - } - } else if this.Cycles != nil { - return false - } else if that1.Cycles != nil { - return false + s := strings.Join([]string{`&Port{`, + `Number:` + valueToStringMesos(this.Number) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Ports) String() string { + if this == nil { + return "nil" } - if this.StalledCyclesFrontend != nil && that1.StalledCyclesFrontend != nil { - if *this.StalledCyclesFrontend != *that1.StalledCyclesFrontend { - return false - } - } else if this.StalledCyclesFrontend != nil { - return false - } else if that1.StalledCyclesFrontend != nil { - return false + s := strings.Join([]string{`&Ports{`, + `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "Port", "Port", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DiscoveryInfo) String() string { + if this == nil { + return "nil" } - if this.StalledCyclesBackend != nil && that1.StalledCyclesBackend != nil { - if *this.StalledCyclesBackend != *that1.StalledCyclesBackend { - return false - } - } else if this.StalledCyclesBackend != nil { - return false - } else if that1.StalledCyclesBackend != nil { - return false + s := strings.Join([]string{`&DiscoveryInfo{`, + `Visibility:` + valueToStringMesos(this.Visibility) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Environment:` + valueToStringMesos(this.Environment) + `,`, + `Location:` + valueToStringMesos(this.Location) + `,`, + `Version:` + valueToStringMesos(this.Version) + `,`, + `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "Ports", "Ports", 1) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMesos(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" } - if this.Instructions != nil && that1.Instructions != nil { - if *this.Instructions != *that1.Instructions { - return false + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FrameworkID) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Instructions != nil { - return false - } else if that1.Instructions != nil { - return false - } - if this.CacheReferences != nil && that1.CacheReferences != nil { - if *this.CacheReferences != *that1.CacheReferences { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.CacheReferences != nil { - return false - } else if that1.CacheReferences != nil { - return false } - if this.CacheMisses != nil && that1.CacheMisses != nil { - if *this.CacheMisses != *that1.CacheMisses { - return false - } - } else if this.CacheMisses != nil { - return false - } else if that1.CacheMisses != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - if this.Branches != nil && that1.Branches != nil { - if *this.Branches != *that1.Branches { - return false + + return nil +} +func (m *OfferID) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Branches != nil { - return false - } else if that1.Branches != nil { - return false - } - if this.BranchMisses != nil && that1.BranchMisses != nil { - if *this.BranchMisses != *that1.BranchMisses { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.BranchMisses != nil { - return false - } else if that1.BranchMisses != nil { - return false } - if this.BusCycles != nil && that1.BusCycles != nil { - if *this.BusCycles != *that1.BusCycles { - return false - } - } else if this.BusCycles != nil { - return false - } else if that1.BusCycles != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - if this.RefCycles != nil && that1.RefCycles != nil { - if *this.RefCycles != *that1.RefCycles { - return false + + return nil +} +func (m *SlaveID) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.RefCycles != nil { - return false - } else if that1.RefCycles != nil { - return false - } - if this.CpuClock != nil && that1.CpuClock != nil { - if *this.CpuClock != *that1.CpuClock { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.CpuClock != nil { - return false - } else if that1.CpuClock != nil { - return false } - if this.TaskClock != nil && that1.TaskClock != nil { - if *this.TaskClock != *that1.TaskClock { - return false - } - } else if this.TaskClock != nil { - return false - } else if that1.TaskClock != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - if this.PageFaults != nil && that1.PageFaults != nil { - if *this.PageFaults != *that1.PageFaults { - return false + + return nil +} +func (m *TaskID) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.PageFaults != nil { - return false - } else if that1.PageFaults != nil { - return false - } - if this.MinorFaults != nil && that1.MinorFaults != nil { - if *this.MinorFaults != *that1.MinorFaults { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.MinorFaults != nil { - return false - } else if that1.MinorFaults != nil { - return false } - if this.MajorFaults != nil && that1.MajorFaults != nil { - if *this.MajorFaults != *that1.MajorFaults { - return false - } - } else if this.MajorFaults != nil { - return false - } else if that1.MajorFaults != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - if this.ContextSwitches != nil && that1.ContextSwitches != nil { - if *this.ContextSwitches != *that1.ContextSwitches { - return false + + return nil +} +func (m *ExecutorID) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.ContextSwitches != nil { - return false - } else if that1.ContextSwitches != nil { - return false - } - if this.CpuMigrations != nil && that1.CpuMigrations != nil { - if *this.CpuMigrations != *that1.CpuMigrations { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.CpuMigrations != nil { - return false - } else if that1.CpuMigrations != nil { - return false } - if this.AlignmentFaults != nil && that1.AlignmentFaults != nil { - if *this.AlignmentFaults != *that1.AlignmentFaults { - return false - } - } else if this.AlignmentFaults != nil { - return false - } else if that1.AlignmentFaults != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - if this.EmulationFaults != nil && that1.EmulationFaults != nil { - if *this.EmulationFaults != *that1.EmulationFaults { - return false + + return nil +} +func (m *ContainerID) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.EmulationFaults != nil { - return false - } else if that1.EmulationFaults != nil { - return false - } - if this.L1DcacheLoads != nil && that1.L1DcacheLoads != nil { - if *this.L1DcacheLoads != *that1.L1DcacheLoads { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.L1DcacheLoads != nil { - return false - } else if that1.L1DcacheLoads != nil { - return false } - if this.L1DcacheLoadMisses != nil && that1.L1DcacheLoadMisses != nil { - if *this.L1DcacheLoadMisses != *that1.L1DcacheLoadMisses { - return false - } - } else if this.L1DcacheLoadMisses != nil { - return false - } else if that1.L1DcacheLoadMisses != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - if this.L1DcacheStores != nil && that1.L1DcacheStores != nil { - if *this.L1DcacheStores != *that1.L1DcacheStores { - return false + + return nil +} +func (m *FrameworkInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.L1DcacheStores != nil { - return false - } else if that1.L1DcacheStores != nil { - return false - } - if this.L1DcacheStoreMisses != nil && that1.L1DcacheStoreMisses != nil { - if *this.L1DcacheStoreMisses != *that1.L1DcacheStoreMisses { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.User = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &FrameworkID{} + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FailoverTimeout", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.FailoverTimeout = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Checkpoint = &b + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Principal = &s + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WebuiUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.WebuiUrl = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Capabilities = append(m.Capabilities, &FrameworkInfo_Capability{}) + if err := m.Capabilities[len(m.Capabilities)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.L1DcacheStoreMisses != nil { - return false - } else if that1.L1DcacheStoreMisses != nil { - return false } - if this.L1DcachePrefetches != nil && that1.L1DcachePrefetches != nil { - if *this.L1DcachePrefetches != *that1.L1DcachePrefetches { - return false - } - } else if this.L1DcachePrefetches != nil { - return false - } else if that1.L1DcachePrefetches != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("user") } - if this.L1DcachePrefetchMisses != nil && that1.L1DcachePrefetchMisses != nil { - if *this.L1DcachePrefetchMisses != *that1.L1DcachePrefetchMisses { - return false - } - } else if this.L1DcachePrefetchMisses != nil { - return false - } else if that1.L1DcachePrefetchMisses != nil { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } - if this.L1IcacheLoads != nil && that1.L1IcacheLoads != nil { - if *this.L1IcacheLoads != *that1.L1IcacheLoads { - return false + + return nil +} +func (m *FrameworkInfo_Capability) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.L1IcacheLoads != nil { - return false - } else if that1.L1IcacheLoads != nil { - return false - } - if this.L1IcacheLoadMisses != nil && that1.L1IcacheLoadMisses != nil { - if *this.L1IcacheLoadMisses != *that1.L1IcacheLoadMisses { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v FrameworkInfo_Capability_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (FrameworkInfo_Capability_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.L1IcacheLoadMisses != nil { - return false - } else if that1.L1IcacheLoadMisses != nil { - return false } - if this.L1IcachePrefetches != nil && that1.L1IcachePrefetches != nil { - if *this.L1IcachePrefetches != *that1.L1IcachePrefetches { - return false - } - } else if this.L1IcachePrefetches != nil { - return false - } else if that1.L1IcachePrefetches != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - if this.L1IcachePrefetchMisses != nil && that1.L1IcachePrefetchMisses != nil { - if *this.L1IcachePrefetchMisses != *that1.L1IcachePrefetchMisses { - return false + + return nil +} +func (m *HealthCheck) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.L1IcachePrefetchMisses != nil { - return false - } else if that1.L1IcachePrefetchMisses != nil { - return false - } - if this.LlcLoads != nil && that1.LlcLoads != nil { - if *this.LlcLoads != *that1.LlcLoads { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Http == nil { + m.Http = &HealthCheck_HTTP{} + } + if err := m.Http.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DelaySeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.DelaySeconds = &v2 + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field IntervalSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.IntervalSeconds = &v2 + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.TimeoutSeconds = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsecutiveFailures", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ConsecutiveFailures = &v + case 6: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.GracePeriodSeconds = &v2 + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CommandInfo{} + } + if err := m.Command.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.LlcLoads != nil { - return false - } else if that1.LlcLoads != nil { - return false } - if this.LlcLoadMisses != nil && that1.LlcLoadMisses != nil { - if *this.LlcLoadMisses != *that1.LlcLoadMisses { - return false + + return nil +} +func (m *HealthCheck_HTTP) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.LlcLoadMisses != nil { - return false - } else if that1.LlcLoadMisses != nil { - return false - } - if this.LlcStores != nil && that1.LlcStores != nil { - if *this.LlcStores != *that1.LlcStores { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Path = &s + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Statuses = append(m.Statuses, v) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.LlcStores != nil { - return false - } else if that1.LlcStores != nil { - return false } - if this.LlcStoreMisses != nil && that1.LlcStoreMisses != nil { - if *this.LlcStoreMisses != *that1.LlcStoreMisses { - return false - } - } else if this.LlcStoreMisses != nil { - return false - } else if that1.LlcStoreMisses != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") } - if this.LlcPrefetches != nil && that1.LlcPrefetches != nil { - if *this.LlcPrefetches != *that1.LlcPrefetches { - return false + + return nil +} +func (m *CommandInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.LlcPrefetches != nil { - return false - } else if that1.LlcPrefetches != nil { - return false - } - if this.LlcPrefetchMisses != nil && that1.LlcPrefetchMisses != nil { - if *this.LlcPrefetchMisses != *that1.LlcPrefetchMisses { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uris", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uris = append(m.Uris, &CommandInfo_URI{}) + if err := m.Uris[len(m.Uris)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Environment == nil { + m.Environment = &Environment{} + } + if err := m.Environment.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &CommandInfo_ContainerInfo{} + } + if err := m.Container.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.User = &s + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shell", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Shell = &b + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Arguments = append(m.Arguments, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.LlcPrefetchMisses != nil { - return false - } else if that1.LlcPrefetchMisses != nil { - return false } - if this.DtlbLoads != nil && that1.DtlbLoads != nil { - if *this.DtlbLoads != *that1.DtlbLoads { - return false + + return nil +} +func (m *CommandInfo_URI) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.DtlbLoads != nil { - return false - } else if that1.DtlbLoads != nil { - return false - } - if this.DtlbLoadMisses != nil && that1.DtlbLoadMisses != nil { - if *this.DtlbLoadMisses != *that1.DtlbLoadMisses { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Executable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Executable = &b + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Extract", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Extract = &b + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cache", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Cache = &b + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.DtlbLoadMisses != nil { - return false - } else if that1.DtlbLoadMisses != nil { - return false } - if this.DtlbStores != nil && that1.DtlbStores != nil { - if *this.DtlbStores != *that1.DtlbStores { - return false - } - } else if this.DtlbStores != nil { - return false - } else if that1.DtlbStores != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - if this.DtlbStoreMisses != nil && that1.DtlbStoreMisses != nil { - if *this.DtlbStoreMisses != *that1.DtlbStoreMisses { - return false + + return nil +} +func (m *CommandInfo_ContainerInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.DtlbStoreMisses != nil { - return false - } else if that1.DtlbStoreMisses != nil { - return false - } - if this.DtlbPrefetches != nil && that1.DtlbPrefetches != nil { - if *this.DtlbPrefetches != *that1.DtlbPrefetches { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Image = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.DtlbPrefetches != nil { - return false - } else if that1.DtlbPrefetches != nil { - return false } - if this.DtlbPrefetchMisses != nil && that1.DtlbPrefetchMisses != nil { - if *this.DtlbPrefetchMisses != *that1.DtlbPrefetchMisses { - return false - } - } else if this.DtlbPrefetchMisses != nil { - return false - } else if that1.DtlbPrefetchMisses != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("image") } - if this.ItlbLoads != nil && that1.ItlbLoads != nil { - if *this.ItlbLoads != *that1.ItlbLoads { - return false + + return nil +} +func (m *ExecutorInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.ItlbLoads != nil { - return false - } else if that1.ItlbLoads != nil { - return false - } - if this.ItlbLoadMisses != nil && that1.ItlbLoadMisses != nil { - if *this.ItlbLoadMisses != *that1.ItlbLoadMisses { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutorId == nil { + m.ExecutorId = &ExecutorID{} + } + if err := m.ExecutorId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CommandInfo{} + } + if err := m.Command.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkId == nil { + m.FrameworkId = &FrameworkID{} + } + if err := m.FrameworkId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Source = &s + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &ContainerInfo{} + } + if err := m.Container.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Discovery == nil { + m.Discovery = &DiscoveryInfo{} + } + if err := m.Discovery.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.ItlbLoadMisses != nil { - return false - } else if that1.ItlbLoadMisses != nil { - return false } - if this.BranchLoads != nil && that1.BranchLoads != nil { - if *this.BranchLoads != *that1.BranchLoads { - return false - } - } else if this.BranchLoads != nil { - return false - } else if that1.BranchLoads != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_id") } - if this.BranchLoadMisses != nil && that1.BranchLoadMisses != nil { - if *this.BranchLoadMisses != *that1.BranchLoadMisses { - return false - } - } else if this.BranchLoadMisses != nil { - return false - } else if that1.BranchLoadMisses != nil { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("command") } - if this.NodeLoads != nil && that1.NodeLoads != nil { - if *this.NodeLoads != *that1.NodeLoads { - return false + + return nil +} +func (m *MasterInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Id = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Ip = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Pid = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Version = &s + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.NodeLoads != nil { - return false - } else if that1.NodeLoads != nil { - return false } - if this.NodeLoadMisses != nil && that1.NodeLoadMisses != nil { - if *this.NodeLoadMisses != *that1.NodeLoadMisses { - return false - } - } else if this.NodeLoadMisses != nil { - return false - } else if that1.NodeLoadMisses != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") } - if this.NodeStores != nil && that1.NodeStores != nil { - if *this.NodeStores != *that1.NodeStores { - return false - } - } else if this.NodeStores != nil { - return false - } else if that1.NodeStores != nil { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("ip") } - if this.NodeStoreMisses != nil && that1.NodeStoreMisses != nil { - if *this.NodeStoreMisses != *that1.NodeStoreMisses { - return false - } - } else if this.NodeStoreMisses != nil { - return false - } else if that1.NodeStoreMisses != nil { - return false + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") } - if this.NodePrefetches != nil && that1.NodePrefetches != nil { - if *this.NodePrefetches != *that1.NodePrefetches { - return false + + return nil +} +func (m *SlaveInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.NodePrefetches != nil { - return false - } else if that1.NodePrefetches != nil { - return false - } - if this.NodePrefetchMisses != nil && that1.NodePrefetchMisses != nil { - if *this.NodePrefetchMisses != *that1.NodePrefetchMisses { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &SlaveID{} + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Checkpoint = &b + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.NodePrefetchMisses != nil { - return false - } else if that1.NodePrefetchMisses != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false } - return true -} -func (this *Request) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") } - that1, ok := that.(*Request) - if !ok { - return fmt3.Errorf("that is not of type *Request") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Request but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Requestbut is not nil && this == nil") - } - if !this.SlaveId.Equal(that1.SlaveId) { - return fmt3.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) - } - if len(this.Resources) != len(that1.Resources) { - return fmt3.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) - } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return fmt3.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *Request) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Request) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.SlaveId.Equal(that1.SlaveId) { - return false - } - if len(this.Resources) != len(that1.Resources) { - return false - } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Offer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Offer) - if !ok { - return fmt3.Errorf("that is not of type *Offer") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Offer but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Offerbut is not nil && this == nil") - } - if !this.Id.Equal(that1.Id) { - return fmt3.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) - } - if !this.FrameworkId.Equal(that1.FrameworkId) { - return fmt3.Errorf("FrameworkId this(%v) Not Equal that(%v)", this.FrameworkId, that1.FrameworkId) - } - if !this.SlaveId.Equal(that1.SlaveId) { - return fmt3.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) - } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) +func (m *Value) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Hostname != nil { - return fmt3.Errorf("this.Hostname == nil && that.Hostname != nil") - } else if that1.Hostname != nil { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) - } - if len(this.Resources) != len(that1.Resources) { - return fmt3.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) - } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return fmt3.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Value_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Value_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scalar == nil { + m.Scalar = &Value_Scalar{} + } + if err := m.Scalar.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ranges == nil { + m.Ranges = &Value_Ranges{} + } + if err := m.Ranges.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Set == nil { + m.Set = &Value_Set{} + } + if err := m.Set.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Text == nil { + m.Text = &Value_Text{} + } + if err := m.Text.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if len(this.Attributes) != len(that1.Attributes) { - return fmt3.Errorf("Attributes this(%v) Not Equal that(%v)", len(this.Attributes), len(that1.Attributes)) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - for i := range this.Attributes { - if !this.Attributes[i].Equal(that1.Attributes[i]) { - return fmt3.Errorf("Attributes this[%v](%v) Not Equal that[%v](%v)", i, this.Attributes[i], i, that1.Attributes[i]) + + return nil +} +func (m *Value_Scalar) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - if len(this.ExecutorIds) != len(that1.ExecutorIds) { - return fmt3.Errorf("ExecutorIds this(%v) Not Equal that(%v)", len(this.ExecutorIds), len(that1.ExecutorIds)) - } - for i := range this.ExecutorIds { - if !this.ExecutorIds[i].Equal(that1.ExecutorIds[i]) { - return fmt3.Errorf("ExecutorIds this[%v](%v) Not Equal that[%v](%v)", i, this.ExecutorIds[i], i, that1.ExecutorIds[i]) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Value = &v2 + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + return nil } -func (this *Offer) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Offer) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true +func (m *Value_Range) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if !this.Id.Equal(that1.Id) { - return false - } - if !this.FrameworkId.Equal(that1.FrameworkId) { - return false - } - if !this.SlaveId.Equal(that1.SlaveId) { - return false - } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Begin = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.End = &v + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Hostname != nil { - return false - } else if that1.Hostname != nil { - return false } - if len(this.Resources) != len(that1.Resources) { - return false - } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return false - } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("begin") } - if len(this.Attributes) != len(that1.Attributes) { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("end") } - for i := range this.Attributes { - if !this.Attributes[i].Equal(that1.Attributes[i]) { - return false + + return nil +} +func (m *Value_Ranges) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - if len(this.ExecutorIds) != len(that1.ExecutorIds) { - return false - } - for i := range this.ExecutorIds { - if !this.ExecutorIds[i].Equal(that1.ExecutorIds[i]) { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Range = append(m.Range, &Value_Range{}) + if err := m.Range[len(m.Range)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true + + return nil } -func (this *TaskInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Value_Set) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Item", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Item = append(m.Item, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - that1, ok := that.(*TaskInfo) - if !ok { - return fmt3.Errorf("that is not of type *TaskInfo") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *TaskInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *TaskInfobut is not nil && this == nil") - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + return nil +} +func (m *Value_Text) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Name != nil { - return fmt3.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if !this.TaskId.Equal(that1.TaskId) { - return fmt3.Errorf("TaskId this(%v) Not Equal that(%v)", this.TaskId, that1.TaskId) - } - if !this.SlaveId.Equal(that1.SlaveId) { - return fmt3.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) - } - if len(this.Resources) != len(that1.Resources) { - return fmt3.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) - } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return fmt3.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !this.Executor.Equal(that1.Executor) { - return fmt3.Errorf("Executor this(%v) Not Equal that(%v)", this.Executor, that1.Executor) - } - if !this.Command.Equal(that1.Command) { - return fmt3.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) - } - if !this.Container.Equal(that1.Container) { - return fmt3.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt3.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !this.HealthCheck.Equal(that1.HealthCheck) { - return fmt3.Errorf("HealthCheck this(%v) Not Equal that(%v)", this.HealthCheck, that1.HealthCheck) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + return nil } -func (this *TaskInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TaskInfo) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false +func (m *Attribute) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false - } - if !this.TaskId.Equal(that1.TaskId) { - return false - } - if !this.SlaveId.Equal(that1.SlaveId) { - return false - } - if len(this.Resources) != len(that1.Resources) { - return false - } - for i := range this.Resources { - if !this.Resources[i].Equal(that1.Resources[i]) { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Value_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Value_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scalar == nil { + m.Scalar = &Value_Scalar{} + } + if err := m.Scalar.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ranges == nil { + m.Ranges = &Value_Ranges{} + } + if err := m.Ranges.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Text == nil { + m.Text = &Value_Text{} + } + if err := m.Text.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Set == nil { + m.Set = &Value_Set{} + } + if err := m.Set.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !this.Executor.Equal(that1.Executor) { - return false - } - if !this.Command.Equal(that1.Command) { - return false - } - if !this.Container.Equal(that1.Container) { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !this.HealthCheck.Equal(that1.HealthCheck) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } - return true -} -func (this *TaskStatus) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - that1, ok := that.(*TaskStatus) - if !ok { - return fmt3.Errorf("that is not of type *TaskStatus") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *TaskStatus but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *TaskStatusbut is not nil && this == nil") - } - if !this.TaskId.Equal(that1.TaskId) { - return fmt3.Errorf("TaskId this(%v) Not Equal that(%v)", this.TaskId, that1.TaskId) - } - if this.State != nil && that1.State != nil { - if *this.State != *that1.State { - return fmt3.Errorf("State this(%v) Not Equal that(%v)", *this.State, *that1.State) - } - } else if this.State != nil { - return fmt3.Errorf("this.State == nil && that.State != nil") - } else if that1.State != nil { - return fmt3.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) - } - if this.Message != nil && that1.Message != nil { - if *this.Message != *that1.Message { - return fmt3.Errorf("Message this(%v) Not Equal that(%v)", *this.Message, *that1.Message) - } - } else if this.Message != nil { - return fmt3.Errorf("this.Message == nil && that.Message != nil") - } else if that1.Message != nil { - return fmt3.Errorf("Message this(%v) Not Equal that(%v)", this.Message, that1.Message) - } - if this.Source != nil && that1.Source != nil { - if *this.Source != *that1.Source { - return fmt3.Errorf("Source this(%v) Not Equal that(%v)", *this.Source, *that1.Source) - } - } else if this.Source != nil { - return fmt3.Errorf("this.Source == nil && that.Source != nil") - } else if that1.Source != nil { - return fmt3.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) - } - if this.Reason != nil && that1.Reason != nil { - if *this.Reason != *that1.Reason { - return fmt3.Errorf("Reason this(%v) Not Equal that(%v)", *this.Reason, *that1.Reason) + return nil +} +func (m *Resource) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Reason != nil { - return fmt3.Errorf("this.Reason == nil && that.Reason != nil") - } else if that1.Reason != nil { - return fmt3.Errorf("Reason this(%v) Not Equal that(%v)", this.Reason, that1.Reason) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt3.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !this.SlaveId.Equal(that1.SlaveId) { - return fmt3.Errorf("SlaveId this(%v) Not Equal that(%v)", this.SlaveId, that1.SlaveId) - } - if !this.ExecutorId.Equal(that1.ExecutorId) { - return fmt3.Errorf("ExecutorId this(%v) Not Equal that(%v)", this.ExecutorId, that1.ExecutorId) - } - if this.Timestamp != nil && that1.Timestamp != nil { - if *this.Timestamp != *that1.Timestamp { - return fmt3.Errorf("Timestamp this(%v) Not Equal that(%v)", *this.Timestamp, *that1.Timestamp) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Value_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Value_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scalar == nil { + m.Scalar = &Value_Scalar{} + } + if err := m.Scalar.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ranges == nil { + m.Ranges = &Value_Ranges{} + } + if err := m.Ranges.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Set == nil { + m.Set = &Value_Set{} + } + if err := m.Set.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Disk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Disk == nil { + m.Disk = &Resource_DiskInfo{} + } + if err := m.Disk.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reservation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Reservation == nil { + m.Reservation = &Resource_ReservationInfo{} + } + if err := m.Reservation.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Revocable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Revocable == nil { + m.Revocable = &Resource_RevocableInfo{} + } + if err := m.Revocable.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Timestamp != nil { - return fmt3.Errorf("this.Timestamp == nil && that.Timestamp != nil") - } else if that1.Timestamp != nil { - return fmt3.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) } - if this.Healthy != nil && that1.Healthy != nil { - if *this.Healthy != *that1.Healthy { - return fmt3.Errorf("Healthy this(%v) Not Equal that(%v)", *this.Healthy, *that1.Healthy) - } - } else if this.Healthy != nil { - return fmt3.Errorf("this.Healthy == nil && that.Healthy != nil") - } else if that1.Healthy != nil { - return fmt3.Errorf("Healthy this(%v) Not Equal that(%v)", this.Healthy, that1.Healthy) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } + return nil } -func (this *TaskStatus) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*TaskStatus) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.TaskId.Equal(that1.TaskId) { - return false - } - if this.State != nil && that1.State != nil { - if *this.State != *that1.State { - return false - } - } else if this.State != nil { - return false - } else if that1.State != nil { - return false - } - if this.Message != nil && that1.Message != nil { - if *this.Message != *that1.Message { - return false - } - } else if this.Message != nil { - return false - } else if that1.Message != nil { - return false - } - if this.Source != nil && that1.Source != nil { - if *this.Source != *that1.Source { - return false - } - } else if this.Source != nil { - return false - } else if that1.Source != nil { - return false - } - if this.Reason != nil && that1.Reason != nil { - if *this.Reason != *that1.Reason { - return false - } - } else if this.Reason != nil { - return false - } else if that1.Reason != nil { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !this.SlaveId.Equal(that1.SlaveId) { - return false - } - if !this.ExecutorId.Equal(that1.ExecutorId) { - return false - } - if this.Timestamp != nil && that1.Timestamp != nil { - if *this.Timestamp != *that1.Timestamp { - return false +func (m *Resource_ReservationInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Timestamp != nil { - return false - } else if that1.Timestamp != nil { - return false - } - if this.Healthy != nil && that1.Healthy != nil { - if *this.Healthy != *that1.Healthy { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Principal = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Healthy != nil { - return false - } else if that1.Healthy != nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") } - return true + + return nil } -func (this *Filters) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Resource_DiskInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt3.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Filters) - if !ok { - return fmt3.Errorf("that is not of type *Filters") - } - if that1 == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Persistence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Persistence == nil { + m.Persistence = &Resource_DiskInfo_Persistence{} + } + if err := m.Persistence.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Volume == nil { + m.Volume = &Volume{} + } + if err := m.Volume.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that is type *Filters but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Filtersbut is not nil && this == nil") } - if this.RefuseSeconds != nil && that1.RefuseSeconds != nil { - if *this.RefuseSeconds != *that1.RefuseSeconds { - return fmt3.Errorf("RefuseSeconds this(%v) Not Equal that(%v)", *this.RefuseSeconds, *that1.RefuseSeconds) + + return nil +} +func (m *Resource_DiskInfo_Persistence) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Id = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.RefuseSeconds != nil { - return fmt3.Errorf("this.RefuseSeconds == nil && that.RefuseSeconds != nil") - } else if that1.RefuseSeconds != nil { - return fmt3.Errorf("RefuseSeconds this(%v) Not Equal that(%v)", this.RefuseSeconds, that1.RefuseSeconds) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") } + return nil } -func (this *Filters) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *Resource_RevocableInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + switch fieldNum { + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false } - that1, ok := that.(*Filters) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + return nil +} +func (m *TrafficControlStatistics) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if this.RefuseSeconds != nil && that1.RefuseSeconds != nil { - if *this.RefuseSeconds != *that1.RefuseSeconds { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Id = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Backlog", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Backlog = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bytes = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Drops = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Overlimits", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Overlimits = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Packets", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Packets = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Qlen", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Qlen = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ratebps", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Ratebps = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ratepps", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Ratepps = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Requeues", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Requeues = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.RefuseSeconds != nil { - return false - } else if that1.RefuseSeconds != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false } - return true -} -func (this *Environment) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") } - that1, ok := that.(*Environment) - if !ok { - return fmt3.Errorf("that is not of type *Environment") - } - if that1 == nil { - if this == nil { - return nil + return nil +} +func (m *ResourceStatistics) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt3.Errorf("that is type *Environment but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Environmentbut is not nil && this == nil") - } - if len(this.Variables) != len(that1.Variables) { - return fmt3.Errorf("Variables this(%v) Not Equal that(%v)", len(this.Variables), len(that1.Variables)) - } - for i := range this.Variables { - if !this.Variables[i].Equal(that1.Variables[i]) { - return fmt3.Errorf("Variables this[%v](%v) Not Equal that[%v](%v)", i, this.Variables[i], i, that1.Variables[i]) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Timestamp = &v2 + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusUserTimeSecs", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CpusUserTimeSecs = &v2 + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusSystemTimeSecs", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CpusSystemTimeSecs = &v2 + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CpusLimit = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemRssBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemRssBytes = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemLimitBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemLimitBytes = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusNrPeriods", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CpusNrPeriods = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusNrThrottled", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CpusNrThrottled = &v + case 9: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpusThrottledTimeSecs", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CpusThrottledTimeSecs = &v2 + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemFileBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemFileBytes = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemAnonBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemAnonBytes = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemMappedFileBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemMappedFileBytes = &v + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Perf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Perf == nil { + m.Perf = &PerfStatistics{} + } + if err := m.Perf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxPackets", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxPackets = &v + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxBytes = &v + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxErrors", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxErrors = &v + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxDropped", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxDropped = &v + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxPackets", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxPackets = &v + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxBytes = &v + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxErrors", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxErrors = &v + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxDropped", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxDropped = &v + case 22: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP50", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTcpRttMicrosecsP50 = &v2 + case 23: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP90", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTcpRttMicrosecsP90 = &v2 + case 24: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP95", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTcpRttMicrosecsP95 = &v2 + case 25: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTcpRttMicrosecsP99", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTcpRttMicrosecsP99 = &v2 + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskLimitBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DiskLimitBytes = &v + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsedBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DiskUsedBytes = &v + case 28: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTcpActiveConnections", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTcpActiveConnections = &v2 + case 29: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTcpTimeWaitConnections", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTcpTimeWaitConnections = &v2 + case 30: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Processes = &v + case 31: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Threads", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Threads = &v + case 32: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemLowPressureCounter", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemLowPressureCounter = &v + case 33: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemMediumPressureCounter", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemMediumPressureCounter = &v + case 34: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemCriticalPressureCounter", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemCriticalPressureCounter = &v + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTrafficControlStatistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetTrafficControlStatistics = append(m.NetTrafficControlStatistics, &TrafficControlStatistics{}) + if err := m.NetTrafficControlStatistics[len(m.NetTrafficControlStatistics)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemTotalBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemTotalBytes = &v + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemTotalMemswBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemTotalMemswBytes = &v + case 38: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemSoftLimitBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemSoftLimitBytes = &v + case 39: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemCacheBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemCacheBytes = &v + case 40: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemSwapBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemSwapBytes = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } + return nil } -func (this *Environment) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Environment) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if len(this.Variables) != len(that1.Variables) { - return false - } - for i := range this.Variables { - if !this.Variables[i].Equal(that1.Variables[i]) { - return false +func (m *ResourceUsage) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Environment_Variable) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Executors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Executors = append(m.Executors, &ResourceUsage_Executor{}) + if err := m.Executors[len(m.Executors)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - that1, ok := that.(*Environment_Variable) - if !ok { - return fmt3.Errorf("that is not of type *Environment_Variable") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Environment_Variable but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Environment_Variablebut is not nil && this == nil") - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) - } - } else if this.Name != nil { - return fmt3.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt3.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) - } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *Environment_Variable) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Environment_Variable) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false - } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false - } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false +func (m *ResourceUsage_Executor) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Parameter) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutorInfo == nil { + m.ExecutorInfo = &ExecutorInfo{} + } + if err := m.ExecutorInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allocated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Allocated = append(m.Allocated, &Resource{}) + if err := m.Allocated[len(m.Allocated)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Statistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Statistics == nil { + m.Statistics = &ResourceStatistics{} + } + if err := m.Statistics.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Parameter) - if !ok { - return fmt3.Errorf("that is not of type *Parameter") } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Parameter but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Parameterbut is not nil && this == nil") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_info") } - if this.Key != nil && that1.Key != nil { - if *this.Key != *that1.Key { - return fmt3.Errorf("Key this(%v) Not Equal that(%v)", *this.Key, *that1.Key) + + return nil +} +func (m *PerfStatistics) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Key != nil { - return fmt3.Errorf("this.Key == nil && that.Key != nil") - } else if that1.Key != nil { - return fmt3.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) - } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Timestamp = &v2 + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Duration = &v2 + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cycles", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Cycles = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StalledCyclesFrontend", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StalledCyclesFrontend = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StalledCyclesBackend", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StalledCyclesBackend = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Instructions", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Instructions = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CacheReferences", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CacheReferences = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CacheMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CacheMisses = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Branches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Branches = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BranchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BranchMisses = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BusCycles", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BusCycles = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RefCycles", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RefCycles = &v + case 13: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuClock", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CpuClock = &v2 + case 14: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskClock", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.TaskClock = &v2 + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.PageFaults = &v + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinorFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MinorFaults = &v + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MajorFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MajorFaults = &v + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContextSwitches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ContextSwitches = &v + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuMigrations", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CpuMigrations = &v + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AlignmentFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AlignmentFaults = &v + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmulationFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EmulationFaults = &v + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheLoads = &v + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheLoadMisses = &v + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheStores = &v + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheStoreMisses = &v + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcachePrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcachePrefetches = &v + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcachePrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcachePrefetchMisses = &v + case 28: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcacheLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcacheLoads = &v + case 29: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcacheLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcacheLoadMisses = &v + case 30: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcachePrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcachePrefetches = &v + case 31: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcachePrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcachePrefetchMisses = &v + case 32: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LlcLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LlcLoads = &v + case 33: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LlcLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LlcLoadMisses = &v + case 34: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LlcStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LlcStores = &v + case 35: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LlcStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LlcStoreMisses = &v + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LlcPrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LlcPrefetches = &v + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LlcPrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LlcPrefetchMisses = &v + case 38: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DtlbLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DtlbLoads = &v + case 39: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DtlbLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DtlbLoadMisses = &v + case 40: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DtlbStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DtlbStores = &v + case 41: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DtlbStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DtlbStoreMisses = &v + case 42: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DtlbPrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DtlbPrefetches = &v + case 43: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DtlbPrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DtlbPrefetchMisses = &v + case 44: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ItlbLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ItlbLoads = &v + case 45: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ItlbLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ItlbLoadMisses = &v + case 46: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BranchLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BranchLoads = &v + case 47: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BranchLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BranchLoadMisses = &v + case 48: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeLoads = &v + case 49: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeLoadMisses = &v + case 50: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeStores = &v + case 51: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeStoreMisses = &v + case 52: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodePrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodePrefetches = &v + case 53: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodePrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodePrefetchMisses = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Value != nil { - return fmt3.Errorf("this.Value == nil && that.Value != nil") - } else if that1.Value != nil { - return fmt3.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("duration") + } + return nil } -func (this *Parameter) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *Request) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SlaveId == nil { + m.SlaveId = &SlaveID{} + } + if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false } - that1, ok := that.(*Parameter) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + return nil +} +func (m *Offer) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &OfferID{} + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkId == nil { + m.FrameworkId = &FrameworkID{} + } + if err := m.FrameworkId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SlaveId == nil { + m.SlaveId = &SlaveID{} + } + if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorIds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutorIds = append(m.ExecutorIds, &ExecutorID{}) + if err := m.ExecutorIds[len(m.ExecutorIds)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if this.Key != nil && that1.Key != nil { - if *this.Key != *that1.Key { - return false - } - } else if this.Key != nil { - return false - } else if that1.Key != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") } - if this.Value != nil && that1.Value != nil { - if *this.Value != *that1.Value { - return false - } - } else if this.Value != nil { - return false - } else if that1.Value != nil { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } - return true -} -func (this *Parameters) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") } - that1, ok := that.(*Parameters) - if !ok { - return fmt3.Errorf("that is not of type *Parameters") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Parameters but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Parametersbut is not nil && this == nil") - } - if len(this.Parameter) != len(that1.Parameter) { - return fmt3.Errorf("Parameter this(%v) Not Equal that(%v)", len(this.Parameter), len(that1.Parameter)) - } - for i := range this.Parameter { - if !this.Parameter[i].Equal(that1.Parameter[i]) { - return fmt3.Errorf("Parameter this[%v](%v) Not Equal that[%v](%v)", i, this.Parameter[i], i, that1.Parameter[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *Parameters) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Parameters) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true +func (m *Offer_Operation) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if len(this.Parameter) != len(that1.Parameter) { - return false - } - for i := range this.Parameter { - if !this.Parameter[i].Equal(that1.Parameter[i]) { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Offer_Operation_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Offer_Operation_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Launch", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Launch == nil { + m.Launch = &Offer_Operation_Launch{} + } + if err := m.Launch.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reserve", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Reserve == nil { + m.Reserve = &Offer_Operation_Reserve{} + } + if err := m.Reserve.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unreserve", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unreserve == nil { + m.Unreserve = &Offer_Operation_Unreserve{} + } + if err := m.Unreserve.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Create", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Create == nil { + m.Create = &Offer_Operation_Create{} + } + if err := m.Create.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Destroy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Destroy == nil { + m.Destroy = &Offer_Operation_Destroy{} + } + if err := m.Destroy.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - return true + + return nil } -func (this *Credential) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Offer_Operation_Launch) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TaskInfos = append(m.TaskInfos, &TaskInfo{}) + if err := m.TaskInfos[len(m.TaskInfos)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - that1, ok := that.(*Credential) - if !ok { - return fmt3.Errorf("that is not of type *Credential") - } - if that1 == nil { - if this == nil { - return nil + return nil +} +func (m *Offer_Operation_Reserve) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt3.Errorf("that is type *Credential but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Credentialbut is not nil && this == nil") - } - if this.Principal != nil && that1.Principal != nil { - if *this.Principal != *that1.Principal { - return fmt3.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Principal != nil { - return fmt3.Errorf("this.Principal == nil && that.Principal != nil") - } else if that1.Principal != nil { - return fmt3.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) - } - if !bytes.Equal(this.Secret, that1.Secret) { - return fmt3.Errorf("Secret this(%v) Not Equal that(%v)", this.Secret, that1.Secret) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } + return nil } -func (this *Credential) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *Offer_Operation_Unreserve) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false } - that1, ok := that.(*Credential) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + return nil +} +func (m *Offer_Operation_Create) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if this.Principal != nil && that1.Principal != nil { - if *this.Principal != *that1.Principal { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, &Resource{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Principal != nil { - return false - } else if that1.Principal != nil { - return false - } - if !bytes.Equal(this.Secret, that1.Secret) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false } - return true + + return nil } -func (this *Credentials) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Offer_Operation_Destroy) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, &Resource{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - that1, ok := that.(*Credentials) - if !ok { - return fmt3.Errorf("that is not of type *Credentials") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Credentials but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Credentialsbut is not nil && this == nil") - } - if len(this.Credentials) != len(that1.Credentials) { - return fmt3.Errorf("Credentials this(%v) Not Equal that(%v)", len(this.Credentials), len(that1.Credentials)) - } - for i := range this.Credentials { - if !this.Credentials[i].Equal(that1.Credentials[i]) { - return fmt3.Errorf("Credentials this[%v](%v) Not Equal that[%v](%v)", i, this.Credentials[i], i, that1.Credentials[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *Credentials) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *TaskInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } - - that1, ok := that.(*Credentials) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TaskId == nil { + m.TaskId = &TaskID{} + } + if err := m.TaskId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SlaveId == nil { + m.SlaveId = &SlaveID{} + } + if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, &Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Executor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Executor == nil { + m.Executor = &ExecutorInfo{} + } + if err := m.Executor.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CommandInfo{} + } + if err := m.Command.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HealthCheck", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HealthCheck == nil { + m.HealthCheck = &HealthCheck{} + } + if err := m.HealthCheck.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &ContainerInfo{} + } + if err := m.Container.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Discovery == nil { + m.Discovery = &DiscoveryInfo{} + } + if err := m.Discovery.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false - } - if len(this.Credentials) != len(that1.Credentials) { - return false } - for i := range this.Credentials { - if !this.Credentials[i].Equal(that1.Credentials[i]) { - return false - } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") } - return true -} -func (this *ACL) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("slave_id") } - that1, ok := that.(*ACL) - if !ok { - return fmt3.Errorf("that is not of type *ACL") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ACL but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ACLbut is not nil && this == nil") - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *ACL) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *TaskStatus) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } - - that1, ok := that.(*ACL) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TaskId == nil { + m.TaskId = &TaskID{} + } + if err := m.TaskId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var v TaskState + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TaskState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.State = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Message = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlaveId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SlaveId == nil { + m.SlaveId = &SlaveID{} + } + if err := m.SlaveId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Timestamp = &v2 + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutorId == nil { + m.ExecutorId = &ExecutorID{} + } + if err := m.ExecutorId.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Healthy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Healthy = &b + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var v TaskStatus_Source + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TaskStatus_Source(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Source = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var v TaskStatus_Reason + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TaskStatus_Reason(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Reason = &v + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uuid = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") } - return true -} -func (this *ACL_Entity) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") } - that1, ok := that.(*ACL_Entity) - if !ok { - return fmt3.Errorf("that is not of type *ACL_Entity") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ACL_Entity but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ACL_Entitybut is not nil && this == nil") - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) - } - } else if this.Type != nil { - return fmt3.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) - } - if len(this.Values) != len(that1.Values) { - return fmt3.Errorf("Values this(%v) Not Equal that(%v)", len(this.Values), len(that1.Values)) - } - for i := range this.Values { - if this.Values[i] != that1.Values[i] { - return fmt3.Errorf("Values this[%v](%v) Not Equal that[%v](%v)", i, this.Values[i], i, that1.Values[i]) - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *ACL_Entity) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACL_Entity) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false - } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false - } - if len(this.Values) != len(that1.Values) { - return false - } - for i := range this.Values { - if this.Values[i] != that1.Values[i] { - return false +func (m *Filters) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACL_RegisterFramework) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field RefuseSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.RefuseSeconds = &v2 + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - that1, ok := that.(*ACL_RegisterFramework) - if !ok { - return fmt3.Errorf("that is not of type *ACL_RegisterFramework") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ACL_RegisterFramework but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ACL_RegisterFrameworkbut is not nil && this == nil") - } - if !this.Principals.Equal(that1.Principals) { - return fmt3.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) - } - if !this.Roles.Equal(that1.Roles) { - return fmt3.Errorf("Roles this(%v) Not Equal that(%v)", this.Roles, that1.Roles) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *ACL_RegisterFramework) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ACL_RegisterFramework) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Principals.Equal(that1.Principals) { - return false - } - if !this.Roles.Equal(that1.Roles) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ACL_RunTask) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACL_RunTask) - if !ok { - return fmt3.Errorf("that is not of type *ACL_RunTask") - } - if that1 == nil { - if this == nil { - return nil +func (m *Environment) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt3.Errorf("that is type *ACL_RunTask but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ACL_RunTaskbut is not nil && this == nil") - } - if !this.Principals.Equal(that1.Principals) { - return fmt3.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) - } - if !this.Users.Equal(that1.Users) { - return fmt3.Errorf("Users this(%v) Not Equal that(%v)", this.Users, that1.Users) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ACL_RunTask) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Variables = append(m.Variables, &Environment_Variable{}) + if err := m.Variables[len(m.Variables)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false } - that1, ok := that.(*ACL_RunTask) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Principals.Equal(that1.Principals) { - return false - } - if !this.Users.Equal(that1.Users) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true + return nil } -func (this *ACL_ShutdownFramework) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Environment_Variable) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt3.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ACL_ShutdownFramework) - if !ok { - return fmt3.Errorf("that is not of type *ACL_ShutdownFramework") - } - if that1 == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that is type *ACL_ShutdownFramework but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ACL_ShutdownFrameworkbut is not nil && this == nil") - } - if !this.Principals.Equal(that1.Principals) { - return fmt3.Errorf("Principals this(%v) Not Equal that(%v)", this.Principals, that1.Principals) } - if !this.FrameworkPrincipals.Equal(that1.FrameworkPrincipals) { - return fmt3.Errorf("FrameworkPrincipals this(%v) Not Equal that(%v)", this.FrameworkPrincipals, that1.FrameworkPrincipals) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } + return nil } -func (this *ACL_ShutdownFramework) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *Parameter) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } - - that1, ok := that.(*ACL_ShutdownFramework) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Key = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if !this.Principals.Equal(that1.Principals) { - return false - } - if !this.FrameworkPrincipals.Equal(that1.FrameworkPrincipals) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } - return true + + return nil } -func (this *ACLs) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Parameters) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Parameter = append(m.Parameter, &Parameter{}) + if err := m.Parameter[len(m.Parameter)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - that1, ok := that.(*ACLs) - if !ok { - return fmt3.Errorf("that is not of type *ACLs") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ACLs but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ACLsbut is not nil && this == nil") - } - if this.Permissive != nil && that1.Permissive != nil { - if *this.Permissive != *that1.Permissive { - return fmt3.Errorf("Permissive this(%v) Not Equal that(%v)", *this.Permissive, *that1.Permissive) + return nil +} +func (m *Credential) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Permissive != nil { - return fmt3.Errorf("this.Permissive == nil && that.Permissive != nil") - } else if that1.Permissive != nil { - return fmt3.Errorf("Permissive this(%v) Not Equal that(%v)", this.Permissive, that1.Permissive) - } - if len(this.RegisterFrameworks) != len(that1.RegisterFrameworks) { - return fmt3.Errorf("RegisterFrameworks this(%v) Not Equal that(%v)", len(this.RegisterFrameworks), len(that1.RegisterFrameworks)) - } - for i := range this.RegisterFrameworks { - if !this.RegisterFrameworks[i].Equal(that1.RegisterFrameworks[i]) { - return fmt3.Errorf("RegisterFrameworks this[%v](%v) Not Equal that[%v](%v)", i, this.RegisterFrameworks[i], i, that1.RegisterFrameworks[i]) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Principal = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Secret = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if len(this.RunTasks) != len(that1.RunTasks) { - return fmt3.Errorf("RunTasks this(%v) Not Equal that(%v)", len(this.RunTasks), len(that1.RunTasks)) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") } - for i := range this.RunTasks { - if !this.RunTasks[i].Equal(that1.RunTasks[i]) { - return fmt3.Errorf("RunTasks this[%v](%v) Not Equal that[%v](%v)", i, this.RunTasks[i], i, that1.RunTasks[i]) + + return nil +} +func (m *Credentials) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - if len(this.ShutdownFrameworks) != len(that1.ShutdownFrameworks) { - return fmt3.Errorf("ShutdownFrameworks this(%v) Not Equal that(%v)", len(this.ShutdownFrameworks), len(that1.ShutdownFrameworks)) - } - for i := range this.ShutdownFrameworks { - if !this.ShutdownFrameworks[i].Equal(that1.ShutdownFrameworks[i]) { - return fmt3.Errorf("ShutdownFrameworks this[%v](%v) Not Equal that[%v](%v)", i, this.ShutdownFrameworks[i], i, that1.ShutdownFrameworks[i]) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Credentials = append(m.Credentials, &Credential{}) + if err := m.Credentials[len(m.Credentials)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } + return nil } -func (this *ACLs) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *ACL) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + switch fieldNum { + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false } - that1, ok := that.(*ACLs) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + return nil +} +func (m *ACL_Entity) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if this.Permissive != nil && that1.Permissive != nil { - if *this.Permissive != *that1.Permissive { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v ACL_Entity_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (ACL_Entity_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Permissive != nil { - return false - } else if that1.Permissive != nil { - return false } - if len(this.RegisterFrameworks) != len(that1.RegisterFrameworks) { - return false - } - for i := range this.RegisterFrameworks { - if !this.RegisterFrameworks[i].Equal(that1.RegisterFrameworks[i]) { - return false + + return nil +} +func (m *ACL_RegisterFramework) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - if len(this.RunTasks) != len(that1.RunTasks) { - return false - } - for i := range this.RunTasks { - if !this.RunTasks[i].Equal(that1.RunTasks[i]) { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Principals == nil { + m.Principals = &ACL_Entity{} + } + if err := m.Principals.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Roles == nil { + m.Roles = &ACL_Entity{} + } + if err := m.Roles.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if len(this.ShutdownFrameworks) != len(that1.ShutdownFrameworks) { - return false - } - for i := range this.ShutdownFrameworks { - if !this.ShutdownFrameworks[i].Equal(that1.ShutdownFrameworks[i]) { - return false - } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("roles") } - return true + + return nil } -func (this *RateLimit) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *ACL_RunTask) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Principals == nil { + m.Principals = &ACL_Entity{} + } + if err := m.Principals.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Users == nil { + m.Users = &ACL_Entity{} + } + if err := m.Users.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - - that1, ok := that.(*RateLimit) - if !ok { - return fmt3.Errorf("that is not of type *RateLimit") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *RateLimit but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *RateLimitbut is not nil && this == nil") + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("users") } - if this.Qps != nil && that1.Qps != nil { - if *this.Qps != *that1.Qps { - return fmt3.Errorf("Qps this(%v) Not Equal that(%v)", *this.Qps, *that1.Qps) + + return nil +} +func (m *ACL_ShutdownFramework) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Qps != nil { - return fmt3.Errorf("this.Qps == nil && that.Qps != nil") - } else if that1.Qps != nil { - return fmt3.Errorf("Qps this(%v) Not Equal that(%v)", this.Qps, that1.Qps) - } - if this.Principal != nil && that1.Principal != nil { - if *this.Principal != *that1.Principal { - return fmt3.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Principals == nil { + m.Principals = &ACL_Entity{} + } + if err := m.Principals.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkPrincipals", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkPrincipals == nil { + m.FrameworkPrincipals = &ACL_Entity{} + } + if err := m.FrameworkPrincipals.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Principal != nil { - return fmt3.Errorf("this.Principal == nil && that.Principal != nil") - } else if that1.Principal != nil { - return fmt3.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) } - if this.Capacity != nil && that1.Capacity != nil { - if *this.Capacity != *that1.Capacity { - return fmt3.Errorf("Capacity this(%v) Not Equal that(%v)", *this.Capacity, *that1.Capacity) - } - } else if this.Capacity != nil { - return fmt3.Errorf("this.Capacity == nil && that.Capacity != nil") - } else if that1.Capacity != nil { - return fmt3.Errorf("Capacity this(%v) Not Equal that(%v)", this.Capacity, that1.Capacity) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principals") } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_principals") } + return nil } -func (this *RateLimit) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*RateLimit) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Qps != nil && that1.Qps != nil { - if *this.Qps != *that1.Qps { - return false - } - } else if this.Qps != nil { - return false - } else if that1.Qps != nil { - return false - } - if this.Principal != nil && that1.Principal != nil { - if *this.Principal != *that1.Principal { - return false +func (m *ACLs) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Principal != nil { - return false - } else if that1.Principal != nil { - return false - } - if this.Capacity != nil && that1.Capacity != nil { - if *this.Capacity != *that1.Capacity { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Permissive = &b + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisterFrameworks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RegisterFrameworks = append(m.RegisterFrameworks, &ACL_RegisterFramework{}) + if err := m.RegisterFrameworks[len(m.RegisterFrameworks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunTasks = append(m.RunTasks, &ACL_RunTask{}) + if err := m.RunTasks[len(m.RunTasks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShutdownFrameworks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShutdownFrameworks = append(m.ShutdownFrameworks, &ACL_ShutdownFramework{}) + if err := m.ShutdownFrameworks[len(m.ShutdownFrameworks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Capacity != nil { - return false - } else if that1.Capacity != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false } - return true + + return nil } -func (this *RateLimits) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *RateLimit) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt3.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RateLimits) - if !ok { - return fmt3.Errorf("that is not of type *RateLimits") - } - if that1 == nil { - if this == nil { - return nil + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Qps", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Qps = &v2 + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Principal = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Capacity = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that is type *RateLimits but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *RateLimitsbut is not nil && this == nil") - } - if len(this.Limits) != len(that1.Limits) { - return fmt3.Errorf("Limits this(%v) Not Equal that(%v)", len(this.Limits), len(that1.Limits)) } - for i := range this.Limits { - if !this.Limits[i].Equal(that1.Limits[i]) { - return fmt3.Errorf("Limits this[%v](%v) Not Equal that[%v](%v)", i, this.Limits[i], i, that1.Limits[i]) - } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") } - if this.AggregateDefaultQps != nil && that1.AggregateDefaultQps != nil { - if *this.AggregateDefaultQps != *that1.AggregateDefaultQps { - return fmt3.Errorf("AggregateDefaultQps this(%v) Not Equal that(%v)", *this.AggregateDefaultQps, *that1.AggregateDefaultQps) + + return nil +} +func (m *RateLimits) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.AggregateDefaultQps != nil { - return fmt3.Errorf("this.AggregateDefaultQps == nil && that.AggregateDefaultQps != nil") - } else if that1.AggregateDefaultQps != nil { - return fmt3.Errorf("AggregateDefaultQps this(%v) Not Equal that(%v)", this.AggregateDefaultQps, that1.AggregateDefaultQps) - } - if this.AggregateDefaultCapacity != nil && that1.AggregateDefaultCapacity != nil { - if *this.AggregateDefaultCapacity != *that1.AggregateDefaultCapacity { - return fmt3.Errorf("AggregateDefaultCapacity this(%v) Not Equal that(%v)", *this.AggregateDefaultCapacity, *that1.AggregateDefaultCapacity) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Limits = append(m.Limits, &RateLimit{}) + if err := m.Limits[len(m.Limits)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateDefaultQps", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(data[iNdEx-8]) + v |= uint64(data[iNdEx-7]) << 8 + v |= uint64(data[iNdEx-6]) << 16 + v |= uint64(data[iNdEx-5]) << 24 + v |= uint64(data[iNdEx-4]) << 32 + v |= uint64(data[iNdEx-3]) << 40 + v |= uint64(data[iNdEx-2]) << 48 + v |= uint64(data[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.AggregateDefaultQps = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateDefaultCapacity", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AggregateDefaultCapacity = &v + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.AggregateDefaultCapacity != nil { - return fmt3.Errorf("this.AggregateDefaultCapacity == nil && that.AggregateDefaultCapacity != nil") - } else if that1.AggregateDefaultCapacity != nil { - return fmt3.Errorf("AggregateDefaultCapacity this(%v) Not Equal that(%v)", this.AggregateDefaultCapacity, that1.AggregateDefaultCapacity) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } + return nil } -func (this *RateLimits) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *Volume) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } - - that1, ok := that.(*RateLimits) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.ContainerPath = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.HostPath = &s + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var v Volume_Mode + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Volume_Mode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Mode = &v + hasFields[0] |= uint64(0x00000002) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if len(this.Limits) != len(that1.Limits) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_path") } - for i := range this.Limits { - if !this.Limits[i].Equal(that1.Limits[i]) { - return false - } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("mode") } - if this.AggregateDefaultQps != nil && that1.AggregateDefaultQps != nil { - if *this.AggregateDefaultQps != *that1.AggregateDefaultQps { - return false + + return nil +} +func (m *ContainerInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.AggregateDefaultQps != nil { - return false - } else if that1.AggregateDefaultQps != nil { - return false - } - if this.AggregateDefaultCapacity != nil && that1.AggregateDefaultCapacity != nil { - if *this.AggregateDefaultCapacity != *that1.AggregateDefaultCapacity { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v ContainerInfo_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (ContainerInfo_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, &Volume{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docker", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Docker == nil { + m.Docker = &ContainerInfo_DockerInfo{} + } + if err := m.Docker.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.AggregateDefaultCapacity != nil { - return false - } else if that1.AggregateDefaultCapacity != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false } - return true -} -func (this *Volume) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - that1, ok := that.(*Volume) - if !ok { - return fmt3.Errorf("that is not of type *Volume") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *Volume but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *Volumebut is not nil && this == nil") - } - if this.ContainerPath != nil && that1.ContainerPath != nil { - if *this.ContainerPath != *that1.ContainerPath { - return fmt3.Errorf("ContainerPath this(%v) Not Equal that(%v)", *this.ContainerPath, *that1.ContainerPath) - } - } else if this.ContainerPath != nil { - return fmt3.Errorf("this.ContainerPath == nil && that.ContainerPath != nil") - } else if that1.ContainerPath != nil { - return fmt3.Errorf("ContainerPath this(%v) Not Equal that(%v)", this.ContainerPath, that1.ContainerPath) - } - if this.HostPath != nil && that1.HostPath != nil { - if *this.HostPath != *that1.HostPath { - return fmt3.Errorf("HostPath this(%v) Not Equal that(%v)", *this.HostPath, *that1.HostPath) - } - } else if this.HostPath != nil { - return fmt3.Errorf("this.HostPath == nil && that.HostPath != nil") - } else if that1.HostPath != nil { - return fmt3.Errorf("HostPath this(%v) Not Equal that(%v)", this.HostPath, that1.HostPath) - } - if this.Mode != nil && that1.Mode != nil { - if *this.Mode != *that1.Mode { - return fmt3.Errorf("Mode this(%v) Not Equal that(%v)", *this.Mode, *that1.Mode) - } - } else if this.Mode != nil { - return fmt3.Errorf("this.Mode == nil && that.Mode != nil") - } else if that1.Mode != nil { - return fmt3.Errorf("Mode this(%v) Not Equal that(%v)", this.Mode, that1.Mode) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *Volume) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*Volume) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.ContainerPath != nil && that1.ContainerPath != nil { - if *this.ContainerPath != *that1.ContainerPath { - return false - } - } else if this.ContainerPath != nil { - return false - } else if that1.ContainerPath != nil { - return false - } - if this.HostPath != nil && that1.HostPath != nil { - if *this.HostPath != *that1.HostPath { - return false +func (m *ContainerInfo_DockerInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.HostPath != nil { - return false - } else if that1.HostPath != nil { - return false - } - if this.Mode != nil && that1.Mode != nil { - if *this.Mode != *that1.Mode { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Image = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var v ContainerInfo_DockerInfo_Network + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (ContainerInfo_DockerInfo_Network(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Network = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortMappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortMappings = append(m.PortMappings, &ContainerInfo_DockerInfo_PortMapping{}) + if err := m.PortMappings[len(m.PortMappings)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Privileged = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Parameters = append(m.Parameters, &Parameter{}) + if err := m.Parameters[len(m.Parameters)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForcePullImage", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.ForcePullImage = &b + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Mode != nil { - return false - } else if that1.Mode != nil { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ContainerInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("image") } - that1, ok := that.(*ContainerInfo) - if !ok { - return fmt3.Errorf("that is not of type *ContainerInfo") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ContainerInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ContainerInfobut is not nil && this == nil") - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) - } - } else if this.Type != nil { - return fmt3.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt3.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) - } - if len(this.Volumes) != len(that1.Volumes) { - return fmt3.Errorf("Volumes this(%v) Not Equal that(%v)", len(this.Volumes), len(that1.Volumes)) - } - for i := range this.Volumes { - if !this.Volumes[i].Equal(that1.Volumes[i]) { - return fmt3.Errorf("Volumes this[%v](%v) Not Equal that[%v](%v)", i, this.Volumes[i], i, that1.Volumes[i]) - } - } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) - } - } else if this.Hostname != nil { - return fmt3.Errorf("this.Hostname == nil && that.Hostname != nil") - } else if that1.Hostname != nil { - return fmt3.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) - } - if !this.Docker.Equal(that1.Docker) { - return fmt3.Errorf("Docker this(%v) Not Equal that(%v)", this.Docker, that1.Docker) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *ContainerInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainerInfo) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false - } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false - } - if len(this.Volumes) != len(that1.Volumes) { - return false - } - for i := range this.Volumes { - if !this.Volumes[i].Equal(that1.Volumes[i]) { - return false +func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - if this.Hostname != nil && that1.Hostname != nil { - if *this.Hostname != *that1.Hostname { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostPort = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ContainerPort = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Protocol = &s + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Hostname != nil { - return false - } else if that1.Hostname != nil { - return false - } - if !this.Docker.Equal(that1.Docker) { - return false } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("host_port") } - return true -} -func (this *ContainerInfo_DockerInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that == nil && this != nil") + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_port") } - that1, ok := that.(*ContainerInfo_DockerInfo) - if !ok { - return fmt3.Errorf("that is not of type *ContainerInfo_DockerInfo") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ContainerInfo_DockerInfo but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ContainerInfo_DockerInfobut is not nil && this == nil") - } - if this.Image != nil && that1.Image != nil { - if *this.Image != *that1.Image { - return fmt3.Errorf("Image this(%v) Not Equal that(%v)", *this.Image, *that1.Image) - } - } else if this.Image != nil { - return fmt3.Errorf("this.Image == nil && that.Image != nil") - } else if that1.Image != nil { - return fmt3.Errorf("Image this(%v) Not Equal that(%v)", this.Image, that1.Image) - } - if this.Network != nil && that1.Network != nil { - if *this.Network != *that1.Network { - return fmt3.Errorf("Network this(%v) Not Equal that(%v)", *this.Network, *that1.Network) - } - } else if this.Network != nil { - return fmt3.Errorf("this.Network == nil && that.Network != nil") - } else if that1.Network != nil { - return fmt3.Errorf("Network this(%v) Not Equal that(%v)", this.Network, that1.Network) - } - if len(this.PortMappings) != len(that1.PortMappings) { - return fmt3.Errorf("PortMappings this(%v) Not Equal that(%v)", len(this.PortMappings), len(that1.PortMappings)) - } - for i := range this.PortMappings { - if !this.PortMappings[i].Equal(that1.PortMappings[i]) { - return fmt3.Errorf("PortMappings this[%v](%v) Not Equal that[%v](%v)", i, this.PortMappings[i], i, that1.PortMappings[i]) - } - } - if this.Privileged != nil && that1.Privileged != nil { - if *this.Privileged != *that1.Privileged { - return fmt3.Errorf("Privileged this(%v) Not Equal that(%v)", *this.Privileged, *that1.Privileged) + return nil +} +func (m *Labels) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Privileged != nil { - return fmt3.Errorf("this.Privileged == nil && that.Privileged != nil") - } else if that1.Privileged != nil { - return fmt3.Errorf("Privileged this(%v) Not Equal that(%v)", this.Privileged, that1.Privileged) - } - if len(this.Parameters) != len(that1.Parameters) { - return fmt3.Errorf("Parameters this(%v) Not Equal that(%v)", len(this.Parameters), len(that1.Parameters)) - } - for i := range this.Parameters { - if !this.Parameters[i].Equal(that1.Parameters[i]) { - return fmt3.Errorf("Parameters this[%v](%v) Not Equal that[%v](%v)", i, this.Parameters[i], i, that1.Parameters[i]) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Labels = append(m.Labels, &Label{}) + if err := m.Labels[len(m.Labels)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } + return nil } -func (this *ContainerInfo_DockerInfo) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*ContainerInfo_DockerInfo) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Image != nil && that1.Image != nil { - if *this.Image != *that1.Image { - return false +func (m *Label) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Image != nil { - return false - } else if that1.Image != nil { - return false - } - if this.Network != nil && that1.Network != nil { - if *this.Network != *that1.Network { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Key = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Network != nil { - return false - } else if that1.Network != nil { - return false - } - if len(this.PortMappings) != len(that1.PortMappings) { - return false } - for i := range this.PortMappings { - if !this.PortMappings[i].Equal(that1.PortMappings[i]) { - return false - } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") } - if this.Privileged != nil && that1.Privileged != nil { - if *this.Privileged != *that1.Privileged { - return false + + return nil +} +func (m *Port) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.Privileged != nil { - return false - } else if that1.Privileged != nil { - return false - } - if len(this.Parameters) != len(that1.Parameters) { - return false - } - for i := range this.Parameters { - if !this.Parameters[i].Equal(that1.Parameters[i]) { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Number = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Protocol = &s + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("number") } - return true + + return nil } -func (this *ContainerInfo_DockerInfo_PortMapping) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Ports) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ports = append(m.Ports, &Port{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt3.Errorf("that == nil && this != nil") } - that1, ok := that.(*ContainerInfo_DockerInfo_PortMapping) - if !ok { - return fmt3.Errorf("that is not of type *ContainerInfo_DockerInfo_PortMapping") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt3.Errorf("that is type *ContainerInfo_DockerInfo_PortMapping but is nil && this != nil") - } else if this == nil { - return fmt3.Errorf("that is type *ContainerInfo_DockerInfo_PortMappingbut is not nil && this == nil") - } - if this.HostPort != nil && that1.HostPort != nil { - if *this.HostPort != *that1.HostPort { - return fmt3.Errorf("HostPort this(%v) Not Equal that(%v)", *this.HostPort, *that1.HostPort) - } - } else if this.HostPort != nil { - return fmt3.Errorf("this.HostPort == nil && that.HostPort != nil") - } else if that1.HostPort != nil { - return fmt3.Errorf("HostPort this(%v) Not Equal that(%v)", this.HostPort, that1.HostPort) - } - if this.ContainerPort != nil && that1.ContainerPort != nil { - if *this.ContainerPort != *that1.ContainerPort { - return fmt3.Errorf("ContainerPort this(%v) Not Equal that(%v)", *this.ContainerPort, *that1.ContainerPort) - } - } else if this.ContainerPort != nil { - return fmt3.Errorf("this.ContainerPort == nil && that.ContainerPort != nil") - } else if that1.ContainerPort != nil { - return fmt3.Errorf("ContainerPort this(%v) Not Equal that(%v)", this.ContainerPort, that1.ContainerPort) - } - if this.Protocol != nil && that1.Protocol != nil { - if *this.Protocol != *that1.Protocol { - return fmt3.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) - } - } else if this.Protocol != nil { - return fmt3.Errorf("this.Protocol == nil && that.Protocol != nil") - } else if that1.Protocol != nil { - return fmt3.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt3.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } return nil } -func (this *ContainerInfo_DockerInfo_PortMapping) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *DiscoveryInfo) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } - - that1, ok := that.(*ContainerInfo_DockerInfo_PortMapping) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Visibility", wireType) + } + var v DiscoveryInfo_Visibility + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (DiscoveryInfo_Visibility(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Visibility = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Environment = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Location = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Version = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ports == nil { + m.Ports = &Ports{} + } + if err := m.Ports.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if this.HostPort != nil && that1.HostPort != nil { - if *this.HostPort != *that1.HostPort { - return false - } - } else if this.HostPort != nil { - return false - } else if that1.HostPort != nil { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("visibility") } - if this.ContainerPort != nil && that1.ContainerPort != nil { - if *this.ContainerPort != *that1.ContainerPort { - return false + + return nil +} +func skipMesos(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } else if this.ContainerPort != nil { - return false - } else if that1.ContainerPort != nil { - return false - } - if this.Protocol != nil && that1.Protocol != nil { - if *this.Protocol != *that1.Protocol { - return false + wireType := int(wire & 0x7) + switch wireType { + case 0: + for { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMesos + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipMesos(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - } else if this.Protocol != nil { - return false - } else if that1.Protocol != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false } - return true + panic("unreachable") } + +var ( + ErrInvalidLengthMesos = fmt.Errorf("proto: negative length found during unmarshaling") +) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.proto index 545879ed..2d00b43f 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.proto +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesos.proto @@ -105,52 +105,83 @@ message ContainerID { /** - * Describes a framework. The user field is used to determine the - * Unix user that an executor/task should be launched as. If the user - * field is set to an empty string Mesos will automagically set it - * to the current user. Note that the ID is only available after a - * framework has registered, however, it is included here in order to - * facilitate scheduler failover (i.e., if it is set then the - * MesosSchedulerDriver expects the scheduler is performing failover). - * The amount of time that the master will wait for the scheduler to - * failover before removing the framework is specified by - * failover_timeout. If checkpoint is set, framework pid, executor - * pids and status updates are checkpointed to disk by the slaves. - * Checkpointing allows a restarted slave to reconnect with old - * executors and recover status updates, at the cost of disk I/O. - * The role field is used to group frameworks for allocation - * decisions, depending on the allocation policy being used. - * If the hostname field is set to an empty string Mesos will - * automagically set it to the current hostname. - * The principal field should match the credential the framework uses - * in authentication. This field is used for framework API rate - * exporting and limiting and should be set even if authentication is - * not enabled if these features are desired. - * The webui_url field allows a framework to advertise its web UI, so - * that the Mesos web UI can link to it. It is expected to be a full - * URL, for example http://my-scheduler.example.com:8080/. + * Describes a framework. */ message FrameworkInfo { + // Used to determine the Unix user that an executor or task should + // be launched as. If the user field is set to an empty string Mesos + // will automagically set it to the current user. required string user = 1; + + // Name of the framework that shows up in the Mesos Web UI. required string name = 2; + + // Note that 'id' is only available after a framework has + // registered, however, it is included here in order to facilitate + // scheduler failover (i.e., if it is set then the + // MesosSchedulerDriver expects the scheduler is performing + // failover). optional FrameworkID id = 3; + + // The amount of time that the master will wait for the scheduler to + // failover before it tears down the framework by killing all its + // tasks/executors. This should be non-zero if a framework expects + // to reconnect after a failover and not lose its tasks/executors. optional double failover_timeout = 4 [default = 0.0]; + + // If set, framework pid, executor pids and status updates are + // checkpointed to disk by the slaves. Checkpointing allows a + // restarted slave to reconnect with old executors and recover + // status updates, at the cost of disk I/O. optional bool checkpoint = 5 [default = false]; + + // Used to group frameworks for allocation decisions, depending on + // the allocation policy being used. optional string role = 6 [default = "*"]; + + // Used to indicate the current host from which the scheduler is + // registered in the Mesos Web UI. If set to an empty string Mesos + // will automagically set it to the current hostname. optional string hostname = 7; + + // This field should match the credential's principal the framework + // uses for authentication. This field is used for framework API + // rate limiting and dynamic reservations. It should be set even + // if authentication is not enabled if these features are desired. optional string principal = 8; + + // This field allows a framework to advertise its web UI, so that + // the Mesos web UI can link to it. It is expected to be a full URL, + // for example http://my-scheduler.example.com:8080/. optional string webui_url = 9; + + message Capability { + enum Type { + // Receive offers with revocable resources. See 'Resource' + // message for details. + // TODO(vinod): This is currently a no-op. + REVOCABLE_RESOURCES = 1; + } + + required Type type = 1; + } + + // This field allows a framework to advertise its set of + // capabilities (e.g., ability to receive offers for revocable + // resources). + repeated Capability capabilities = 10; } /** * Describes a health check for a task or executor (or any arbitrary * process/command). A "strategy" is picked by specifying one of the - * optional fields, currently only 'http' and 'command' are - * supported. Specifying more than one strategy is an error. + * optional fields; currently only 'command' is supported. + * Specifying more than one strategy is an error. */ message HealthCheck { - // Describes an HTTP health check. + // Describes an HTTP health check. This is not fully implemented and not + // recommended for use - see MESOS-2533. message HTTP { // Port to send the HTTP request. required uint32 port = 1; @@ -170,6 +201,7 @@ message HealthCheck { // for specific data in the response. } + // HTTP health check - not yet recommended for use, see MESOS-2533. optional HTTP http = 1; // TODO(benh): Consider adding a URL health check strategy which @@ -177,12 +209,7 @@ message HealthCheck { // encapsulates all the details in a single string field. // TODO(benh): Other possible health check strategies could include - // one for TCP/UDP or a "command". A "command" could be running a - // (shell) command to check the healthiness. We'd need to determine - // what arguments (or environment variables) we'd want to set so - // that the command could do it's job (i.e., do we want to expose - // the stdout/stderr and/or the pid to make checking for healthiness - // easier). + // one for TCP/UDP. // Amount of time to wait until starting the health checks. optional double delay_seconds = 2 [default = 15.0]; @@ -218,7 +245,24 @@ message CommandInfo { message URI { required string value = 1; optional bool executable = 2; + + // In case the fetched file is recognized as an archive, extract + // its contents into the sandbox. Note that a cached archive is + // not copied from the cache to the sandbox in case extraction + // originates from an archive in the cache. optional bool extract = 3 [default = true]; + + // If this field is "true", the fetcher cache will be used. If not, + // fetching bypasses the cache and downloads directly into the + // sandbox directory, no matter whether a suitable cache file is + // available or not. The former directs the fetcher to download to + // the file cache, then copy from there to the sandbox. Subsequent + // fetch attempts with the same URI will omit downloading and copy + // from the cache as long as the file is resident there. Cache files + // may get evicted at any time, which then leads to renewed + // downloading. See also "docs/fetcher.md" and + // "docs/fetcher-cache-internals.md". + optional bool cache = 4; } // Describes a container. @@ -293,6 +337,12 @@ message ExecutorInfo { // usage information into a time series database for monitoring. optional string source = 10; optional bytes data = 4; + + // Service discovery information for the executor. It is not + // interpreted or acted upon by Mesos. It is up to a service + // discovery system to use this information as needed and to handle + // executors without service discovery information. + optional DiscoveryInfo discovery = 12; } @@ -307,6 +357,7 @@ message MasterInfo { required uint32 port = 3 [default = 5050]; optional string pid = 4; optional string hostname = 5; + optional string version = 6; } @@ -323,6 +374,8 @@ message SlaveInfo { repeated Resource resources = 3; repeated Attribute attributes = 5; optional SlaveID id = 6; + // TODO(joerg84): Remove checkpoint field as with 0.22.0 + // slave checkpointing is enabled for all slaves (MESOS-2317). optional bool checkpoint = 7 [default = false]; } @@ -399,15 +452,122 @@ message Resource { optional Value.Ranges ranges = 4; optional Value.Set set = 5; optional string role = 6 [default = "*"]; + + message ReservationInfo { + // Describes a dynamic reservation. A dynamic reservation is + // acquired by an operator via the '/reserve' HTTP endpoint or by + // a framework via the offer cycle by sending back an + // 'Offer::Operation::Reserve' message. + // NOTE: We currently do not allow frameworks with role "*" to + // make dynamic reservations. + + // This field indicates the principal of the operator or framework + // that reserved this resource. It is used in conjunction with the + // "unreserve" ACL to determine whether the entity attempting to + // unreserve this resource is permitted to do so. + // NOTE: This field should match the FrameworkInfo.principal of + // the framework that reserved this resource. + required string principal = 1; + } + + // If this is set, this resource was dynamically reserved by an + // operator or a framework. Otherwise, this resource is either unreserved + // or statically reserved by an operator via the --resources flag. + optional ReservationInfo reservation = 8; + + message DiskInfo { + // Describes a persistent disk volume. + // A persistent disk volume will not be automatically garbage + // collected if the task/executor/slave terminates, but is + // re-offered to the framework(s) belonging to the 'role'. + // A framework can set the ID (if it is not set yet) to express + // the intention to create a new persistent disk volume from a + // regular disk resource. To reuse a previously created volume, a + // framework can launch a task/executor when it receives an offer + // with a persistent volume, i.e., ID is set. + // NOTE: Currently, we do not allow a persistent disk volume + // without a reservation (i.e., 'role' should not be '*'). + message Persistence { + // A unique ID for the persistent disk volume. + // NOTE: The ID needs to be unique per role on each slave. + required string id = 1; + } + + optional Persistence persistence = 1; + + // Describes how this disk resource will be mounted in the + // container. If not set, the disk resource will be used as the + // sandbox. Otherwise, it will be mounted according to the + // 'container_path' inside 'volume'. The 'host_path' inside + // 'volume' is ignored. + // NOTE: If 'volume' is set but 'persistence' is not set, the + // volume will be automatically garbage collected after + // task/executor terminates. Currently, if 'persistence' is set, + // 'volume' must be set. + optional Volume volume = 2; + } + + optional DiskInfo disk = 7; + + message RevocableInfo {} + + // If this is set, the resources are revocable, i.e., any tasks or + // executors launched using these resources could get preempted or + // throttled at any time. This could be used by frameworks to run + // best effort tasks that do not need strict uptime or performance + // guarantees. Note that if this is set, 'disk' or 'reservation' + // cannot be set. + optional RevocableInfo revocable = 9; +} + +/** + * When the network bandwidth caps are enabled and the container + * is over its limit, outbound packets may be either delayed or + * dropped completely either because it exceeds the maximum bandwidth + * allocation for a single container (the cap) or because the combined + * network traffic of multiple containers on the host exceeds the + * transmit capacity of the host (the share). We can report the + * following statistics for each of these conditions exported directly + * from the Linux Traffic Control Queueing Discipline. + * + * id : name of the limiter, e.g. 'tx_bw_cap' + * backlog : number of packets currently delayed + * bytes : total bytes seen + * drops : number of packets dropped in total + * overlimits : number of packets which exceeded allocation + * packets : total packets seen + * qlen : number of packets currently queued + * rate_bps : throughput in bytes/sec + * rate_pps : throughput in packets/sec + * requeues : number of times a packet has been delayed due to + * locking or device contention issues + * + * More information on the operation of Linux Traffic Control can be + * found at http://www.lartc.org/lartc.html. + */ +message TrafficControlStatistics { + required string id = 1; + optional uint64 backlog = 2; + optional uint64 bytes = 3; + optional uint64 drops = 4; + optional uint64 overlimits = 5; + optional uint64 packets = 6; + optional uint64 qlen = 7; + optional uint64 ratebps = 8; + optional uint64 ratepps = 9; + optional uint64 requeues = 10; } -/* +/** * A snapshot of resource usage statistics. */ message ResourceStatistics { required double timestamp = 1; // Snapshot time, in seconds since the Epoch. + optional uint32 processes = 30; + optional uint32 threads = 31; + // CPU Usage Information: // Total CPU time spent in user mode, and kernel mode. optional double cpus_user_time_secs = 2; @@ -422,17 +582,55 @@ message ResourceStatistics { optional double cpus_throttled_time_secs = 9; // Memory Usage Information: - optional uint64 mem_rss_bytes = 5; // Resident Set Size. - // Amount of memory resources allocated. + // mem_total_bytes was added in 0.23.0 to represent the total memory + // of a process in RAM (as opposed to in Swap). This was previously + // reported as mem_rss_bytes, which was also changed in 0.23.0 to + // represent only the anonymous memory usage, to keep in sync with + // Linux kernel's (arguably erroneous) use of terminology. + optional uint64 mem_total_bytes = 36; + + // Total memory + swap usage. This is set if swap is enabled. + optional uint64 mem_total_memsw_bytes = 37; + + // Hard memory limit for a container. optional uint64 mem_limit_bytes = 6; - // Broken out memory usage information (files, anonymous, and mmaped files) + // Soft memory limit for a container. + optional uint64 mem_soft_limit_bytes = 38; + + // Broken out memory usage information: pagecache, rss (anonymous), + // mmaped files and swap. + + // TODO(chzhcn) mem_file_bytes and mem_anon_bytes are deprecated in + // 0.23.0 and will be removed in 0.24.0. optional uint64 mem_file_bytes = 10; optional uint64 mem_anon_bytes = 11; - optional uint64 mem_mapped_file_bytes = 12; - // TODO(bmahler): Add disk usage. + // mem_cache_bytes is added in 0.23.0 to represent page cache usage. + optional uint64 mem_cache_bytes = 39; + + // Since 0.23.0, mem_rss_bytes is changed to represent only + // anonymous memory usage. Note that neither its requiredness, type, + // name nor numeric tag has been changed. + optional uint64 mem_rss_bytes = 5; + + optional uint64 mem_mapped_file_bytes = 12; + // This is only set if swap is enabled. + optional uint64 mem_swap_bytes = 40; + + // Number of occurrences of different levels of memory pressure + // events reported by memory cgroup. Pressure listening (re)starts + // with these values set to 0 when slave (re)starts. See + // https://www.kernel.org/doc/Documentation/cgroups/memory.txt for + // more details. + optional uint64 mem_low_pressure_counter = 32; + optional uint64 mem_medium_pressure_counter = 33; + optional uint64 mem_critical_pressure_counter = 34; + + // Disk Usage Information for executor working directory. + optional uint64 disk_limit_bytes = 26; + optional uint64 disk_used_bytes = 27; // Perf statistics. optional PerfStatistics perf = 13; @@ -453,34 +651,36 @@ message ResourceStatistics { optional double net_tcp_rtt_microsecs_p90 = 23; optional double net_tcp_rtt_microsecs_p95 = 24; optional double net_tcp_rtt_microsecs_p99 = 25; + + optional double net_tcp_active_connections = 28; + optional double net_tcp_time_wait_connections = 29; + + // Network traffic flowing into or out of a container can be delayed + // or dropped due to congestion or policy inside and outside the + // container. + repeated TrafficControlStatistics net_traffic_control_statistics = 35; } /** - * Describes a snapshot of the resource usage for an executor. - * - * TODO(bmahler): Note that we want to be sending this information - * to the master, and subsequently to the relevant scheduler. So - * this proto is designed to be easy for the scheduler to use, this - * is why we provide the slave id, executor info / task info. + * Describes a snapshot of the resource usage for executors. */ message ResourceUsage { - required SlaveID slave_id = 1; - required FrameworkID framework_id = 2; + message Executor { + required ExecutorInfo executor_info = 1; - // Resource usage is for an executor. For tasks launched with - // an explicit executor, the executor id is provided. For tasks - // launched without an executor, our internal executor will be - // used. In this case, we provide the task id here instead, in - // order to make this message easier for schedulers to work with. + // This includes resources used by the executor itself + // as well as its active tasks. + repeated Resource allocated = 2; - optional ExecutorID executor_id = 3; // If present, this executor was - optional string executor_name = 4; // explicitly specified. + // Current resource usage. If absent, the containerizer + // cannot provide resource usage. + optional ResourceStatistics statistics = 3; + } - optional TaskID task_id = 5; // If present, the task did not have an executor. + repeated Executor executors = 1; - // If missing, the isolation module cannot provide resource usage. - optional ResourceStatistics statistics = 6; + // TODO(jieyu): Include slave's total resources here. } @@ -564,6 +764,8 @@ message PerfStatistics { * to proactively influence the allocator. If 'slave_id' is provided * then this request is assumed to only apply to resources on that * slave. + * + * TODO(vinod): Remove this once the old driver is removed. */ message Request { optional SlaveID slave_id = 1; @@ -583,6 +785,44 @@ message Offer { repeated Resource resources = 5; repeated Attribute attributes = 7; repeated ExecutorID executor_ids = 6; + + // Defines an operation that can be performed against offers. + message Operation { + enum Type { + LAUNCH = 1; + RESERVE = 2; + UNRESERVE = 3; + CREATE = 4; + DESTROY = 5; + } + + message Launch { + repeated TaskInfo task_infos = 1; + } + + message Reserve { + repeated Resource resources = 1; + } + + message Unreserve { + repeated Resource resources = 1; + } + + message Create { + repeated Resource volumes = 1; + } + + message Destroy { + repeated Resource volumes = 1; + } + + required Type type = 1; + optional Launch launch = 2; + optional Reserve reserve = 3; + optional Unreserve unreserve = 4; + optional Create create = 5; + optional Destroy destroy = 6; + } } @@ -607,6 +847,19 @@ message TaskInfo { // A health check for the task (currently in *alpha* and initial // support will only be for TaskInfo's that have a CommandInfo). optional HealthCheck health_check = 8; + + // Labels are free-form key value pairs which are exposed through + // master and slave endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and slave processes. Therefore, + // labels should be used to tag tasks with light-weight meta-data. + optional Labels labels = 10; + + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + optional DiscoveryInfo discovery = 11; } @@ -625,8 +878,6 @@ enum TaskState { TASK_FAILED = 3; // TERMINAL. The task failed to finish successfully. TASK_KILLED = 4; // TERMINAL. The task was killed by the executor. TASK_LOST = 5; // TERMINAL. The task failed but can be rescheduled. - // TASK_ERROR is currently unused but will be introduced in 0.22.0. - // TODO(dhamon): Start using TASK_ERROR. TASK_ERROR = 7; // TERMINAL. The task description contains an error. } @@ -635,16 +886,20 @@ enum TaskState { * Describes the current status of a task. */ message TaskStatus { - /** Describes the source of the task status update. */ + // Describes the source of the task status update. enum Source { SOURCE_MASTER = 0; SOURCE_SLAVE = 1; SOURCE_EXECUTOR = 2; } - /** Detailed reason for the task status update. */ + // Detailed reason for the task status update. + // + // TODO(bmahler): Differentiate between slave removal reasons + // (e.g. unhealthy vs. unregistered for maintenance). enum Reason { REASON_COMMAND_EXECUTOR_FAILED = 0; + REASON_EXECUTOR_PREEMPTED = 17; REASON_EXECUTOR_TERMINATED = 1; REASON_EXECUTOR_UNREGISTERED = 2; REASON_FRAMEWORK_REMOVED = 3; @@ -654,6 +909,7 @@ message TaskStatus { REASON_MASTER_DISCONNECTED = 7; REASON_MEMORY_LIMIT = 8; REASON_RECONCILIATION = 9; + REASON_RESOURCES_UNKNOWN = 18; REASON_SLAVE_DISCONNECTED = 10; REASON_SLAVE_REMOVED = 11; REASON_SLAVE_RESTARTED = 12; @@ -673,6 +929,17 @@ message TaskStatus { optional ExecutorID executor_id = 7; // TODO(benh): Use in master/slave. optional double timestamp = 6; + // Statuses that are delivered reliably to the scheduler will + // include a 'uuid'. The status is considered delivered once + // it is acknowledged by the scheduler. Schedulers can choose + // to either explicitly acknowledge statuses or let the scheduler + // driver implicitly acknowledge (default). + // + // TODO(bmahler): This is currently overwritten in the scheduler + // driver and executor driver, but executors will need to set this + // to a valid RFC-4122 UUID if using the HTTP API. + optional bytes uuid = 11; + // Describes whether the task has been determined to be healthy // (true) or unhealthy (false) according to the HealthCheck field in // the command info. @@ -928,10 +1195,15 @@ message ContainerInfo { optional bool privileged = 4 [default = false]; // Allowing arbitrary parameters to be passed to docker CLI. - // Note that anything passed to this field is not guranteed + // Note that anything passed to this field is not guaranteed // to be supported moving forward, as we might move away from // the docker CLI. repeated Parameter parameters = 5; + + // With this flag set to true, the docker containerizer will + // pull the docker image from the registry even if the image + // is already downloaded on the slave. + optional bool force_pull_image = 6; } required Type type = 1; @@ -940,3 +1212,68 @@ message ContainerInfo { optional DockerInfo docker = 3; } + + +/** + * Collection of labels. + */ +message Labels { + repeated Label labels = 1; +} + + +/** + * Key, value pair used to store free form user-data. + */ +message Label { + required string key = 1; + optional string value = 2; +} + + +/** + * Named port used for service discovery. + */ +message Port { + required uint32 number = 1; + optional string name = 2; + optional string protocol = 3; +} + + +/** + * Collection of ports. + */ +message Ports { + repeated Port ports = 1; +} + + +/** +* Service discovery information. +* The visibility field restricts discovery within a framework +* (FRAMEWORK), within a Mesos cluster (CLUSTER), or places no +* restrictions (EXTERNAL). +* The environment, location, and version fields provide first class +* support for common attributes used to differentiate between +* similar services. The environment may receive values such as +* PROD/QA/DEV, the location field may receive values like +* EAST-US/WEST-US/EUROPE/AMEA, and the version field may receive +* values like v2.0/v0.9. The exact use of these fields is up to each +* service discovery system. +*/ +message DiscoveryInfo { + enum Visibility { + FRAMEWORK = 0; + CLUSTER = 1; + EXTERNAL = 2; + } + + required Visibility visibility = 1; + optional string name = 2; + optional string environment = 3; + optional string location = 4; + optional string version = 5; + optional Ports ports = 6; + optional Labels labels = 7; +} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesospb_test.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesospb_test.go index da57cf92..aef9eac8 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesospb_test.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/mesospb_test.go @@ -8,56 +8,56 @@ import testing "testing" import math_rand "math/rand" import time "time" import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" -import testing1 "testing" -import math_rand1 "math/rand" -import time1 "time" -import encoding_json "encoding/json" -import testing2 "testing" -import math_rand2 "math/rand" -import time2 "time" -import github_com_gogo_protobuf_proto1 "github.com/gogo/protobuf/proto" -import math_rand3 "math/rand" -import time3 "time" -import testing3 "testing" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" import fmt "fmt" -import math_rand4 "math/rand" -import time4 "time" -import testing4 "testing" -import github_com_gogo_protobuf_proto2 "github.com/gogo/protobuf/proto" -import math_rand5 "math/rand" -import time5 "time" -import testing5 "testing" -import fmt1 "fmt" import go_parser "go/parser" -import math_rand6 "math/rand" -import time6 "time" -import testing6 "testing" -import github_com_gogo_protobuf_proto3 "github.com/gogo/protobuf/proto" +import proto "github.com/gogo/protobuf/proto" +import math "math" + +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf func TestFrameworkIDProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFrameworkID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FrameworkID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestFrameworkIDMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFrameworkID(popr, false) size := p.Size() data := make([]byte, size) @@ -66,20 +66,20 @@ func TestFrameworkIDMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FrameworkID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -124,29 +124,42 @@ func BenchmarkFrameworkIDProtoUnmarshal(b *testing.B) { } func TestOfferIDProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOfferID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &OfferID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestOfferIDMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOfferID(popr, false) size := p.Size() data := make([]byte, size) @@ -155,20 +168,20 @@ func TestOfferIDMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &OfferID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -213,29 +226,42 @@ func BenchmarkOfferIDProtoUnmarshal(b *testing.B) { } func TestSlaveIDProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSlaveID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &SlaveID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestSlaveIDMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSlaveID(popr, false) size := p.Size() data := make([]byte, size) @@ -244,20 +270,20 @@ func TestSlaveIDMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &SlaveID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -302,29 +328,42 @@ func BenchmarkSlaveIDProtoUnmarshal(b *testing.B) { } func TestTaskIDProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTaskID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &TaskID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestTaskIDMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedTaskID(popr, false) size := p.Size() data := make([]byte, size) @@ -333,20 +372,20 @@ func TestTaskIDMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &TaskID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -391,29 +430,42 @@ func BenchmarkTaskIDProtoUnmarshal(b *testing.B) { } func TestExecutorIDProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedExecutorID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ExecutorID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestExecutorIDMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedExecutorID(popr, false) size := p.Size() data := make([]byte, size) @@ -422,20 +474,20 @@ func TestExecutorIDMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ExecutorID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -480,29 +532,42 @@ func BenchmarkExecutorIDProtoUnmarshal(b *testing.B) { } func TestContainerIDProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedContainerID(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ContainerID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestContainerIDMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedContainerID(popr, false) size := p.Size() data := make([]byte, size) @@ -511,20 +576,20 @@ func TestContainerIDMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ContainerID{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -569,29 +634,42 @@ func BenchmarkContainerIDProtoUnmarshal(b *testing.B) { } func TestFrameworkInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFrameworkInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FrameworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestFrameworkInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFrameworkInfo(popr, false) size := p.Size() data := make([]byte, size) @@ -600,20 +678,20 @@ func TestFrameworkInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FrameworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -657,30 +735,145 @@ func BenchmarkFrameworkInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestFrameworkInfo_CapabilityProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo_Capability(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FrameworkInfo_Capability{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFrameworkInfo_CapabilityMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo_Capability(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FrameworkInfo_Capability{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFrameworkInfo_CapabilityProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FrameworkInfo_Capability, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFrameworkInfo_CapabilityProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFrameworkInfo_Capability(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FrameworkInfo_Capability{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + func TestHealthCheckProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHealthCheck(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestHealthCheckMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHealthCheck(popr, false) size := p.Size() data := make([]byte, size) @@ -689,20 +882,20 @@ func TestHealthCheckMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -747,29 +940,42 @@ func BenchmarkHealthCheckProtoUnmarshal(b *testing.B) { } func TestHealthCheck_HTTPProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHealthCheck_HTTP(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &HealthCheck_HTTP{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestHealthCheck_HTTPMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedHealthCheck_HTTP(popr, false) size := p.Size() data := make([]byte, size) @@ -778,20 +984,20 @@ func TestHealthCheck_HTTPMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &HealthCheck_HTTP{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -836,29 +1042,42 @@ func BenchmarkHealthCheck_HTTPProtoUnmarshal(b *testing.B) { } func TestCommandInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedCommandInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestCommandInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedCommandInfo(popr, false) size := p.Size() data := make([]byte, size) @@ -867,20 +1086,20 @@ func TestCommandInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -925,29 +1144,42 @@ func BenchmarkCommandInfoProtoUnmarshal(b *testing.B) { } func TestCommandInfo_URIProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedCommandInfo_URI(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestCommandInfo_URIMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedCommandInfo_URI(popr, false) size := p.Size() data := make([]byte, size) @@ -956,20 +1188,20 @@ func TestCommandInfo_URIMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1014,29 +1246,42 @@ func BenchmarkCommandInfo_URIProtoUnmarshal(b *testing.B) { } func TestCommandInfo_ContainerInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedCommandInfo_ContainerInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &CommandInfo_ContainerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestCommandInfo_ContainerInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedCommandInfo_ContainerInfo(popr, false) size := p.Size() data := make([]byte, size) @@ -1045,20 +1290,20 @@ func TestCommandInfo_ContainerInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &CommandInfo_ContainerInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1103,29 +1348,42 @@ func BenchmarkCommandInfo_ContainerInfoProtoUnmarshal(b *testing.B) { } func TestExecutorInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedExecutorInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestExecutorInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedExecutorInfo(popr, false) size := p.Size() data := make([]byte, size) @@ -1134,20 +1392,20 @@ func TestExecutorInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1192,29 +1450,42 @@ func BenchmarkExecutorInfoProtoUnmarshal(b *testing.B) { } func TestMasterInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMasterInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestMasterInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMasterInfo(popr, false) size := p.Size() data := make([]byte, size) @@ -1223,20 +1494,20 @@ func TestMasterInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1281,29 +1552,42 @@ func BenchmarkMasterInfoProtoUnmarshal(b *testing.B) { } func TestSlaveInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSlaveInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &SlaveInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestSlaveInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedSlaveInfo(popr, false) size := p.Size() data := make([]byte, size) @@ -1312,20 +1596,20 @@ func TestSlaveInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &SlaveInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1370,29 +1654,42 @@ func BenchmarkSlaveInfoProtoUnmarshal(b *testing.B) { } func TestValueProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestValueMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue(popr, false) size := p.Size() data := make([]byte, size) @@ -1401,20 +1698,20 @@ func TestValueMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1459,29 +1756,42 @@ func BenchmarkValueProtoUnmarshal(b *testing.B) { } func TestValue_ScalarProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Scalar(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestValue_ScalarMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Scalar(popr, false) size := p.Size() data := make([]byte, size) @@ -1490,20 +1800,20 @@ func TestValue_ScalarMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1548,29 +1858,42 @@ func BenchmarkValue_ScalarProtoUnmarshal(b *testing.B) { } func TestValue_RangeProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Range(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestValue_RangeMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Range(popr, false) size := p.Size() data := make([]byte, size) @@ -1579,20 +1902,20 @@ func TestValue_RangeMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1637,29 +1960,42 @@ func BenchmarkValue_RangeProtoUnmarshal(b *testing.B) { } func TestValue_RangesProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Ranges(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestValue_RangesMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Ranges(popr, false) size := p.Size() data := make([]byte, size) @@ -1668,20 +2004,20 @@ func TestValue_RangesMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1726,29 +2062,42 @@ func BenchmarkValue_RangesProtoUnmarshal(b *testing.B) { } func TestValue_SetProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Set(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestValue_SetMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Set(popr, false) size := p.Size() data := make([]byte, size) @@ -1757,20 +2106,20 @@ func TestValue_SetMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1815,29 +2164,42 @@ func BenchmarkValue_SetProtoUnmarshal(b *testing.B) { } func TestValue_TextProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Text(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestValue_TextMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedValue_Text(popr, false) size := p.Size() data := make([]byte, size) @@ -1846,20 +2208,20 @@ func TestValue_TextMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1904,29 +2266,42 @@ func BenchmarkValue_TextProtoUnmarshal(b *testing.B) { } func TestAttributeProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAttribute(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Attribute{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestAttributeMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedAttribute(popr, false) size := p.Size() data := make([]byte, size) @@ -1935,20 +2310,20 @@ func TestAttributeMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Attribute{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -1993,29 +2368,42 @@ func BenchmarkAttributeProtoUnmarshal(b *testing.B) { } func TestResourceProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResource(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Resource{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestResourceMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedResource(popr, false) size := p.Size() data := make([]byte, size) @@ -2024,20 +2412,20 @@ func TestResourceMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Resource{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } @@ -2081,31 +2469,44 @@ func BenchmarkResourceProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceStatisticsProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, false) +func TestResource_ReservationInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_ReservationInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestResourceStatisticsMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, false) +func TestResource_ReservationInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_ReservationInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2113,29 +2514,29 @@ func TestResourceStatisticsMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_ReservationInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceStatistics, 10000) + pops := make([]*Resource_ReservationInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceStatistics(popr, false) + pops[i] = NewPopulatedResource_ReservationInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2148,18 +2549,18 @@ func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_ReservationInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_ReservationInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceStatistics{} + msg := &Resource_ReservationInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2170,31 +2571,44 @@ func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceUsageProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, false) +func TestResource_DiskInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestResourceUsageMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, false) +func TestResource_DiskInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2202,29 +2616,29 @@ func TestResourceUsageMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkResourceUsageProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceUsage, 10000) + pops := make([]*Resource_DiskInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceUsage(popr, false) + pops[i] = NewPopulatedResource_DiskInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2237,18 +2651,18 @@ func BenchmarkResourceUsageProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { +func BenchmarkResource_DiskInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceUsage(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceUsage{} + msg := &Resource_DiskInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2259,31 +2673,44 @@ func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPerfStatisticsProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, false) +func TestResource_DiskInfo_PersistenceProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestPerfStatisticsMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, false) +func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2291,29 +2718,29 @@ func TestPerfStatisticsMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_PersistenceProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*PerfStatistics, 10000) + pops := make([]*Resource_DiskInfo_Persistence, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedPerfStatistics(popr, false) + pops[i] = NewPopulatedResource_DiskInfo_Persistence(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2326,18 +2753,18 @@ func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPerfStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_PersistenceProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPerfStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo_Persistence(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &PerfStatistics{} + msg := &Resource_DiskInfo_Persistence{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2348,31 +2775,44 @@ func BenchmarkPerfStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRequestProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRequest(popr, false) +func TestResource_RevocableInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_RevocableInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Request{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestRequestMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRequest(popr, false) +func TestResource_RevocableInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_RevocableInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2380,29 +2820,29 @@ func TestRequestMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Request{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRequestProtoMarshal(b *testing.B) { +func BenchmarkResource_RevocableInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Request, 10000) + pops := make([]*Resource_RevocableInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRequest(popr, false) + pops[i] = NewPopulatedResource_RevocableInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2415,18 +2855,18 @@ func BenchmarkRequestProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRequestProtoUnmarshal(b *testing.B) { +func BenchmarkResource_RevocableInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRequest(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_RevocableInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Request{} + msg := &Resource_RevocableInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2437,31 +2877,44 @@ func BenchmarkRequestProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOfferProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer(popr, false) +func TestTrafficControlStatisticsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTrafficControlStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestOfferMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOffer(popr, false) +func TestTrafficControlStatisticsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTrafficControlStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2469,29 +2922,29 @@ func TestOfferMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkOfferProtoMarshal(b *testing.B) { +func BenchmarkTrafficControlStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer, 10000) + pops := make([]*TrafficControlStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer(popr, false) + pops[i] = NewPopulatedTrafficControlStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2504,18 +2957,18 @@ func BenchmarkOfferProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOfferProtoUnmarshal(b *testing.B) { +func BenchmarkTrafficControlStatisticsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTrafficControlStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer{} + msg := &TrafficControlStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2526,31 +2979,44 @@ func BenchmarkOfferProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, false) +func TestResourceStatisticsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskInfo{} + msg := &ResourceStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestTaskInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, false) +func TestResourceStatisticsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2558,29 +3024,29 @@ func TestTaskInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskInfo{} + msg := &ResourceStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkTaskInfoProtoMarshal(b *testing.B) { +func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskInfo, 10000) + pops := make([]*ResourceStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTaskInfo(popr, false) + pops[i] = NewPopulatedResourceStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2593,18 +3059,18 @@ func BenchmarkTaskInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskInfoProtoUnmarshal(b *testing.B) { +func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TaskInfo{} + msg := &ResourceStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2615,31 +3081,44 @@ func BenchmarkTaskInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskStatusProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, false) +func TestResourceUsageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskStatus{} + msg := &ResourceUsage{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestTaskStatusMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, false) +func TestResourceUsageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2647,29 +3126,29 @@ func TestTaskStatusMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskStatus{} + msg := &ResourceUsage{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkTaskStatusProtoMarshal(b *testing.B) { +func BenchmarkResourceUsageProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskStatus, 10000) + pops := make([]*ResourceUsage, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTaskStatus(popr, false) + pops[i] = NewPopulatedResourceUsage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2682,18 +3161,18 @@ func BenchmarkTaskStatusProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskStatusProtoUnmarshal(b *testing.B) { +func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskStatus(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceUsage(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TaskStatus{} + msg := &ResourceUsage{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2704,31 +3183,44 @@ func BenchmarkTaskStatusProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFiltersProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFilters(popr, false) +func TestResourceUsage_ExecutorProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Filters{} + msg := &ResourceUsage_Executor{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestFiltersMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFilters(popr, false) +func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2736,29 +3228,29 @@ func TestFiltersMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Filters{} + msg := &ResourceUsage_Executor{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkFiltersProtoMarshal(b *testing.B) { +func BenchmarkResourceUsage_ExecutorProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Filters, 10000) + pops := make([]*ResourceUsage_Executor, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFilters(popr, false) + pops[i] = NewPopulatedResourceUsage_Executor(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2771,18 +3263,18 @@ func BenchmarkFiltersProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkFiltersProtoUnmarshal(b *testing.B) { +func BenchmarkResourceUsage_ExecutorProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFilters(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResourceUsage_Executor(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Filters{} + msg := &ResourceUsage_Executor{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2793,31 +3285,44 @@ func BenchmarkFiltersProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEnvironmentProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, false) +func TestPerfStatisticsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPerfStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} + msg := &PerfStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestEnvironmentMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, false) +func TestPerfStatisticsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPerfStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2825,29 +3330,29 @@ func TestEnvironmentMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} + msg := &PerfStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkEnvironmentProtoMarshal(b *testing.B) { +func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Environment, 10000) + pops := make([]*PerfStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedEnvironment(popr, false) + pops[i] = NewPopulatedPerfStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2860,18 +3365,18 @@ func BenchmarkEnvironmentProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkEnvironmentProtoUnmarshal(b *testing.B) { +func BenchmarkPerfStatisticsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPerfStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Environment{} + msg := &PerfStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2882,31 +3387,44 @@ func BenchmarkEnvironmentProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEnvironment_VariableProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, false) +func TestRequestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRequest(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment_Variable{} + msg := &Request{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestEnvironment_VariableMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, false) +func TestRequestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRequest(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2914,29 +3432,29 @@ func TestEnvironment_VariableMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment_Variable{} + msg := &Request{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { +func BenchmarkRequestProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Environment_Variable, 10000) + pops := make([]*Request, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedEnvironment_Variable(popr, false) + pops[i] = NewPopulatedRequest(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2949,18 +3467,18 @@ func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkEnvironment_VariableProtoUnmarshal(b *testing.B) { +func BenchmarkRequestProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment_Variable(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRequest(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Environment_Variable{} + msg := &Request{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2971,31 +3489,44 @@ func BenchmarkEnvironment_VariableProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestParameterProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameter(popr, false) +func TestOfferProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} + msg := &Offer{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestParameterMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameter(popr, false) +func TestOfferMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3003,29 +3534,29 @@ func TestParameterMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} + msg := &Offer{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkParameterProtoMarshal(b *testing.B) { +func BenchmarkOfferProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Parameter, 10000) + pops := make([]*Offer, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedParameter(popr, false) + pops[i] = NewPopulatedOffer(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3038,18 +3569,18 @@ func BenchmarkParameterProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkParameterProtoUnmarshal(b *testing.B) { +func BenchmarkOfferProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameter(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Parameter{} + msg := &Offer{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3060,31 +3591,44 @@ func BenchmarkParameterProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestParametersProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameters(popr, false) +func TestOffer_OperationProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameters{} + msg := &Offer_Operation{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestParametersMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedParameters(popr, false) +func TestOffer_OperationMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3092,29 +3636,29 @@ func TestParametersMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameters{} + msg := &Offer_Operation{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkParametersProtoMarshal(b *testing.B) { +func BenchmarkOffer_OperationProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Parameters, 10000) + pops := make([]*Offer_Operation, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedParameters(popr, false) + pops[i] = NewPopulatedOffer_Operation(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3127,18 +3671,18 @@ func BenchmarkParametersProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkParametersProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_OperationProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameters(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Parameters{} + msg := &Offer_Operation{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3149,31 +3693,44 @@ func BenchmarkParametersProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCredentialProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredential(popr, false) +func TestOffer_Operation_LaunchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Launch(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} + msg := &Offer_Operation_Launch{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestCredentialMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredential(popr, false) +func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Launch(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3181,29 +3738,29 @@ func TestCredentialMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} + msg := &Offer_Operation_Launch{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkCredentialProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_LaunchProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Credential, 10000) + pops := make([]*Offer_Operation_Launch, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCredential(popr, false) + pops[i] = NewPopulatedOffer_Operation_Launch(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3216,18 +3773,18 @@ func BenchmarkCredentialProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCredentialProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_LaunchProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredential(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Launch(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Credential{} + msg := &Offer_Operation_Launch{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3238,31 +3795,44 @@ func BenchmarkCredentialProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCredentialsProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredentials(popr, false) +func TestOffer_Operation_ReserveProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Reserve(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credentials{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestCredentialsMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCredentials(popr, false) +func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Reserve(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3270,29 +3840,29 @@ func TestCredentialsMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credentials{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkCredentialsProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_ReserveProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Credentials, 10000) + pops := make([]*Offer_Operation_Reserve, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCredentials(popr, false) + pops[i] = NewPopulatedOffer_Operation_Reserve(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3305,18 +3875,18 @@ func BenchmarkCredentialsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_ReserveProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredentials(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Reserve(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Credentials{} + msg := &Offer_Operation_Reserve{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3327,31 +3897,44 @@ func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestACLProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL(popr, false) +func TestOffer_Operation_UnreserveProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestACLMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL(popr, false) +func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3359,29 +3942,29 @@ func TestACLMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACLProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_UnreserveProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ACL, 10000) + pops := make([]*Offer_Operation_Unreserve, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedACL(popr, false) + pops[i] = NewPopulatedOffer_Operation_Unreserve(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3394,18 +3977,18 @@ func BenchmarkACLProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkACLProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_UnreserveProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Unreserve(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ACL{} + msg := &Offer_Operation_Unreserve{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3416,31 +3999,44 @@ func BenchmarkACLProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestACL_EntityProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, false) +func TestOffer_Operation_CreateProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Create(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_Entity{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestACL_EntityMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, false) +func TestOffer_Operation_CreateMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Create(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3448,29 +4044,29 @@ func TestACL_EntityMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_Entity{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_EntityProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_CreateProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ACL_Entity, 10000) + pops := make([]*Offer_Operation_Create, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedACL_Entity(popr, false) + pops[i] = NewPopulatedOffer_Operation_Create(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3483,18 +4079,18 @@ func BenchmarkACL_EntityProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkACL_EntityProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_CreateProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_Entity(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Create(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ACL_Entity{} + msg := &Offer_Operation_Create{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3505,31 +4101,44 @@ func BenchmarkACL_EntityProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestACL_RegisterFrameworkProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, false) +func TestOffer_Operation_DestroyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Destroy(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_RegisterFramework{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestACL_RegisterFrameworkMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, false) +func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Destroy(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3537,29 +4146,29 @@ func TestACL_RegisterFrameworkMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_RegisterFramework{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_RegisterFrameworkProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_DestroyProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ACL_RegisterFramework, 10000) + pops := make([]*Offer_Operation_Destroy, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedACL_RegisterFramework(popr, false) + pops[i] = NewPopulatedOffer_Operation_Destroy(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3572,18 +4181,18 @@ func BenchmarkACL_RegisterFrameworkProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkACL_RegisterFrameworkProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_DestroyProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_RegisterFramework(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Destroy(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ACL_RegisterFramework{} + msg := &Offer_Operation_Destroy{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3594,31 +4203,44 @@ func BenchmarkACL_RegisterFrameworkProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestACL_RunTaskProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, false) +func TestTaskInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_RunTask{} + msg := &TaskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestACL_RunTaskMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, false) +func TestTaskInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3626,29 +4248,29 @@ func TestACL_RunTaskMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_RunTask{} + msg := &TaskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_RunTaskProtoMarshal(b *testing.B) { +func BenchmarkTaskInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ACL_RunTask, 10000) + pops := make([]*TaskInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedACL_RunTask(popr, false) + pops[i] = NewPopulatedTaskInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3661,18 +4283,18 @@ func BenchmarkACL_RunTaskProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkACL_RunTaskProtoUnmarshal(b *testing.B) { +func BenchmarkTaskInfoProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_RunTask(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ACL_RunTask{} + msg := &TaskInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3683,31 +4305,44 @@ func BenchmarkACL_RunTaskProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestACL_ShutdownFrameworkProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, false) +func TestTaskStatusProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskStatus(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_ShutdownFramework{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestACL_ShutdownFrameworkMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, false) +func TestTaskStatusMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskStatus(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3715,29 +4350,29 @@ func TestACL_ShutdownFrameworkMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_ShutdownFramework{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_ShutdownFrameworkProtoMarshal(b *testing.B) { +func BenchmarkTaskStatusProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ACL_ShutdownFramework, 10000) + pops := make([]*TaskStatus, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedACL_ShutdownFramework(popr, false) + pops[i] = NewPopulatedTaskStatus(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3750,18 +4385,18 @@ func BenchmarkACL_ShutdownFrameworkProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkACL_ShutdownFrameworkProtoUnmarshal(b *testing.B) { +func BenchmarkTaskStatusProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_ShutdownFramework(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskStatus(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ACL_ShutdownFramework{} + msg := &TaskStatus{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3772,31 +4407,44 @@ func BenchmarkACL_ShutdownFrameworkProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestACLsProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACLs(popr, false) +func TestFiltersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFilters(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACLs{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestACLsMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedACLs(popr, false) +func TestFiltersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFilters(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3804,29 +4452,29 @@ func TestACLsMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACLs{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACLsProtoMarshal(b *testing.B) { +func BenchmarkFiltersProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ACLs, 10000) + pops := make([]*Filters, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedACLs(popr, false) + pops[i] = NewPopulatedFilters(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3839,18 +4487,18 @@ func BenchmarkACLsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkACLsProtoUnmarshal(b *testing.B) { +func BenchmarkFiltersProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACLs(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFilters(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ACLs{} + msg := &Filters{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3861,31 +4509,44 @@ func BenchmarkACLsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRateLimitProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, false) +func TestEnvironmentProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} + msg := &Environment{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestRateLimitMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, false) +func TestEnvironmentMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3893,29 +4554,29 @@ func TestRateLimitMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} + msg := &Environment{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRateLimitProtoMarshal(b *testing.B) { +func BenchmarkEnvironmentProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RateLimit, 10000) + pops := make([]*Environment, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRateLimit(popr, false) + pops[i] = NewPopulatedEnvironment(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3928,18 +4589,18 @@ func BenchmarkRateLimitProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { +func BenchmarkEnvironmentProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimit(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &RateLimit{} + msg := &Environment{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3950,31 +4611,44 @@ func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRateLimitsProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, false) +func TestEnvironment_VariableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimits{} + msg := &Environment_Variable{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestRateLimitsMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, false) +func TestEnvironment_VariableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3982,29 +4656,29 @@ func TestRateLimitsMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimits{} + msg := &Environment_Variable{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRateLimitsProtoMarshal(b *testing.B) { +func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RateLimits, 10000) + pops := make([]*Environment_Variable, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRateLimits(popr, false) + pops[i] = NewPopulatedEnvironment_Variable(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4017,18 +4691,18 @@ func BenchmarkRateLimitsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { +func BenchmarkEnvironment_VariableProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimits(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment_Variable(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &RateLimits{} + msg := &Environment_Variable{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4039,31 +4713,44 @@ func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestVolumeProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolume(popr, false) +func TestParameterProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} + msg := &Parameter{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestVolumeMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVolume(popr, false) +func TestParameterMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4071,29 +4758,29 @@ func TestVolumeMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} + msg := &Parameter{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkVolumeProtoMarshal(b *testing.B) { +func BenchmarkParameterProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Volume, 10000) + pops := make([]*Parameter, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolume(popr, false) + pops[i] = NewPopulatedParameter(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4106,18 +4793,18 @@ func BenchmarkVolumeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkVolumeProtoUnmarshal(b *testing.B) { +func BenchmarkParameterProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameter(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Volume{} + msg := &Parameter{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4128,31 +4815,44 @@ func BenchmarkVolumeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, false) +func TestParametersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo{} + msg := &Parameters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestContainerInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, false) +func TestParametersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4160,29 +4860,29 @@ func TestContainerInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo{} + msg := &Parameters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkContainerInfoProtoMarshal(b *testing.B) { +func BenchmarkParametersProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo, 10000) + pops := make([]*Parameters, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainerInfo(popr, false) + pops[i] = NewPopulatedParameters(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4195,18 +4895,18 @@ func BenchmarkContainerInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkContainerInfoProtoUnmarshal(b *testing.B) { +func BenchmarkParametersProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameters(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ContainerInfo{} + msg := &Parameters{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4217,31 +4917,44 @@ func BenchmarkContainerInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfoProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) +func TestCredentialProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo{} + msg := &Credential{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestContainerInfo_DockerInfoMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) +func TestCredentialMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4249,29 +4962,29 @@ func TestContainerInfo_DockerInfoMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo{} + msg := &Credential{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkContainerInfo_DockerInfoProtoMarshal(b *testing.B) { +func BenchmarkCredentialProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_DockerInfo, 10000) + pops := make([]*Credential, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) + pops[i] = NewPopulatedCredential(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4284,18 +4997,18 @@ func BenchmarkContainerInfo_DockerInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkContainerInfo_DockerInfoProtoUnmarshal(b *testing.B) { +func BenchmarkCredentialProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredential(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ContainerInfo_DockerInfo{} + msg := &Credential{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4306,31 +5019,44 @@ func BenchmarkContainerInfo_DockerInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfo_PortMappingProto(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) +func TestCredentialsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Credentials{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestContainerInfo_DockerInfo_PortMappingMarshalTo(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) +func TestCredentialsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4338,29 +5064,29 @@ func TestContainerInfo_DockerInfo_PortMappingMarshalTo(t *testing.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Credentials{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkContainerInfo_DockerInfo_PortMappingProtoMarshal(b *testing.B) { +func BenchmarkCredentialsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerInfo_DockerInfo_PortMapping, 10000) + pops := make([]*Credentials, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + pops[i] = NewPopulatedCredentials(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4373,18 +5099,18 @@ func BenchmarkContainerInfo_DockerInfo_PortMappingProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkContainerInfo_DockerInfo_PortMappingProtoUnmarshal(b *testing.B) { +func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredentials(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ContainerInfo_DockerInfo_PortMapping{} + msg := &Credentials{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4395,6031 +5121,10314 @@ func BenchmarkContainerInfo_DockerInfo_PortMappingProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkIDJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &FrameworkID{} - err = encoding_json.Unmarshal(jsondata, msg) +func TestACLProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } -} -func TestOfferIDJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedOfferID(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACL{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &OfferID{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestSlaveIDJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestACLMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &SlaveID{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } -} -func TestTaskIDJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedTaskID(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACL{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskID{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestExecutorIDJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &ExecutorID{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + +func BenchmarkACLProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedACL(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestContainerIDJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedContainerID(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainerID{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + +func BenchmarkACLProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ACL{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &FrameworkInfo{} - err = encoding_json.Unmarshal(jsondata, msg) + +func TestACL_EntityProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_Entity(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestHealthCheckJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACL_Entity{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestHealthCheck_HTTPJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestACL_EntityMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_Entity(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &HealthCheck_HTTP{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestCommandInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACL_Entity{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfo_URIJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkACL_EntityProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_Entity, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedACL_Entity(popr, false) } - msg := &CommandInfo_URI{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkACL_EntityProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_Entity(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ACL_Entity{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_ContainerInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestACL_RegisterFrameworkProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RegisterFramework(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_ContainerInfo{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &ACL_RegisterFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestExecutorInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestACL_RegisterFrameworkMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RegisterFramework(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &ExecutorInfo{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } -} -func TestMasterInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACL_RegisterFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &MasterInfo{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestSlaveInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkACL_RegisterFrameworkProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_RegisterFramework, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedACL_RegisterFramework(popr, false) } - msg := &SlaveInfo{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkACL_RegisterFrameworkProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_RegisterFramework(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ACL_RegisterFramework{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestValueJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedValue(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestACL_RunTaskProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RunTask(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &ACL_RunTask{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestValue_ScalarJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestACL_RunTaskMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RunTask(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &Value_Scalar{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestValue_RangeJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACL_RunTask{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Range{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestValue_RangesJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkACL_RunTaskProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_RunTask, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedACL_RunTask(popr, false) } - msg := &Value_Ranges{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkACL_RunTaskProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_RunTask(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ACL_RunTask{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestValue_SetJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestACL_ShutdownFrameworkProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_ShutdownFramework(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Set{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &ACL_ShutdownFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestValue_TextJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestACL_ShutdownFrameworkMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_ShutdownFramework(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &Value_Text{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } -} -func TestAttributeJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedAttribute(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACL_ShutdownFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Attribute{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestResourceJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedResource(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkACL_ShutdownFrameworkProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_ShutdownFramework, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedACL_ShutdownFramework(popr, false) } - msg := &Resource{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkACL_ShutdownFrameworkProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACL_ShutdownFramework(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ACL_ShutdownFramework{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestResourceStatisticsJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestACLsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACLs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &ACLs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestResourceUsageJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestACLsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACLs(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &ResourceUsage{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestPerfStatisticsJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ACLs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRequestJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedRequest(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkACLsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACLs, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedACLs(popr, false) } - msg := &Request{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkACLsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedACLs(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ACLs{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestOfferJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedOffer(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestRateLimitProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestTaskInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestRateLimitMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &TaskInfo{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestTaskStatusJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &TaskStatus{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + +func BenchmarkRateLimitProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RateLimit, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRateLimit(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestFiltersJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedFilters(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &Filters{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + +func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimit(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &RateLimit{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestEnvironmentJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestRateLimitsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestEnvironment_VariableJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestRateLimitsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &Environment_Variable{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestParameterJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedParameter(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestParametersJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedParameters(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkRateLimitsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RateLimits, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRateLimits(popr, false) } - msg := &Parameters{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimits(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &RateLimits{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestCredentialJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedCredential(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestVolumeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestCredentialsJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedCredentials(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestVolumeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &Credentials{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestACLJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedACL(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkVolumeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Volume, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedVolume(popr, false) } - msg := &ACL{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkVolumeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &Volume{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestACL_EntityJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestContainerInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ACL_Entity{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestACL_RegisterFrameworkJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestContainerInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &ACL_RegisterFramework{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestACL_RunTaskJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_RunTask{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + +func BenchmarkContainerInfoProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerInfo, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainerInfo(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestACL_ShutdownFrameworkJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_ShutdownFramework{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + +func BenchmarkContainerInfoProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ContainerInfo{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestACLsJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedACLs(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACLs{} - err = encoding_json.Unmarshal(jsondata, msg) + +func TestContainerInfo_DockerInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } -} -func TestRateLimitJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestRateLimitsJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func TestContainerInfo_DockerInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - msg := &RateLimits{} - err = encoding_json.Unmarshal(jsondata, msg) + _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) - } -} -func TestVolumeJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedVolume(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestContainerInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) - if err != nil { - panic(err) + +func BenchmarkContainerInfo_DockerInfoProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerInfo_DockerInfo, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) } - msg := &ContainerInfo{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainerInfo_DockerInfoProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + msg := &ContainerInfo_DockerInfo{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfoJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestContainerInfo_DockerInfo_PortMappingProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ContainerInfo_DockerInfo{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + msg := &ContainerInfo_DockerInfo_PortMapping{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestContainerInfo_DockerInfo_PortMappingJSON(t *testing1.T) { - popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) - jsondata, err := encoding_json.Marshal(p) + +func TestContainerInfo_DockerInfo_PortMappingMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &ContainerInfo_DockerInfo_PortMapping{} - err = encoding_json.Unmarshal(jsondata, msg) - if err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestFrameworkIDProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &FrameworkID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + +func BenchmarkContainerInfo_DockerInfo_PortMappingProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerInfo_DockerInfo_PortMapping, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestFrameworkIDProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &FrameworkID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkContainerInfo_DockerInfo_PortMappingProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &ContainerInfo_DockerInfo_PortMapping{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestOfferIDProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedOfferID(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &OfferID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestLabelsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestOfferIDProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedOfferID(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &OfferID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestLabelsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} - -func TestSlaveIDProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &SlaveID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestSlaveIDProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &SlaveID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkLabelsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Labels, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLabels(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestTaskIDProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedTaskID(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &TaskID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkLabelsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLabels(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Labels{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestTaskIDProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedTaskID(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &TaskID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestLabelProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestExecutorIDProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ExecutorID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestLabelMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} - -func TestExecutorIDProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ExecutorID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestContainerIDProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerID(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ContainerID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkLabelProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Label, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLabel(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestContainerIDProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerID(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ContainerID{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkLabelProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLabel(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Label{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &FrameworkInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestPortProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Port{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestFrameworkInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &FrameworkInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestPortMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Port{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} - -func TestHealthCheckProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &HealthCheck{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestHealthCheckProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &HealthCheck{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkPortProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Port, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedPort(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestHealthCheck_HTTPProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &HealthCheck_HTTP{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkPortProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPort(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Port{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestHealthCheck_HTTPProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &HealthCheck_HTTP{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestPortsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestCommandInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &CommandInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestPortsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} - -func TestCommandInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &CommandInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfo_URIProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &CommandInfo_URI{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkPortsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Ports, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedPorts(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_URIProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &CommandInfo_URI{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkPortsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedPorts(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &Ports{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_ContainerInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &CommandInfo_ContainerInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestDiscoveryInfoProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestCommandInfo_ContainerInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &CommandInfo_ContainerInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestDiscoveryInfoMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} - -func TestExecutorInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ExecutorInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) + for i := range data { + data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestExecutorInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ExecutorInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkDiscoveryInfoProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DiscoveryInfo, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDiscoveryInfo(popr, false) } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) } + b.SetBytes(int64(total / b.N)) } -func TestMasterInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &MasterInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) +func BenchmarkDiscoveryInfoProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDiscoveryInfo(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data } - if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + msg := &DiscoveryInfo{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } } + b.SetBytes(int64(total / b.N)) } -func TestMasterInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &MasterInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestFrameworkIDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkID(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FrameworkID{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestSlaveInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &SlaveInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOfferIDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOfferID(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OfferID{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestSlaveInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &SlaveInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestSlaveIDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveID(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SlaveID{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValueProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Value{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestTaskIDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskID(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TaskID{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValueProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Value{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestExecutorIDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorID(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ExecutorID{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_ScalarProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Value_Scalar{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestContainerIDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerID(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerID{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_ScalarProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Value_Scalar{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestFrameworkInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FrameworkInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_RangeProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Value_Range{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestFrameworkInfo_CapabilityJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo_Capability(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FrameworkInfo_Capability{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_RangeProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Value_Range{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestHealthCheckJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &HealthCheck{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_RangesProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Value_Ranges{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestHealthCheck_HTTPJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck_HTTP(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &HealthCheck_HTTP{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_RangesProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Value_Ranges{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestCommandInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CommandInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_SetProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Value_Set{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestCommandInfo_URIJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_URI(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CommandInfo_URI{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_SetProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Value_Set{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestCommandInfo_ContainerInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CommandInfo_ContainerInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_TextProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Value_Text{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestExecutorInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ExecutorInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestValue_TextProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Value_Text{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestMasterInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMasterInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MasterInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestAttributeProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedAttribute(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Attribute{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestSlaveInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SlaveInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestAttributeProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedAttribute(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Attribute{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestValueJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Value{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestResourceProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedResource(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Resource{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestValue_ScalarJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Scalar(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Value_Scalar{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestResourceProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedResource(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Resource{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestValue_RangeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Range(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Value_Range{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestResourceStatisticsProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ResourceStatistics{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestValue_RangesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Ranges(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Value_Ranges{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestResourceStatisticsProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ResourceStatistics{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestValue_SetJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Set(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Value_Set{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestResourceUsageProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ResourceUsage{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestValue_TextJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Text(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Value_Text{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestResourceUsageProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ResourceUsage{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestAttributeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAttribute(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Attribute{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestPerfStatisticsProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &PerfStatistics{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResourceJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Resource{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestPerfStatisticsProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &PerfStatistics{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResource_ReservationInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_ReservationInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Resource_ReservationInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestRequestProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedRequest(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Request{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResource_DiskInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Resource_DiskInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestRequestProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedRequest(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Request{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResource_DiskInfo_PersistenceJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo_Persistence(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Resource_DiskInfo_Persistence{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestOfferProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedOffer(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Offer{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResource_RevocableInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_RevocableInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Resource_RevocableInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestOfferProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedOffer(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Offer{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestTrafficControlStatisticsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTrafficControlStatistics(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TrafficControlStatistics{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestTaskInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &TaskInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResourceStatisticsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceStatistics(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceStatistics{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestTaskInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &TaskInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResourceUsageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceUsage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestTaskStatusProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &TaskStatus{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestResourceUsage_ExecutorJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceUsage_Executor{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestTaskStatusProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &TaskStatus{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestPerfStatisticsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPerfStatistics(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &PerfStatistics{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestFiltersProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedFilters(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Filters{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestRequestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRequest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Request{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestFiltersProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedFilters(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Filters{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOfferJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestEnvironmentProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Environment{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOffer_OperationJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestEnvironmentProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Environment{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOffer_Operation_LaunchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Launch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Launch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestEnvironment_VariableProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Environment_Variable{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOffer_Operation_ReserveJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Reserve(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Reserve{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestEnvironment_VariableProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Environment_Variable{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOffer_Operation_UnreserveJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Unreserve(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Unreserve{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestParameterProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedParameter(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Parameter{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOffer_Operation_CreateJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Create(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Create{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestParameterProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedParameter(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Parameter{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOffer_Operation_DestroyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Destroy(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Destroy{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestParametersProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedParameters(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Parameters{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestTaskInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TaskInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestParametersProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedParameters(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Parameters{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestTaskStatusJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskStatus(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TaskStatus{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCredentialProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCredential(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Credential{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestFiltersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFilters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Filters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCredentialProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCredential(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Credential{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestEnvironmentJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Environment{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCredentialsProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCredentials(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Credentials{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestEnvironment_VariableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Environment_Variable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestCredentialsProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedCredentials(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Credentials{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestParameterJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Parameter{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACLProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ACL{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestParametersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Parameters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACLProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ACL{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestCredentialJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Credential{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_EntityProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ACL_Entity{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestCredentialsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Credentials{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_EntityProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ACL_Entity{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestACLJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ACL{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_RegisterFrameworkProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ACL_RegisterFramework{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestACL_EntityJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_Entity(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ACL_Entity{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_RegisterFrameworkProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) +func TestACL_RegisterFrameworkJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedACL_RegisterFramework(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } msg := &ACL_RegisterFramework{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_RunTaskProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) +func TestACL_RunTaskJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedACL_RunTask(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } msg := &ACL_RunTask{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_RunTaskProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ACL_RunTask{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestACL_ShutdownFrameworkJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_ShutdownFramework(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ACL_ShutdownFramework{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_ShutdownFrameworkProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ACL_ShutdownFramework{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestACLsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACLs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ACLs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACL_ShutdownFrameworkProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ACL_ShutdownFramework{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestRateLimitJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RateLimit{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACLsProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACLs(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ACLs{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestRateLimitsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RateLimits{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestACLsProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedACLs(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ACLs{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestVolumeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Volume{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestRateLimitProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &RateLimit{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestContainerInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestRateLimitProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &RateLimit{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestContainerInfo_DockerInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo_DockerInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestRateLimitsProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &RateLimits{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestContainerInfo_DockerInfo_PortMappingJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainerInfo_DockerInfo_PortMapping{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestRateLimitsProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &RateLimits{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestLabelsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Labels{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestVolumeProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedVolume(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &Volume{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestLabelJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Label{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestVolumeProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedVolume(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &Volume{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestPortJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Port{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestContainerInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ContainerInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestPortsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Ports{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestContainerInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ContainerInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestDiscoveryInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DiscoveryInfo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } - -func TestContainerInfo_DockerInfoProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ContainerInfo_DockerInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestFrameworkIDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkID(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FrameworkID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestContainerInfo_DockerInfoProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ContainerInfo_DockerInfo{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestFrameworkIDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkID(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FrameworkID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestContainerInfo_DockerInfo_PortMappingProtoText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) - data := github_com_gogo_protobuf_proto1.MarshalTextString(p) - msg := &ContainerInfo_DockerInfo_PortMapping{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOfferIDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOfferID(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OfferID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestContainerInfo_DockerInfo_PortMappingProtoCompactText(t *testing2.T) { - popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) - data := github_com_gogo_protobuf_proto1.CompactTextString(p) - msg := &ContainerInfo_DockerInfo_PortMapping{} - if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { - panic(err) +func TestOfferIDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOfferID(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OfferID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestFrameworkIDStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) +func TestSlaveIDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveID(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SlaveID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestOfferIDStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedOfferID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestSlaveIDStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestTaskIDStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedTaskID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestSlaveIDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveID(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SlaveID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestExecutorIDStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestContainerIDStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedContainerID(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestFrameworkInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestTaskIDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskID(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TaskID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestHealthCheckStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestHealthCheck_HTTPStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestTaskIDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskID(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TaskID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestCommandInfo_URIStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestCommandInfo_ContainerInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestExecutorInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestExecutorIDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorID(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ExecutorID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestMasterInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestSlaveInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestValueStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedValue(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestExecutorIDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorID(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ExecutorID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestValue_ScalarStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValue_RangeStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestValue_RangesStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestValue_SetStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestContainerIDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerID(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestValue_TextStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestAttributeStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedAttribute(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestResourceStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedResource(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestContainerIDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerID(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerID{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestResourceStatisticsStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestResourceUsageStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestPerfStatisticsStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestFrameworkInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FrameworkInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestRequestStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestOfferStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedOffer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestTaskInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestFrameworkInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FrameworkInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestTaskStatusStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestFiltersStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedFilters(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestEnvironmentStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestFrameworkInfo_CapabilityProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo_Capability(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FrameworkInfo_Capability{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestEnvironment_VariableStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestParameterStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedParameter(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestParametersStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedParameters(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestFrameworkInfo_CapabilityProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo_Capability(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FrameworkInfo_Capability{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestCredentialStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedCredential(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestCredentialsStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedCredentials(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestACLStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedACL(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestHealthCheckProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &HealthCheck{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestACL_EntityStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestACL_RegisterFrameworkStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestACL_RunTaskStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestHealthCheckProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &HealthCheck{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestACL_ShutdownFrameworkStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestACLsStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedACLs(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestRateLimitStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestHealthCheck_HTTPProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck_HTTP(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &HealthCheck_HTTP{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestRateLimitsStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestVolumeStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedVolume(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestContainerInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + +func TestHealthCheck_HTTPProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck_HTTP(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &HealthCheck_HTTP{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } -} -func TestContainerInfo_DockerInfoStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestContainerInfo_DockerInfo_PortMappingStringer(t *testing3.T) { - popr := math_rand3.New(math_rand3.NewSource(time3.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestFrameworkIDSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + +func TestCommandInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CommandInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkFrameworkIDSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*FrameworkID, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkID(popr, false) +func TestCommandInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CommandInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestOfferIDSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedOfferID(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) +func TestCommandInfo_URIProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_URI(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CommandInfo_URI{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) - } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkOfferIDSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*OfferID, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOfferID(popr, false) +func TestCommandInfo_URIProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_URI(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CommandInfo_URI{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestSlaveIDSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestCommandInfo_ContainerInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CommandInfo_ContainerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkSlaveIDSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*SlaveID, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSlaveID(popr, false) +func TestCommandInfo_ContainerInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CommandInfo_ContainerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestTaskIDSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedTaskID(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestExecutorInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ExecutorInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkTaskIDSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*TaskID, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTaskID(popr, false) +func TestExecutorInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ExecutorInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestExecutorIDSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestMasterInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMasterInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MasterInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkExecutorIDSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ExecutorID, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExecutorID(popr, false) +func TestMasterInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMasterInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MasterInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestContainerIDSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedContainerID(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestSlaveInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SlaveInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkContainerIDSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ContainerID, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerID(popr, false) +func TestSlaveInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SlaveInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestValueProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Value{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkFrameworkInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*FrameworkInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkInfo(popr, false) +func TestValueProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Value{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestHealthCheckSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestValue_ScalarProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Scalar(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Value_Scalar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkHealthCheckSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*HealthCheck, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHealthCheck(popr, false) +func TestValue_ScalarProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Scalar(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Value_Scalar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestHealthCheck_HTTPSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestValue_RangeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Range(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Value_Range{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkHealthCheck_HTTPSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*HealthCheck_HTTP, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedHealthCheck_HTTP(popr, false) +func TestValue_RangeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Range(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Value_Range{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestCommandInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestValue_RangesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Ranges(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Value_Ranges{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkCommandInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*CommandInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCommandInfo(popr, false) +func TestValue_RangesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Ranges(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Value_Ranges{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_URISize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestValue_SetProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Set(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Value_Set{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkCommandInfo_URISize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*CommandInfo_URI, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCommandInfo_URI(popr, false) +func TestValue_SetProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Set(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Value_Set{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_ContainerInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestValue_TextProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Text(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Value_Text{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkCommandInfo_ContainerInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*CommandInfo_ContainerInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCommandInfo_ContainerInfo(popr, false) +func TestValue_TextProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Text(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Value_Text{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestExecutorInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestAttributeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAttribute(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Attribute{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkExecutorInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ExecutorInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExecutorInfo(popr, false) +func TestAttributeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAttribute(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Attribute{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestMasterInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestResourceProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Resource{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkMasterInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*MasterInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMasterInfo(popr, false) +func TestResourceProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Resource{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestSlaveInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) +func TestResource_ReservationInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_ReservationInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Resource_ReservationInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) - } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkSlaveInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*SlaveInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedSlaveInfo(popr, false) +func TestResource_ReservationInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_ReservationInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Resource_ReservationInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestValueSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedValue(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestResource_DiskInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Resource_DiskInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkValueSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Value, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedValue(popr, false) +func TestResource_DiskInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Resource_DiskInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestValue_ScalarSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestResource_DiskInfo_PersistenceProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo_Persistence(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Resource_DiskInfo_Persistence{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkValue_ScalarSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Value_Scalar, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedValue_Scalar(popr, false) +func TestResource_DiskInfo_PersistenceProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo_Persistence(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Resource_DiskInfo_Persistence{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestValue_RangeSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestResource_RevocableInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_RevocableInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Resource_RevocableInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkValue_RangeSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Value_Range, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedValue_Range(popr, false) +func TestResource_RevocableInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_RevocableInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Resource_RevocableInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestValue_RangesSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) +func TestTrafficControlStatisticsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTrafficControlStatistics(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TrafficControlStatistics{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) - } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkValue_RangesSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Value_Ranges, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedValue_Ranges(popr, false) +func TestTrafficControlStatisticsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTrafficControlStatistics(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TrafficControlStatistics{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestValue_SetSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestResourceStatisticsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceStatistics(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ResourceStatistics{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkValue_SetSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Value_Set, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedValue_Set(popr, false) +func TestResourceStatisticsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceStatistics(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ResourceStatistics{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestValue_TextSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestResourceUsageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ResourceUsage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkValue_TextSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Value_Text, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedValue_Text(popr, false) +func TestResourceUsageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ResourceUsage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestAttributeSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedAttribute(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestResourceUsage_ExecutorProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ResourceUsage_Executor{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkAttributeSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Attribute, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAttribute(popr, false) +func TestResourceUsage_ExecutorProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ResourceUsage_Executor{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestResourceSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedResource(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestPerfStatisticsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPerfStatistics(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &PerfStatistics{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkResourceSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Resource, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedResource(popr, false) +func TestPerfStatisticsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPerfStatistics(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &PerfStatistics{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestResourceStatisticsSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestRequestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRequest(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Request{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkResourceStatisticsSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ResourceStatistics, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedResourceStatistics(popr, false) +func TestRequestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRequest(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Request{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestResourceUsageSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestOfferProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Offer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkResourceUsageSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ResourceUsage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedResourceUsage(popr, false) +func TestOfferProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Offer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestPerfStatisticsSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestOffer_OperationProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Offer_Operation{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkPerfStatisticsSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*PerfStatistics, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedPerfStatistics(popr, false) +func TestOffer_OperationProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Offer_Operation{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestRequestSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedRequest(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) +func TestOffer_Operation_LaunchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Launch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Offer_Operation_Launch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) - } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRequestSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Request, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRequest(popr, false) +func TestOffer_Operation_LaunchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Launch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Offer_Operation_Launch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestOfferSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedOffer(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestOffer_Operation_ReserveProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Reserve(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Offer_Operation_Reserve{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkOfferSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Offer, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOffer(popr, false) +func TestOffer_Operation_ReserveProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Reserve(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Offer_Operation_Reserve{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestTaskInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestOffer_Operation_UnreserveProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Unreserve(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Offer_Operation_Unreserve{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkTaskInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*TaskInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTaskInfo(popr, false) +func TestOffer_Operation_UnreserveProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Unreserve(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Offer_Operation_Unreserve{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestTaskStatusSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestOffer_Operation_CreateProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Create(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Offer_Operation_Create{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkTaskStatusSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*TaskStatus, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTaskStatus(popr, false) +func TestOffer_Operation_CreateProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Create(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Offer_Operation_Create{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestFiltersSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedFilters(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) +func TestOffer_Operation_DestroyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Destroy(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Offer_Operation_Destroy{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) - } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkFiltersSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Filters, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFilters(popr, false) +func TestOffer_Operation_DestroyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Destroy(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Offer_Operation_Destroy{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestEnvironmentSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestTaskInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TaskInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkEnvironmentSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Environment, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedEnvironment(popr, false) +func TestTaskInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TaskInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestEnvironment_VariableSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestTaskStatusProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskStatus(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TaskStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkEnvironment_VariableSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Environment_Variable, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedEnvironment_Variable(popr, false) +func TestTaskStatusProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskStatus(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TaskStatus{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestParameterSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedParameter(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestFiltersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFilters(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Filters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkParameterSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Parameter, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedParameter(popr, false) +func TestFiltersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFilters(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Filters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - b.SetBytes(int64(total / b.N)) -} - -func TestParametersSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedParameters(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +} + +func TestEnvironmentProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Environment{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkParametersSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Parameters, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedParameters(popr, false) +func TestEnvironmentProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Environment{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestCredentialSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedCredential(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestEnvironment_VariableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Environment_Variable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkCredentialSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Credential, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCredential(popr, false) +func TestEnvironment_VariableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Environment_Variable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestCredentialsSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedCredentials(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestParameterProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Parameter{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkCredentialsSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Credentials, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCredentials(popr, false) +func TestParameterProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Parameter{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestACLSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedACL(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestParametersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Parameters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACLSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ACL, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedACL(popr, false) +func TestParametersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Parameters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestACL_EntitySize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestCredentialProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Credential{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_EntitySize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ACL_Entity, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedACL_Entity(popr, false) +func TestCredentialProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Credential{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestACL_RegisterFrameworkSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestCredentialsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Credentials{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_RegisterFrameworkSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ACL_RegisterFramework, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedACL_RegisterFramework(popr, false) +func TestCredentialsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Credentials{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestACL_RunTaskSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestACLProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ACL{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_RunTaskSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ACL_RunTask, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedACL_RunTask(popr, false) +func TestACLProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ACL{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestACL_ShutdownFrameworkSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestACL_EntityProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_Entity(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ACL_Entity{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACL_ShutdownFrameworkSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ACL_ShutdownFramework, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedACL_ShutdownFramework(popr, false) +func TestACL_EntityProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_Entity(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ACL_Entity{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestACLsSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedACLs(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestACL_RegisterFrameworkProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RegisterFramework(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ACL_RegisterFramework{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkACLsSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ACLs, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedACLs(popr, false) +func TestACL_RegisterFrameworkProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RegisterFramework(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ACL_RegisterFramework{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestRateLimitSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestACL_RunTaskProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RunTask(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ACL_RunTask{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRateLimitSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*RateLimit, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRateLimit(popr, false) +func TestACL_RunTaskProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RunTask(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ACL_RunTask{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestRateLimitsSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestACL_ShutdownFrameworkProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_ShutdownFramework(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ACL_ShutdownFramework{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkRateLimitsSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*RateLimits, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRateLimits(popr, false) +func TestACL_ShutdownFrameworkProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_ShutdownFramework(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ACL_ShutdownFramework{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestVolumeSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedVolume(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestACLsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACLs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ACLs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkVolumeSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*Volume, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedVolume(popr, false) +func TestACLsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACLs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ACLs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestContainerInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestRateLimitProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkContainerInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ContainerInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerInfo(popr, false) +func TestRateLimitProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfoSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestRateLimitsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkContainerInfo_DockerInfoSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ContainerInfo_DockerInfo, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) +func TestRateLimitsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestContainerInfo_DockerInfo_PortMappingSize(t *testing4.T) { - popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) - size2 := github_com_gogo_protobuf_proto2.Size(p) - data, err := github_com_gogo_protobuf_proto2.Marshal(p) - if err != nil { - panic(err) - } - size := p.Size() - if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) +func TestVolumeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } - size3 := github_com_gogo_protobuf_proto2.Size(p) - if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkContainerInfo_DockerInfo_PortMappingSize(b *testing4.B) { - popr := math_rand4.New(math_rand4.NewSource(616)) - total := 0 - pops := make([]*ContainerInfo_DockerInfo_PortMapping, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) +func TestVolumeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - b.SetBytes(int64(total / b.N)) } -func TestFrameworkIDGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) +func TestContainerInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOfferIDGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedOfferID(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestContainerInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestSlaveIDGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestContainerInfo_DockerInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestTaskIDGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedTaskID(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestContainerInfo_DockerInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestExecutorIDGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestContainerInfo_DockerInfo_PortMappingProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainerInfo_DockerInfo_PortMapping{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestContainerIDGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedContainerID(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestContainerInfo_DockerInfo_PortMappingProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainerInfo_DockerInfo_PortMapping{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestFrameworkInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestLabelsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestHealthCheckGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestLabelsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestHealthCheck_HTTPGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestLabelProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Label{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestLabelProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Label{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfo_URIGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestPortProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Port{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestCommandInfo_ContainerInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestPortProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Port{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestExecutorInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestPortsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestMasterInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestPortsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestSlaveInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestDiscoveryInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestValueGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedValue(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + +func TestDiscoveryInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } -} -func TestValue_ScalarGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } - _, err := go_parser.ParseExpr(s1) +} + +func TestFrameworkIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestValue_RangeGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &FrameworkID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestValue_RangesGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestOfferIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOfferID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestValue_SetGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &OfferID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestValue_TextGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestSlaveIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestAttributeGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedAttribute(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &SlaveID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestResourceGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedResource(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestTaskIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestResourceStatisticsGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &TaskID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestResourceUsageGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestExecutorIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestPerfStatisticsGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &ExecutorID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestRequestGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedRequest(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestContainerIDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerID(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestOfferGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedOffer(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &ContainerID{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestTaskInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestFrameworkInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestTaskStatusGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &FrameworkInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestFiltersGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedFilters(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestFrameworkInfo_CapabilityVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo_Capability(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestEnvironmentGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &FrameworkInfo_Capability{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestEnvironment_VariableGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedEnvironment_Variable(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestHealthCheckVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestParameterGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedParameter(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + msg := &HealthCheck{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) } - _, err := go_parser.ParseExpr(s1) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestHealthCheck_HTTPVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck_HTTP(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestParametersGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedParameters(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &HealthCheck_HTTP{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestCredentialGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedCredential(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCredentialsGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedCredentials(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) +func TestCommandInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestACLGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedACL(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &CommandInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestACL_EntityGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedACL_Entity(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestACL_RegisterFrameworkGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedACL_RegisterFramework(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) +func TestCommandInfo_URIVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_URI(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestACL_RunTaskGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedACL_RunTask(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &CommandInfo_URI{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestACL_ShutdownFrameworkGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedACL_ShutdownFramework(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestACLsGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedACLs(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) +func TestCommandInfo_ContainerInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_ContainerInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestRateLimitGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedRateLimit(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &CommandInfo_ContainerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestRateLimitsGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedRateLimits(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - panic(err) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestVolumeGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedVolume(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) +func TestExecutorInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestContainerInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedContainerInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &ExecutorInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } -} -func TestContainerInfo_DockerInfoGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } - _, err := go_parser.ParseExpr(s1) +} +func TestMasterInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMasterInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } -} -func TestContainerInfo_DockerInfo_PortMappingGoString(t *testing5.T) { - popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) - s1 := p.GoString() - s2 := fmt1.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { + msg := &MasterInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } } -func TestFrameworkIDVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedFrameworkID(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestSlaveInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &FrameworkID{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &SlaveInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOfferIDVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedOfferID(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestValueVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &OfferID{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Value{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSlaveIDVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedSlaveID(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestValue_ScalarVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Scalar(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &SlaveID{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Value_Scalar{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTaskIDVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedTaskID(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestValue_RangeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Range(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &TaskID{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Value_Range{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExecutorIDVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedExecutorID(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestValue_RangesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Ranges(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &ExecutorID{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Value_Ranges{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestContainerIDVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedContainerID(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestValue_SetVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Set(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &ContainerID{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Value_Set{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFrameworkInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedFrameworkInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestValue_TextVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Text(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &FrameworkInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Value_Text{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestHealthCheckVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedHealthCheck(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestAttributeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAttribute(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &HealthCheck{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Attribute{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestHealthCheck_HTTPVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedHealthCheck_HTTP(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestResourceVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &HealthCheck_HTTP{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Resource{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCommandInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedCommandInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestResource_ReservationInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_ReservationInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &CommandInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Resource_ReservationInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCommandInfo_URIVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedCommandInfo_URI(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestResource_DiskInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &CommandInfo_URI{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Resource_DiskInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCommandInfo_ContainerInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedCommandInfo_ContainerInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestResource_DiskInfo_PersistenceVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &CommandInfo_ContainerInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Resource_DiskInfo_Persistence{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestExecutorInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedExecutorInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestResource_RevocableInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_RevocableInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &ExecutorInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Resource_RevocableInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestMasterInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedMasterInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestTrafficControlStatisticsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTrafficControlStatistics(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &MasterInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &TrafficControlStatistics{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestSlaveInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedSlaveInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestResourceStatisticsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceStatistics(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &SlaveInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &ResourceStatistics{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValueVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedValue(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestResourceUsageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Value{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &ResourceUsage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_ScalarVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedValue_Scalar(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { +func TestResourceUsage_ExecutorVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage_Executor(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { panic(err) } - msg := &Value_Scalar{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &ResourceUsage_Executor{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_RangeVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedValue_Range(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestPerfStatisticsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPerfStatistics(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Value_Range{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &PerfStatistics{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_RangesVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedValue_Ranges(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestRequestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRequest(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Value_Ranges{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Request{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_SetVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedValue_Set(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestOfferVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Value_Set{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Offer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestValue_TextVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedValue_Text(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestOffer_OperationVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Value_Text{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Offer_Operation{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestAttributeVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedAttribute(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestOffer_Operation_LaunchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Launch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Attribute{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Offer_Operation_Launch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedResource(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestOffer_Operation_ReserveVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Reserve(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Resource{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Offer_Operation_Reserve{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceStatisticsVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedResourceStatistics(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestOffer_Operation_UnreserveVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &ResourceStatistics{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Offer_Operation_Unreserve{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestResourceUsageVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedResourceUsage(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestOffer_Operation_CreateVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Create(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &ResourceUsage{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Offer_Operation_Create{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestPerfStatisticsVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedPerfStatistics(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestOffer_Operation_DestroyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Destroy(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &PerfStatistics{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Offer_Operation_Destroy{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestRequestVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedRequest(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestTaskInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Request{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &TaskInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestOfferVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedOffer(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestTaskStatusVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskStatus(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Offer{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &TaskStatus{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTaskInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedTaskInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestFiltersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFilters(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &TaskInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Filters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestTaskStatusVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedTaskStatus(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestEnvironmentVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEnvironment(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &TaskStatus{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Environment{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestFiltersVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedFilters(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestEnvironment_VariableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEnvironment_Variable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Filters{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Environment_Variable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEnvironmentVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedEnvironment(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) +func TestParameterVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedParameter(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &Environment{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { + msg := &Parameter{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestParametersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedParameters(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Parameters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCredentialVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCredential(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Credential{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCredentialsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCredentials(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Credentials{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACLVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_EntityVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_Entity(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_Entity{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_RegisterFrameworkVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_RegisterFramework(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_RegisterFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_RunTaskVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_RunTask(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_RunTask{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACL_ShutdownFrameworkVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_ShutdownFramework(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACL_ShutdownFramework{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestACLsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACLs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ACLs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestEnvironment_VariableVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestRateLimitVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRateLimit(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RateLimit{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRateLimitsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRateLimits(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RateLimits{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestVolumeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedVolume(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Volume{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainerInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainerInfo_DockerInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerInfo_DockerInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainerInfo_DockerInfo_PortMappingVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainerInfo_DockerInfo_PortMapping{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLabelsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabels(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Labels{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLabelVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabel(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Label{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestPortVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPort(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Port{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestPortsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPorts(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Ports{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDiscoveryInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDiscoveryInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DiscoveryInfo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFrameworkIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOfferIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOfferID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSlaveIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTaskIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestExecutorIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerIDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerID(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkInfo_CapabilityGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo_Capability(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestHealthCheckGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestHealthCheck_HTTPGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck_HTTP(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCommandInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCommandInfo_URIGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_URI(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCommandInfo_ContainerInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_ContainerInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestExecutorInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMasterInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMasterInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSlaveInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValueGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_ScalarGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Scalar(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_RangeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Range(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_RangesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Ranges(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_SetGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Set(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestValue_TextGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Text(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAttributeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAttribute(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_ReservationInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_ReservationInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_DiskInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_DiskInfo_PersistenceGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResource_RevocableInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_RevocableInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTrafficControlStatisticsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTrafficControlStatistics(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceStatisticsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceStatistics(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceUsageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestResourceUsage_ExecutorGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage_Executor(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPerfStatisticsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPerfStatistics(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRequestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRequest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOfferGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_OperationGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_LaunchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Launch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_ReserveGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Reserve(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_UnreserveGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_CreateGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Create(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOffer_Operation_DestroyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Destroy(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTaskInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTaskStatusGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskStatus(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFiltersGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFilters(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEnvironmentGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEnvironment(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEnvironment_VariableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEnvironment_Variable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestParameterGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedParameter(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestParametersGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedParameters(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCredentialGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCredential(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCredentialsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCredentials(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestACLGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestACL_EntityGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_Entity(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestACL_RegisterFrameworkGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_RegisterFramework(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestACL_RunTaskGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_RunTask(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestACL_ShutdownFrameworkGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACL_ShutdownFramework(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestACLsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedACLs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRateLimitGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRateLimit(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRateLimitsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRateLimits(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestVolumeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedVolume(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerInfo_DockerInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_DockerInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainerInfo_DockerInfo_PortMappingGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLabelsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabels(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLabelGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabel(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPortGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPort(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestPortsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPorts(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDiscoveryInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDiscoveryInfo(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFrameworkIDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkID(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFrameworkIDSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FrameworkID, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFrameworkID(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOfferIDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOfferID(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOfferIDSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OfferID, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOfferID(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestSlaveIDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveID(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkSlaveIDSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*SlaveID, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedSlaveID(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTaskIDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskID(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTaskIDSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*TaskID, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTaskID(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestExecutorIDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorID(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkExecutorIDSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ExecutorID, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedExecutorID(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainerIDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerID(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainerIDSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerID, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainerID(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFrameworkInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFrameworkInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FrameworkInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFrameworkInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFrameworkInfo_CapabilitySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFrameworkInfo_Capability(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFrameworkInfo_CapabilitySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FrameworkInfo_Capability, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestHealthCheckSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkHealthCheckSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*HealthCheck, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedHealthCheck(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestHealthCheck_HTTPSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedHealthCheck_HTTP(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkHealthCheck_HTTPSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*HealthCheck_HTTP, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedHealthCheck_HTTP(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCommandInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCommandInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CommandInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCommandInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCommandInfo_URISize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_URI(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCommandInfo_URISize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CommandInfo_URI, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCommandInfo_URI(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCommandInfo_ContainerInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCommandInfo_ContainerInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCommandInfo_ContainerInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CommandInfo_ContainerInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCommandInfo_ContainerInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestExecutorInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedExecutorInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkExecutorInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ExecutorInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedExecutorInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMasterInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMasterInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMasterInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MasterInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMasterInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestSlaveInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSlaveInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkSlaveInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*SlaveInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedSlaveInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValueSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValueSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedValue(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValue_ScalarSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Scalar(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValue_ScalarSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value_Scalar, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedValue_Scalar(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValue_RangeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Range(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValue_RangeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value_Range, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedValue_Range(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValue_RangesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Ranges(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValue_RangesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value_Ranges, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedValue_Ranges(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValue_SetSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Set(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValue_SetSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value_Set, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedValue_Set(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestValue_TextSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedValue_Text(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkValue_TextSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Value_Text, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedValue_Text(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAttributeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAttribute(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAttributeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Attribute, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAttribute(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResourceSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResourceSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Resource, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResource(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResource_ReservationInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_ReservationInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResource_ReservationInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Resource_ReservationInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResource_ReservationInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResource_DiskInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResource_DiskInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Resource_DiskInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResource_DiskInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResource_DiskInfo_PersistenceSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_DiskInfo_Persistence(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResource_DiskInfo_PersistenceSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Resource_DiskInfo_Persistence, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResource_DiskInfo_Persistence(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResource_RevocableInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_RevocableInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResource_RevocableInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Resource_RevocableInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResource_RevocableInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTrafficControlStatisticsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTrafficControlStatistics(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTrafficControlStatisticsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*TrafficControlStatistics, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTrafficControlStatistics(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResourceStatisticsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceStatistics(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResourceStatisticsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ResourceStatistics, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResourceStatistics(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResourceUsageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResourceUsageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ResourceUsage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResourceUsage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestResourceUsage_ExecutorSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkResourceUsage_ExecutorSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ResourceUsage_Executor, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResourceUsage_Executor(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestPerfStatisticsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPerfStatistics(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkPerfStatisticsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*PerfStatistics, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedPerfStatistics(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRequestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRequest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRequestSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Request, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRequest(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOfferSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOfferSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOffer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOffer_OperationSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOffer_OperationSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOffer_Operation(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOffer_Operation_LaunchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Launch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOffer_Operation_LaunchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation_Launch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOffer_Operation_Launch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOffer_Operation_ReserveSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Reserve(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOffer_Operation_ReserveSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation_Reserve, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOffer_Operation_Reserve(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOffer_Operation_UnreserveSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Unreserve(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOffer_Operation_UnreserveSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation_Unreserve, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOffer_Operation_Unreserve(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOffer_Operation_CreateSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Create(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOffer_Operation_CreateSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation_Create, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOffer_Operation_Create(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOffer_Operation_DestroySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_Destroy(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOffer_Operation_DestroySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation_Destroy, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOffer_Operation_Destroy(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTaskInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTaskInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*TaskInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTaskInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTaskStatusSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTaskStatus(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTaskStatusSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*TaskStatus, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTaskStatus(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFiltersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFilters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFiltersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Filters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFilters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestEnvironmentSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkEnvironmentSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Environment, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedEnvironment(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestEnvironment_VariableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedEnvironment_Variable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkEnvironment_VariableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Environment_Variable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedEnvironment_Variable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestParameterSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameter(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkParameterSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Parameter, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedParameter(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestParametersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedParameters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkParametersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Parameters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedParameters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCredentialSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredential(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCredentialSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Credential, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCredential(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCredentialsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCredentials(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCredentialsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Credentials, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCredentials(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestACLSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkACLSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedACL(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestACL_EntitySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_Entity(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkACL_EntitySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_Entity, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedACL_Entity(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestACL_RegisterFrameworkSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RegisterFramework(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkACL_RegisterFrameworkSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_RegisterFramework, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedACL_RegisterFramework(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestACL_RunTaskSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_RunTask(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkACL_RunTaskSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_RunTask, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedACL_RunTask(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestACL_ShutdownFrameworkSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACL_ShutdownFramework(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkACL_ShutdownFrameworkSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACL_ShutdownFramework, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedACL_ShutdownFramework(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestACLsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedACLs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkACLsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ACLs, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedACLs(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRateLimitSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimit(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRateLimitSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RateLimit, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRateLimit(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRateLimitsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRateLimits(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRateLimitsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RateLimits, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRateLimits(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestVolumeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkVolumeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Volume, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedVolume(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainerInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainerInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainerInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainerInfo_DockerInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainerInfo_DockerInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerInfo_DockerInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainerInfo_DockerInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainerInfo_DockerInfo_PortMappingSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainerInfo_DockerInfo_PortMappingSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainerInfo_DockerInfo_PortMapping, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLabelsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabels(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLabelsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Labels, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLabels(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLabelSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLabel(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLabelSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Label, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLabel(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestPortSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPort(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkPortSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Port, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedPort(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestPortsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedPorts(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkPortsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Ports, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedPorts(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDiscoveryInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDiscoveryInfo(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDiscoveryInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DiscoveryInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDiscoveryInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFrameworkIDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOfferIDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOfferID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSlaveIDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTaskIDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestExecutorIDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainerIDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerID(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFrameworkInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFrameworkInfo_CapabilityStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFrameworkInfo_Capability(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestHealthCheckStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestHealthCheck_HTTPStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedHealthCheck_HTTP(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCommandInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCommandInfo_URIStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_URI(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCommandInfo_ContainerInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCommandInfo_ContainerInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestExecutorInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedExecutorInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMasterInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMasterInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSlaveInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSlaveInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestValueStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestValue_ScalarStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Scalar(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestValue_RangeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Range(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestValue_RangesStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Ranges(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestValue_SetStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Set(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestValue_TextStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedValue_Text(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAttributeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAttribute(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResourceStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResource_ReservationInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_ReservationInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResource_DiskInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResource_DiskInfo_PersistenceStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResource_RevocableInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_RevocableInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTrafficControlStatisticsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTrafficControlStatistics(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResourceStatisticsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceStatistics(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResourceUsageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestResourceUsage_ExecutorStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResourceUsage_Executor(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestPerfStatisticsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPerfStatistics(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestRequestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRequest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOfferStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOffer_OperationStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOffer_Operation_LaunchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Launch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOffer_Operation_ReserveStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Reserve(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOffer_Operation_UnreserveStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOffer_Operation_CreateStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Create(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOffer_Operation_DestroyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOffer_Operation_Destroy(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTaskInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTaskStatusStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTaskStatus(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFiltersStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFilters(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestEnvironmentStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEnvironment(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestEnvironment_VariableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEnvironment_Variable(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &Environment_Variable{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestParameterVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestParameterStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedParameter(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &Parameter{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestParametersVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestParametersStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedParameters(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &Parameters{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCredentialVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestCredentialStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCredential(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &Credential{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestCredentialsVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestCredentialsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCredentials(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &Credentials{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACLVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestACLStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_EntityVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestACL_EntityStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_Entity(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_Entity{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_RegisterFrameworkVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestACL_RegisterFrameworkStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_RegisterFramework(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_RegisterFramework{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_RunTaskVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestACL_RunTaskStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_RunTask(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_RunTask{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACL_ShutdownFrameworkVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestACL_ShutdownFrameworkStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACL_ShutdownFramework(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACL_ShutdownFramework{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestACLsVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestACLsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedACLs(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &ACLs{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRateLimitVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestRateLimitStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRateLimit(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &RateLimit{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestRateLimitsVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestRateLimitsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedRateLimits(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &RateLimits{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestVolumeVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestVolumeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedVolume(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &Volume{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestContainerInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainerInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainerInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfo_DockerInfoVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) +func TestContainerInfo_DockerInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainerInfo_DockerInfo(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } - msg := &ContainerInfo_DockerInfo{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) +} +func TestContainerInfo_DockerInfo_PortMappingStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) +} +func TestLabelsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabels(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } -func TestContainerInfo_DockerInfo_PortMappingVerboseEqual(t *testing6.T) { - popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) - p := NewPopulatedContainerInfo_DockerInfo_PortMapping(popr, false) - data, err := github_com_gogo_protobuf_proto3.Marshal(p) - if err != nil { - panic(err) +func TestLabelStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLabel(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } - msg := &ContainerInfo_DockerInfo_PortMapping{} - if err := github_com_gogo_protobuf_proto3.Unmarshal(data, msg); err != nil { - panic(err) +} +func TestPortStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPort(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) +} +func TestPortsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedPorts(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDiscoveryInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDiscoveryInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) } } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.pb.go index 72d1ef70..7b62a952 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.pb.go @@ -5,12 +5,14 @@ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf type StatusUpdateRecord_Type int32 @@ -71,7 +73,13 @@ type Task struct { // NOTE: Either both the fields must be set or both must be unset. StatusUpdateState *TaskState `protobuf:"varint,9,opt,name=status_update_state,enum=mesosproto.TaskState" json:"status_update_state,omitempty"` StatusUpdateUuid []byte `protobuf:"bytes,10,opt,name=status_update_uuid" json:"status_update_uuid,omitempty"` - XXX_unrecognized []byte `json:"-"` + Labels *Labels `protobuf:"bytes,11,opt,name=labels" json:"labels,omitempty"` + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + Discovery *DiscoveryInfo `protobuf:"bytes,12,opt,name=discovery" json:"discovery,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Task) Reset() { *m = Task{} } @@ -148,33 +156,18 @@ func (m *Task) GetStatusUpdateUuid() []byte { return nil } -// Describes a role, which are used to group frameworks for allocation -// decisions, depending on the allocation policy being used. -// The weight field can be used to indicate forms of priority. -type RoleInfo struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Weight *float64 `protobuf:"fixed64,2,opt,name=weight,def=1" json:"weight,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RoleInfo) Reset() { *m = RoleInfo{} } -func (m *RoleInfo) String() string { return proto.CompactTextString(m) } -func (*RoleInfo) ProtoMessage() {} - -const Default_RoleInfo_Weight float64 = 1 - -func (m *RoleInfo) GetName() string { - if m != nil && m.Name != nil { - return *m.Name +func (m *Task) GetLabels() *Labels { + if m != nil { + return m.Labels } - return "" + return nil } -func (m *RoleInfo) GetWeight() float64 { - if m != nil && m.Weight != nil { - return *m.Weight +func (m *Task) GetDiscovery() *DiscoveryInfo { + if m != nil { + return m.Discovery } - return Default_RoleInfo_Weight + return nil } // TODO(vinod): Create a new UUID message type. @@ -184,7 +177,10 @@ type StatusUpdate struct { SlaveId *SlaveID `protobuf:"bytes,3,opt,name=slave_id" json:"slave_id,omitempty"` Status *TaskStatus `protobuf:"bytes,4,req,name=status" json:"status,omitempty"` Timestamp *float64 `protobuf:"fixed64,5,req,name=timestamp" json:"timestamp,omitempty"` - Uuid []byte `protobuf:"bytes,6,req,name=uuid" json:"uuid,omitempty"` + // This is being deprecated in favor of TaskStatus.uuid. In 0.23.0, + // we set the TaskStatus 'uuid' in the executor driver for all + // retryable status updates. + Uuid []byte `protobuf:"bytes,6,opt,name=uuid" json:"uuid,omitempty"` // This corresponds to the latest state of the task according to the // slave. Note that this state might be different than the state in // 'status' because status update manager queues updates. In other @@ -635,7 +631,8 @@ func (m *ReviveOffersMessage) GetFrameworkId() *FrameworkID { } type RunTaskMessage struct { - FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` + // TODO(karya): Remove framework_id after MESOS-2559 has shipped. + FrameworkId *FrameworkID `protobuf:"bytes,1,opt,name=framework_id" json:"framework_id,omitempty"` Framework *FrameworkInfo `protobuf:"bytes,2,req,name=framework" json:"framework,omitempty"` Pid *string `protobuf:"bytes,3,req,name=pid" json:"pid,omitempty"` Task *TaskInfo `protobuf:"bytes,4,req,name=task" json:"task,omitempty"` @@ -830,6 +827,10 @@ func (m *FrameworkErrorMessage) GetMessage() string { type RegisterSlaveMessage struct { Slave *SlaveInfo `protobuf:"bytes,1,req,name=slave" json:"slave,omitempty"` + // Resources that are checkpointed by the slave (e.g., persistent + // volume or dynamic reservation). Frameworks need to release + // checkpointed resources explicitly. + CheckpointedResources []*Resource `protobuf:"bytes,3,rep,name=checkpointed_resources" json:"checkpointed_resources,omitempty"` // NOTE: This is a hack for the master to detect the slave's // version. If unset the slave is < 0.21.0. // TODO(bmahler): Do proper versioning: MESOS-986. @@ -848,6 +849,13 @@ func (m *RegisterSlaveMessage) GetSlave() *SlaveInfo { return nil } +func (m *RegisterSlaveMessage) GetCheckpointedResources() []*Resource { + if m != nil { + return m.CheckpointedResources + } + return nil +} + func (m *RegisterSlaveMessage) GetVersion() string { if m != nil && m.Version != nil { return *m.Version @@ -856,14 +864,14 @@ func (m *RegisterSlaveMessage) GetVersion() string { } type ReregisterSlaveMessage struct { - // TODO(bmahler): slave_id is deprecated. - // 0.21.0: Now an optional field. Always written, never read. - // 0.22.0: Remove this field. - SlaveId *SlaveID `protobuf:"bytes,1,opt,name=slave_id" json:"slave_id,omitempty"` - Slave *SlaveInfo `protobuf:"bytes,2,req,name=slave" json:"slave,omitempty"` - ExecutorInfos []*ExecutorInfo `protobuf:"bytes,4,rep,name=executor_infos" json:"executor_infos,omitempty"` - Tasks []*Task `protobuf:"bytes,3,rep,name=tasks" json:"tasks,omitempty"` - CompletedFrameworks []*Archive_Framework `protobuf:"bytes,5,rep,name=completed_frameworks" json:"completed_frameworks,omitempty"` + Slave *SlaveInfo `protobuf:"bytes,2,req,name=slave" json:"slave,omitempty"` + // Resources that are checkpointed by the slave (e.g., persistent + // volume or dynamic reservation). Frameworks need to release + // checkpointed resources explicitly. + CheckpointedResources []*Resource `protobuf:"bytes,7,rep,name=checkpointed_resources" json:"checkpointed_resources,omitempty"` + ExecutorInfos []*ExecutorInfo `protobuf:"bytes,4,rep,name=executor_infos" json:"executor_infos,omitempty"` + Tasks []*Task `protobuf:"bytes,3,rep,name=tasks" json:"tasks,omitempty"` + CompletedFrameworks []*Archive_Framework `protobuf:"bytes,5,rep,name=completed_frameworks" json:"completed_frameworks,omitempty"` // NOTE: This is a hack for the master to detect the slave's // version. If unset the slave is < 0.21.0. // TODO(bmahler): Do proper versioning: MESOS-986. @@ -875,16 +883,16 @@ func (m *ReregisterSlaveMessage) Reset() { *m = ReregisterSlaveMessage{} func (m *ReregisterSlaveMessage) String() string { return proto.CompactTextString(m) } func (*ReregisterSlaveMessage) ProtoMessage() {} -func (m *ReregisterSlaveMessage) GetSlaveId() *SlaveID { +func (m *ReregisterSlaveMessage) GetSlave() *SlaveInfo { if m != nil { - return m.SlaveId + return m.Slave } return nil } -func (m *ReregisterSlaveMessage) GetSlave() *SlaveInfo { +func (m *ReregisterSlaveMessage) GetCheckpointedResources() []*Resource { if m != nil { - return m.Slave + return m.CheckpointedResources } return nil } @@ -918,8 +926,9 @@ func (m *ReregisterSlaveMessage) GetVersion() string { } type SlaveRegisteredMessage struct { - SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` + Connection *MasterSlaveConnection `protobuf:"bytes,2,opt,name=connection" json:"connection,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *SlaveRegisteredMessage) Reset() { *m = SlaveRegisteredMessage{} } @@ -933,9 +942,17 @@ func (m *SlaveRegisteredMessage) GetSlaveId() *SlaveID { return nil } +func (m *SlaveRegisteredMessage) GetConnection() *MasterSlaveConnection { + if m != nil { + return m.Connection + } + return nil +} + type SlaveReregisteredMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` Reconciliations []*ReconcileTasksMessage `protobuf:"bytes,2,rep,name=reconciliations" json:"reconciliations,omitempty"` + Connection *MasterSlaveConnection `protobuf:"bytes,3,opt,name=connection" json:"connection,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -957,6 +974,13 @@ func (m *SlaveReregisteredMessage) GetReconciliations() []*ReconcileTasksMessage return nil } +func (m *SlaveReregisteredMessage) GetConnection() *MasterSlaveConnection { + if m != nil { + return m.Connection + } + return nil +} + type UnregisterSlaveMessage struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -973,6 +997,25 @@ func (m *UnregisterSlaveMessage) GetSlaveId() *SlaveID { return nil } +type MasterSlaveConnection struct { + // Product of max_slave_ping_timeouts * slave_ping_timeout. + // If no pings are received within the total timeout, + // the master will remove the slave. + TotalPingTimeoutSeconds *float64 `protobuf:"fixed64,1,opt,name=total_ping_timeout_seconds" json:"total_ping_timeout_seconds,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MasterSlaveConnection) Reset() { *m = MasterSlaveConnection{} } +func (m *MasterSlaveConnection) String() string { return proto.CompactTextString(m) } +func (*MasterSlaveConnection) ProtoMessage() {} + +func (m *MasterSlaveConnection) GetTotalPingTimeoutSeconds() float64 { + if m != nil && m.TotalPingTimeoutSeconds != nil { + return *m.TotalPingTimeoutSeconds + } + return 0 +} + // This message is periodically sent by the master to the slave. // If the slave is connected to the master, "connected" is true. type PingSlaveMessage struct { @@ -1018,16 +1061,34 @@ func (m *ShutdownFrameworkMessage) GetFrameworkId() *FrameworkID { return nil } -// Tells the executor to initiate a shut down by invoking -// Executor::shutdown. +// Tells a slave (and consequently executor) to shutdown an executor. type ShutdownExecutorMessage struct { - XXX_unrecognized []byte `json:"-"` + // TODO(vinod): Make these fields required. These are made optional + // for backwards compatibility between 0.23.0 slave and pre 0.23.0 + // executor driver. + ExecutorId *ExecutorID `protobuf:"bytes,1,opt,name=executor_id" json:"executor_id,omitempty"` + FrameworkId *FrameworkID `protobuf:"bytes,2,opt,name=framework_id" json:"framework_id,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *ShutdownExecutorMessage) Reset() { *m = ShutdownExecutorMessage{} } func (m *ShutdownExecutorMessage) String() string { return proto.CompactTextString(m) } func (*ShutdownExecutorMessage) ProtoMessage() {} +func (m *ShutdownExecutorMessage) GetExecutorId() *ExecutorID { + if m != nil { + return m.ExecutorId + } + return nil +} + +func (m *ShutdownExecutorMessage) GetFrameworkId() *FrameworkID { + if m != nil { + return m.FrameworkId + } + return nil +} + type UpdateFrameworkMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` Pid *string `protobuf:"bytes,2,req,name=pid" json:"pid,omitempty"` @@ -1052,6 +1113,52 @@ func (m *UpdateFrameworkMessage) GetPid() string { return "" } +// This message is sent to the slave whenever there is an update of +// the resources that need to be checkpointed (e.g., persistent volume +// or dynamic reservation). +type CheckpointResourcesMessage struct { + Resources []*Resource `protobuf:"bytes,1,rep,name=resources" json:"resources,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CheckpointResourcesMessage) Reset() { *m = CheckpointResourcesMessage{} } +func (m *CheckpointResourcesMessage) String() string { return proto.CompactTextString(m) } +func (*CheckpointResourcesMessage) ProtoMessage() {} + +func (m *CheckpointResourcesMessage) GetResources() []*Resource { + if m != nil { + return m.Resources + } + return nil +} + +// This message is sent by the slave to the master to inform the +// master about the total amount of oversubscribed (allocated and +// allocatable) resources. +type UpdateSlaveMessage struct { + SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` + OversubscribedResources []*Resource `protobuf:"bytes,2,rep,name=oversubscribed_resources" json:"oversubscribed_resources,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateSlaveMessage) Reset() { *m = UpdateSlaveMessage{} } +func (m *UpdateSlaveMessage) String() string { return proto.CompactTextString(m) } +func (*UpdateSlaveMessage) ProtoMessage() {} + +func (m *UpdateSlaveMessage) GetSlaveId() *SlaveID { + if m != nil { + return m.SlaveId + } + return nil +} + +func (m *UpdateSlaveMessage) GetOversubscribedResources() []*Resource { + if m != nil { + return m.OversubscribedResources + } + return nil +} + type RegisterExecutorMessage struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` ExecutorId *ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` @@ -1260,110 +1367,6 @@ func (m *ShutdownMessage) GetMessage() string { return "" } -type AuthenticateMessage struct { - Pid *string `protobuf:"bytes,1,req,name=pid" json:"pid,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticateMessage) Reset() { *m = AuthenticateMessage{} } -func (m *AuthenticateMessage) String() string { return proto.CompactTextString(m) } -func (*AuthenticateMessage) ProtoMessage() {} - -func (m *AuthenticateMessage) GetPid() string { - if m != nil && m.Pid != nil { - return *m.Pid - } - return "" -} - -type AuthenticationMechanismsMessage struct { - Mechanisms []string `protobuf:"bytes,1,rep,name=mechanisms" json:"mechanisms,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticationMechanismsMessage) Reset() { *m = AuthenticationMechanismsMessage{} } -func (m *AuthenticationMechanismsMessage) String() string { return proto.CompactTextString(m) } -func (*AuthenticationMechanismsMessage) ProtoMessage() {} - -func (m *AuthenticationMechanismsMessage) GetMechanisms() []string { - if m != nil { - return m.Mechanisms - } - return nil -} - -type AuthenticationStartMessage struct { - Mechanism *string `protobuf:"bytes,1,req,name=mechanism" json:"mechanism,omitempty"` - Data *string `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticationStartMessage) Reset() { *m = AuthenticationStartMessage{} } -func (m *AuthenticationStartMessage) String() string { return proto.CompactTextString(m) } -func (*AuthenticationStartMessage) ProtoMessage() {} - -func (m *AuthenticationStartMessage) GetMechanism() string { - if m != nil && m.Mechanism != nil { - return *m.Mechanism - } - return "" -} - -func (m *AuthenticationStartMessage) GetData() string { - if m != nil && m.Data != nil { - return *m.Data - } - return "" -} - -type AuthenticationStepMessage struct { - Data []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticationStepMessage) Reset() { *m = AuthenticationStepMessage{} } -func (m *AuthenticationStepMessage) String() string { return proto.CompactTextString(m) } -func (*AuthenticationStepMessage) ProtoMessage() {} - -func (m *AuthenticationStepMessage) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -type AuthenticationCompletedMessage struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticationCompletedMessage) Reset() { *m = AuthenticationCompletedMessage{} } -func (m *AuthenticationCompletedMessage) String() string { return proto.CompactTextString(m) } -func (*AuthenticationCompletedMessage) ProtoMessage() {} - -type AuthenticationFailedMessage struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticationFailedMessage) Reset() { *m = AuthenticationFailedMessage{} } -func (m *AuthenticationFailedMessage) String() string { return proto.CompactTextString(m) } -func (*AuthenticationFailedMessage) ProtoMessage() {} - -type AuthenticationErrorMessage struct { - Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticationErrorMessage) Reset() { *m = AuthenticationErrorMessage{} } -func (m *AuthenticationErrorMessage) String() string { return proto.CompactTextString(m) } -func (*AuthenticationErrorMessage) ProtoMessage() {} - -func (m *AuthenticationErrorMessage) GetError() string { - if m != nil && m.Error != nil { - return *m.Error - } - return "" -} - // * // Describes Completed Frameworks, etc. for archival. type Archive struct { @@ -1465,86 +1468,24 @@ func (m *TaskHealthStatus) GetConsecutiveFailures() int32 { return 0 } -// Collection of Modules. -type Modules struct { - Libraries []*Modules_Library `protobuf:"bytes,1,rep,name=libraries" json:"libraries,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Modules) Reset() { *m = Modules{} } -func (m *Modules) String() string { return proto.CompactTextString(m) } -func (*Modules) ProtoMessage() {} - -func (m *Modules) GetLibraries() []*Modules_Library { - if m != nil { - return m.Libraries - } - return nil -} - -type Modules_Library struct { - // If "file" contains a slash ("/"), then it is interpreted as a - // (relative or absolute) pathname. Otherwise a standard library - // search is performed. - File *string `protobuf:"bytes,1,opt,name=file" json:"file,omitempty"` - // We will add the proper prefix ("lib") and suffix (".so" for - // Linux and ".dylib" for OS X) to the "name". - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Modules []*Modules_Library_Module `protobuf:"bytes,3,rep,name=modules" json:"modules,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Modules_Library) Reset() { *m = Modules_Library{} } -func (m *Modules_Library) String() string { return proto.CompactTextString(m) } -func (*Modules_Library) ProtoMessage() {} - -func (m *Modules_Library) GetFile() string { - if m != nil && m.File != nil { - return *m.File - } - return "" -} - -func (m *Modules_Library) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Modules_Library) GetModules() []*Modules_Library_Module { - if m != nil { - return m.Modules - } - return nil -} - -type Modules_Library_Module struct { - // Module name. - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Module-specific parameters. - Parameters []*Parameter `protobuf:"bytes,2,rep,name=parameters" json:"parameters,omitempty"` - XXX_unrecognized []byte `json:"-"` +// * +// Message to signal completion of an event within a module. +type HookExecuted struct { + Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` + XXX_unrecognized []byte `json:"-"` } -func (m *Modules_Library_Module) Reset() { *m = Modules_Library_Module{} } -func (m *Modules_Library_Module) String() string { return proto.CompactTextString(m) } -func (*Modules_Library_Module) ProtoMessage() {} +func (m *HookExecuted) Reset() { *m = HookExecuted{} } +func (m *HookExecuted) String() string { return proto.CompactTextString(m) } +func (*HookExecuted) ProtoMessage() {} -func (m *Modules_Library_Module) GetName() string { - if m != nil && m.Name != nil { - return *m.Name +func (m *HookExecuted) GetModule() string { + if m != nil && m.Module != nil { + return *m.Module } return "" } -func (m *Modules_Library_Module) GetParameters() []*Parameter { - if m != nil { - return m.Parameters - } - return nil -} - func init() { proto.RegisterEnum("mesosproto.StatusUpdateRecord_Type", StatusUpdateRecord_Type_name, StatusUpdateRecord_Type_value) } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.proto index 0182f419..d58c99e9 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.proto +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/messages.proto @@ -54,15 +54,14 @@ message Task { // NOTE: Either both the fields must be set or both must be unset. optional TaskState status_update_state = 9; optional bytes status_update_uuid = 10; -} + optional Labels labels = 11; -// Describes a role, which are used to group frameworks for allocation -// decisions, depending on the allocation policy being used. -// The weight field can be used to indicate forms of priority. -message RoleInfo { - required string name = 1; - optional double weight = 2 [default = 1]; + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + optional DiscoveryInfo discovery = 12; } @@ -73,7 +72,11 @@ message StatusUpdate { optional SlaveID slave_id = 3; required TaskStatus status = 4; required double timestamp = 5; - required bytes uuid = 6; + + // This is being deprecated in favor of TaskStatus.uuid. In 0.23.0, + // we set the TaskStatus 'uuid' in the executor driver for all + // retryable status updates. + optional bytes uuid = 6; // This corresponds to the latest state of the task according to the // slave. Note that this state might be different than the state in @@ -188,7 +191,8 @@ message ReviveOffersMessage { message RunTaskMessage { - required FrameworkID framework_id = 1; + // TODO(karya): Remove framework_id after MESOS-2559 has shipped. + optional FrameworkID framework_id = 1 [deprecated = true]; required FrameworkInfo framework = 2; required string pid = 3; required TaskInfo task = 4; @@ -244,6 +248,11 @@ message FrameworkErrorMessage { message RegisterSlaveMessage { required SlaveInfo slave = 1; + // Resources that are checkpointed by the slave (e.g., persistent + // volume or dynamic reservation). Frameworks need to release + // checkpointed resources explicitly. + repeated Resource checkpointed_resources = 3; + // NOTE: This is a hack for the master to detect the slave's // version. If unset the slave is < 0.21.0. // TODO(bmahler): Do proper versioning: MESOS-986. @@ -252,11 +261,13 @@ message RegisterSlaveMessage { message ReregisterSlaveMessage { - // TODO(bmahler): slave_id is deprecated. - // 0.21.0: Now an optional field. Always written, never read. - // 0.22.0: Remove this field. - optional SlaveID slave_id = 1; required SlaveInfo slave = 2; + + // Resources that are checkpointed by the slave (e.g., persistent + // volume or dynamic reservation). Frameworks need to release + // checkpointed resources explicitly. + repeated Resource checkpointed_resources = 7; + repeated ExecutorInfo executor_infos = 4; repeated Task tasks = 3; repeated Archive.Framework completed_frameworks = 5; @@ -270,6 +281,7 @@ message ReregisterSlaveMessage { message SlaveRegisteredMessage { required SlaveID slave_id = 1; + optional MasterSlaveConnection connection = 2; } @@ -277,6 +289,7 @@ message SlaveReregisteredMessage { required SlaveID slave_id = 1; repeated ReconcileTasksMessage reconciliations = 2; + optional MasterSlaveConnection connection = 3; } @@ -285,6 +298,14 @@ message UnregisterSlaveMessage { } +message MasterSlaveConnection { + // Product of max_slave_ping_timeouts * slave_ping_timeout. + // If no pings are received within the total timeout, + // the master will remove the slave. + optional double total_ping_timeout_seconds = 1; +} + + // This message is periodically sent by the master to the slave. // If the slave is connected to the master, "connected" is true. message PingSlaveMessage { @@ -303,9 +324,14 @@ message ShutdownFrameworkMessage { } -// Tells the executor to initiate a shut down by invoking -// Executor::shutdown. -message ShutdownExecutorMessage {} +// Tells a slave (and consequently executor) to shutdown an executor. +message ShutdownExecutorMessage { + // TODO(vinod): Make these fields required. These are made optional + // for backwards compatibility between 0.23.0 slave and pre 0.23.0 + // executor driver. + optional ExecutorID executor_id = 1; + optional FrameworkID framework_id = 2; +} message UpdateFrameworkMessage { @@ -314,6 +340,23 @@ message UpdateFrameworkMessage { } +// This message is sent to the slave whenever there is an update of +// the resources that need to be checkpointed (e.g., persistent volume +// or dynamic reservation). +message CheckpointResourcesMessage { + repeated Resource resources = 1; +} + + +// This message is sent by the slave to the master to inform the +// master about the total amount of oversubscribed (allocated and +// allocatable) resources. +message UpdateSlaveMessage { + required SlaveID slave_id = 1; + repeated Resource oversubscribed_resources = 2; +} + + message RegisterExecutorMessage { required FrameworkID framework_id = 1; required ExecutorID executor_id = 2; @@ -361,38 +404,6 @@ message ShutdownMessage { } -message AuthenticateMessage { - required string pid = 1; // PID that needs to be authenticated. -} - - -message AuthenticationMechanismsMessage { - repeated string mechanisms = 1; // List of available SASL mechanisms. -} - - -message AuthenticationStartMessage { - required string mechanism = 1; - optional string data = 2; -} - - -message AuthenticationStepMessage { - required bytes data = 1; -} - - -message AuthenticationCompletedMessage {} - - -message AuthenticationFailedMessage {} - - -message AuthenticationErrorMessage { - optional string error = 1; -} - - // TODO(adam-mesos): Move this to an 'archive' package. /** * Describes Completed Frameworks, etc. for archival. @@ -426,28 +437,9 @@ message TaskHealthStatus { } -// Collection of Modules. -message Modules { - message Library { - // If "file" contains a slash ("/"), then it is interpreted as a - // (relative or absolute) pathname. Otherwise a standard library - // search is performed. - optional string file = 1; - - // We will add the proper prefix ("lib") and suffix (".so" for - // Linux and ".dylib" for OS X) to the "name". - optional string name = 2; - - message Module { - // Module name. - optional string name = 1; - - // Module-specific parameters. - repeated Parameter parameters = 2; - } - - repeated Module modules = 3; - } - - repeated Library libraries = 1; +/** + * Message to signal completion of an event within a module. + */ +message HookExecuted { + optional string module = 1; } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.pb.go index 77e78223..0157ec37 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/registry.pb.go @@ -5,12 +5,14 @@ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf type Registry struct { @@ -86,6 +88,3 @@ func (m *Registry_Slaves) GetSlaves() []*Registry_Slave { } return nil } - -func init() { -} diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.pb.go index f90c727a..29a56ce1 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.pb.go @@ -5,12 +5,14 @@ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf // Possible event types, followed by message definitions if @@ -18,35 +20,32 @@ var _ = math.Inf type Event_Type int32 const ( - Event_REGISTERED Event_Type = 1 - Event_REREGISTERED Event_Type = 2 - Event_OFFERS Event_Type = 3 - Event_RESCIND Event_Type = 4 - Event_UPDATE Event_Type = 5 - Event_MESSAGE Event_Type = 6 - Event_FAILURE Event_Type = 7 - Event_ERROR Event_Type = 8 + Event_SUBSCRIBED Event_Type = 1 + Event_OFFERS Event_Type = 2 + Event_RESCIND Event_Type = 3 + Event_UPDATE Event_Type = 4 + Event_MESSAGE Event_Type = 5 + Event_FAILURE Event_Type = 6 + Event_ERROR Event_Type = 7 ) var Event_Type_name = map[int32]string{ - 1: "REGISTERED", - 2: "REREGISTERED", - 3: "OFFERS", - 4: "RESCIND", - 5: "UPDATE", - 6: "MESSAGE", - 7: "FAILURE", - 8: "ERROR", + 1: "SUBSCRIBED", + 2: "OFFERS", + 3: "RESCIND", + 4: "UPDATE", + 5: "MESSAGE", + 6: "FAILURE", + 7: "ERROR", } var Event_Type_value = map[string]int32{ - "REGISTERED": 1, - "REREGISTERED": 2, - "OFFERS": 3, - "RESCIND": 4, - "UPDATE": 5, - "MESSAGE": 6, - "FAILURE": 7, - "ERROR": 8, + "SUBSCRIBED": 1, + "OFFERS": 2, + "RESCIND": 3, + "UPDATE": 4, + "MESSAGE": 5, + "FAILURE": 6, + "ERROR": 7, } func (x Event_Type) Enum() *Event_Type { @@ -71,44 +70,41 @@ func (x *Event_Type) UnmarshalJSON(data []byte) error { type Call_Type int32 const ( - Call_REGISTER Call_Type = 1 - Call_REREGISTER Call_Type = 2 - Call_UNREGISTER Call_Type = 3 - Call_REQUEST Call_Type = 4 - Call_DECLINE Call_Type = 5 - Call_REVIVE Call_Type = 6 - Call_LAUNCH Call_Type = 7 - Call_KILL Call_Type = 8 - Call_ACKNOWLEDGE Call_Type = 9 - Call_RECONCILE Call_Type = 10 - Call_MESSAGE Call_Type = 11 + Call_SUBSCRIBE Call_Type = 1 + Call_TEARDOWN Call_Type = 2 + Call_ACCEPT Call_Type = 3 + Call_DECLINE Call_Type = 4 + Call_REVIVE Call_Type = 5 + Call_KILL Call_Type = 6 + Call_SHUTDOWN Call_Type = 7 + Call_ACKNOWLEDGE Call_Type = 8 + Call_RECONCILE Call_Type = 9 + Call_MESSAGE Call_Type = 10 ) var Call_Type_name = map[int32]string{ - 1: "REGISTER", - 2: "REREGISTER", - 3: "UNREGISTER", - 4: "REQUEST", - 5: "DECLINE", - 6: "REVIVE", - 7: "LAUNCH", - 8: "KILL", - 9: "ACKNOWLEDGE", - 10: "RECONCILE", - 11: "MESSAGE", + 1: "SUBSCRIBE", + 2: "TEARDOWN", + 3: "ACCEPT", + 4: "DECLINE", + 5: "REVIVE", + 6: "KILL", + 7: "SHUTDOWN", + 8: "ACKNOWLEDGE", + 9: "RECONCILE", + 10: "MESSAGE", } var Call_Type_value = map[string]int32{ - "REGISTER": 1, - "REREGISTER": 2, - "UNREGISTER": 3, - "REQUEST": 4, - "DECLINE": 5, - "REVIVE": 6, - "LAUNCH": 7, - "KILL": 8, - "ACKNOWLEDGE": 9, - "RECONCILE": 10, - "MESSAGE": 11, + "SUBSCRIBE": 1, + "TEARDOWN": 2, + "ACCEPT": 3, + "DECLINE": 4, + "REVIVE": 5, + "KILL": 6, + "SHUTDOWN": 7, + "ACKNOWLEDGE": 8, + "RECONCILE": 9, + "MESSAGE": 10, } func (x Call_Type) Enum() *Call_Type { @@ -129,23 +125,23 @@ func (x *Call_Type) UnmarshalJSON(data []byte) error { } // * -// Low-level scheduler event API. +// Scheduler event API. // // An event is described using the standard protocol buffer "union" -// trick, see https://developers.google.com/protocol-buffers/docs/techniques#union. +// trick, see: +// https://developers.google.com/protocol-buffers/docs/techniques#union. type Event struct { // Type of the event, indicates which optional field below should be // present if that type has a nested message definition. - Type *Event_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Event_Type" json:"type,omitempty"` - Registered *Event_Registered `protobuf:"bytes,2,opt,name=registered" json:"registered,omitempty"` - Reregistered *Event_Reregistered `protobuf:"bytes,3,opt,name=reregistered" json:"reregistered,omitempty"` - Offers *Event_Offers `protobuf:"bytes,4,opt,name=offers" json:"offers,omitempty"` - Rescind *Event_Rescind `protobuf:"bytes,5,opt,name=rescind" json:"rescind,omitempty"` - Update *Event_Update `protobuf:"bytes,6,opt,name=update" json:"update,omitempty"` - Message *Event_Message `protobuf:"bytes,7,opt,name=message" json:"message,omitempty"` - Failure *Event_Failure `protobuf:"bytes,8,opt,name=failure" json:"failure,omitempty"` - Error *Event_Error `protobuf:"bytes,9,opt,name=error" json:"error,omitempty"` - XXX_unrecognized []byte `json:"-"` + Type *Event_Type `protobuf:"varint,1,req,name=type,enum=mesosproto.Event_Type" json:"type,omitempty"` + Subscribed *Event_Subscribed `protobuf:"bytes,2,opt,name=subscribed" json:"subscribed,omitempty"` + Offers *Event_Offers `protobuf:"bytes,3,opt,name=offers" json:"offers,omitempty"` + Rescind *Event_Rescind `protobuf:"bytes,4,opt,name=rescind" json:"rescind,omitempty"` + Update *Event_Update `protobuf:"bytes,5,opt,name=update" json:"update,omitempty"` + Message *Event_Message `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"` + Failure *Event_Failure `protobuf:"bytes,7,opt,name=failure" json:"failure,omitempty"` + Error *Event_Error `protobuf:"bytes,8,opt,name=error" json:"error,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Event) Reset() { *m = Event{} } @@ -156,19 +152,12 @@ func (m *Event) GetType() Event_Type { if m != nil && m.Type != nil { return *m.Type } - return Event_REGISTERED -} - -func (m *Event) GetRegistered() *Event_Registered { - if m != nil { - return m.Registered - } - return nil + return Event_SUBSCRIBED } -func (m *Event) GetReregistered() *Event_Reregistered { +func (m *Event) GetSubscribed() *Event_Subscribed { if m != nil { - return m.Reregistered + return m.Subscribed } return nil } @@ -215,54 +204,27 @@ func (m *Event) GetError() *Event_Error { return nil } -type Event_Registered struct { +// First event received when the scheduler subscribes. +type Event_Subscribed struct { FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` - MasterInfo *MasterInfo `protobuf:"bytes,2,req,name=master_info" json:"master_info,omitempty"` XXX_unrecognized []byte `json:"-"` } -func (m *Event_Registered) Reset() { *m = Event_Registered{} } -func (m *Event_Registered) String() string { return proto.CompactTextString(m) } -func (*Event_Registered) ProtoMessage() {} +func (m *Event_Subscribed) Reset() { *m = Event_Subscribed{} } +func (m *Event_Subscribed) String() string { return proto.CompactTextString(m) } +func (*Event_Subscribed) ProtoMessage() {} -func (m *Event_Registered) GetFrameworkId() *FrameworkID { +func (m *Event_Subscribed) GetFrameworkId() *FrameworkID { if m != nil { return m.FrameworkId } return nil } -func (m *Event_Registered) GetMasterInfo() *MasterInfo { - if m != nil { - return m.MasterInfo - } - return nil -} - -type Event_Reregistered struct { - FrameworkId *FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"` - MasterInfo *MasterInfo `protobuf:"bytes,2,req,name=master_info" json:"master_info,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Event_Reregistered) Reset() { *m = Event_Reregistered{} } -func (m *Event_Reregistered) String() string { return proto.CompactTextString(m) } -func (*Event_Reregistered) ProtoMessage() {} - -func (m *Event_Reregistered) GetFrameworkId() *FrameworkID { - if m != nil { - return m.FrameworkId - } - return nil -} - -func (m *Event_Reregistered) GetMasterInfo() *MasterInfo { - if m != nil { - return m.MasterInfo - } - return nil -} - +// Received whenever there are new resources that are offered to the +// scheduler. Each offer corresponds to a set of resources on a +// slave. Until the scheduler accepts or declines an offer the +// resources are considered allocated to the scheduler. type Event_Offers struct { Offers []*Offer `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -279,6 +241,10 @@ func (m *Event_Offers) GetOffers() []*Offer { return nil } +// Received when a particular offer is no longer valid (e.g., the +// slave corresponding to the offer has been removed) and hence +// needs to be rescinded. Any future calls ('Accept' / 'Decline') made +// by the scheduler regarding this offer will be invalid. type Event_Rescind struct { OfferId *OfferID `protobuf:"bytes,1,req,name=offer_id" json:"offer_id,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -295,9 +261,17 @@ func (m *Event_Rescind) GetOfferId() *OfferID { return nil } +// Received whenever there is a status update that is generated by +// the executor or slave or master. Status updates should be used by +// executors to reliably communicate the status of the tasks that +// they manage. It is crucial that a terminal update (see TaskState +// in mesos.proto) is sent by the executor as soon as the task +// terminates, in order for Mesos to release the resources allocated +// to the task. It is also the responsibility of the scheduler to +// explicitly acknowledge the receipt of a status update. See +// 'Acknowledge' in the 'Call' section below for the semantics. type Event_Update struct { - Uuid []byte `protobuf:"bytes,1,req,name=uuid" json:"uuid,omitempty"` - Status *TaskStatus `protobuf:"bytes,2,req,name=status" json:"status,omitempty"` + Status *TaskStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -305,13 +279,6 @@ func (m *Event_Update) Reset() { *m = Event_Update{} } func (m *Event_Update) String() string { return proto.CompactTextString(m) } func (*Event_Update) ProtoMessage() {} -func (m *Event_Update) GetUuid() []byte { - if m != nil { - return m.Uuid - } - return nil -} - func (m *Event_Update) GetStatus() *TaskStatus { if m != nil { return m.Status @@ -319,6 +286,11 @@ func (m *Event_Update) GetStatus() *TaskStatus { return nil } +// Received when a custom message generated by the executor is +// forwarded by the master. Note that this message is not +// interpreted by Mesos and is only forwarded (without reliability +// guarantees) to the scheduler. It is up to the executor to retry +// if the message is dropped for any reason. type Event_Message struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` ExecutorId *ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` @@ -351,6 +323,16 @@ func (m *Event_Message) GetData() []byte { return nil } +// Received when a slave is removed from the cluster (e.g., failed +// health checks) or when an executor is terminated. Note that, this +// event coincides with receipt of terminal UPDATE events for any +// active tasks belonging to the slave or executor and receipt of +// 'Rescind' events for any outstanding offers belonging to the +// slave. Note that there is no guaranteed order between the +// 'Failure', 'Update' and 'Rescind' events when a slave or executor +// is removed. +// TODO(vinod): Consider splitting the lost slave and terminated +// executor into separate events and ensure it's reliably generated. type Event_Failure struct { SlaveId *SlaveID `protobuf:"bytes,1,opt,name=slave_id" json:"slave_id,omitempty"` // If this was just a failure of an executor on a slave then @@ -386,6 +368,13 @@ func (m *Event_Failure) GetStatus() int32 { return 0 } +// Received when an invalid framework (e.g., unauthenticated, +// unauthorized) attempts to subscribe with the master. Error can +// also be received if scheduler sends invalid Calls (e.g., not +// properly initialized). +// TODO(vinod): Remove this once the old scheduler driver is no +// longer supported. With HTTP API all errors will be signaled via +// HTTP response codes. type Event_Error struct { Message *string `protobuf:"bytes,1,req,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` @@ -403,25 +392,29 @@ func (m *Event_Error) GetMessage() string { } // * -// Low-level scheduler call API. +// Scheduler call API. // // Like Event, a Call is described using the standard protocol buffer // "union" trick (see above). type Call struct { - // Identifies who generated this call. Always necessary, but the - // only thing that needs to be set for certain calls, e.g., - // REGISTER, REREGISTER, and UNREGISTER. - FrameworkInfo *FrameworkInfo `protobuf:"bytes,1,req,name=framework_info" json:"framework_info,omitempty"` + // Identifies who generated this call. Master assigns a framework id + // when a new scheduler subscribes for the first time. Once assigned, + // the scheduler must set the 'framework_id' here and within its + // FrameworkInfo (in any further 'Subscribe' calls). This allows the + // master to identify a scheduler correctly across disconnections, + // failovers, etc. + FrameworkId *FrameworkID `protobuf:"bytes,1,opt,name=framework_id" json:"framework_id,omitempty"` // Type of the call, indicates which optional field below should be // present if that type has a nested message definition. Type *Call_Type `protobuf:"varint,2,req,name=type,enum=mesosproto.Call_Type" json:"type,omitempty"` - Request *Call_Request `protobuf:"bytes,3,opt,name=request" json:"request,omitempty"` - Decline *Call_Decline `protobuf:"bytes,4,opt,name=decline" json:"decline,omitempty"` - Launch *Call_Launch `protobuf:"bytes,5,opt,name=launch" json:"launch,omitempty"` + Subscribe *Call_Subscribe `protobuf:"bytes,3,opt,name=subscribe" json:"subscribe,omitempty"` + Accept *Call_Accept `protobuf:"bytes,4,opt,name=accept" json:"accept,omitempty"` + Decline *Call_Decline `protobuf:"bytes,5,opt,name=decline" json:"decline,omitempty"` Kill *Call_Kill `protobuf:"bytes,6,opt,name=kill" json:"kill,omitempty"` - Acknowledge *Call_Acknowledge `protobuf:"bytes,7,opt,name=acknowledge" json:"acknowledge,omitempty"` - Reconcile *Call_Reconcile `protobuf:"bytes,8,opt,name=reconcile" json:"reconcile,omitempty"` - Message *Call_Message `protobuf:"bytes,9,opt,name=message" json:"message,omitempty"` + Shutdown *Call_Shutdown `protobuf:"bytes,7,opt,name=shutdown" json:"shutdown,omitempty"` + Acknowledge *Call_Acknowledge `protobuf:"bytes,8,opt,name=acknowledge" json:"acknowledge,omitempty"` + Reconcile *Call_Reconcile `protobuf:"bytes,9,opt,name=reconcile" json:"reconcile,omitempty"` + Message *Call_Message `protobuf:"bytes,10,opt,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -429,9 +422,9 @@ func (m *Call) Reset() { *m = Call{} } func (m *Call) String() string { return proto.CompactTextString(m) } func (*Call) ProtoMessage() {} -func (m *Call) GetFrameworkInfo() *FrameworkInfo { +func (m *Call) GetFrameworkId() *FrameworkID { if m != nil { - return m.FrameworkInfo + return m.FrameworkId } return nil } @@ -440,26 +433,26 @@ func (m *Call) GetType() Call_Type { if m != nil && m.Type != nil { return *m.Type } - return Call_REGISTER + return Call_SUBSCRIBE } -func (m *Call) GetRequest() *Call_Request { +func (m *Call) GetSubscribe() *Call_Subscribe { if m != nil { - return m.Request + return m.Subscribe } return nil } -func (m *Call) GetDecline() *Call_Decline { +func (m *Call) GetAccept() *Call_Accept { if m != nil { - return m.Decline + return m.Accept } return nil } -func (m *Call) GetLaunch() *Call_Launch { +func (m *Call) GetDecline() *Call_Decline { if m != nil { - return m.Launch + return m.Decline } return nil } @@ -471,6 +464,13 @@ func (m *Call) GetKill() *Call_Kill { return nil } +func (m *Call) GetShutdown() *Call_Shutdown { + if m != nil { + return m.Shutdown + } + return nil +} + func (m *Call) GetAcknowledge() *Call_Acknowledge { if m != nil { return m.Acknowledge @@ -492,22 +492,105 @@ func (m *Call) GetMessage() *Call_Message { return nil } -type Call_Request struct { - Requests []*Request `protobuf:"bytes,1,rep,name=requests" json:"requests,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Subscribes the scheduler with the master to receive events. A +// scheduler must send other calls only after it has received the +// SUBCRIBED event. +type Call_Subscribe struct { + // See the comments below on 'framework_id' on the semantics for + // 'framework_info.id'. + FrameworkInfo *FrameworkInfo `protobuf:"bytes,1,req,name=framework_info" json:"framework_info,omitempty"` + // 'force' field is only relevant when 'framework_info.id' is set. + // It tells the master what to do in case an instance of the + // scheduler attempts to subscribe when another instance of it is + // already connected (e.g., split brain due to network partition). + // If 'force' is true, this scheduler instance is allowed and the + // old connected scheduler instance is disconnected. If false, + // this scheduler instance is disallowed subscription in favor of + // the already connected scheduler instance. + // + // It is recommended to set this to true only when a newly elected + // scheduler instance is attempting to subscribe but not when a + // scheduler is retrying subscription (e.g., disconnection or + // master failover; see sched/sched.cpp for an example). + Force *bool `protobuf:"varint,2,opt,name=force" json:"force,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Call_Subscribe) Reset() { *m = Call_Subscribe{} } +func (m *Call_Subscribe) String() string { return proto.CompactTextString(m) } +func (*Call_Subscribe) ProtoMessage() {} + +func (m *Call_Subscribe) GetFrameworkInfo() *FrameworkInfo { + if m != nil { + return m.FrameworkInfo + } + return nil +} + +func (m *Call_Subscribe) GetForce() bool { + if m != nil && m.Force != nil { + return *m.Force + } + return false +} + +// Accepts an offer, performing the specified operations +// in a sequential manner. +// +// E.g. Launch a task with a newly reserved persistent volume: +// +// Accept { +// offer_ids: [ ... ] +// operations: [ +// { type: RESERVE, +// reserve: { resources: [ disk(role):2 ] } } +// { type: CREATE, +// create: { volumes: [ disk(role):1+persistence ] } } +// { type: LAUNCH, +// launch: { task_infos ... disk(role):1;disk(role):1+persistence } } +// ] +// } +// +// Note that any of the offer’s resources not used in the 'Accept' +// call (e.g., to launch a task) are considered unused and might be +// reoffered to other frameworks. In other words, the same OfferID +// cannot be used in more than one 'Accept' call. +type Call_Accept struct { + OfferIds []*OfferID `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"` + Operations []*Offer_Operation `protobuf:"bytes,2,rep,name=operations" json:"operations,omitempty"` + Filters *Filters `protobuf:"bytes,3,opt,name=filters" json:"filters,omitempty"` + XXX_unrecognized []byte `json:"-"` } -func (m *Call_Request) Reset() { *m = Call_Request{} } -func (m *Call_Request) String() string { return proto.CompactTextString(m) } -func (*Call_Request) ProtoMessage() {} +func (m *Call_Accept) Reset() { *m = Call_Accept{} } +func (m *Call_Accept) String() string { return proto.CompactTextString(m) } +func (*Call_Accept) ProtoMessage() {} + +func (m *Call_Accept) GetOfferIds() []*OfferID { + if m != nil { + return m.OfferIds + } + return nil +} -func (m *Call_Request) GetRequests() []*Request { +func (m *Call_Accept) GetOperations() []*Offer_Operation { if m != nil { - return m.Requests + return m.Operations } return nil } +func (m *Call_Accept) GetFilters() *Filters { + if m != nil { + return m.Filters + } + return nil +} + +// Declines an offer, signaling the master to potentially reoffer +// the resources to a different framework. Note that this is same +// as sending an Accept call with no operations. See comments on +// top of 'Accept' for semantics. type Call_Decline struct { OfferIds []*OfferID `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"` Filters *Filters `protobuf:"bytes,2,opt,name=filters" json:"filters,omitempty"` @@ -532,54 +615,73 @@ func (m *Call_Decline) GetFilters() *Filters { return nil } -type Call_Launch struct { - TaskInfos []*TaskInfo `protobuf:"bytes,1,rep,name=task_infos" json:"task_infos,omitempty"` - OfferIds []*OfferID `protobuf:"bytes,2,rep,name=offer_ids" json:"offer_ids,omitempty"` - Filters *Filters `protobuf:"bytes,3,opt,name=filters" json:"filters,omitempty"` - XXX_unrecognized []byte `json:"-"` +// Kills a specific task. If the scheduler has a custom executor, +// the kill is forwarded to the executor and it is up to the +// executor to kill the task and send a TASK_KILLED (or TASK_FAILED) +// update. Note that Mesos releases the resources for a task once it +// receives a terminal update (See TaskState in mesos.proto) for it. +// If the task is unknown to the master, a TASK_LOST update is +// generated. +type Call_Kill struct { + TaskId *TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` + SlaveId *SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"` + XXX_unrecognized []byte `json:"-"` } -func (m *Call_Launch) Reset() { *m = Call_Launch{} } -func (m *Call_Launch) String() string { return proto.CompactTextString(m) } -func (*Call_Launch) ProtoMessage() {} +func (m *Call_Kill) Reset() { *m = Call_Kill{} } +func (m *Call_Kill) String() string { return proto.CompactTextString(m) } +func (*Call_Kill) ProtoMessage() {} -func (m *Call_Launch) GetTaskInfos() []*TaskInfo { +func (m *Call_Kill) GetTaskId() *TaskID { if m != nil { - return m.TaskInfos + return m.TaskId } return nil } -func (m *Call_Launch) GetOfferIds() []*OfferID { +func (m *Call_Kill) GetSlaveId() *SlaveID { if m != nil { - return m.OfferIds + return m.SlaveId } return nil } -func (m *Call_Launch) GetFilters() *Filters { +// Shuts down a custom executor. When the executor gets a shutdown +// event, it is expected to kill all its tasks (and send TASK_KILLED +// updates) and terminate. If the executor doesn’t terminate within +// a certain timeout (configurable via +// '--executor_shutdown_grace_period' slave flag), the slave will +// forcefully destroy the container (executor and its tasks) and +// transition its active tasks to TASK_LOST. +type Call_Shutdown struct { + ExecutorId *ExecutorID `protobuf:"bytes,1,req,name=executor_id" json:"executor_id,omitempty"` + SlaveId *SlaveID `protobuf:"bytes,2,req,name=slave_id" json:"slave_id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Call_Shutdown) Reset() { *m = Call_Shutdown{} } +func (m *Call_Shutdown) String() string { return proto.CompactTextString(m) } +func (*Call_Shutdown) ProtoMessage() {} + +func (m *Call_Shutdown) GetExecutorId() *ExecutorID { if m != nil { - return m.Filters + return m.ExecutorId } return nil } -type Call_Kill struct { - TaskId *TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Call_Kill) Reset() { *m = Call_Kill{} } -func (m *Call_Kill) String() string { return proto.CompactTextString(m) } -func (*Call_Kill) ProtoMessage() {} - -func (m *Call_Kill) GetTaskId() *TaskID { +func (m *Call_Shutdown) GetSlaveId() *SlaveID { if m != nil { - return m.TaskId + return m.SlaveId } return nil } +// Acknowledges the receipt of status update. Schedulers are +// responsible for explicitly acknowledging the receipt of status +// updates that have 'Update.status().uuid()' field set. Such status +// updates are retried by the slave until they are acknowledged by +// the scheduler. type Call_Acknowledge struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` TaskId *TaskID `protobuf:"bytes,2,req,name=task_id" json:"task_id,omitempty"` @@ -612,30 +714,56 @@ func (m *Call_Acknowledge) GetUuid() []byte { return nil } -// Allows the framework to query the status for non-terminal tasks. +// Allows the scheduler to query the status for non-terminal tasks. // This causes the master to send back the latest task status for -// each task in 'statuses', if possible. Tasks that are no longer -// known will result in a TASK_LOST update. If statuses is empty, -// then the master will send the latest status for each task -// currently known. -// TODO(bmahler): Add a guiding document for reconciliation or -// document reconciliation in-depth here. +// each task in 'tasks', if possible. Tasks that are no longer known +// will result in a TASK_LOST update. If 'statuses' is empty, then +// the master will send the latest status for each task currently +// known. type Call_Reconcile struct { - Statuses []*TaskStatus `protobuf:"bytes,1,rep,name=statuses" json:"statuses,omitempty"` - XXX_unrecognized []byte `json:"-"` + Tasks []*Call_Reconcile_Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Call_Reconcile) Reset() { *m = Call_Reconcile{} } func (m *Call_Reconcile) String() string { return proto.CompactTextString(m) } func (*Call_Reconcile) ProtoMessage() {} -func (m *Call_Reconcile) GetStatuses() []*TaskStatus { +func (m *Call_Reconcile) GetTasks() []*Call_Reconcile_Task { + if m != nil { + return m.Tasks + } + return nil +} + +// TODO(vinod): Support arbitrary queries than just state of tasks. +type Call_Reconcile_Task struct { + TaskId *TaskID `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"` + SlaveId *SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Call_Reconcile_Task) Reset() { *m = Call_Reconcile_Task{} } +func (m *Call_Reconcile_Task) String() string { return proto.CompactTextString(m) } +func (*Call_Reconcile_Task) ProtoMessage() {} + +func (m *Call_Reconcile_Task) GetTaskId() *TaskID { if m != nil { - return m.Statuses + return m.TaskId + } + return nil +} + +func (m *Call_Reconcile_Task) GetSlaveId() *SlaveID { + if m != nil { + return m.SlaveId } return nil } +// Sends arbitrary binary data to the executor. Note that Mesos +// neither interprets this data nor makes any guarantees about the +// delivery of this message to the executor. type Call_Message struct { SlaveId *SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"` ExecutorId *ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"` diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.proto b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.proto index 6117bb12..dfa20500 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.proto +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/scheduler.proto @@ -23,54 +23,80 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto"; /** - * Low-level scheduler event API. + * Scheduler event API. * * An event is described using the standard protocol buffer "union" - * trick, see https://developers.google.com/protocol-buffers/docs/techniques#union. + * trick, see: + * https://developers.google.com/protocol-buffers/docs/techniques#union. */ message Event { // Possible event types, followed by message definitions if // applicable. enum Type { - REGISTERED = 1; - REREGISTERED = 2; - OFFERS = 3; - RESCIND = 4; - UPDATE = 5; - MESSAGE = 6; - FAILURE = 7; - ERROR = 8; + SUBSCRIBED = 1; // See 'Subscribed' below. + OFFERS = 2; // See 'Offers' below. + RESCIND = 3; // See 'Rescind' below. + UPDATE = 4; // See 'Update' below. + MESSAGE = 5; // See 'Message' below. + FAILURE = 6; // See 'Failure' below. + ERROR = 7; // See 'Error' below. } - message Registered { + // First event received when the scheduler subscribes. + message Subscribed { required FrameworkID framework_id = 1; - required MasterInfo master_info = 2; - } - - message Reregistered { - required FrameworkID framework_id = 1; - required MasterInfo master_info = 2; } + // Received whenever there are new resources that are offered to the + // scheduler. Each offer corresponds to a set of resources on a + // slave. Until the scheduler accepts or declines an offer the + // resources are considered allocated to the scheduler. message Offers { repeated Offer offers = 1; } + // Received when a particular offer is no longer valid (e.g., the + // slave corresponding to the offer has been removed) and hence + // needs to be rescinded. Any future calls ('Accept' / 'Decline') made + // by the scheduler regarding this offer will be invalid. message Rescind { required OfferID offer_id = 1; } + // Received whenever there is a status update that is generated by + // the executor or slave or master. Status updates should be used by + // executors to reliably communicate the status of the tasks that + // they manage. It is crucial that a terminal update (see TaskState + // in mesos.proto) is sent by the executor as soon as the task + // terminates, in order for Mesos to release the resources allocated + // to the task. It is also the responsibility of the scheduler to + // explicitly acknowledge the receipt of a status update. See + // 'Acknowledge' in the 'Call' section below for the semantics. message Update { - required bytes uuid = 1; // TODO(benh): Replace with UpdateID. - required TaskStatus status = 2; + required TaskStatus status = 1; } + // Received when a custom message generated by the executor is + // forwarded by the master. Note that this message is not + // interpreted by Mesos and is only forwarded (without reliability + // guarantees) to the scheduler. It is up to the executor to retry + // if the message is dropped for any reason. message Message { required SlaveID slave_id = 1; required ExecutorID executor_id = 2; required bytes data = 3; } + // Received when a slave is removed from the cluster (e.g., failed + // health checks) or when an executor is terminated. Note that, this + // event coincides with receipt of terminal UPDATE events for any + // active tasks belonging to the slave or executor and receipt of + // 'Rescind' events for any outstanding offers belonging to the + // slave. Note that there is no guaranteed order between the + // 'Failure', 'Update' and 'Rescind' events when a slave or executor + // is removed. + // TODO(vinod): Consider splitting the lost slave and terminated + // executor into separate events and ensure it's reliably generated. message Failure { optional SlaveID slave_id = 1; @@ -81,29 +107,33 @@ message Event { optional int32 status = 3; } + // Received when an invalid framework (e.g., unauthenticated, + // unauthorized) attempts to subscribe with the master. Error can + // also be received if scheduler sends invalid Calls (e.g., not + // properly initialized). + // TODO(vinod): Remove this once the old scheduler driver is no + // longer supported. With HTTP API all errors will be signaled via + // HTTP response codes. message Error { required string message = 1; } - // TODO(benh): Add a 'from' or 'sender'. - // Type of the event, indicates which optional field below should be // present if that type has a nested message definition. required Type type = 1; - optional Registered registered = 2; - optional Reregistered reregistered = 3; - optional Offers offers = 4; - optional Rescind rescind = 5; - optional Update update = 6; - optional Message message = 7; - optional Failure failure = 8; - optional Error error = 9; + optional Subscribed subscribed = 2; + optional Offers offers = 3; + optional Rescind rescind = 4; + optional Update update = 5; + optional Message message = 6; + optional Failure failure = 7; + optional Error error = 8; } /** - * Low-level scheduler call API. + * Scheduler call API. * * Like Event, a Call is described using the standard protocol buffer * "union" trick (see above). @@ -112,20 +142,19 @@ message Call { // Possible call types, followed by message definitions if // applicable. enum Type { - REGISTER = 1; - REREGISTER = 2; - UNREGISTER = 3; - REQUEST = 4; - DECLINE = 5; - REVIVE = 6; - LAUNCH = 7; - KILL = 8; - ACKNOWLEDGE = 9; - RECONCILE = 10; - MESSAGE = 11; + SUBSCRIBE = 1; // See 'Subscribe' below. + TEARDOWN = 2; // Shuts down all tasks/executors and removes framework. + ACCEPT = 3; // See 'Accept' below. + DECLINE = 4; // See 'Decline' below. + REVIVE = 5; // Removes any previous filters set via ACCEPT or DECLINE. + KILL = 6; // See 'Kill' below. + SHUTDOWN = 7; // See 'Shutdown' below. + ACKNOWLEDGE = 8; // See 'Acknowledge' below. + RECONCILE = 9; // See 'Reconcile' below. + MESSAGE = 10; // See 'Message' below. // TODO(benh): Consider adding an 'ACTIVATE' and 'DEACTIVATE' for - // already registered frameworks as a way of stopping offers from + // already subscribed frameworks as a way of stopping offers from // being generated and other events from being sent by the master. // Note that this functionality existed originally to support // SchedulerDriver::abort which was only necessary to handle @@ -133,63 +162,144 @@ message Call { // something that is not an issue with the Event/Call API. } - message Request { - repeated mesosproto.Request requests = 1; + // Subscribes the scheduler with the master to receive events. A + // scheduler must send other calls only after it has received the + // SUBCRIBED event. + message Subscribe { + // See the comments below on 'framework_id' on the semantics for + // 'framework_info.id'. + required FrameworkInfo framework_info = 1; + + // 'force' field is only relevant when 'framework_info.id' is set. + // It tells the master what to do in case an instance of the + // scheduler attempts to subscribe when another instance of it is + // already connected (e.g., split brain due to network partition). + // If 'force' is true, this scheduler instance is allowed and the + // old connected scheduler instance is disconnected. If false, + // this scheduler instance is disallowed subscription in favor of + // the already connected scheduler instance. + // + // It is recommended to set this to true only when a newly elected + // scheduler instance is attempting to subscribe but not when a + // scheduler is retrying subscription (e.g., disconnection or + // master failover; see sched/sched.cpp for an example). + optional bool force = 2; } - message Decline { + // Accepts an offer, performing the specified operations + // in a sequential manner. + // + // E.g. Launch a task with a newly reserved persistent volume: + // + // Accept { + // offer_ids: [ ... ] + // operations: [ + // { type: RESERVE, + // reserve: { resources: [ disk(role):2 ] } } + // { type: CREATE, + // create: { volumes: [ disk(role):1+persistence ] } } + // { type: LAUNCH, + // launch: { task_infos ... disk(role):1;disk(role):1+persistence } } + // ] + // } + // + // Note that any of the offer’s resources not used in the 'Accept' + // call (e.g., to launch a task) are considered unused and might be + // reoffered to other frameworks. In other words, the same OfferID + // cannot be used in more than one 'Accept' call. + message Accept { repeated OfferID offer_ids = 1; - optional Filters filters = 2; + repeated Offer.Operation operations = 2; + optional Filters filters = 3; } - message Launch { - repeated TaskInfo task_infos = 1; - repeated OfferID offer_ids = 2; - optional Filters filters = 3; + // Declines an offer, signaling the master to potentially reoffer + // the resources to a different framework. Note that this is same + // as sending an Accept call with no operations. See comments on + // top of 'Accept' for semantics. + message Decline { + repeated OfferID offer_ids = 1; + optional Filters filters = 2; } + // Kills a specific task. If the scheduler has a custom executor, + // the kill is forwarded to the executor and it is up to the + // executor to kill the task and send a TASK_KILLED (or TASK_FAILED) + // update. Note that Mesos releases the resources for a task once it + // receives a terminal update (See TaskState in mesos.proto) for it. + // If the task is unknown to the master, a TASK_LOST update is + // generated. message Kill { required TaskID task_id = 1; + optional SlaveID slave_id = 2; } + // Shuts down a custom executor. When the executor gets a shutdown + // event, it is expected to kill all its tasks (and send TASK_KILLED + // updates) and terminate. If the executor doesn’t terminate within + // a certain timeout (configurable via + // '--executor_shutdown_grace_period' slave flag), the slave will + // forcefully destroy the container (executor and its tasks) and + // transition its active tasks to TASK_LOST. + message Shutdown { + required ExecutorID executor_id = 1; + required SlaveID slave_id = 2; + } + + // Acknowledges the receipt of status update. Schedulers are + // responsible for explicitly acknowledging the receipt of status + // updates that have 'Update.status().uuid()' field set. Such status + // updates are retried by the slave until they are acknowledged by + // the scheduler. message Acknowledge { required SlaveID slave_id = 1; required TaskID task_id = 2; required bytes uuid = 3; } - // Allows the framework to query the status for non-terminal tasks. + // Allows the scheduler to query the status for non-terminal tasks. // This causes the master to send back the latest task status for - // each task in 'statuses', if possible. Tasks that are no longer - // known will result in a TASK_LOST update. If statuses is empty, - // then the master will send the latest status for each task - // currently known. - // TODO(bmahler): Add a guiding document for reconciliation or - // document reconciliation in-depth here. + // each task in 'tasks', if possible. Tasks that are no longer known + // will result in a TASK_LOST update. If 'statuses' is empty, then + // the master will send the latest status for each task currently + // known. message Reconcile { - repeated TaskStatus statuses = 1; // Should be non-terminal only. + // TODO(vinod): Support arbitrary queries than just state of tasks. + message Task { + required TaskID task_id = 1; + optional SlaveID slave_id = 2; + } + + repeated Task tasks = 1; } + // Sends arbitrary binary data to the executor. Note that Mesos + // neither interprets this data nor makes any guarantees about the + // delivery of this message to the executor. message Message { required SlaveID slave_id = 1; required ExecutorID executor_id = 2; required bytes data = 3; } - // Identifies who generated this call. Always necessary, but the - // only thing that needs to be set for certain calls, e.g., - // REGISTER, REREGISTER, and UNREGISTER. - required FrameworkInfo framework_info = 1; + // Identifies who generated this call. Master assigns a framework id + // when a new scheduler subscribes for the first time. Once assigned, + // the scheduler must set the 'framework_id' here and within its + // FrameworkInfo (in any further 'Subscribe' calls). This allows the + // master to identify a scheduler correctly across disconnections, + // failovers, etc. + optional FrameworkID framework_id = 1; // Type of the call, indicates which optional field below should be // present if that type has a nested message definition. required Type type = 2; - optional Request request = 3; - optional Decline decline = 4; - optional Launch launch = 5; + optional Subscribe subscribe = 3; + optional Accept accept = 4; + optional Decline decline = 5; optional Kill kill = 6; - optional Acknowledge acknowledge = 7; - optional Reconcile reconcile = 8; - optional Message message = 9; + optional Shutdown shutdown = 7; + optional Acknowledge acknowledge = 8; + optional Reconcile reconcile = 9; + optional Message message = 10; } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.pb.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.pb.go index b584062b..db42a71b 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.pb.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/state.pb.go @@ -5,30 +5,24 @@ package mesosproto import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" import math "math" -// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb" +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" -import io2 "io" -import fmt8 "fmt" -import github_com_gogo_protobuf_proto4 "github.com/gogo/protobuf/proto" +import bytes "bytes" -import fmt9 "fmt" -import strings4 "strings" -import reflect4 "reflect" +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" -import fmt10 "fmt" -import strings5 "strings" -import github_com_gogo_protobuf_proto5 "github.com/gogo/protobuf/proto" -import sort2 "sort" -import strconv2 "strconv" -import reflect5 "reflect" - -import fmt11 "fmt" -import bytes2 "bytes" +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = fmt.Errorf var _ = math.Inf type Operation_Type int32 @@ -192,795 +186,508 @@ func (m *Operation_Expunge) GetName() string { func init() { proto.RegisterEnum("mesosproto.Operation_Type", Operation_Type_name, Operation_Type_value) } -func (m *Entry) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io2.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - case 2: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Uuid", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io2.ErrUnexpectedEOF - } - m.Uuid = append([]byte{}, data[index:postIndex]...) - index = postIndex - case 3: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + byteLen - if postIndex > l { - return io2.ErrUnexpectedEOF - } - m.Value = append([]byte{}, data[index:postIndex]...) - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto4.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io2.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy +func (this *Entry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } + return fmt.Errorf("that == nil && this != nil") } - return nil -} -func (m *Operation) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + + that1, ok := that.(*Entry) + if !ok { + return fmt.Errorf("that is not of type *Entry") + } + if that1 == nil { + if this == nil { + return nil } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 0 { - return fmt8.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Operation_Type - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - v |= (Operation_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 2: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io2.ErrUnexpectedEOF - } - if m.Snapshot == nil { - m.Snapshot = &Operation_Snapshot{} - } - if err := m.Snapshot.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 4: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Diff", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io2.ErrUnexpectedEOF - } - if m.Diff == nil { - m.Diff = &Operation_Diff{} - } - if err := m.Diff.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - case 3: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Expunge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io2.ErrUnexpectedEOF - } - if m.Expunge == nil { - m.Expunge = &Operation_Expunge{} - } - if err := m.Expunge.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto4.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io2.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return fmt.Errorf("that is type *Entry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Entrybut is not nil && this == nil") + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !bytes.Equal(this.Uuid, that1.Uuid) { + return fmt.Errorf("Uuid this(%v) Not Equal that(%v)", this.Uuid, that1.Uuid) + } + if !bytes.Equal(this.Value, that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } return nil } -func (m *Operation_Snapshot) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } +func (this *Entry) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Entry", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io2.ErrUnexpectedEOF - } - if m.Entry == nil { - m.Entry = &Entry{} - } - if err := m.Entry.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto4.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io2.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + return false + } + + that1, ok := that.(*Entry) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true } + return false + } else if this == nil { + return false } - return nil -} -func (m *Operation_Diff) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Entry", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + msglen - if postIndex > l { - return io2.ErrUnexpectedEOF - } - if m.Entry == nil { - m.Entry = &Entry{} - } - if err := m.Entry.Unmarshal(data[index:postIndex]); err != nil { - return err - } - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto4.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io2.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false } - return nil -} -func (m *Operation_Expunge) Unmarshal(data []byte) error { - l := len(data) - index := 0 - for index < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - switch fieldNum { - case 1: - if wireType != 2 { - return fmt8.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if index >= l { - return io2.ErrUnexpectedEOF - } - b := data[index] - index++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - postIndex := index + int(stringLen) - if postIndex > l { - return io2.ErrUnexpectedEOF - } - s := string(data[index:postIndex]) - m.Name = &s - index = postIndex - default: - var sizeOfWire int - for { - sizeOfWire++ - wire >>= 7 - if wire == 0 { - break - } - } - index -= sizeOfWire - skippy, err := github_com_gogo_protobuf_proto4.Skip(data[index:]) - if err != nil { - return err - } - if (index + skippy) > l { - return io2.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...) - index += skippy - } + if !bytes.Equal(this.Uuid, that1.Uuid) { + return false } - return nil -} -func (this *Entry) String() string { - if this == nil { - return "nil" + if !bytes.Equal(this.Value, that1.Value) { + return false } - s := strings4.Join([]string{`&Entry{`, - `Name:` + valueToStringState(this.Name) + `,`, - `Uuid:` + valueToStringState(this.Uuid) + `,`, - `Value:` + valueToStringState(this.Value) + `,`, - `XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Operation) String() string { - if this == nil { - return "nil" + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - s := strings4.Join([]string{`&Operation{`, - `Type:` + valueToStringState(this.Type) + `,`, - `Snapshot:` + strings4.Replace(fmt9.Sprintf("%v", this.Snapshot), "Operation_Snapshot", "Operation_Snapshot", 1) + `,`, - `Diff:` + strings4.Replace(fmt9.Sprintf("%v", this.Diff), "Operation_Diff", "Operation_Diff", 1) + `,`, - `Expunge:` + strings4.Replace(fmt9.Sprintf("%v", this.Expunge), "Operation_Expunge", "Operation_Expunge", 1) + `,`, - `XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s + return true } -func (this *Operation_Snapshot) String() string { - if this == nil { - return "nil" +func (this *Operation) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") } - s := strings4.Join([]string{`&Operation_Snapshot{`, - `Entry:` + strings4.Replace(fmt9.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`, - `XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Operation_Diff) String() string { - if this == nil { - return "nil" + + that1, ok := that.(*Operation) + if !ok { + return fmt.Errorf("that is not of type *Operation") } - s := strings4.Join([]string{`&Operation_Diff{`, - `Entry:` + strings4.Replace(fmt9.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`, - `XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Operation_Expunge) String() string { - if this == nil { - return "nil" + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Operation but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Operationbut is not nil && this == nil") } - s := strings4.Join([]string{`&Operation_Expunge{`, - `Name:` + valueToStringState(this.Name) + `,`, - `XXX_unrecognized:` + fmt9.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringState(v interface{}) string { - rv := reflect4.ValueOf(v) - if rv.IsNil() { - return "nil" + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } - pv := reflect4.Indirect(rv).Interface() - return fmt9.Sprintf("*%v", pv) -} -func (m *Entry) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovState(uint64(l)) + if !this.Snapshot.Equal(that1.Snapshot) { + return fmt.Errorf("Snapshot this(%v) Not Equal that(%v)", this.Snapshot, that1.Snapshot) } - if m.Uuid != nil { - l = len(m.Uuid) - n += 1 + l + sovState(uint64(l)) + if !this.Diff.Equal(that1.Diff) { + return fmt.Errorf("Diff this(%v) Not Equal that(%v)", this.Diff, that1.Diff) } - if m.Value != nil { - l = len(m.Value) - n += 1 + l + sovState(uint64(l)) + if !this.Expunge.Equal(that1.Expunge) { + return fmt.Errorf("Expunge this(%v) Not Equal that(%v)", this.Expunge, that1.Expunge) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } - return n + return nil } +func (this *Operation) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } -func (m *Operation) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovState(uint64(*m.Type)) + that1, ok := that.(*Operation) + if !ok { + return false } - if m.Snapshot != nil { - l = m.Snapshot.Size() - n += 1 + l + sovState(uint64(l)) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - if m.Diff != nil { - l = m.Diff.Size() - n += 1 + l + sovState(uint64(l)) + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false } - if m.Expunge != nil { - l = m.Expunge.Size() - n += 1 + l + sovState(uint64(l)) + if !this.Snapshot.Equal(that1.Snapshot) { + return false } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !this.Diff.Equal(that1.Diff) { + return false } - return n -} - -func (m *Operation_Snapshot) Size() (n int) { - var l int - _ = l - if m.Entry != nil { - l = m.Entry.Size() - n += 1 + l + sovState(uint64(l)) + if !this.Expunge.Equal(that1.Expunge) { + return false } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - return n + return true } +func (this *Operation_Snapshot) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } -func (m *Operation_Diff) Size() (n int) { - var l int - _ = l - if m.Entry != nil { - l = m.Entry.Size() - n += 1 + l + sovState(uint64(l)) + that1, ok := that.(*Operation_Snapshot) + if !ok { + return fmt.Errorf("that is not of type *Operation_Snapshot") } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Operation_Snapshot but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Operation_Snapshotbut is not nil && this == nil") } - return n + if !this.Entry.Equal(that1.Entry) { + return fmt.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil } - -func (m *Operation_Expunge) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovState(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (this *Operation_Snapshot) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false } - return n -} -func sovState(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } + that1, ok := that.(*Operation_Snapshot) + if !ok { + return false } - return n -} -func sozState(x uint64) (n int) { - return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func NewPopulatedEntry(r randyState, easy bool) *Entry { - this := &Entry{} - v1 := randStringState(r) - this.Name = &v1 - v2 := r.Intn(100) - this.Uuid = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Uuid[i] = byte(r.Intn(256)) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - v3 := r.Intn(100) - this.Value = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Value[i] = byte(r.Intn(256)) + if !this.Entry.Equal(that1.Entry) { + return false } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 4) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - return this + return true } +func (this *Operation_Diff) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } -func NewPopulatedOperation(r randyState, easy bool) *Operation { - this := &Operation{} - v4 := Operation_Type([]int32{1, 3, 2}[r.Intn(3)]) - this.Type = &v4 - if r.Intn(10) != 0 { - this.Snapshot = NewPopulatedOperation_Snapshot(r, easy) + that1, ok := that.(*Operation_Diff) + if !ok { + return fmt.Errorf("that is not of type *Operation_Diff") } - if r.Intn(10) != 0 { - this.Diff = NewPopulatedOperation_Diff(r, easy) + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Operation_Diff but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Operation_Diffbut is not nil && this == nil") } - if r.Intn(10) != 0 { - this.Expunge = NewPopulatedOperation_Expunge(r, easy) + if !this.Entry.Equal(that1.Entry) { + return fmt.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry) } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 5) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } - return this + return nil } - -func NewPopulatedOperation_Snapshot(r randyState, easy bool) *Operation_Snapshot { - this := &Operation_Snapshot{} - this.Entry = NewPopulatedEntry(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 2) +func (this *Operation_Diff) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false } - return this -} -func NewPopulatedOperation_Diff(r randyState, easy bool) *Operation_Diff { - this := &Operation_Diff{} - this.Entry = NewPopulatedEntry(r, easy) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 2) + that1, ok := that.(*Operation_Diff) + if !ok { + return false } - return this -} - -func NewPopulatedOperation_Expunge(r randyState, easy bool) *Operation_Expunge { - this := &Operation_Expunge{} - v5 := randStringState(r) - this.Name = &v5 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedState(r, 2) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - return this -} - -type randyState interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneState(r randyState) rune { - res := rune(r.Uint32() % 1112064) - if 55296 <= res { - res += 2047 + if !this.Entry.Equal(that1.Entry) { + return false } - return res -} -func randStringState(r randyState) string { - v6 := r.Intn(100) - tmps := make([]rune, v6) - for i := 0; i < v6; i++ { - tmps[i] = randUTF8RuneState(r) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false } - return string(tmps) + return true } -func randUnrecognizedState(r randyState, maxFieldNumber int) (data []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 +func (this *Operation_Expunge) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil } - fieldNumber := maxFieldNumber + r.Intn(100) - data = randFieldState(data, r, fieldNumber, wire) + return fmt.Errorf("that == nil && this != nil") } - return data -} -func randFieldState(data []byte, r randyState, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - data = encodeVarintPopulateState(data, uint64(key)) - v7 := r.Int63() - if r.Intn(2) == 0 { - v7 *= -1 + + that1, ok := that.(*Operation_Expunge) + if !ok { + return fmt.Errorf("that is not of type *Operation_Expunge") + } + if that1 == nil { + if this == nil { + return nil } - data = encodeVarintPopulateState(data, uint64(v7)) - case 1: - data = encodeVarintPopulateState(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - data = encodeVarintPopulateState(data, uint64(key)) - ll := r.Intn(100) - data = encodeVarintPopulateState(data, uint64(ll)) - for j := 0; j < ll; j++ { - data = append(data, byte(r.Intn(256))) + return fmt.Errorf("that is type *Operation_Expunge but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Operation_Expungebut is not nil && this == nil") + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) } - default: - data = encodeVarintPopulateState(data, uint64(key)) - data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) } - return data -} -func encodeVarintPopulateState(data []byte, v uint64) []byte { - for v >= 1<<7 { - data = append(data, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) } - data = append(data, uint8(v)) - return data + return nil } -func (m *Entry) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err +func (this *Operation_Expunge) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false } - return data[:n], nil -} -func (m *Entry) MarshalTo(data []byte) (n int, err error) { - var i int - _ = i - var l int - _ = l - if m.Name != nil { - data[i] = 0xa - i++ - i = encodeVarintState(data, i, uint64(len(*m.Name))) - i += copy(data[i:], *m.Name) + that1, ok := that.(*Operation_Expunge) + if !ok { + return false } - if m.Uuid != nil { - data[i] = 0x12 - i++ - i = encodeVarintState(data, i, uint64(len(m.Uuid))) - i += copy(data[i:], m.Uuid) + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false } - if m.Value != nil { - data[i] = 0x1a - i++ - i = encodeVarintState(data, i, uint64(len(m.Value))) - i += copy(data[i:], m.Value) + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false } - if m.XXX_unrecognized != nil { - i += copy(data[i:], m.XXX_unrecognized) + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Entry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesosproto.Entry{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringState(this.Name, "string")+",\n") + } + if this.Uuid != nil { + s = append(s, "Uuid: "+valueToGoStringState(this.Uuid, "byte")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringState(this.Value, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Operation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesosproto.Operation{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringState(this.Type, "mesosproto.Operation_Type")+",\n") + } + if this.Snapshot != nil { + s = append(s, "Snapshot: "+fmt.Sprintf("%#v", this.Snapshot)+",\n") + } + if this.Diff != nil { + s = append(s, "Diff: "+fmt.Sprintf("%#v", this.Diff)+",\n") + } + if this.Expunge != nil { + s = append(s, "Expunge: "+fmt.Sprintf("%#v", this.Expunge)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Operation_Snapshot) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Operation_Snapshot{") + if this.Entry != nil { + s = append(s, "Entry: "+fmt.Sprintf("%#v", this.Entry)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Operation_Diff) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Operation_Diff{") + if this.Entry != nil { + s = append(s, "Entry: "+fmt.Sprintf("%#v", this.Entry)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Operation_Expunge) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesosproto.Operation_Expunge{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringState(this.Name, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringState(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringState(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "}" + return s +} +func (m *Entry) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Entry) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { + data[i] = 0xa + i++ + i = encodeVarintState(data, i, uint64(len(*m.Name))) + i += copy(data[i:], *m.Name) + } + if m.Uuid == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") + } else { + data[i] = 0x12 + i++ + i = encodeVarintState(data, i, uint64(len(m.Uuid))) + i += copy(data[i:], m.Uuid) + } + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + data[i] = 0x1a + i++ + i = encodeVarintState(data, i, uint64(len(m.Value))) + i += copy(data[i:], m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) } return i, nil } @@ -995,12 +702,14 @@ func (m *Operation) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Operation) MarshalTo(data []byte) (n int, err error) { +func (m *Operation) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Type != nil { + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { data[i] = 0x8 i++ i = encodeVarintState(data, i, uint64(*m.Type)) @@ -1015,21 +724,21 @@ func (m *Operation) MarshalTo(data []byte) (n int, err error) { } i += n1 } - if m.Diff != nil { - data[i] = 0x22 + if m.Expunge != nil { + data[i] = 0x1a i++ - i = encodeVarintState(data, i, uint64(m.Diff.Size())) - n2, err := m.Diff.MarshalTo(data[i:]) + i = encodeVarintState(data, i, uint64(m.Expunge.Size())) + n2, err := m.Expunge.MarshalTo(data[i:]) if err != nil { return 0, err } i += n2 } - if m.Expunge != nil { - data[i] = 0x1a + if m.Diff != nil { + data[i] = 0x22 i++ - i = encodeVarintState(data, i, uint64(m.Expunge.Size())) - n3, err := m.Expunge.MarshalTo(data[i:]) + i = encodeVarintState(data, i, uint64(m.Diff.Size())) + n3, err := m.Diff.MarshalTo(data[i:]) if err != nil { return 0, err } @@ -1051,12 +760,14 @@ func (m *Operation_Snapshot) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Operation_Snapshot) MarshalTo(data []byte) (n int, err error) { +func (m *Operation_Snapshot) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Entry != nil { + if m.Entry == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") + } else { data[i] = 0xa i++ i = encodeVarintState(data, i, uint64(m.Entry.Size())) @@ -1082,12 +793,14 @@ func (m *Operation_Diff) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Operation_Diff) MarshalTo(data []byte) (n int, err error) { +func (m *Operation_Diff) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Entry != nil { + if m.Entry == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") + } else { data[i] = 0xa i++ i = encodeVarintState(data, i, uint64(m.Entry.Size())) @@ -1113,12 +826,14 @@ func (m *Operation_Expunge) Marshal() (data []byte, err error) { return data[:n], nil } -func (m *Operation_Expunge) MarshalTo(data []byte) (n int, err error) { +func (m *Operation_Expunge) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l - if m.Name != nil { + if m.Name == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } else { data[i] = 0xa i++ i = encodeVarintState(data, i, uint64(len(*m.Name))) @@ -1157,424 +872,932 @@ func encodeVarintState(data []byte, offset int, v uint64) int { data[offset] = uint8(v) return offset + 1 } -func (this *Entry) GoString() string { - if this == nil { - return "nil" - } - s := strings5.Join([]string{`&mesosproto.Entry{` + - `Name:` + valueToGoStringState(this.Name, "string"), - `Uuid:` + valueToGoStringState(this.Uuid, "byte"), - `Value:` + valueToGoStringState(this.Value, "byte"), - `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Operation) GoString() string { - if this == nil { - return "nil" - } - s := strings5.Join([]string{`&mesosproto.Operation{` + - `Type:` + valueToGoStringState(this.Type, "mesosproto.Operation_Type"), - `Snapshot:` + fmt10.Sprintf("%#v", this.Snapshot), - `Diff:` + fmt10.Sprintf("%#v", this.Diff), - `Expunge:` + fmt10.Sprintf("%#v", this.Expunge), - `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Operation_Snapshot) GoString() string { - if this == nil { - return "nil" +func NewPopulatedEntry(r randyState, easy bool) *Entry { + this := &Entry{} + v1 := randStringState(r) + this.Name = &v1 + v2 := r.Intn(100) + this.Uuid = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Uuid[i] = byte(r.Intn(256)) } - s := strings5.Join([]string{`&mesosproto.Operation_Snapshot{` + - `Entry:` + fmt10.Sprintf("%#v", this.Entry), - `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Operation_Diff) GoString() string { - if this == nil { - return "nil" + v3 := r.Intn(100) + this.Value = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Value[i] = byte(r.Intn(256)) } - s := strings5.Join([]string{`&mesosproto.Operation_Diff{` + - `Entry:` + fmt10.Sprintf("%#v", this.Entry), - `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s -} -func (this *Operation_Expunge) GoString() string { - if this == nil { - return "nil" + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedState(r, 4) } - s := strings5.Join([]string{`&mesosproto.Operation_Expunge{` + - `Name:` + valueToGoStringState(this.Name, "string"), - `XXX_unrecognized:` + fmt10.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") - return s + return this } -func valueToGoStringState(v interface{}, typ string) string { - rv := reflect5.ValueOf(v) - if rv.IsNil() { - return "nil" + +func NewPopulatedOperation(r randyState, easy bool) *Operation { + this := &Operation{} + v4 := Operation_Type([]int32{1, 3, 2}[r.Intn(3)]) + this.Type = &v4 + if r.Intn(10) != 0 { + this.Snapshot = NewPopulatedOperation_Snapshot(r, easy) } - pv := reflect5.Indirect(rv).Interface() - return fmt10.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func extensionToGoStringState(e map[int32]github_com_gogo_protobuf_proto5.Extension) string { - if e == nil { - return "nil" + if r.Intn(10) != 0 { + this.Expunge = NewPopulatedOperation_Expunge(r, easy) } - s := "map[int32]proto.Extension{" - keys := make([]int, 0, len(e)) - for k := range e { - keys = append(keys, int(k)) + if r.Intn(10) != 0 { + this.Diff = NewPopulatedOperation_Diff(r, easy) } - sort2.Ints(keys) - ss := []string{} - for _, k := range keys { - ss = append(ss, strconv2.Itoa(k)+": "+e[int32(k)].GoString()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedState(r, 5) } - s += strings5.Join(ss, ",") + "}" - return s + return this } -func (this *Entry) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt11.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Entry) - if !ok { - return fmt11.Errorf("that is not of type *Entry") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt11.Errorf("that is type *Entry but is nil && this != nil") - } else if this == nil { - return fmt11.Errorf("that is type *Entrybut is not nil && this == nil") +func NewPopulatedOperation_Snapshot(r randyState, easy bool) *Operation_Snapshot { + this := &Operation_Snapshot{} + this.Entry = NewPopulatedEntry(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedState(r, 2) } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt11.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) - } - } else if this.Name != nil { - return fmt11.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt11.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + return this +} + +func NewPopulatedOperation_Diff(r randyState, easy bool) *Operation_Diff { + this := &Operation_Diff{} + this.Entry = NewPopulatedEntry(r, easy) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedState(r, 2) } - if !bytes2.Equal(this.Uuid, that1.Uuid) { - return fmt11.Errorf("Uuid this(%v) Not Equal that(%v)", this.Uuid, that1.Uuid) + return this +} + +func NewPopulatedOperation_Expunge(r randyState, easy bool) *Operation_Expunge { + this := &Operation_Expunge{} + v5 := randStringState(r) + this.Name = &v5 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedState(r, 2) } - if !bytes2.Equal(this.Value, that1.Value) { - return fmt11.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + return this +} + +type randyState interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneState(r randyState) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + return rune(ru + 61) +} +func randStringState(r randyState) string { + v6 := r.Intn(100) + tmps := make([]rune, v6) + for i := 0; i < v6; i++ { + tmps[i] = randUTF8RuneState(r) } - return nil + return string(tmps) } -func (this *Entry) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func randUnrecognizedState(r randyState, maxFieldNumber int) (data []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 } - return false + fieldNumber := maxFieldNumber + r.Intn(100) + data = randFieldState(data, r, fieldNumber, wire) } - - that1, ok := that.(*Entry) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false - } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false - } - if !bytes2.Equal(this.Uuid, that1.Uuid) { - return false - } - if !bytes2.Equal(this.Value, that1.Value) { - return false - } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true + return data } -func (this *Operation) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func randFieldState(data []byte, r randyState, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateState(data, uint64(key)) + v7 := r.Int63() + if r.Intn(2) == 0 { + v7 *= -1 } - return fmt11.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Operation) - if !ok { - return fmt11.Errorf("that is not of type *Operation") - } - if that1 == nil { - if this == nil { - return nil + data = encodeVarintPopulateState(data, uint64(v7)) + case 1: + data = encodeVarintPopulateState(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + data = encodeVarintPopulateState(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateState(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) } - return fmt11.Errorf("that is type *Operation but is nil && this != nil") - } else if this == nil { - return fmt11.Errorf("that is type *Operationbut is not nil && this == nil") + default: + data = encodeVarintPopulateState(data, uint64(key)) + data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return fmt11.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) - } - } else if this.Type != nil { - return fmt11.Errorf("this.Type == nil && that.Type != nil") - } else if that1.Type != nil { - return fmt11.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + return data +} +func encodeVarintPopulateState(data []byte, v uint64) []byte { + for v >= 1<<7 { + data = append(data, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 } - if !this.Snapshot.Equal(that1.Snapshot) { - return fmt11.Errorf("Snapshot this(%v) Not Equal that(%v)", this.Snapshot, that1.Snapshot) + data = append(data, uint8(v)) + return data +} +func (m *Entry) Size() (n int) { + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovState(uint64(l)) } - if !this.Diff.Equal(that1.Diff) { - return fmt11.Errorf("Diff this(%v) Not Equal that(%v)", this.Diff, that1.Diff) + if m.Uuid != nil { + l = len(m.Uuid) + n += 1 + l + sovState(uint64(l)) } - if !this.Expunge.Equal(that1.Expunge) { - return fmt11.Errorf("Expunge this(%v) Not Equal that(%v)", this.Expunge, that1.Expunge) + if m.Value != nil { + l = len(m.Value) + n += 1 + l + sovState(uint64(l)) } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *Operation) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*Operation) - if !ok { - return false - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if this.Type != nil && that1.Type != nil { - if *this.Type != *that1.Type { - return false - } - } else if this.Type != nil { - return false - } else if that1.Type != nil { - return false +func (m *Operation) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovState(uint64(*m.Type)) } - if !this.Snapshot.Equal(that1.Snapshot) { - return false + if m.Snapshot != nil { + l = m.Snapshot.Size() + n += 1 + l + sovState(uint64(l)) } - if !this.Diff.Equal(that1.Diff) { - return false + if m.Expunge != nil { + l = m.Expunge.Size() + n += 1 + l + sovState(uint64(l)) } - if !this.Expunge.Equal(that1.Expunge) { - return false + if m.Diff != nil { + l = m.Diff.Size() + n += 1 + l + sovState(uint64(l)) } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Operation_Snapshot) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt11.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Operation_Snapshot) - if !ok { - return fmt11.Errorf("that is not of type *Operation_Snapshot") - } - if that1 == nil { - if this == nil { - return nil - } - return fmt11.Errorf("that is type *Operation_Snapshot but is nil && this != nil") - } else if this == nil { - return fmt11.Errorf("that is type *Operation_Snapshotbut is not nil && this == nil") - } - if !this.Entry.Equal(that1.Entry) { - return fmt11.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry) +func (m *Operation_Snapshot) Size() (n int) { + var l int + _ = l + if m.Entry != nil { + l = m.Entry.Size() + n += 1 + l + sovState(uint64(l)) } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return nil + return n } -func (this *Operation_Snapshot) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - that1, ok := that.(*Operation_Snapshot) - if !ok { - return false +func (m *Operation_Diff) Size() (n int) { + var l int + _ = l + if m.Entry != nil { + l = m.Entry.Size() + n += 1 + l + sovState(uint64(l)) } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - if !this.Entry.Equal(that1.Entry) { - return false + return n +} + +func (m *Operation_Expunge) Size() (n int) { + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovState(uint64(l)) } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return true + return n } -func (this *Operation_Diff) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt11.Errorf("that == nil && this != nil") - } - that1, ok := that.(*Operation_Diff) - if !ok { - return fmt11.Errorf("that is not of type *Operation_Diff") - } - if that1 == nil { - if this == nil { - return nil +func sovState(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break } - return fmt11.Errorf("that is type *Operation_Diff but is nil && this != nil") - } else if this == nil { - return fmt11.Errorf("that is type *Operation_Diffbut is not nil && this == nil") } - if !this.Entry.Equal(that1.Entry) { - return fmt11.Errorf("Entry this(%v) Not Equal that(%v)", this.Entry, that1.Entry) + return n +} +func sozState(x uint64) (n int) { + return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Entry) String() string { + if this == nil { + return "nil" } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + s := strings.Join([]string{`&Entry{`, + `Name:` + valueToStringState(this.Name) + `,`, + `Uuid:` + valueToStringState(this.Uuid) + `,`, + `Value:` + valueToStringState(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Operation) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&Operation{`, + `Type:` + valueToStringState(this.Type) + `,`, + `Snapshot:` + strings.Replace(fmt.Sprintf("%v", this.Snapshot), "Operation_Snapshot", "Operation_Snapshot", 1) + `,`, + `Expunge:` + strings.Replace(fmt.Sprintf("%v", this.Expunge), "Operation_Expunge", "Operation_Expunge", 1) + `,`, + `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Operation_Diff", "Operation_Diff", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s } -func (this *Operation_Diff) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false +func (this *Operation_Snapshot) String() string { + if this == nil { + return "nil" } - - that1, ok := that.(*Operation_Diff) - if !ok { - return false + s := strings.Join([]string{`&Operation_Snapshot{`, + `Entry:` + strings.Replace(fmt.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Operation_Diff) String() string { + if this == nil { + return "nil" } - if that1 == nil { - if this == nil { - return true + s := strings.Join([]string{`&Operation_Diff{`, + `Entry:` + strings.Replace(fmt.Sprintf("%v", this.Entry), "Entry", "Entry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Operation_Expunge) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Operation_Expunge{`, + `Name:` + valueToStringState(this.Name) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringState(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Entry) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uuid = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append([]byte{}, data[iNdEx:postIndex]...) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipState(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false - } else if this == nil { - return false } - if !this.Entry.Equal(that1.Entry) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") } - return true + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + return nil } -func (this *Operation_Expunge) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil +func (m *Operation) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Operation_Type + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (Operation_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Snapshot == nil { + m.Snapshot = &Operation_Snapshot{} + } + if err := m.Snapshot.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expunge", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Expunge == nil { + m.Expunge = &Operation_Expunge{} + } + if err := m.Expunge.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Diff == nil { + m.Diff = &Operation_Diff{} + } + if err := m.Diff.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipState(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return fmt11.Errorf("that == nil && this != nil") } - - that1, ok := that.(*Operation_Expunge) - if !ok { - return fmt11.Errorf("that is not of type *Operation_Expunge") + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") } - if that1 == nil { - if this == nil { - return nil + + return nil +} +func (m *Operation_Snapshot) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return fmt11.Errorf("that is type *Operation_Expunge but is nil && this != nil") - } else if this == nil { - return fmt11.Errorf("that is type *Operation_Expungebut is not nil && this == nil") - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return fmt11.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Entry == nil { + m.Entry = &Entry{} + } + if err := m.Entry.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipState(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Name != nil { - return fmt11.Errorf("this.Name == nil && that.Name != nil") - } else if that1.Name != nil { - return fmt11.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt11.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") } + return nil } -func (this *Operation_Expunge) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true +func (m *Operation_Diff) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Entry == nil { + m.Entry = &Entry{} + } + if err := m.Entry.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipState(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - return false } - - that1, ok := that.(*Operation_Expunge) - if !ok { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("entry") } - if that1 == nil { - if this == nil { - return true + + return nil +} +func (m *Operation_Expunge) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - return false - } else if this == nil { - return false - } - if this.Name != nil && that1.Name != nil { - if *this.Name != *that1.Name { - return false + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipState(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } - } else if this.Name != nil { - return false - } else if that1.Name != nil { - return false } - if !bytes2.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } - return true + + return nil +} +func skipState(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthState + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipState(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") } + +var ( + ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") +) diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/statepb_test.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/statepb_test.go index 56d626be..89870c02 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/statepb_test.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosproto/statepb_test.go @@ -4,60 +4,60 @@ package mesosproto -import testing14 "testing" -import math_rand14 "math/rand" -import time14 "time" -import github_com_gogo_protobuf_proto8 "github.com/gogo/protobuf/proto" -import testing15 "testing" -import math_rand15 "math/rand" -import time15 "time" -import encoding_json2 "encoding/json" -import testing16 "testing" -import math_rand16 "math/rand" -import time16 "time" -import github_com_gogo_protobuf_proto9 "github.com/gogo/protobuf/proto" -import math_rand17 "math/rand" -import time17 "time" -import testing17 "testing" -import fmt4 "fmt" -import math_rand18 "math/rand" -import time18 "time" -import testing18 "testing" -import github_com_gogo_protobuf_proto10 "github.com/gogo/protobuf/proto" -import math_rand19 "math/rand" -import time19 "time" -import testing19 "testing" -import fmt5 "fmt" -import go_parser2 "go/parser" -import math_rand20 "math/rand" -import time20 "time" -import testing20 "testing" -import github_com_gogo_protobuf_proto11 "github.com/gogo/protobuf/proto" +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" -func TestEntryProto(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEntry(popr, false) - data, err := github_com_gogo_protobuf_proto8.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Entry{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestEntryMarshalTo(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestEntryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEntry(popr, false) size := p.Size() data := make([]byte, size) @@ -66,25 +66,25 @@ func TestEntryMarshalTo(t *testing14.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Entry{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkEntryProtoMarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkEntryProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Entry, 10000) for i := 0; i < 10000; i++ { @@ -92,7 +92,7 @@ func BenchmarkEntryProtoMarshal(b *testing14.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -101,12 +101,12 @@ func BenchmarkEntryProtoMarshal(b *testing14.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkEntryProtoUnmarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkEntryProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(NewPopulatedEntry(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEntry(popr, false)) if err != nil { panic(err) } @@ -116,37 +116,50 @@ func BenchmarkEntryProtoUnmarshal(b *testing14.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto8.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestOperationProto(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperationProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation(popr, false) - data, err := github_com_gogo_protobuf_proto8.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestOperationMarshalTo(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperationMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation(popr, false) size := p.Size() data := make([]byte, size) @@ -155,25 +168,25 @@ func TestOperationMarshalTo(t *testing14.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkOperationProtoMarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperationProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation, 10000) for i := 0; i < 10000; i++ { @@ -181,7 +194,7 @@ func BenchmarkOperationProtoMarshal(b *testing14.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -190,12 +203,12 @@ func BenchmarkOperationProtoMarshal(b *testing14.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOperationProtoUnmarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperationProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(NewPopulatedOperation(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOperation(popr, false)) if err != nil { panic(err) } @@ -205,37 +218,50 @@ func BenchmarkOperationProtoUnmarshal(b *testing14.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto8.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestOperation_SnapshotProto(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperation_SnapshotProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Snapshot(popr, false) - data, err := github_com_gogo_protobuf_proto8.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Snapshot{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestOperation_SnapshotMarshalTo(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperation_SnapshotMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Snapshot(popr, false) size := p.Size() data := make([]byte, size) @@ -244,25 +270,25 @@ func TestOperation_SnapshotMarshalTo(t *testing14.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Snapshot{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkOperation_SnapshotProtoMarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperation_SnapshotProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation_Snapshot, 10000) for i := 0; i < 10000; i++ { @@ -270,7 +296,7 @@ func BenchmarkOperation_SnapshotProtoMarshal(b *testing14.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -279,12 +305,12 @@ func BenchmarkOperation_SnapshotProtoMarshal(b *testing14.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOperation_SnapshotProtoUnmarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperation_SnapshotProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(NewPopulatedOperation_Snapshot(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOperation_Snapshot(popr, false)) if err != nil { panic(err) } @@ -294,37 +320,50 @@ func BenchmarkOperation_SnapshotProtoUnmarshal(b *testing14.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto8.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestOperation_DiffProto(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperation_DiffProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Diff(popr, false) - data, err := github_com_gogo_protobuf_proto8.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Diff{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestOperation_DiffMarshalTo(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperation_DiffMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Diff(popr, false) size := p.Size() data := make([]byte, size) @@ -333,25 +372,25 @@ func TestOperation_DiffMarshalTo(t *testing14.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Diff{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkOperation_DiffProtoMarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperation_DiffProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation_Diff, 10000) for i := 0; i < 10000; i++ { @@ -359,7 +398,7 @@ func BenchmarkOperation_DiffProtoMarshal(b *testing14.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -368,12 +407,12 @@ func BenchmarkOperation_DiffProtoMarshal(b *testing14.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOperation_DiffProtoUnmarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperation_DiffProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(NewPopulatedOperation_Diff(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOperation_Diff(popr, false)) if err != nil { panic(err) } @@ -383,37 +422,50 @@ func BenchmarkOperation_DiffProtoUnmarshal(b *testing14.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto8.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestOperation_ExpungeProto(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperation_ExpungeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Expunge(popr, false) - data, err := github_com_gogo_protobuf_proto8.Marshal(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Expunge{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } -func TestOperation_ExpungeMarshalTo(t *testing14.T) { - popr := math_rand14.New(math_rand14.NewSource(time14.Now().UnixNano())) +func TestOperation_ExpungeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Expunge(popr, false) size := p.Size() data := make([]byte, size) @@ -422,25 +474,25 @@ func TestOperation_ExpungeMarshalTo(t *testing14.T) { } _, err := p.MarshalTo(data) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Expunge{} - if err := github_com_gogo_protobuf_proto8.Unmarshal(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } for i := range data { data[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func BenchmarkOperation_ExpungeProtoMarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperation_ExpungeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation_Expunge, 10000) for i := 0; i < 10000; i++ { @@ -448,7 +500,7 @@ func BenchmarkOperation_ExpungeProtoMarshal(b *testing14.B) { } b.ResetTimer() for i := 0; i < b.N; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(pops[i%10000]) + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) if err != nil { panic(err) } @@ -457,12 +509,12 @@ func BenchmarkOperation_ExpungeProtoMarshal(b *testing14.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOperation_ExpungeProtoUnmarshal(b *testing14.B) { - popr := math_rand14.New(math_rand14.NewSource(616)) +func BenchmarkOperation_ExpungeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 datas := make([][]byte, 10000) for i := 0; i < 10000; i++ { - data, err := github_com_gogo_protobuf_proto8.Marshal(NewPopulatedOperation_Expunge(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOperation_Expunge(popr, false)) if err != nil { panic(err) } @@ -472,336 +524,452 @@ func BenchmarkOperation_ExpungeProtoUnmarshal(b *testing14.B) { b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) - if err := github_com_gogo_protobuf_proto8.Unmarshal(datas[i%10000], msg); err != nil { + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { panic(err) } } b.SetBytes(int64(total / b.N)) } -func TestEntryJSON(t *testing15.T) { - popr := math_rand15.New(math_rand15.NewSource(time15.Now().UnixNano())) +func TestEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEntry(popr, true) - jsondata, err := encoding_json2.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Entry{} - err = encoding_json2.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOperationJSON(t *testing15.T) { - popr := math_rand15.New(math_rand15.NewSource(time15.Now().UnixNano())) +func TestOperationJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation(popr, true) - jsondata, err := encoding_json2.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation{} - err = encoding_json2.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOperation_SnapshotJSON(t *testing15.T) { - popr := math_rand15.New(math_rand15.NewSource(time15.Now().UnixNano())) +func TestOperation_SnapshotJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Snapshot(popr, true) - jsondata, err := encoding_json2.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Snapshot{} - err = encoding_json2.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOperation_DiffJSON(t *testing15.T) { - popr := math_rand15.New(math_rand15.NewSource(time15.Now().UnixNano())) +func TestOperation_DiffJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Diff(popr, true) - jsondata, err := encoding_json2.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Diff{} - err = encoding_json2.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestOperation_ExpungeJSON(t *testing15.T) { - popr := math_rand15.New(math_rand15.NewSource(time15.Now().UnixNano())) +func TestOperation_ExpungeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Expunge(popr, true) - jsondata, err := encoding_json2.Marshal(p) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } msg := &Operation_Expunge{} - err = encoding_json2.Unmarshal(jsondata, msg) + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Json Equal %#v", msg, p) + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestEntryProtoText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEntry(popr, true) - data := github_com_gogo_protobuf_proto9.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Entry{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestEntryProtoCompactText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEntry(popr, true) - data := github_com_gogo_protobuf_proto9.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Entry{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperationProtoText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperationProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation(popr, true) - data := github_com_gogo_protobuf_proto9.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Operation{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperationProtoCompactText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperationProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation(popr, true) - data := github_com_gogo_protobuf_proto9.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Operation{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperation_SnapshotProtoText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperation_SnapshotProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Snapshot(popr, true) - data := github_com_gogo_protobuf_proto9.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Operation_Snapshot{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperation_SnapshotProtoCompactText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperation_SnapshotProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Snapshot(popr, true) - data := github_com_gogo_protobuf_proto9.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Operation_Snapshot{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperation_DiffProtoText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperation_DiffProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Diff(popr, true) - data := github_com_gogo_protobuf_proto9.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Operation_Diff{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperation_DiffProtoCompactText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperation_DiffProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Diff(popr, true) - data := github_com_gogo_protobuf_proto9.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Operation_Diff{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperation_ExpungeProtoText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperation_ExpungeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Expunge(popr, true) - data := github_com_gogo_protobuf_proto9.MarshalTextString(p) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &Operation_Expunge{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestOperation_ExpungeProtoCompactText(t *testing16.T) { - popr := math_rand16.New(math_rand16.NewSource(time16.Now().UnixNano())) +func TestOperation_ExpungeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Expunge(popr, true) - data := github_com_gogo_protobuf_proto9.CompactTextString(p) + data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Operation_Expunge{} - if err := github_com_gogo_protobuf_proto9.UnmarshalText(data, msg); err != nil { - panic(err) + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { - t.Fatalf("%#v !Proto %#v", msg, p) + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } -func TestEntryStringer(t *testing17.T) { - popr := math_rand17.New(math_rand17.NewSource(time17.Now().UnixNano())) +func TestEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEntry(popr, false) - s1 := p.String() - s2 := fmt4.Sprintf("%v", p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Entry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperationVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperation_SnapshotVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation_Snapshot(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation_Snapshot{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperation_DiffVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation_Diff(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation_Diff{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOperation_ExpungeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOperation_Expunge(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Operation_Expunge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperationStringer(t *testing17.T) { - popr := math_rand17.New(math_rand17.NewSource(time17.Now().UnixNano())) +func TestOperationGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation(popr, false) - s1 := p.String() - s2 := fmt4.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperation_SnapshotStringer(t *testing17.T) { - popr := math_rand17.New(math_rand17.NewSource(time17.Now().UnixNano())) +func TestOperation_SnapshotGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Snapshot(popr, false) - s1 := p.String() - s2 := fmt4.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperation_DiffStringer(t *testing17.T) { - popr := math_rand17.New(math_rand17.NewSource(time17.Now().UnixNano())) +func TestOperation_DiffGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Diff(popr, false) - s1 := p.String() - s2 := fmt4.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestOperation_ExpungeStringer(t *testing17.T) { - popr := math_rand17.New(math_rand17.NewSource(time17.Now().UnixNano())) +func TestOperation_ExpungeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Expunge(popr, false) - s1 := p.String() - s2 := fmt4.Sprintf("%v", p) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) } } -func TestEntrySize(t *testing18.T) { - popr := math_rand18.New(math_rand18.NewSource(time18.Now().UnixNano())) +func TestEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedEntry(popr, true) - size2 := github_com_gogo_protobuf_proto10.Size(p) - data, err := github_com_gogo_protobuf_proto10.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto10.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkEntrySize(b *testing18.B) { - popr := math_rand18.New(math_rand18.NewSource(616)) +func BenchmarkEntrySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Entry, 1000) for i := 0; i < 1000; i++ { @@ -814,29 +982,30 @@ func BenchmarkEntrySize(b *testing18.B) { b.SetBytes(int64(total / b.N)) } -func TestOperationSize(t *testing18.T) { - popr := math_rand18.New(math_rand18.NewSource(time18.Now().UnixNano())) +func TestOperationSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation(popr, true) - size2 := github_com_gogo_protobuf_proto10.Size(p) - data, err := github_com_gogo_protobuf_proto10.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto10.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkOperationSize(b *testing18.B) { - popr := math_rand18.New(math_rand18.NewSource(616)) +func BenchmarkOperationSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation, 1000) for i := 0; i < 1000; i++ { @@ -849,29 +1018,30 @@ func BenchmarkOperationSize(b *testing18.B) { b.SetBytes(int64(total / b.N)) } -func TestOperation_SnapshotSize(t *testing18.T) { - popr := math_rand18.New(math_rand18.NewSource(time18.Now().UnixNano())) +func TestOperation_SnapshotSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Snapshot(popr, true) - size2 := github_com_gogo_protobuf_proto10.Size(p) - data, err := github_com_gogo_protobuf_proto10.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto10.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkOperation_SnapshotSize(b *testing18.B) { - popr := math_rand18.New(math_rand18.NewSource(616)) +func BenchmarkOperation_SnapshotSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation_Snapshot, 1000) for i := 0; i < 1000; i++ { @@ -884,29 +1054,30 @@ func BenchmarkOperation_SnapshotSize(b *testing18.B) { b.SetBytes(int64(total / b.N)) } -func TestOperation_DiffSize(t *testing18.T) { - popr := math_rand18.New(math_rand18.NewSource(time18.Now().UnixNano())) +func TestOperation_DiffSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Diff(popr, true) - size2 := github_com_gogo_protobuf_proto10.Size(p) - data, err := github_com_gogo_protobuf_proto10.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto10.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkOperation_DiffSize(b *testing18.B) { - popr := math_rand18.New(math_rand18.NewSource(616)) +func BenchmarkOperation_DiffSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation_Diff, 1000) for i := 0; i < 1000; i++ { @@ -919,29 +1090,30 @@ func BenchmarkOperation_DiffSize(b *testing18.B) { b.SetBytes(int64(total / b.N)) } -func TestOperation_ExpungeSize(t *testing18.T) { - popr := math_rand18.New(math_rand18.NewSource(time18.Now().UnixNano())) +func TestOperation_ExpungeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOperation_Expunge(popr, true) - size2 := github_com_gogo_protobuf_proto10.Size(p) - data, err := github_com_gogo_protobuf_proto10.Marshal(p) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { - panic(err) + t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(data) != size { - t.Fatalf("size %v != marshalled size %v", size, len(data)) + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) } if size2 != size { - t.Fatalf("size %v != before marshal proto.Size %v", size, size2) + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } - size3 := github_com_gogo_protobuf_proto10.Size(p) + size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { - t.Fatalf("size %v != after marshal proto.Size %v", size, size3) + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } -func BenchmarkOperation_ExpungeSize(b *testing18.B) { - popr := math_rand18.New(math_rand18.NewSource(616)) +func BenchmarkOperation_ExpungeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) total := 0 pops := make([]*Operation_Expunge, 1000) for i := 0; i < 1000; i++ { @@ -954,144 +1126,49 @@ func BenchmarkOperation_ExpungeSize(b *testing18.B) { b.SetBytes(int64(total / b.N)) } -func TestEntryGoString(t *testing19.T) { - popr := math_rand19.New(math_rand19.NewSource(time19.Now().UnixNano())) +func TestEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEntry(popr, false) - s1 := p.GoString() - s2 := fmt5.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser2.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperationGoString(t *testing19.T) { - popr := math_rand19.New(math_rand19.NewSource(time19.Now().UnixNano())) +func TestOperationStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation(popr, false) - s1 := p.GoString() - s2 := fmt5.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser2.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperation_SnapshotGoString(t *testing19.T) { - popr := math_rand19.New(math_rand19.NewSource(time19.Now().UnixNano())) +func TestOperation_SnapshotStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Snapshot(popr, false) - s1 := p.GoString() - s2 := fmt5.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser2.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperation_DiffGoString(t *testing19.T) { - popr := math_rand19.New(math_rand19.NewSource(time19.Now().UnixNano())) +func TestOperation_DiffStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Diff(popr, false) - s1 := p.GoString() - s2 := fmt5.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser2.ParseExpr(s1) - if err != nil { - panic(err) + t.Fatalf("String want %v got %v", s1, s2) } } -func TestOperation_ExpungeGoString(t *testing19.T) { - popr := math_rand19.New(math_rand19.NewSource(time19.Now().UnixNano())) +func TestOperation_ExpungeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedOperation_Expunge(popr, false) - s1 := p.GoString() - s2 := fmt5.Sprintf("%#v", p) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser2.ParseExpr(s1) - if err != nil { - panic(err) - } -} -func TestEntryVerboseEqual(t *testing20.T) { - popr := math_rand20.New(math_rand20.NewSource(time20.Now().UnixNano())) - p := NewPopulatedEntry(popr, false) - data, err := github_com_gogo_protobuf_proto11.Marshal(p) - if err != nil { - panic(err) - } - msg := &Entry{} - if err := github_com_gogo_protobuf_proto11.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperationVerboseEqual(t *testing20.T) { - popr := math_rand20.New(math_rand20.NewSource(time20.Now().UnixNano())) - p := NewPopulatedOperation(popr, false) - data, err := github_com_gogo_protobuf_proto11.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation{} - if err := github_com_gogo_protobuf_proto11.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperation_SnapshotVerboseEqual(t *testing20.T) { - popr := math_rand20.New(math_rand20.NewSource(time20.Now().UnixNano())) - p := NewPopulatedOperation_Snapshot(popr, false) - data, err := github_com_gogo_protobuf_proto11.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation_Snapshot{} - if err := github_com_gogo_protobuf_proto11.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperation_DiffVerboseEqual(t *testing20.T) { - popr := math_rand20.New(math_rand20.NewSource(time20.Now().UnixNano())) - p := NewPopulatedOperation_Diff(popr, false) - data, err := github_com_gogo_protobuf_proto11.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation_Diff{} - if err := github_com_gogo_protobuf_proto11.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOperation_ExpungeVerboseEqual(t *testing20.T) { - popr := math_rand20.New(math_rand20.NewSource(time20.Now().UnixNano())) - p := NewPopulatedOperation_Expunge(popr, false) - data, err := github_com_gogo_protobuf_proto11.Marshal(p) - if err != nil { - panic(err) - } - msg := &Operation_Expunge{} - if err := github_com_gogo_protobuf_proto11.Unmarshal(data, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + t.Fatalf("String want %v got %v", s1, s2) } } diff --git a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/constants.go b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/constants.go index 849c26ba..1e51fa51 100644 --- a/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/constants.go +++ b/Godeps/_workspace/src/github.com/mesos/mesos-go/mesosutil/constants.go @@ -2,5 +2,5 @@ package mesosutil const ( // MesosVersion indicates the supported mesos version. - MesosVersion = "0.20.0" + MesosVersion = "0.23.0" )