diff --git a/api/v1/cmd/example-scheduler/app/state.go b/api/v1/cmd/example-scheduler/app/state.go index d04eb50b..efd74981 100644 --- a/api/v1/cmd/example-scheduler/app/state.go +++ b/api/v1/cmd/example-scheduler/app/state.go @@ -29,6 +29,7 @@ func prepareExecutorInfo( if execImage != "" { // Create mesos custom executor return &mesos.ExecutorInfo{ + Type: mesos.ExecutorInfo_CUSTOM, ExecutorID: mesos.ExecutorID{Value: "default"}, Name: proto.String("Test Executor"), Command: mesos.CommandInfo{ @@ -73,6 +74,7 @@ func prepareExecutorInfo( // Create mesos custom executor return &mesos.ExecutorInfo{ + Type: mesos.ExecutorInfo_CUSTOM, ExecutorID: mesos.ExecutorID{Value: "default"}, Name: proto.String("Test Executor"), Command: mesos.CommandInfo{ diff --git a/api/v1/lib/httpcli/httpsched/state_test.go b/api/v1/lib/httpcli/httpsched/state_test.go index 92a3e1fe..54a752c5 100644 --- a/api/v1/lib/httpcli/httpsched/state_test.go +++ b/api/v1/lib/httpcli/httpsched/state_test.go @@ -28,7 +28,7 @@ func TestDisconnectionDecoder(t *testing.T) { // ERROR event triggers disconnect latch.Reset() errtype := scheduler.Event_ERROR - event := &scheduler.Event{Type: &errtype} + event := &scheduler.Event{Type: errtype} decoder = encoding.DecoderFunc(func(um encoding.Unmarshaler) error { return nil }) d = disconnectionDecoder(decoder, latch.Close) _ = d.Decode(event) @@ -39,6 +39,7 @@ func TestDisconnectionDecoder(t *testing.T) { // sanity: non-ERROR event does not trigger disconnect latch.Reset() errtype = scheduler.Event_SUBSCRIBED + event = &scheduler.Event{Type: errtype} _ = d.Decode(event) if latch.Closed() { t.Error("disconnect func was unexpectedly called") diff --git a/api/v1/lib/mesos.pb.go b/api/v1/lib/mesos.pb.go index f7be0efe..8943a0d5 100644 --- a/api/v1/lib/mesos.pb.go +++ b/api/v1/lib/mesos.pb.go @@ -23,6 +23,7 @@ MachineID MachineInfo FrameworkInfo + CheckInfo HealthCheck KillPolicy CommandInfo @@ -47,6 +48,7 @@ TaskInfo TaskGroupInfo Task + CheckStatusInfo TaskStatus Filters Environment @@ -61,6 +63,8 @@ NetworkInfo CapabilityInfo LinuxInfo + RLimitInfo + TTYInfo ContainerInfo ContainerStatus CgroupInfo @@ -161,7 +165,7 @@ const ( TASK_FAILED TaskState = 3 TASK_KILLED TaskState = 4 TASK_ERROR TaskState = 7 - // In Mesos 1.2, this will only be sent when the framework does NOT + // In Mesos 1.3, this will only be sent when the framework does NOT // opt-in to the PARTITION_AWARE capability. TASK_LOST TaskState = 5 // The task failed to launch because of a transient error. The @@ -173,10 +177,12 @@ const ( // master, typically due to a network failure or partition. The task // may or may not still be running. TASK_UNREACHABLE TaskState = 10 - // The task was running on an agent that has been shutdown (e.g., - // the agent become partitioned, rebooted, and then reconnected to - // the master; any tasks running before the reboot will transition - // from UNREACHABLE to GONE). The task is no longer running. + // The task is no longer running. This can occur if the agent has + // been terminated along with all of its tasks (e.g., the host that + // was running the agent was rebooted). It might also occur if the + // task was terminated due to an agent or containerizer error, or if + // the task was preempted by the QoS controller in an + // oversubscription scenario. TASK_GONE TaskState = 11 // The task was running on an agent that the master cannot contact; // the operator has asserted that the agent has been shutdown, but @@ -339,6 +345,17 @@ const ( // Mesos when the agent reregisters (unless the master has // failed over). FrameworkInfo_Capability_PARTITION_AWARE FrameworkInfo_Capability_Type = 5 + // This expresses the ability for the framework to be + // "multi-tenant" via using the newly introduced `roles` + // field, and examining `Offer.allocation_info` to determine + // which role the offers are being made to. We also + // expect that "single-tenant" schedulers eventually + // provide this and move away from the deprecated + // `role` field. + // + // NOTE: The implementation for supporting multiple + // roles is not complete, DO NOT USE THIS. + FrameworkInfo_Capability_MULTI_ROLE FrameworkInfo_Capability_Type = 6 ) var FrameworkInfo_Capability_Type_name = map[int32]string{ @@ -348,6 +365,7 @@ var FrameworkInfo_Capability_Type_name = map[int32]string{ 3: "GPU_RESOURCES", 4: "SHARED_RESOURCES", 5: "PARTITION_AWARE", + 6: "MULTI_ROLE", } var FrameworkInfo_Capability_Type_value = map[string]int32{ "UNKNOWN": 0, @@ -356,6 +374,7 @@ var FrameworkInfo_Capability_Type_value = map[string]int32{ "GPU_RESOURCES": 3, "SHARED_RESOURCES": 4, "PARTITION_AWARE": 5, + "MULTI_ROLE": 6, } func (x FrameworkInfo_Capability_Type) Enum() *FrameworkInfo_Capability_Type { @@ -375,6 +394,42 @@ func (x *FrameworkInfo_Capability_Type) UnmarshalJSON(data []byte) error { return nil } +type CheckInfo_Type int32 + +const ( + CheckInfo_UNKNOWN CheckInfo_Type = 0 + CheckInfo_COMMAND CheckInfo_Type = 1 + CheckInfo_HTTP CheckInfo_Type = 2 +) + +var CheckInfo_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "COMMAND", + 2: "HTTP", +} +var CheckInfo_Type_value = map[string]int32{ + "UNKNOWN": 0, + "COMMAND": 1, + "HTTP": 2, +} + +func (x CheckInfo_Type) Enum() *CheckInfo_Type { + p := new(CheckInfo_Type) + *p = x + return p +} +func (x CheckInfo_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(CheckInfo_Type_name, int32(x)) +} +func (x *CheckInfo_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CheckInfo_Type_value, data, "CheckInfo_Type") + if err != nil { + return err + } + *x = CheckInfo_Type(value) + return nil +} + type HealthCheck_Type int32 const ( @@ -427,6 +482,9 @@ const ( // // 2) Default executor only accepts a *single* `LAUNCH` or `LAUNCH_GROUP` // offer operation. + // + // 3) If `container` is set, `container.type` must be `MESOS` + // and `container.mesos.image` must not be set. ExecutorInfo_DEFAULT ExecutorInfo_Type = 1 // For frameworks that need custom functionality to run tasks, a `CUSTOM` // executor can be used. Note that `command` must be set when using a @@ -462,6 +520,48 @@ func (x *ExecutorInfo_Type) UnmarshalJSON(data []byte) error { return nil } +type AgentInfo_Capability_Type int32 + +const ( + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + AgentInfo_Capability_UNKNOWN AgentInfo_Capability_Type = 0 + // This expresses the ability for the agent to be able + // to launch tasks of a 'multi-role' framework. + // + // NOTE: The implementation for supporting multiple + // roles is not complete, DO NOT USE THIS. + AgentInfo_Capability_MULTI_ROLE AgentInfo_Capability_Type = 1 +) + +var AgentInfo_Capability_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "MULTI_ROLE", +} +var AgentInfo_Capability_Type_value = map[string]int32{ + "UNKNOWN": 0, + "MULTI_ROLE": 1, +} + +func (x AgentInfo_Capability_Type) Enum() *AgentInfo_Capability_Type { + p := new(AgentInfo_Capability_Type) + *p = x + return p +} +func (x AgentInfo_Capability_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AgentInfo_Capability_Type_name, int32(x)) +} +func (x *AgentInfo_Capability_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AgentInfo_Capability_Type_value, data, "AgentInfo_Capability_Type") + if err != nil { + return err + } + *x = AgentInfo_Capability_Type(value) + return nil +} + type Value_Type int32 const ( @@ -644,6 +744,7 @@ const ( REASON_GC_ERROR TaskStatus_Reason = 4 REASON_INVALID_FRAMEWORKID TaskStatus_Reason = 5 REASON_INVALID_OFFERS TaskStatus_Reason = 6 + REASON_IO_SWITCHBOARD_EXITED TaskStatus_Reason = 27 REASON_MASTER_DISCONNECTED TaskStatus_Reason = 7 REASON_RECONCILIATION TaskStatus_Reason = 9 REASON_RESOURCES_UNKNOWN TaskStatus_Reason = 18 @@ -651,6 +752,7 @@ const ( REASON_AGENT_REMOVED TaskStatus_Reason = 11 REASON_AGENT_RESTARTED TaskStatus_Reason = 12 REASON_AGENT_UNKNOWN TaskStatus_Reason = 13 + REASON_TASK_CHECK_STATUS_UPDATED TaskStatus_Reason = 28 REASON_TASK_GROUP_INVALID TaskStatus_Reason = 25 REASON_TASK_GROUP_UNAUTHORIZED TaskStatus_Reason = 26 REASON_TASK_INVALID TaskStatus_Reason = 14 @@ -674,6 +776,7 @@ var TaskStatus_Reason_name = map[int32]string{ 4: "REASON_GC_ERROR", 5: "REASON_INVALID_FRAMEWORKID", 6: "REASON_INVALID_OFFERS", + 27: "REASON_IO_SWITCHBOARD_EXITED", 7: "REASON_MASTER_DISCONNECTED", 9: "REASON_RECONCILIATION", 18: "REASON_RESOURCES_UNKNOWN", @@ -681,6 +784,7 @@ var TaskStatus_Reason_name = map[int32]string{ 11: "REASON_AGENT_REMOVED", 12: "REASON_AGENT_RESTARTED", 13: "REASON_AGENT_UNKNOWN", + 28: "REASON_TASK_CHECK_STATUS_UPDATED", 25: "REASON_TASK_GROUP_INVALID", 26: "REASON_TASK_GROUP_UNAUTHORIZED", 14: "REASON_TASK_INVALID", @@ -703,6 +807,7 @@ var TaskStatus_Reason_value = map[string]int32{ "REASON_GC_ERROR": 4, "REASON_INVALID_FRAMEWORKID": 5, "REASON_INVALID_OFFERS": 6, + "REASON_IO_SWITCHBOARD_EXITED": 27, "REASON_MASTER_DISCONNECTED": 7, "REASON_RECONCILIATION": 9, "REASON_RESOURCES_UNKNOWN": 18, @@ -710,6 +815,7 @@ var TaskStatus_Reason_value = map[string]int32{ "REASON_AGENT_REMOVED": 11, "REASON_AGENT_RESTARTED": 12, "REASON_AGENT_UNKNOWN": 13, + "REASON_TASK_CHECK_STATUS_UPDATED": 28, "REASON_TASK_GROUP_INVALID": 25, "REASON_TASK_GROUP_UNAUTHORIZED": 26, "REASON_TASK_INVALID": 14, @@ -1059,6 +1165,84 @@ func (x *CapabilityInfo_Capability) UnmarshalJSON(data []byte) error { return nil } +type RLimitInfo_RLimit_Type int32 + +const ( + RLimitInfo_RLimit_UNKNOWN RLimitInfo_RLimit_Type = 0 + RLimitInfo_RLimit_RLMT_AS RLimitInfo_RLimit_Type = 1 + RLimitInfo_RLimit_RLMT_CORE RLimitInfo_RLimit_Type = 2 + RLimitInfo_RLimit_RLMT_CPU RLimitInfo_RLimit_Type = 3 + RLimitInfo_RLimit_RLMT_DATA RLimitInfo_RLimit_Type = 4 + RLimitInfo_RLimit_RLMT_FSIZE RLimitInfo_RLimit_Type = 5 + RLimitInfo_RLimit_RLMT_LOCKS RLimitInfo_RLimit_Type = 6 + RLimitInfo_RLimit_RLMT_MEMLOCK RLimitInfo_RLimit_Type = 7 + RLimitInfo_RLimit_RLMT_MSGQUEUE RLimitInfo_RLimit_Type = 8 + RLimitInfo_RLimit_RLMT_NICE RLimitInfo_RLimit_Type = 9 + RLimitInfo_RLimit_RLMT_NOFILE RLimitInfo_RLimit_Type = 10 + RLimitInfo_RLimit_RLMT_NPROC RLimitInfo_RLimit_Type = 11 + RLimitInfo_RLimit_RLMT_RSS RLimitInfo_RLimit_Type = 12 + RLimitInfo_RLimit_RLMT_RTPRIO RLimitInfo_RLimit_Type = 13 + RLimitInfo_RLimit_RLMT_RTTIME RLimitInfo_RLimit_Type = 14 + RLimitInfo_RLimit_RLMT_SIGPENDING RLimitInfo_RLimit_Type = 15 + RLimitInfo_RLimit_RLMT_STACK RLimitInfo_RLimit_Type = 16 +) + +var RLimitInfo_RLimit_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "RLMT_AS", + 2: "RLMT_CORE", + 3: "RLMT_CPU", + 4: "RLMT_DATA", + 5: "RLMT_FSIZE", + 6: "RLMT_LOCKS", + 7: "RLMT_MEMLOCK", + 8: "RLMT_MSGQUEUE", + 9: "RLMT_NICE", + 10: "RLMT_NOFILE", + 11: "RLMT_NPROC", + 12: "RLMT_RSS", + 13: "RLMT_RTPRIO", + 14: "RLMT_RTTIME", + 15: "RLMT_SIGPENDING", + 16: "RLMT_STACK", +} +var RLimitInfo_RLimit_Type_value = map[string]int32{ + "UNKNOWN": 0, + "RLMT_AS": 1, + "RLMT_CORE": 2, + "RLMT_CPU": 3, + "RLMT_DATA": 4, + "RLMT_FSIZE": 5, + "RLMT_LOCKS": 6, + "RLMT_MEMLOCK": 7, + "RLMT_MSGQUEUE": 8, + "RLMT_NICE": 9, + "RLMT_NOFILE": 10, + "RLMT_NPROC": 11, + "RLMT_RSS": 12, + "RLMT_RTPRIO": 13, + "RLMT_RTTIME": 14, + "RLMT_SIGPENDING": 15, + "RLMT_STACK": 16, +} + +func (x RLimitInfo_RLimit_Type) Enum() *RLimitInfo_RLimit_Type { + p := new(RLimitInfo_RLimit_Type) + *p = x + return p +} +func (x RLimitInfo_RLimit_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(RLimitInfo_RLimit_Type_name, int32(x)) +} +func (x *RLimitInfo_RLimit_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RLimitInfo_RLimit_Type_value, data, "RLimitInfo_RLimit_Type") + if err != nil { + return err + } + *x = RLimitInfo_RLimit_Type(value) + return nil +} + // All container implementation types. type ContainerInfo_Type int32 @@ -1529,9 +1713,19 @@ type FrameworkInfo struct { // the agent. Enabling checkpointing improves fault tolerance, at // the cost of a (usually small) increase in 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"` + // Roles are the entities to which allocations are made. + // The framework must have at least one role in order to + // be offered resources. Note that `role` is deprecated + // in favor of `roles` and only one of these fields must + // be used. Since we cannot distinguish between empty + // `roles` and the default unset `role`, we require that + // frameworks set the `MULTI_ROLE` capability if + // setting the `roles` field. + // + // NOTE: The implmentation for supporting `roles` + // is not complete, DO NOT USE the `roles` field. + Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` + Roles []string `protobuf:"bytes,12,rep,name=roles" json:"roles,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 if one is @@ -1606,6 +1800,13 @@ func (m *FrameworkInfo) GetRole() string { return Default_FrameworkInfo_Role } +func (m *FrameworkInfo) GetRoles() []string { + if m != nil { + return m.Roles + } + return nil +} + func (m *FrameworkInfo) GetHostname() string { if m != nil && m.Hostname != nil { return *m.Hostname @@ -1656,23 +1857,156 @@ func (m *FrameworkInfo_Capability) GetType() FrameworkInfo_Capability_Type { return FrameworkInfo_Capability_UNKNOWN } +// * +// Describes a general non-interpreting non-killing check for a task or +// executor (or any arbitrary process/command). A type is picked by +// specifying one of the optional fields. Specifying more than one type +// is an error. +// +// NOTE: This API is unstable and the related feature is experimental. +type CheckInfo struct { + // The type of the check. + Type CheckInfo_Type `protobuf:"varint,1,opt,name=type,enum=mesos.CheckInfo_Type" json:"type"` + // Command check. + Command *CheckInfo_Command `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + // HTTP check. + HTTP *CheckInfo_Http `protobuf:"bytes,3,opt,name=http" json:"http,omitempty"` + // Amount of time to wait to start checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STARTING` if the latter + // is used by the executor. + DelaySeconds *float64 `protobuf:"fixed64,4,opt,name=delay_seconds,def=15" json:"delay_seconds,omitempty"` + // Interval between check attempts, i.e., amount of time to wait after + // the previous check finished or timed out to start the next check. + IntervalSeconds *float64 `protobuf:"fixed64,5,opt,name=interval_seconds,def=10" json:"interval_seconds,omitempty"` + // Amount of time to wait for the check to complete. Zero means infinite + // timeout. + // + // After this timeout, the check attempt is aborted and no result is + // reported. Note that this may be considered a state change and hence + // may trigger a check status change delivery to the corresponding + // scheduler. See `CheckStatusInfo` for more details. + TimeoutSeconds *float64 `protobuf:"fixed64,6,opt,name=timeout_seconds,def=20" json:"timeout_seconds,omitempty"` +} + +func (m *CheckInfo) Reset() { *m = CheckInfo{} } +func (*CheckInfo) ProtoMessage() {} + +const Default_CheckInfo_DelaySeconds float64 = 15 +const Default_CheckInfo_IntervalSeconds float64 = 10 +const Default_CheckInfo_TimeoutSeconds float64 = 20 + +func (m *CheckInfo) GetType() CheckInfo_Type { + if m != nil { + return m.Type + } + return CheckInfo_UNKNOWN +} + +func (m *CheckInfo) GetCommand() *CheckInfo_Command { + if m != nil { + return m.Command + } + return nil +} + +func (m *CheckInfo) GetHTTP() *CheckInfo_Http { + if m != nil { + return m.HTTP + } + return nil +} + +func (m *CheckInfo) GetDelaySeconds() float64 { + if m != nil && m.DelaySeconds != nil { + return *m.DelaySeconds + } + return Default_CheckInfo_DelaySeconds +} + +func (m *CheckInfo) GetIntervalSeconds() float64 { + if m != nil && m.IntervalSeconds != nil { + return *m.IntervalSeconds + } + return Default_CheckInfo_IntervalSeconds +} + +func (m *CheckInfo) GetTimeoutSeconds() float64 { + if m != nil && m.TimeoutSeconds != nil { + return *m.TimeoutSeconds + } + return Default_CheckInfo_TimeoutSeconds +} + +// Describes a command check. If applicable, enters mount and/or network +// namespaces of the task. +type CheckInfo_Command struct { + Command CommandInfo `protobuf:"bytes,1,req,name=command" json:"command"` +} + +func (m *CheckInfo_Command) Reset() { *m = CheckInfo_Command{} } +func (*CheckInfo_Command) ProtoMessage() {} + +func (m *CheckInfo_Command) GetCommand() CommandInfo { + if m != nil { + return m.Command + } + return CommandInfo{} +} + +// Describes an HTTP check. Sends a GET request to +// http://:port/path. Note that is not configurable and is +// resolved automatically to 127.0.0.1. +type CheckInfo_Http struct { + // Port to send the HTTP request. + Port uint32 `protobuf:"varint,1,req,name=port" json:"port"` + // HTTP request path. + Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` +} + +func (m *CheckInfo_Http) Reset() { *m = CheckInfo_Http{} } +func (*CheckInfo_Http) ProtoMessage() {} + +func (m *CheckInfo_Http) GetPort() uint32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *CheckInfo_Http) GetPath() string { + if m != nil && m.Path != nil { + return *m.Path + } + return "" +} + // * // Describes a health check for a task or executor (or any arbitrary // process/command). A type is picked by specifying one of the // optional fields. Specifying more than one type is an error. type HealthCheck struct { - // Amount of time to wait until starting the health checks. + // Amount of time to wait to start health checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STATING` if the latter is + // used by the executor. DelaySeconds *float64 `protobuf:"fixed64,2,opt,name=delay_seconds,def=15" json:"delay_seconds,omitempty"` - // Interval between health checks. + // Interval between health checks, i.e., amount of time to wait after + // the previous health check finished or timed out to start the next + // health check. IntervalSeconds *float64 `protobuf:"fixed64,3,opt,name=interval_seconds,def=10" json:"interval_seconds,omitempty"` - // Amount of time to wait for the health check to complete. + // Amount of time to wait for the health check to complete. After this + // timeout, the health check is aborted and treated as a failure. Zero + // means infinite timeout. TimeoutSeconds *float64 `protobuf:"fixed64,4,opt,name=timeout_seconds,def=20" json:"timeout_seconds,omitempty"` - // Number of consecutive failures until signaling kill task. + // Number of consecutive failures until the task is killed by the executor. ConsecutiveFailures *uint32 `protobuf:"varint,5,opt,name=consecutive_failures,def=3" json:"consecutive_failures,omitempty"` - // Amount of time to allow failed health checks since launch. + // Amount of time after the task is launched during which health check + // failures are ignored. Once the a check succeeds for the first time, + // the grace period does not apply anymore. Note that it includes + // `delay_seconds`, i.e., setting `grace_period_seconds` < `delay_seconds` + // has no effect. GracePeriodSeconds *float64 `protobuf:"fixed64,6,opt,name=grace_period_seconds,def=10" json:"grace_period_seconds,omitempty"` // The type of health check. - Type *HealthCheck_Type `protobuf:"varint,8,opt,name=type,enum=mesos.HealthCheck_Type" json:"type,omitempty"` + Type HealthCheck_Type `protobuf:"varint,8,opt,name=type,enum=mesos.HealthCheck_Type" json:"type"` // Command health check. Command *CommandInfo `protobuf:"bytes,7,opt,name=command" json:"command,omitempty"` // HTTP health check. @@ -1726,8 +2060,8 @@ func (m *HealthCheck) GetGracePeriodSeconds() float64 { } func (m *HealthCheck) GetType() HealthCheck_Type { - if m != nil && m.Type != nil { - return *m.Type + if m != nil { + return m.Type } return HealthCheck_UNKNOWN } @@ -2018,10 +2352,10 @@ type ExecutorInfo struct { // // TODO(vinod): Add support for explicitly setting `type` to `DEFAULT ` // in `LAUNCH` offer operation. - Type *ExecutorInfo_Type `protobuf:"varint,15,opt,name=type,enum=mesos.ExecutorInfo_Type" json:"type,omitempty"` - ExecutorID ExecutorID `protobuf:"bytes,1,req,name=executor_id" json:"executor_id"` - FrameworkID *FrameworkID `protobuf:"bytes,8,opt,name=framework_id" json:"framework_id,omitempty"` - Command CommandInfo `protobuf:"bytes,7,req,name=command" json:"command"` + Type ExecutorInfo_Type `protobuf:"varint,15,opt,name=type,enum=mesos.ExecutorInfo_Type" json:"type"` + ExecutorID ExecutorID `protobuf:"bytes,1,req,name=executor_id" json:"executor_id"` + FrameworkID *FrameworkID `protobuf:"bytes,8,opt,name=framework_id" json:"framework_id,omitempty"` + Command CommandInfo `protobuf:"bytes,7,req,name=command" json:"command"` // Executor provided with a container will launch the container // with the executor's CommandInfo and we expect the container to // act as a Mesos executor. @@ -2066,8 +2400,8 @@ func (m *ExecutorInfo) Reset() { *m = ExecutorInfo{} } func (*ExecutorInfo) ProtoMessage() {} func (m *ExecutorInfo) GetType() ExecutorInfo_Type { - if m != nil && m.Type != nil { - return *m.Type + if m != nil { + return m.Type } return ExecutorInfo_UNKNOWN } @@ -2286,6 +2620,21 @@ func (m *AgentInfo) GetID() *AgentID { return nil } +type AgentInfo_Capability struct { + // Enum fields should be optional, see: MESOS-4997. + Type AgentInfo_Capability_Type `protobuf:"varint,1,opt,name=type,enum=mesos.AgentInfo_Capability_Type" json:"type"` +} + +func (m *AgentInfo_Capability) Reset() { *m = AgentInfo_Capability{} } +func (*AgentInfo_Capability) ProtoMessage() {} + +func (m *AgentInfo_Capability) GetType() AgentInfo_Capability_Type { + if m != nil { + return m.Type + } + return AgentInfo_Capability_UNKNOWN +} + // * // Describes an Attribute or Resource "value". A value is described // using the standard protocol buffer "union" trick. @@ -2500,7 +2849,8 @@ type Resource struct { // The role that this resource is reserved for. If "*", this indicates // that the resource is unreserved. Otherwise, the resource will only // be offered to frameworks that belong to this role. - Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` + Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` + AllocationInfo *Resource_AllocationInfo `protobuf:"bytes,11,opt,name=allocation_info" json:"allocation_info,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. @@ -2567,6 +2917,13 @@ func (m *Resource) GetRole() string { return Default_Resource_Role } +func (m *Resource) GetAllocationInfo() *Resource_AllocationInfo { + if m != nil { + return m.AllocationInfo + } + return nil +} + func (m *Resource) GetReservation() *Resource_ReservationInfo { if m != nil { return m.Reservation @@ -2595,6 +2952,29 @@ func (m *Resource) GetShared() *Resource_SharedInfo { return nil } +// This was initially introduced to support MULTI_ROLE capable +// frameworks. Frameworks that are not MULTI_ROLE capable can +// continue to assume that the offered resources are allocated +// to their role. +// +// NOTE: Implementation of this is in-progress, DO NOT USE! +type Resource_AllocationInfo struct { + // If set, this resource is allocated to a role. Note that in the + // future, this may be unset and the scheduler may be responsible + // for allocating to one of its roles. + Role *string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"` +} + +func (m *Resource_AllocationInfo) Reset() { *m = Resource_AllocationInfo{} } +func (*Resource_AllocationInfo) ProtoMessage() {} + +func (m *Resource_AllocationInfo) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return "" +} + type Resource_ReservationInfo struct { // Indicates the principal, if any, of the framework or operator // that reserved this resource. If reserved by a framework, the @@ -4507,6 +4887,13 @@ type Offer struct { // The unavailability may also be forever! See comments in // `Unavailability` for more details. Unavailability *Unavailability `protobuf:"bytes,9,opt,name=unavailability" json:"unavailability,omitempty"` + // An offer represents resources allocated to *one* of the + // roles managed by the scheduler. (Therefore, each + // `Offer.resources[i].allocation_info` will match the + // top level `Offer.allocation_info`). + // + // NOTE: Implementation of this is in-progress, DO NOT USE! + AllocationInfo *Resource_AllocationInfo `protobuf:"bytes,10,opt,name=allocation_info" json:"allocation_info,omitempty"` } func (m *Offer) Reset() { *m = Offer{} } @@ -4575,9 +4962,16 @@ func (m *Offer) GetUnavailability() *Unavailability { return nil } +func (m *Offer) GetAllocationInfo() *Resource_AllocationInfo { + if m != nil { + return m.AllocationInfo + } + return nil +} + // Defines an operation that can be performed against offers. type Offer_Operation struct { - Type *Offer_Operation_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Offer_Operation_Type" json:"type,omitempty"` + Type Offer_Operation_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Offer_Operation_Type" json:"type"` Launch *Offer_Operation_Launch `protobuf:"bytes,2,opt,name=launch" json:"launch,omitempty"` LaunchGroup *Offer_Operation_LaunchGroup `protobuf:"bytes,7,opt,name=launch_group" json:"launch_group,omitempty"` Reserve *Offer_Operation_Reserve `protobuf:"bytes,3,opt,name=reserve" json:"reserve,omitempty"` @@ -4590,8 +4984,8 @@ 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 + if m != nil { + return m.Type } return Offer_Operation_UNKNOWN } @@ -4845,8 +5239,17 @@ type TaskInfo struct { // command-based tasks. For tasks that specify an executor, it is // the executor's responsibility to implement the health checking. HealthCheck *HealthCheck `protobuf:"bytes,8,opt,name=health_check" json:"health_check,omitempty"` + // A general check for the task. Implemented for all built-in executors. + // For tasks that specify an executor, it is the executor's responsibility + // to implement checking support. Executors should (all built-in executors + // will) neither interpret nor act on the check's result. + // + // NOTE: Check support in built-in executors is experimental. + // + // TODO(alexr): Consider supporting multiple checks per task. + Check *CheckInfo `protobuf:"bytes,13,opt,name=check" json:"check,omitempty"` // A kill policy for the task. Implemented for executor-less - // command-based and docker tasks. For tasks that specify other + // command-based and docker tasks. For tasks that specify an // executor, it is the executor's responsibility to implement // the kill policy. KillPolicy *KillPolicy `protobuf:"bytes,12,opt,name=kill_policy" json:"kill_policy,omitempty"` @@ -4924,6 +5327,13 @@ func (m *TaskInfo) GetHealthCheck() *HealthCheck { return nil } +func (m *TaskInfo) GetCheck() *CheckInfo { + if m != nil { + return m.Check + } + return nil +} + func (m *TaskInfo) GetKillPolicy() *KillPolicy { if m != nil { return m.KillPolicy @@ -5114,6 +5524,76 @@ func (m *Task) GetUser() string { return "" } +// * +// Describes the status of a check. Type and the corresponding field, i.e., +// `command` or `http` must be set. If the result of the check is not available +// (e.g., the check timed out), these fields must contain empty messages, i.e., +// `exit_code` or `status_code` will be unset. +// +// NOTE: This API is unstable and the related feature is experimental. +type CheckStatusInfo struct { + // The type of the check this status corresponds to. + Type *CheckInfo_Type `protobuf:"varint,1,opt,name=type,enum=mesos.CheckInfo_Type" json:"type,omitempty"` + // Status of a command check. + Command *CheckStatusInfo_Command `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + // Status of an HTTP check. + HTTP *CheckStatusInfo_Http `protobuf:"bytes,3,opt,name=http" json:"http,omitempty"` +} + +func (m *CheckStatusInfo) Reset() { *m = CheckStatusInfo{} } +func (*CheckStatusInfo) ProtoMessage() {} + +func (m *CheckStatusInfo) GetType() CheckInfo_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return CheckInfo_UNKNOWN +} + +func (m *CheckStatusInfo) GetCommand() *CheckStatusInfo_Command { + if m != nil { + return m.Command + } + return nil +} + +func (m *CheckStatusInfo) GetHTTP() *CheckStatusInfo_Http { + if m != nil { + return m.HTTP + } + return nil +} + +type CheckStatusInfo_Command struct { + // Exit code of a command check. + ExitCode *int32 `protobuf:"varint,1,opt,name=exit_code" json:"exit_code,omitempty"` +} + +func (m *CheckStatusInfo_Command) Reset() { *m = CheckStatusInfo_Command{} } +func (*CheckStatusInfo_Command) ProtoMessage() {} + +func (m *CheckStatusInfo_Command) GetExitCode() int32 { + if m != nil && m.ExitCode != nil { + return *m.ExitCode + } + return 0 +} + +type CheckStatusInfo_Http struct { + // HTTP status code of an HTTP check. + StatusCode *uint32 `protobuf:"varint,1,opt,name=status_code" json:"status_code,omitempty"` +} + +func (m *CheckStatusInfo_Http) Reset() { *m = CheckStatusInfo_Http{} } +func (*CheckStatusInfo_Http) ProtoMessage() {} + +func (m *CheckStatusInfo_Http) GetStatusCode() uint32 { + if m != nil && m.StatusCode != nil { + return *m.StatusCode + } + return 0 +} + // * // Describes the current status of a task. type TaskStatus struct { @@ -5136,10 +5616,21 @@ type TaskStatus struct { // 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. + // Describes whether the task has been determined to be healthy (true) or + // unhealthy (false) according to the `health_check` field in `TaskInfo`. Healthy *bool `protobuf:"varint,8,opt,name=healthy" json:"healthy,omitempty"` + // Contains check status for the check specified in the corresponding + // `TaskInfo`. If no check has been specified, this field must be + // absent, otherwise it must be present even if the check status is + // not available yet. If the status update is triggered for a different + // reason than `REASON_TASK_CHECK_STATUS_UPDATED`, this field will contain + // the last known value. + // + // NOTE: A check-related task status update is triggered if and only if + // the value or presence of any field in `CheckStatusInfo` changes. + // + // NOTE: Check support in built-in executors is experimental. + CheckStatus *CheckStatusInfo `protobuf:"bytes,15,opt,name=check_status" json:"check_status,omitempty"` // Labels are free-form key value pairs which are exposed through // master and agent endpoints. Labels will not be interpreted or // acted upon by Mesos itself. As opposed to the data field, labels @@ -5237,6 +5728,13 @@ func (m *TaskStatus) GetHealthy() bool { return false } +func (m *TaskStatus) GetCheckStatus() *CheckStatusInfo { + if m != nil { + return m.CheckStatus + } + return nil +} + func (m *TaskStatus) GetLabels() *Labels { if m != nil { return m.Labels @@ -5302,8 +5800,11 @@ func (m *Environment) GetVariables() []Environment_Variable { } type Environment_Variable struct { - Name string `protobuf:"bytes,1,req,name=name" json:"name"` - Value string `protobuf:"bytes,2,req,name=value" json:"value"` + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + // NOTE: The `value` field was made optional in Mesos 1.2 but it + // is currently enforced to be set. This constraint will be + // removed in a future version. + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` } func (m *Environment_Variable) Reset() { *m = Environment_Variable{} } @@ -5317,8 +5818,8 @@ func (m *Environment_Variable) GetName() string { } func (m *Environment_Variable) GetValue() string { - if m != nil { - return m.Value + if m != nil && m.Value != nil { + return *m.Value } return "" } @@ -5740,7 +6241,7 @@ func (m *Volume_Source_DockerVolume) GetDriverOptions() *Parameters { // from their parent container's sandbox. It'll be an error if // the current container is a top level container. type Volume_Source_SandboxPath struct { - Type *Volume_Source_SandboxPath_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Volume_Source_SandboxPath_Type" json:"type,omitempty"` + Type Volume_Source_SandboxPath_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Volume_Source_SandboxPath_Type" json:"type"` // A path relative to the corresponding container's sandbox. // Note that upwards traversal (i.e. ../../abc) is not allowed. Path string `protobuf:"bytes,2,req,name=path" json:"path"` @@ -5750,8 +6251,8 @@ func (m *Volume_Source_SandboxPath) Reset() { *m = Volume_Source_SandboxPat func (*Volume_Source_SandboxPath) ProtoMessage() {} func (m *Volume_Source_SandboxPath) GetType() Volume_Source_SandboxPath_Type { - if m != nil && m.Type != nil { - return *m.Type + if m != nil { + return m.Type } return Volume_Source_SandboxPath_UNKNOWN } @@ -5951,9 +6452,108 @@ func (m *LinuxInfo) GetCapabilityInfo() *CapabilityInfo { return nil } +// * +// Encapsulation for POSIX rlimits, see +// http://pubs.opengroup.org/onlinepubs/009695399/functions/getrlimit.html. +// Note that some types might only be defined for Linux. +// We use a custom prefix to avoid conflict with existing system macros +// (e.g., `RLIMIT_CPU` or `NOFILE`). +type RLimitInfo struct { + Rlimits []RLimitInfo_RLimit `protobuf:"bytes,1,rep,name=rlimits" json:"rlimits"` +} + +func (m *RLimitInfo) Reset() { *m = RLimitInfo{} } +func (*RLimitInfo) ProtoMessage() {} + +func (m *RLimitInfo) GetRlimits() []RLimitInfo_RLimit { + if m != nil { + return m.Rlimits + } + return nil +} + +type RLimitInfo_RLimit struct { + Type RLimitInfo_RLimit_Type `protobuf:"varint,1,opt,name=type,enum=mesos.RLimitInfo_RLimit_Type" json:"type"` + // Either both are set or both are not set. + // If both are not set, it represents unlimited. + // If both are set, we require `soft` <= `hard`. + Hard *uint64 `protobuf:"varint,2,opt,name=hard" json:"hard,omitempty"` + Soft *uint64 `protobuf:"varint,3,opt,name=soft" json:"soft,omitempty"` +} + +func (m *RLimitInfo_RLimit) Reset() { *m = RLimitInfo_RLimit{} } +func (*RLimitInfo_RLimit) ProtoMessage() {} + +func (m *RLimitInfo_RLimit) GetType() RLimitInfo_RLimit_Type { + if m != nil { + return m.Type + } + return RLimitInfo_RLimit_UNKNOWN +} + +func (m *RLimitInfo_RLimit) GetHard() uint64 { + if m != nil && m.Hard != nil { + return *m.Hard + } + return 0 +} + +func (m *RLimitInfo_RLimit) GetSoft() uint64 { + if m != nil && m.Soft != nil { + return *m.Soft + } + return 0 +} + +// * +// Describes the information about (pseudo) TTY that can +// be attached to a process running in a container. +type TTYInfo struct { + WindowSize *TTYInfo_WindowSize `protobuf:"bytes,1,opt,name=window_size" json:"window_size,omitempty"` +} + +func (m *TTYInfo) Reset() { *m = TTYInfo{} } +func (*TTYInfo) ProtoMessage() {} + +func (m *TTYInfo) GetWindowSize() *TTYInfo_WindowSize { + if m != nil { + return m.WindowSize + } + return nil +} + +type TTYInfo_WindowSize struct { + Rows uint32 `protobuf:"varint,1,req,name=rows" json:"rows"` + Columns uint32 `protobuf:"varint,2,req,name=columns" json:"columns"` +} + +func (m *TTYInfo_WindowSize) Reset() { *m = TTYInfo_WindowSize{} } +func (*TTYInfo_WindowSize) ProtoMessage() {} + +func (m *TTYInfo_WindowSize) GetRows() uint32 { + if m != nil { + return m.Rows + } + return 0 +} + +func (m *TTYInfo_WindowSize) GetColumns() uint32 { + if m != nil { + return m.Columns + } + return 0 +} + // * // Describes a container configuration and allows extensible // configurations for different container implementations. +// +// NOTE: `ContainerInfo` may be specified, e.g., by a task, even if no +// container image is provided. In this case neither `MesosInfo` nor +// `DockerInfo` is set, the required `type` must be `MESOS`. This is to +// address a case when a task without an image, e.g., a shell script +// with URIs, wants to use features originally designed for containers, +// for example custom network isolation via `NetworkInfo`. type ContainerInfo struct { Type *ContainerInfo_Type `protobuf:"varint,1,req,name=type,enum=mesos.ContainerInfo_Type" json:"type,omitempty"` Volumes []Volume `protobuf:"bytes,2,rep,name=volumes" json:"volumes"` @@ -5967,6 +6567,10 @@ type ContainerInfo struct { NetworkInfos []NetworkInfo `protobuf:"bytes,7,rep,name=network_infos" json:"network_infos"` // Linux specific information for the container. LinuxInfo *LinuxInfo `protobuf:"bytes,8,opt,name=linux_info" json:"linux_info,omitempty"` + // (POSIX only) rlimits of the container. + RlimitInfo *RLimitInfo `protobuf:"bytes,9,opt,name=rlimit_info" json:"rlimit_info,omitempty"` + // If specified a tty will be attached to the container entrypoint. + TTYInfo *TTYInfo `protobuf:"bytes,10,opt,name=tty_info" json:"tty_info,omitempty"` } func (m *ContainerInfo) Reset() { *m = ContainerInfo{} } @@ -6021,6 +6625,20 @@ func (m *ContainerInfo) GetLinuxInfo() *LinuxInfo { return nil } +func (m *ContainerInfo) GetRlimitInfo() *RLimitInfo { + if m != nil { + return m.RlimitInfo + } + return nil +} + +func (m *ContainerInfo) GetTTYInfo() *TTYInfo { + if m != nil { + return m.TTYInfo + } + return nil +} + type ContainerInfo_DockerInfo struct { // The docker image that is going to be passed to the registry. Image string `protobuf:"bytes,1,req,name=image" json:"image"` @@ -6145,6 +6763,7 @@ func (m *ContainerInfo_MesosInfo) GetImage() *Image { // setup. The information is sent back to the framework as part of the // TaskStatus message. type ContainerStatus struct { + ContainerID *ContainerID `protobuf:"bytes,4,opt,name=container_id" json:"container_id,omitempty"` // This field can be reliably used to identify the container IP address. NetworkInfos []NetworkInfo `protobuf:"bytes,1,rep,name=network_infos" json:"network_infos"` // Information about Linux control group (cgroup). @@ -6156,6 +6775,13 @@ type ContainerStatus struct { func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } func (*ContainerStatus) ProtoMessage() {} +func (m *ContainerStatus) GetContainerID() *ContainerID { + if m != nil { + return m.ContainerID + } + return nil +} + func (m *ContainerStatus) GetNetworkInfos() []NetworkInfo { if m != nil { return m.NetworkInfos @@ -6657,8 +7283,10 @@ func init() { proto.RegisterEnum("mesos.TaskState", TaskState_name, TaskState_value) proto.RegisterEnum("mesos.MachineInfo_Mode", MachineInfo_Mode_name, MachineInfo_Mode_value) proto.RegisterEnum("mesos.FrameworkInfo_Capability_Type", FrameworkInfo_Capability_Type_name, FrameworkInfo_Capability_Type_value) + proto.RegisterEnum("mesos.CheckInfo_Type", CheckInfo_Type_name, CheckInfo_Type_value) proto.RegisterEnum("mesos.HealthCheck_Type", HealthCheck_Type_name, HealthCheck_Type_value) proto.RegisterEnum("mesos.ExecutorInfo_Type", ExecutorInfo_Type_name, ExecutorInfo_Type_value) + proto.RegisterEnum("mesos.AgentInfo_Capability_Type", AgentInfo_Capability_Type_name, AgentInfo_Capability_Type_value) proto.RegisterEnum("mesos.Value_Type", Value_Type_name, Value_Type_value) proto.RegisterEnum("mesos.Resource_DiskInfo_Source_Type", Resource_DiskInfo_Source_Type_name, Resource_DiskInfo_Source_Type_value) proto.RegisterEnum("mesos.Offer_Operation_Type", Offer_Operation_Type_name, Offer_Operation_Type_value) @@ -6670,6 +7298,7 @@ func init() { proto.RegisterEnum("mesos.Volume_Source_SandboxPath_Type", Volume_Source_SandboxPath_Type_name, Volume_Source_SandboxPath_Type_value) proto.RegisterEnum("mesos.NetworkInfo_Protocol", NetworkInfo_Protocol_name, NetworkInfo_Protocol_value) proto.RegisterEnum("mesos.CapabilityInfo_Capability", CapabilityInfo_Capability_name, CapabilityInfo_Capability_value) + proto.RegisterEnum("mesos.RLimitInfo_RLimit_Type", RLimitInfo_RLimit_Type_name, RLimitInfo_RLimit_Type_value) proto.RegisterEnum("mesos.ContainerInfo_Type", ContainerInfo_Type_name, ContainerInfo_Type_value) proto.RegisterEnum("mesos.ContainerInfo_DockerInfo_Network", ContainerInfo_DockerInfo_Network_name, ContainerInfo_DockerInfo_Network_value) proto.RegisterEnum("mesos.DiscoveryInfo_Visibility", DiscoveryInfo_Visibility_name, DiscoveryInfo_Visibility_value) @@ -6702,6 +7331,13 @@ func (x FrameworkInfo_Capability_Type) String() string { } return strconv.Itoa(int(x)) } +func (x CheckInfo_Type) String() string { + s, ok := CheckInfo_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} func (x HealthCheck_Type) String() string { s, ok := HealthCheck_Type_name[int32(x)] if ok { @@ -6716,6 +7352,13 @@ func (x ExecutorInfo_Type) String() string { } return strconv.Itoa(int(x)) } +func (x AgentInfo_Capability_Type) String() string { + s, ok := AgentInfo_Capability_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} func (x Value_Type) String() string { s, ok := Value_Type_name[int32(x)] if ok { @@ -6793,6 +7436,13 @@ func (x CapabilityInfo_Capability) String() string { } return strconv.Itoa(int(x)) } +func (x RLimitInfo_RLimit_Type) String() string { + s, ok := RLimitInfo_RLimit_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} func (x ContainerInfo_Type) String() string { s, ok := ContainerInfo_Type_name[int32(x)] if ok { @@ -7680,6 +8330,14 @@ func (this *FrameworkInfo) VerboseEqual(that interface{}) error { } else if that1.Role != nil { return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) } + if len(this.Roles) != len(that1.Roles) { + return fmt.Errorf("Roles this(%v) Not Equal that(%v)", len(this.Roles), len(that1.Roles)) + } + for i := range this.Roles { + if this.Roles[i] != that1.Roles[i] { + return fmt.Errorf("Roles this[%v](%v) Not Equal that[%v](%v)", i, this.Roles[i], i, that1.Roles[i]) + } + } 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) @@ -7776,6 +8434,14 @@ func (this *FrameworkInfo) Equal(that interface{}) bool { } else if that1.Role != nil { return false } + if len(this.Roles) != len(that1.Roles) { + return false + } + for i := range this.Roles { + if this.Roles[i] != that1.Roles[i] { + return false + } + } if this.Hostname != nil && that1.Hostname != nil { if *this.Hostname != *that1.Hostname { return false @@ -7866,6 +8532,240 @@ func (this *FrameworkInfo_Capability) Equal(that interface{}) bool { } return true } +func (this *CheckInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckInfo) + if !ok { + return fmt.Errorf("that is not of type *CheckInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckInfobut is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + 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) + } + return nil +} +func (this *CheckInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Command.Equal(that1.Command) { + 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 + } + return true +} +func (this *CheckInfo_Command) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckInfo_Command) + if !ok { + return fmt.Errorf("that is not of type *CheckInfo_Command") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckInfo_Command but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckInfo_Commandbut is not nil && this == nil") + } + if !this.Command.Equal(&that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + return nil +} +func (this *CheckInfo_Command) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckInfo_Command) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Command.Equal(&that1.Command) { + return false + } + return true +} +func (this *CheckInfo_Http) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckInfo_Http) + if !ok { + return fmt.Errorf("that is not of type *CheckInfo_Http") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckInfo_Http but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckInfo_Httpbut is not nil && this == nil") + } + if this.Port != that1.Port { + 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) + } + return nil +} +func (this *CheckInfo_Http) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckInfo_Http) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Port != that1.Port { + 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 + } + return true +} func (this *HealthCheck) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -7931,13 +8831,7 @@ func (this *HealthCheck) VerboseEqual(that interface{}) error { } else if that1.GracePeriodSeconds != nil { return fmt.Errorf("GracePeriodSeconds this(%v) Not Equal that(%v)", this.GracePeriodSeconds, that1.GracePeriodSeconds) } - 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 { + if this.Type != that1.Type { return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } if !this.Command.Equal(that1.Command) { @@ -8016,13 +8910,7 @@ func (this *HealthCheck) Equal(that interface{}) bool { } else if that1.GracePeriodSeconds != 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 { + if this.Type != that1.Type { return false } if !this.Command.Equal(that1.Command) { @@ -8516,13 +9404,7 @@ func (this *ExecutorInfo) VerboseEqual(that interface{}) error { } else if this == nil { return fmt.Errorf("that is type *ExecutorInfobut 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 { + if this.Type != that1.Type { return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } if !this.ExecutorID.Equal(&that1.ExecutorID) { @@ -8597,13 +9479,7 @@ func (this *ExecutorInfo) Equal(that interface{}) bool { } 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 { + if this.Type != that1.Type { return false } if !this.ExecutorID.Equal(&that1.ExecutorID) { @@ -8898,6 +9774,56 @@ func (this *AgentInfo) Equal(that interface{}) bool { } return true } +func (this *AgentInfo_Capability) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AgentInfo_Capability) + if !ok { + return fmt.Errorf("that is not of type *AgentInfo_Capability") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AgentInfo_Capability but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AgentInfo_Capabilitybut is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + return nil +} +func (this *AgentInfo_Capability) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AgentInfo_Capability) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + return true +} func (this *Value) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -9378,6 +10304,9 @@ func (this *Resource) VerboseEqual(that interface{}) error { } else if that1.Role != nil { return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return fmt.Errorf("AllocationInfo this(%v) Not Equal that(%v)", this.AllocationInfo, that1.AllocationInfo) + } if !this.Reservation.Equal(that1.Reservation) { return fmt.Errorf("Reservation this(%v) Not Equal that(%v)", this.Reservation, that1.Reservation) } @@ -9442,6 +10371,9 @@ func (this *Resource) Equal(that interface{}) bool { } else if that1.Role != nil { return false } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return false + } if !this.Reservation.Equal(that1.Reservation) { return false } @@ -9456,6 +10388,68 @@ func (this *Resource) Equal(that interface{}) bool { } return true } +func (this *Resource_AllocationInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_AllocationInfo) + if !ok { + return fmt.Errorf("that is not of type *Resource_AllocationInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_AllocationInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_AllocationInfobut is not nil && this == nil") + } + 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) + } + return nil +} +func (this *Resource_AllocationInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_AllocationInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + 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 + } + return true +} func (this *Resource_ReservationInfo) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -13726,6 +14720,9 @@ func (this *Offer) VerboseEqual(that interface{}) error { if !this.Unavailability.Equal(that1.Unavailability) { return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return fmt.Errorf("AllocationInfo this(%v) Not Equal that(%v)", this.AllocationInfo, that1.AllocationInfo) + } return nil } func (this *Offer) Equal(that interface{}) bool { @@ -13790,6 +14787,9 @@ func (this *Offer) Equal(that interface{}) bool { if !this.Unavailability.Equal(that1.Unavailability) { return false } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return false + } return true } func (this *Offer_Operation) VerboseEqual(that interface{}) error { @@ -13812,13 +14812,7 @@ func (this *Offer_Operation) VerboseEqual(that interface{}) error { } 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 { + if this.Type != that1.Type { return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } if !this.Launch.Equal(that1.Launch) { @@ -13861,13 +14855,7 @@ func (this *Offer_Operation) Equal(that interface{}) bool { } 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 { + if this.Type != that1.Type { return false } if !this.Launch.Equal(that1.Launch) { @@ -14385,6 +15373,9 @@ func (this *TaskInfo) VerboseEqual(that interface{}) error { if !this.HealthCheck.Equal(that1.HealthCheck) { return fmt.Errorf("HealthCheck this(%v) Not Equal that(%v)", this.HealthCheck, that1.HealthCheck) } + if !this.Check.Equal(that1.Check) { + return fmt.Errorf("Check this(%v) Not Equal that(%v)", this.Check, that1.Check) + } if !this.KillPolicy.Equal(that1.KillPolicy) { return fmt.Errorf("KillPolicy this(%v) Not Equal that(%v)", this.KillPolicy, that1.KillPolicy) } @@ -14448,6 +15439,9 @@ func (this *TaskInfo) Equal(that interface{}) bool { if !this.HealthCheck.Equal(that1.HealthCheck) { return false } + if !this.Check.Equal(that1.Check) { + return false + } if !this.KillPolicy.Equal(that1.KillPolicy) { return false } @@ -14706,6 +15700,204 @@ func (this *Task) Equal(that interface{}) bool { } return true } +func (this *CheckStatusInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckStatusInfo) + if !ok { + return fmt.Errorf("that is not of type *CheckStatusInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckStatusInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckStatusInfobut 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.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.HTTP.Equal(that1.HTTP) { + return fmt.Errorf("HTTP this(%v) Not Equal that(%v)", this.HTTP, that1.HTTP) + } + return nil +} +func (this *CheckStatusInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckStatusInfo) + 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.Command.Equal(that1.Command) { + return false + } + if !this.HTTP.Equal(that1.HTTP) { + return false + } + return true +} +func (this *CheckStatusInfo_Command) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckStatusInfo_Command) + if !ok { + return fmt.Errorf("that is not of type *CheckStatusInfo_Command") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckStatusInfo_Command but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckStatusInfo_Commandbut is not nil && this == nil") + } + if this.ExitCode != nil && that1.ExitCode != nil { + if *this.ExitCode != *that1.ExitCode { + return fmt.Errorf("ExitCode this(%v) Not Equal that(%v)", *this.ExitCode, *that1.ExitCode) + } + } else if this.ExitCode != nil { + return fmt.Errorf("this.ExitCode == nil && that.ExitCode != nil") + } else if that1.ExitCode != nil { + return fmt.Errorf("ExitCode this(%v) Not Equal that(%v)", this.ExitCode, that1.ExitCode) + } + return nil +} +func (this *CheckStatusInfo_Command) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckStatusInfo_Command) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ExitCode != nil && that1.ExitCode != nil { + if *this.ExitCode != *that1.ExitCode { + return false + } + } else if this.ExitCode != nil { + return false + } else if that1.ExitCode != nil { + return false + } + return true +} +func (this *CheckStatusInfo_Http) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckStatusInfo_Http) + if !ok { + return fmt.Errorf("that is not of type *CheckStatusInfo_Http") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckStatusInfo_Http but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckStatusInfo_Httpbut is not nil && this == nil") + } + if this.StatusCode != nil && that1.StatusCode != nil { + if *this.StatusCode != *that1.StatusCode { + return fmt.Errorf("StatusCode this(%v) Not Equal that(%v)", *this.StatusCode, *that1.StatusCode) + } + } else if this.StatusCode != nil { + return fmt.Errorf("this.StatusCode == nil && that.StatusCode != nil") + } else if that1.StatusCode != nil { + return fmt.Errorf("StatusCode this(%v) Not Equal that(%v)", this.StatusCode, that1.StatusCode) + } + return nil +} +func (this *CheckStatusInfo_Http) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckStatusInfo_Http) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.StatusCode != nil && that1.StatusCode != nil { + if *this.StatusCode != *that1.StatusCode { + return false + } + } else if this.StatusCode != nil { + return false + } else if that1.StatusCode != nil { + return false + } + return true +} func (this *TaskStatus) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -14795,6 +15987,9 @@ func (this *TaskStatus) VerboseEqual(that interface{}) error { } else if that1.Healthy != nil { return fmt.Errorf("Healthy this(%v) Not Equal that(%v)", this.Healthy, that1.Healthy) } + if !this.CheckStatus.Equal(that1.CheckStatus) { + return fmt.Errorf("CheckStatus this(%v) Not Equal that(%v)", this.CheckStatus, that1.CheckStatus) + } if !this.Labels.Equal(that1.Labels) { return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) } @@ -14895,6 +16090,9 @@ func (this *TaskStatus) Equal(that interface{}) bool { } else if that1.Healthy != nil { return false } + if !this.CheckStatus.Equal(that1.CheckStatus) { + return false + } if !this.Labels.Equal(that1.Labels) { return false } @@ -15051,7 +16249,13 @@ func (this *Environment_Variable) VerboseEqual(that interface{}) error { if this.Name != that1.Name { return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) } - if this.Value != that1.Value { + 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) } return nil @@ -15079,7 +16283,13 @@ func (this *Environment_Variable) Equal(that interface{}) bool { if this.Name != that1.Name { return false } - if this.Value != that1.Value { + 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 true @@ -15986,13 +17196,7 @@ func (this *Volume_Source_SandboxPath) VerboseEqual(that interface{}) error { } else if this == nil { return fmt.Errorf("that is type *Volume_Source_SandboxPathbut 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 { + if this.Type != that1.Type { return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } if this.Path != that1.Path { @@ -16020,13 +17224,7 @@ func (this *Volume_Source_SandboxPath) Equal(that interface{}) bool { } 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 { + if this.Type != that1.Type { return false } if this.Path != that1.Path { @@ -16414,6 +17612,258 @@ func (this *LinuxInfo) Equal(that interface{}) bool { } return true } +func (this *RLimitInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RLimitInfo) + if !ok { + return fmt.Errorf("that is not of type *RLimitInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RLimitInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RLimitInfobut is not nil && this == nil") + } + if len(this.Rlimits) != len(that1.Rlimits) { + return fmt.Errorf("Rlimits this(%v) Not Equal that(%v)", len(this.Rlimits), len(that1.Rlimits)) + } + for i := range this.Rlimits { + if !this.Rlimits[i].Equal(&that1.Rlimits[i]) { + return fmt.Errorf("Rlimits this[%v](%v) Not Equal that[%v](%v)", i, this.Rlimits[i], i, that1.Rlimits[i]) + } + } + return nil +} +func (this *RLimitInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*RLimitInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Rlimits) != len(that1.Rlimits) { + return false + } + for i := range this.Rlimits { + if !this.Rlimits[i].Equal(&that1.Rlimits[i]) { + return false + } + } + return true +} +func (this *RLimitInfo_RLimit) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RLimitInfo_RLimit) + if !ok { + return fmt.Errorf("that is not of type *RLimitInfo_RLimit") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RLimitInfo_RLimit but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RLimitInfo_RLimitbut is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Hard != nil && that1.Hard != nil { + if *this.Hard != *that1.Hard { + return fmt.Errorf("Hard this(%v) Not Equal that(%v)", *this.Hard, *that1.Hard) + } + } else if this.Hard != nil { + return fmt.Errorf("this.Hard == nil && that.Hard != nil") + } else if that1.Hard != nil { + return fmt.Errorf("Hard this(%v) Not Equal that(%v)", this.Hard, that1.Hard) + } + if this.Soft != nil && that1.Soft != nil { + if *this.Soft != *that1.Soft { + return fmt.Errorf("Soft this(%v) Not Equal that(%v)", *this.Soft, *that1.Soft) + } + } else if this.Soft != nil { + return fmt.Errorf("this.Soft == nil && that.Soft != nil") + } else if that1.Soft != nil { + return fmt.Errorf("Soft this(%v) Not Equal that(%v)", this.Soft, that1.Soft) + } + return nil +} +func (this *RLimitInfo_RLimit) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*RLimitInfo_RLimit) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if this.Hard != nil && that1.Hard != nil { + if *this.Hard != *that1.Hard { + return false + } + } else if this.Hard != nil { + return false + } else if that1.Hard != nil { + return false + } + if this.Soft != nil && that1.Soft != nil { + if *this.Soft != *that1.Soft { + return false + } + } else if this.Soft != nil { + return false + } else if that1.Soft != nil { + return false + } + return true +} +func (this *TTYInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TTYInfo) + if !ok { + return fmt.Errorf("that is not of type *TTYInfo") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TTYInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TTYInfobut is not nil && this == nil") + } + if !this.WindowSize.Equal(that1.WindowSize) { + return fmt.Errorf("WindowSize this(%v) Not Equal that(%v)", this.WindowSize, that1.WindowSize) + } + return nil +} +func (this *TTYInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TTYInfo) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.WindowSize.Equal(that1.WindowSize) { + return false + } + return true +} +func (this *TTYInfo_WindowSize) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TTYInfo_WindowSize) + if !ok { + return fmt.Errorf("that is not of type *TTYInfo_WindowSize") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TTYInfo_WindowSize but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TTYInfo_WindowSizebut is not nil && this == nil") + } + if this.Rows != that1.Rows { + return fmt.Errorf("Rows this(%v) Not Equal that(%v)", this.Rows, that1.Rows) + } + if this.Columns != that1.Columns { + return fmt.Errorf("Columns this(%v) Not Equal that(%v)", this.Columns, that1.Columns) + } + return nil +} +func (this *TTYInfo_WindowSize) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TTYInfo_WindowSize) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Rows != that1.Rows { + return false + } + if this.Columns != that1.Columns { + return false + } + return true +} func (this *ContainerInfo) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -16477,6 +17927,12 @@ func (this *ContainerInfo) VerboseEqual(that interface{}) error { if !this.LinuxInfo.Equal(that1.LinuxInfo) { return fmt.Errorf("LinuxInfo this(%v) Not Equal that(%v)", this.LinuxInfo, that1.LinuxInfo) } + if !this.RlimitInfo.Equal(that1.RlimitInfo) { + return fmt.Errorf("RlimitInfo this(%v) Not Equal that(%v)", this.RlimitInfo, that1.RlimitInfo) + } + if !this.TTYInfo.Equal(that1.TTYInfo) { + return fmt.Errorf("TTYInfo this(%v) Not Equal that(%v)", this.TTYInfo, that1.TTYInfo) + } return nil } func (this *ContainerInfo) Equal(that interface{}) bool { @@ -16542,6 +17998,12 @@ func (this *ContainerInfo) Equal(that interface{}) bool { if !this.LinuxInfo.Equal(that1.LinuxInfo) { return false } + if !this.RlimitInfo.Equal(that1.RlimitInfo) { + return false + } + if !this.TTYInfo.Equal(that1.TTYInfo) { + return false + } return true } func (this *ContainerInfo_DockerInfo) VerboseEqual(that interface{}) error { @@ -16842,6 +18304,9 @@ func (this *ContainerStatus) VerboseEqual(that interface{}) error { } else if this == nil { return fmt.Errorf("that is type *ContainerStatusbut is not nil && this == nil") } + if !this.ContainerID.Equal(that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } if len(this.NetworkInfos) != len(that1.NetworkInfos) { return fmt.Errorf("NetworkInfos this(%v) Not Equal that(%v)", len(this.NetworkInfos), len(that1.NetworkInfos)) } @@ -16884,6 +18349,9 @@ func (this *ContainerStatus) Equal(that interface{}) bool { } else if this == nil { return false } + if !this.ContainerID.Equal(that1.ContainerID) { + return false + } if len(this.NetworkInfos) != len(that1.NetworkInfos) { return false } @@ -18213,7 +19681,7 @@ func (this *FrameworkInfo) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 15) + s := make([]string, 0, 16) s = append(s, "&mesos.FrameworkInfo{") s = append(s, "User: "+fmt.Sprintf("%#v", this.User)+",\n") s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") @@ -18229,6 +19697,9 @@ func (this *FrameworkInfo) GoString() string { if this.Role != nil { s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") } + if this.Roles != nil { + s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") + } if this.Hostname != nil { s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") } @@ -18257,6 +19728,54 @@ func (this *FrameworkInfo_Capability) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *CheckInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.CheckInfo{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + 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") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckInfo_Command) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckInfo_Command{") + s = append(s, "Command: "+strings.Replace(this.Command.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckInfo_Http) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.CheckInfo_Http{") + s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") + if this.Path != nil { + s = append(s, "Path: "+valueToGoStringMesos(this.Path, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *HealthCheck) GoString() string { if this == nil { return "nil" @@ -18278,9 +19797,7 @@ func (this *HealthCheck) GoString() string { if this.GracePeriodSeconds != nil { s = append(s, "GracePeriodSeconds: "+valueToGoStringMesos(this.GracePeriodSeconds, "float64")+",\n") } - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesos.HealthCheck_Type")+",\n") - } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") if this.Command != nil { s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") } @@ -18389,9 +19906,7 @@ func (this *ExecutorInfo) GoString() string { } s := make([]string, 0, 16) s = append(s, "&mesos.ExecutorInfo{") - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesos.ExecutorInfo_Type")+",\n") - } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") s = append(s, "ExecutorID: "+strings.Replace(this.ExecutorID.GoString(), `&`, ``, 1)+",\n") if this.FrameworkID != nil { s = append(s, "FrameworkID: "+fmt.Sprintf("%#v", this.FrameworkID)+",\n") @@ -18472,6 +19987,16 @@ func (this *AgentInfo) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *AgentInfo_Capability) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.AgentInfo_Capability{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func (this *Value) GoString() string { if this == nil { return "nil" @@ -18576,7 +20101,7 @@ func (this *Resource) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 14) + s := make([]string, 0, 15) s = append(s, "&mesos.Resource{") s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") if this.Type != nil { @@ -18594,6 +20119,9 @@ func (this *Resource) GoString() string { if this.Role != nil { s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") } + if this.AllocationInfo != nil { + s = append(s, "AllocationInfo: "+fmt.Sprintf("%#v", this.AllocationInfo)+",\n") + } if this.Reservation != nil { s = append(s, "Reservation: "+fmt.Sprintf("%#v", this.Reservation)+",\n") } @@ -18609,6 +20137,18 @@ func (this *Resource) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *Resource_AllocationInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Resource_AllocationInfo{") + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *Resource_ReservationInfo) GoString() string { if this == nil { return "nil" @@ -19380,7 +20920,7 @@ func (this *Offer) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 13) + s := make([]string, 0, 14) s = append(s, "&mesos.Offer{") s = append(s, "ID: "+strings.Replace(this.ID.GoString(), `&`, ``, 1)+",\n") s = append(s, "FrameworkID: "+strings.Replace(this.FrameworkID.GoString(), `&`, ``, 1)+",\n") @@ -19401,6 +20941,9 @@ func (this *Offer) GoString() string { if this.Unavailability != nil { s = append(s, "Unavailability: "+fmt.Sprintf("%#v", this.Unavailability)+",\n") } + if this.AllocationInfo != nil { + s = append(s, "AllocationInfo: "+fmt.Sprintf("%#v", this.AllocationInfo)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -19410,9 +20953,7 @@ func (this *Offer_Operation) GoString() string { } s := make([]string, 0, 11) s = append(s, "&mesos.Offer_Operation{") - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesos.Offer_Operation_Type")+",\n") - } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") if this.Launch != nil { s = append(s, "Launch: "+fmt.Sprintf("%#v", this.Launch)+",\n") } @@ -19530,7 +21071,7 @@ func (this *TaskInfo) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 16) + s := make([]string, 0, 17) s = append(s, "&mesos.TaskInfo{") s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") s = append(s, "TaskID: "+strings.Replace(this.TaskID.GoString(), `&`, ``, 1)+",\n") @@ -19550,6 +21091,9 @@ func (this *TaskInfo) GoString() string { if this.HealthCheck != nil { s = append(s, "HealthCheck: "+fmt.Sprintf("%#v", this.HealthCheck)+",\n") } + if this.Check != nil { + s = append(s, "Check: "+fmt.Sprintf("%#v", this.Check)+",\n") + } if this.KillPolicy != nil { s = append(s, "KillPolicy: "+fmt.Sprintf("%#v", this.KillPolicy)+",\n") } @@ -19620,11 +21164,53 @@ func (this *Task) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *CheckStatusInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.CheckStatusInfo{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesos.CheckInfo_Type")+",\n") + } + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.HTTP != nil { + s = append(s, "HTTP: "+fmt.Sprintf("%#v", this.HTTP)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckStatusInfo_Command) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckStatusInfo_Command{") + if this.ExitCode != nil { + s = append(s, "ExitCode: "+valueToGoStringMesos(this.ExitCode, "int32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckStatusInfo_Http) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckStatusInfo_Http{") + if this.StatusCode != nil { + s = append(s, "StatusCode: "+valueToGoStringMesos(this.StatusCode, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *TaskStatus) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 18) + s := make([]string, 0, 19) s = append(s, "&mesos.TaskStatus{") s = append(s, "TaskID: "+strings.Replace(this.TaskID.GoString(), `&`, ``, 1)+",\n") if this.State != nil { @@ -19657,6 +21243,9 @@ func (this *TaskStatus) GoString() string { if this.Healthy != nil { s = append(s, "Healthy: "+valueToGoStringMesos(this.Healthy, "bool")+",\n") } + if this.CheckStatus != nil { + s = append(s, "CheckStatus: "+fmt.Sprintf("%#v", this.CheckStatus)+",\n") + } if this.Labels != nil { s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } @@ -19700,7 +21289,9 @@ func (this *Environment_Variable) GoString() string { s := make([]string, 0, 6) s = append(s, "&mesos.Environment_Variable{") s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -19896,9 +21487,7 @@ func (this *Volume_Source_SandboxPath) GoString() string { } s := make([]string, 0, 6) s = append(s, "&mesos.Volume_Source_SandboxPath{") - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesos.Volume_Source_SandboxPath_Type")+",\n") - } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") s = append(s, "}") return strings.Join(s, "") @@ -19980,11 +21569,62 @@ func (this *LinuxInfo) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *RLimitInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.RLimitInfo{") + if this.Rlimits != nil { + s = append(s, "Rlimits: "+strings.Replace(fmt.Sprintf("%#v", this.Rlimits), `&`, ``, 1)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RLimitInfo_RLimit) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.RLimitInfo_RLimit{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Hard != nil { + s = append(s, "Hard: "+valueToGoStringMesos(this.Hard, "uint64")+",\n") + } + if this.Soft != nil { + s = append(s, "Soft: "+valueToGoStringMesos(this.Soft, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TTYInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.TTYInfo{") + if this.WindowSize != nil { + s = append(s, "WindowSize: "+fmt.Sprintf("%#v", this.WindowSize)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TTYInfo_WindowSize) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.TTYInfo_WindowSize{") + s = append(s, "Rows: "+fmt.Sprintf("%#v", this.Rows)+",\n") + s = append(s, "Columns: "+fmt.Sprintf("%#v", this.Columns)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func (this *ContainerInfo) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 11) + s := make([]string, 0, 13) s = append(s, "&mesos.ContainerInfo{") if this.Type != nil { s = append(s, "Type: "+valueToGoStringMesos(this.Type, "mesos.ContainerInfo_Type")+",\n") @@ -20007,6 +21647,12 @@ func (this *ContainerInfo) GoString() string { if this.LinuxInfo != nil { s = append(s, "LinuxInfo: "+fmt.Sprintf("%#v", this.LinuxInfo)+",\n") } + if this.RlimitInfo != nil { + s = append(s, "RlimitInfo: "+fmt.Sprintf("%#v", this.RlimitInfo)+",\n") + } + if this.TTYInfo != nil { + s = append(s, "TTYInfo: "+fmt.Sprintf("%#v", this.TTYInfo)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -20068,8 +21714,11 @@ func (this *ContainerStatus) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&mesos.ContainerStatus{") + if this.ContainerID != nil { + s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n") + } if this.NetworkInfos != nil { s = append(s, "NetworkInfos: "+strings.Replace(fmt.Sprintf("%#v", this.NetworkInfos), `&`, ``, 1)+",\n") } @@ -20802,6 +22451,21 @@ func (m *FrameworkInfo) MarshalTo(data []byte) (int, error) { } i += n8 } + if len(m.Roles) > 0 { + for _, s := range m.Roles { + data[i] = 0x62 + 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 i, nil } @@ -20826,6 +22490,115 @@ func (m *FrameworkInfo_Capability) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *CheckInfo) 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 *CheckInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(m.Type)) + if m.Command != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Command.Size())) + n9, err := m.Command.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.HTTP != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.HTTP.Size())) + n10, err := m.HTTP.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.DelaySeconds != nil { + data[i] = 0x21 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.DelaySeconds))) + } + if m.IntervalSeconds != nil { + data[i] = 0x29 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.IntervalSeconds))) + } + if m.TimeoutSeconds != nil { + data[i] = 0x31 + i++ + i = encodeFixed64Mesos(data, i, uint64(math.Float64bits(*m.TimeoutSeconds))) + } + return i, nil +} + +func (m *CheckInfo_Command) 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 *CheckInfo_Command) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.Command.Size())) + n11, err := m.Command.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + return i, nil +} + +func (m *CheckInfo_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 *CheckInfo_Http) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + 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) + } + return i, nil +} + func (m *HealthCheck) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -20845,11 +22618,11 @@ func (m *HealthCheck) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.HTTP.Size())) - n9, err := m.HTTP.MarshalTo(data[i:]) + n12, err := m.HTTP.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n9 + i += n12 } if m.DelaySeconds != nil { data[i] = 0x11 @@ -20880,26 +22653,24 @@ func (m *HealthCheck) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n10, err := m.Command.MarshalTo(data[i:]) + n13, err := m.Command.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n10 - } - if m.Type != nil { - data[i] = 0x40 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) + i += n13 } + data[i] = 0x40 + i++ + i = encodeVarintMesos(data, i, uint64(m.Type)) if m.TCP != nil { data[i] = 0x4a i++ i = encodeVarintMesos(data, i, uint64(m.TCP.Size())) - n11, err := m.TCP.MarshalTo(data[i:]) + n14, err := m.TCP.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n11 + i += n14 } return i, nil } @@ -20984,11 +22755,11 @@ func (m *KillPolicy) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.GracePeriod.Size())) - n12, err := m.GracePeriod.MarshalTo(data[i:]) + n15, err := m.GracePeriod.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n12 + i += n15 } return i, nil } @@ -21024,11 +22795,11 @@ func (m *CommandInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Environment.Size())) - n13, err := m.Environment.MarshalTo(data[i:]) + n16, err := m.Environment.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n13 + i += n16 } if m.Value != nil { data[i] = 0x1a @@ -21146,11 +22917,11 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.ExecutorID.Size())) - n14, err := m.ExecutorID.MarshalTo(data[i:]) + n17, err := m.ExecutorID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n14 + i += n17 if m.Data != nil { data[i] = 0x22 i++ @@ -21172,20 +22943,20 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n15, err := m.Command.MarshalTo(data[i:]) + n18, err := m.Command.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n15 + i += n18 if m.FrameworkID != nil { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.FrameworkID.Size())) - n16, err := m.FrameworkID.MarshalTo(data[i:]) + n19, err := m.FrameworkID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n16 + i += n19 } if m.Name != nil { data[i] = 0x4a @@ -21203,47 +22974,45 @@ func (m *ExecutorInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x5a i++ i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n17, err := m.Container.MarshalTo(data[i:]) + n20, err := m.Container.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n17 + i += n20 } if m.Discovery != nil { data[i] = 0x62 i++ i = encodeVarintMesos(data, i, uint64(m.Discovery.Size())) - n18, err := m.Discovery.MarshalTo(data[i:]) + n21, err := m.Discovery.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n18 + i += n21 } if m.ShutdownGracePeriod != nil { data[i] = 0x6a i++ i = encodeVarintMesos(data, i, uint64(m.ShutdownGracePeriod.Size())) - n19, err := m.ShutdownGracePeriod.MarshalTo(data[i:]) + n22, err := m.ShutdownGracePeriod.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n19 + i += n22 } if m.Labels != nil { data[i] = 0x72 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n20, err := m.Labels.MarshalTo(data[i:]) + n23, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n20 - } - if m.Type != nil { - data[i] = 0x78 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) + i += n23 } + data[i] = 0x78 + i++ + i = encodeVarintMesos(data, i, uint64(m.Type)) return i, nil } @@ -21298,11 +23067,11 @@ func (m *MasterInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Address.Size())) - n21, err := m.Address.MarshalTo(data[i:]) + n24, err := m.Address.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n21 + i += n24 } return i, nil } @@ -21354,11 +23123,11 @@ func (m *AgentInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.ID.Size())) - n22, err := m.ID.MarshalTo(data[i:]) + n25, err := m.ID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n22 + i += n25 } if m.Port != nil { data[i] = 0x40 @@ -21368,6 +23137,27 @@ func (m *AgentInfo) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *AgentInfo_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 data[:n], nil +} + +func (m *AgentInfo_Capability) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(m.Type)) + return i, nil +} + func (m *Value) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -21390,41 +23180,41 @@ func (m *Value) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n23, err := m.Scalar.MarshalTo(data[i:]) + n26, err := m.Scalar.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n23 + i += n26 } if m.Ranges != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n24, err := m.Ranges.MarshalTo(data[i:]) + n27, err := m.Ranges.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n24 + i += n27 } if m.Set != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n25, err := m.Set.MarshalTo(data[i:]) + n28, err := m.Set.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n25 + i += n28 } if m.Text != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Text.Size())) - n26, err := m.Text.MarshalTo(data[i:]) + n29, err := m.Text.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n26 + i += n29 } return i, nil } @@ -21585,41 +23375,41 @@ func (m *Attribute) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n27, err := m.Scalar.MarshalTo(data[i:]) + n30, err := m.Scalar.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n27 + i += n30 } if m.Ranges != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n28, err := m.Ranges.MarshalTo(data[i:]) + n31, err := m.Ranges.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n28 + i += n31 } if m.Text != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Text.Size())) - n29, err := m.Text.MarshalTo(data[i:]) + n32, err := m.Text.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n29 + i += n32 } if m.Set != nil { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n30, err := m.Set.MarshalTo(data[i:]) + n33, err := m.Set.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n30 + i += n33 } return i, nil } @@ -21654,31 +23444,31 @@ func (m *Resource) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Scalar.Size())) - n31, err := m.Scalar.MarshalTo(data[i:]) + n34, err := m.Scalar.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n31 + i += n34 } if m.Ranges != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Ranges.Size())) - n32, err := m.Ranges.MarshalTo(data[i:]) + n35, err := m.Ranges.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n32 + i += n35 } if m.Set != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Set.Size())) - n33, err := m.Set.MarshalTo(data[i:]) + n36, err := m.Set.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n33 + i += n36 } if m.Role != nil { data[i] = 0x32 @@ -21690,41 +23480,75 @@ func (m *Resource) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Disk.Size())) - n34, err := m.Disk.MarshalTo(data[i:]) + n37, err := m.Disk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n34 + i += n37 } if m.Reservation != nil { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.Reservation.Size())) - n35, err := m.Reservation.MarshalTo(data[i:]) + n38, err := m.Reservation.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n35 + i += n38 } if m.Revocable != nil { data[i] = 0x4a i++ i = encodeVarintMesos(data, i, uint64(m.Revocable.Size())) - n36, err := m.Revocable.MarshalTo(data[i:]) + n39, err := m.Revocable.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n36 + i += n39 } if m.Shared != nil { data[i] = 0x52 i++ i = encodeVarintMesos(data, i, uint64(m.Shared.Size())) - n37, err := m.Shared.MarshalTo(data[i:]) + n40, err := m.Shared.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n37 + i += n40 + } + if m.AllocationInfo != nil { + data[i] = 0x5a + i++ + i = encodeVarintMesos(data, i, uint64(m.AllocationInfo.Size())) + n41, err := m.AllocationInfo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 + } + return i, nil +} + +func (m *Resource_AllocationInfo) 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 *Resource_AllocationInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Role != nil { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Role))) + i += copy(data[i:], *m.Role) } return i, nil } @@ -21754,11 +23578,11 @@ func (m *Resource_ReservationInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n38, err := m.Labels.MarshalTo(data[i:]) + n42, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n38 + i += n42 } return i, nil } @@ -21782,31 +23606,31 @@ func (m *Resource_DiskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.Persistence.Size())) - n39, err := m.Persistence.MarshalTo(data[i:]) + n43, err := m.Persistence.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n39 + i += n43 } if m.Volume != nil { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Volume.Size())) - n40, err := m.Volume.MarshalTo(data[i:]) + n44, err := m.Volume.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n40 + i += n44 } if m.Source != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Source.Size())) - n41, err := m.Source.MarshalTo(data[i:]) + n45, err := m.Source.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n41 + i += n45 } return i, nil } @@ -21865,21 +23689,21 @@ func (m *Resource_DiskInfo_Source) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Path.Size())) - n42, err := m.Path.MarshalTo(data[i:]) + n46, err := m.Path.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n42 + i += n46 } if m.Mount != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Mount.Size())) - n43, err := m.Mount.MarshalTo(data[i:]) + n47, err := m.Mount.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n43 + i += n47 } return i, nil } @@ -22499,41 +24323,41 @@ func (m *SNMPStatistics) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.IPStats.Size())) - n44, err := m.IPStats.MarshalTo(data[i:]) + n48, err := m.IPStats.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n44 + i += n48 } if m.ICMPStats != nil { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.ICMPStats.Size())) - n45, err := m.ICMPStats.MarshalTo(data[i:]) + n49, err := m.ICMPStats.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n45 + i += n49 } if m.TCPStats != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.TCPStats.Size())) - n46, err := m.TCPStats.MarshalTo(data[i:]) + n50, err := m.TCPStats.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n46 + i += n50 } if m.UDPStats != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.UDPStats.Size())) - n47, err := m.UDPStats.MarshalTo(data[i:]) + n51, err := m.UDPStats.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n47 + i += n51 } return i, nil } @@ -22615,11 +24439,11 @@ func (m *ResourceStatistics) MarshalTo(data []byte) (int, error) { data[i] = 0x6a i++ i = encodeVarintMesos(data, i, uint64(m.Perf.Size())) - n48, err := m.Perf.MarshalTo(data[i:]) + n52, err := m.Perf.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n48 + i += n52 } if m.NetRxPackets != nil { data[i] = 0x70 @@ -22826,11 +24650,11 @@ func (m *ResourceStatistics) MarshalTo(data []byte) (int, error) { data[i] = 0x2 i++ i = encodeVarintMesos(data, i, uint64(m.NetSNMPStatistics.Size())) - n49, err := m.NetSNMPStatistics.MarshalTo(data[i:]) + n53, err := m.NetSNMPStatistics.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n49 + i += n53 } return i, nil } @@ -22895,11 +24719,11 @@ func (m *ResourceUsage_Executor) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.ExecutorInfo.Size())) - n50, err := m.ExecutorInfo.MarshalTo(data[i:]) + n54, err := m.ExecutorInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n50 + i += n54 if len(m.Allocated) > 0 { for _, msg := range m.Allocated { data[i] = 0x12 @@ -22916,20 +24740,20 @@ func (m *ResourceUsage_Executor) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Statistics.Size())) - n51, err := m.Statistics.MarshalTo(data[i:]) + n55, err := m.Statistics.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n51 + i += n55 } data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.ContainerID.Size())) - n52, err := m.ContainerID.MarshalTo(data[i:]) + n56, err := m.ContainerID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n52 + i += n56 if len(m.Tasks) > 0 { for _, msg := range m.Tasks { data[i] = 0x2a @@ -22967,11 +24791,11 @@ func (m *ResourceUsage_Executor_Task) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.ID.Size())) - n53, err := m.ID.MarshalTo(data[i:]) + n57, err := m.ID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n53 + i += n57 if len(m.Resources) > 0 { for _, msg := range m.Resources { data[i] = 0x1a @@ -22988,11 +24812,11 @@ func (m *ResourceUsage_Executor_Task) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n54, err := m.Labels.MarshalTo(data[i:]) + n58, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n54 + i += n58 } return i, nil } @@ -23371,11 +25195,11 @@ func (m *Request) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.AgentID.Size())) - n55, err := m.AgentID.MarshalTo(data[i:]) + n59, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n55 + i += n59 } if len(m.Resources) > 0 { for _, msg := range m.Resources { @@ -23410,27 +25234,27 @@ func (m *Offer) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.ID.Size())) - n56, err := m.ID.MarshalTo(data[i:]) + n60, err := m.ID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n56 + i += n60 data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.FrameworkID.Size())) - n57, err := m.FrameworkID.MarshalTo(data[i:]) + n61, err := m.FrameworkID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n57 + i += n61 data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.AgentID.Size())) - n58, err := m.AgentID.MarshalTo(data[i:]) + n62, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n58 + i += n62 data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(len(m.Hostname))) @@ -23475,21 +25299,31 @@ func (m *Offer) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.URL.Size())) - n59, err := m.URL.MarshalTo(data[i:]) + n63, err := m.URL.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n59 + i += n63 } if m.Unavailability != nil { data[i] = 0x4a i++ i = encodeVarintMesos(data, i, uint64(m.Unavailability.Size())) - n60, err := m.Unavailability.MarshalTo(data[i:]) + n64, err := m.Unavailability.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.AllocationInfo != nil { + data[i] = 0x52 + i++ + i = encodeVarintMesos(data, i, uint64(m.AllocationInfo.Size())) + n65, err := m.AllocationInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n60 + i += n65 } return i, nil } @@ -23509,70 +25343,68 @@ func (m *Offer_Operation) MarshalTo(data []byte) (int, error) { _ = i var l int _ = l - if m.Type != nil { - data[i] = 0x8 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) - } + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(m.Type)) if m.Launch != nil { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Launch.Size())) - n61, err := m.Launch.MarshalTo(data[i:]) + n66, err := m.Launch.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n61 + i += n66 } if m.Reserve != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Reserve.Size())) - n62, err := m.Reserve.MarshalTo(data[i:]) + n67, err := m.Reserve.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n62 + i += n67 } if m.Unreserve != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Unreserve.Size())) - n63, err := m.Unreserve.MarshalTo(data[i:]) + n68, err := m.Unreserve.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n63 + i += n68 } if m.Create != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Create.Size())) - n64, err := m.Create.MarshalTo(data[i:]) + n69, err := m.Create.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n64 + i += n69 } if m.Destroy != nil { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.Destroy.Size())) - n65, err := m.Destroy.MarshalTo(data[i:]) + n70, err := m.Destroy.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n65 + i += n70 } if m.LaunchGroup != nil { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.LaunchGroup.Size())) - n66, err := m.LaunchGroup.MarshalTo(data[i:]) + n71, err := m.LaunchGroup.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n66 + i += n71 } return i, nil } @@ -23625,19 +25457,19 @@ func (m *Offer_Operation_LaunchGroup) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.Executor.Size())) - n67, err := m.Executor.MarshalTo(data[i:]) + n72, err := m.Executor.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n67 + i += n72 data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.TaskGroup.Size())) - n68, err := m.TaskGroup.MarshalTo(data[i:]) + n73, err := m.TaskGroup.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n68 + i += n73 return i, nil } @@ -23779,47 +25611,47 @@ func (m *InverseOffer) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.OfferID.Size())) - n69, err := m.OfferID.MarshalTo(data[i:]) + n74, err := m.OfferID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n69 + i += n74 if m.URL != nil { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.URL.Size())) - n70, err := m.URL.MarshalTo(data[i:]) + n75, err := m.URL.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n70 + i += n75 } data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.FrameworkID.Size())) - n71, err := m.FrameworkID.MarshalTo(data[i:]) + n76, err := m.FrameworkID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n71 + i += n76 if m.AgentID != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.AgentID.Size())) - n72, err := m.AgentID.MarshalTo(data[i:]) + n77, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n72 + i += n77 } data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Unavailability.Size())) - n73, err := m.Unavailability.MarshalTo(data[i:]) + n78, err := m.Unavailability.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n73 + i += n78 if len(m.Resources) > 0 { for _, msg := range m.Resources { data[i] = 0x32 @@ -23857,19 +25689,19 @@ func (m *TaskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.TaskID.Size())) - n74, err := m.TaskID.MarshalTo(data[i:]) + n79, err := m.TaskID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n74 + i += n79 data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.AgentID.Size())) - n75, err := m.AgentID.MarshalTo(data[i:]) + n80, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n75 + i += n80 if len(m.Resources) > 0 { for _, msg := range m.Resources { data[i] = 0x22 @@ -23886,11 +25718,11 @@ func (m *TaskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Executor.Size())) - n76, err := m.Executor.MarshalTo(data[i:]) + n81, err := m.Executor.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n76 + i += n81 } if m.Data != nil { data[i] = 0x32 @@ -23902,61 +25734,71 @@ func (m *TaskInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Command.Size())) - n77, err := m.Command.MarshalTo(data[i:]) + n82, err := m.Command.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n77 + i += n82 } if m.HealthCheck != nil { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.HealthCheck.Size())) - n78, err := m.HealthCheck.MarshalTo(data[i:]) + n83, err := m.HealthCheck.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n78 + i += n83 } if m.Container != nil { data[i] = 0x4a i++ i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n79, err := m.Container.MarshalTo(data[i:]) + n84, err := m.Container.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n79 + i += n84 } if m.Labels != nil { data[i] = 0x52 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n80, err := m.Labels.MarshalTo(data[i:]) + n85, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n80 + i += n85 } if m.Discovery != nil { data[i] = 0x5a i++ i = encodeVarintMesos(data, i, uint64(m.Discovery.Size())) - n81, err := m.Discovery.MarshalTo(data[i:]) + n86, err := m.Discovery.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n81 + i += n86 } if m.KillPolicy != nil { data[i] = 0x62 i++ i = encodeVarintMesos(data, i, uint64(m.KillPolicy.Size())) - n82, err := m.KillPolicy.MarshalTo(data[i:]) + n87, err := m.KillPolicy.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n82 + i += n87 + } + if m.Check != nil { + data[i] = 0x6a + i++ + i = encodeVarintMesos(data, i, uint64(m.Check.Size())) + n88, err := m.Check.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n88 } return i, nil } @@ -24013,37 +25855,37 @@ func (m *Task) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.TaskID.Size())) - n83, err := m.TaskID.MarshalTo(data[i:]) + n89, err := m.TaskID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n83 + i += n89 data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.FrameworkID.Size())) - n84, err := m.FrameworkID.MarshalTo(data[i:]) + n90, err := m.FrameworkID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n84 + i += n90 if m.ExecutorID != nil { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.ExecutorID.Size())) - n85, err := m.ExecutorID.MarshalTo(data[i:]) + n91, err := m.ExecutorID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n85 + i += n91 } data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.AgentID.Size())) - n86, err := m.AgentID.MarshalTo(data[i:]) + n92, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n86 + i += n92 if m.State == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") } else { @@ -24090,31 +25932,31 @@ func (m *Task) MarshalTo(data []byte) (int, error) { data[i] = 0x5a i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n87, err := m.Labels.MarshalTo(data[i:]) + n93, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n87 + i += n93 } if m.Discovery != nil { data[i] = 0x62 i++ i = encodeVarintMesos(data, i, uint64(m.Discovery.Size())) - n88, err := m.Discovery.MarshalTo(data[i:]) + n94, err := m.Discovery.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n88 + i += n94 } if m.Container != nil { data[i] = 0x6a i++ i = encodeVarintMesos(data, i, uint64(m.Container.Size())) - n89, err := m.Container.MarshalTo(data[i:]) + n95, err := m.Container.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n89 + i += n95 } if m.User != nil { data[i] = 0x72 @@ -24125,6 +25967,95 @@ func (m *Task) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *CheckStatusInfo) 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 *CheckStatusInfo) 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.Command != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(m.Command.Size())) + n96, err := m.Command.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n96 + } + if m.HTTP != nil { + data[i] = 0x1a + i++ + i = encodeVarintMesos(data, i, uint64(m.HTTP.Size())) + n97, err := m.HTTP.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n97 + } + return i, nil +} + +func (m *CheckStatusInfo_Command) 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 *CheckStatusInfo_Command) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ExitCode != nil { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.ExitCode)) + } + return i, nil +} + +func (m *CheckStatusInfo_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 *CheckStatusInfo_Http) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.StatusCode != nil { + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(*m.StatusCode)) + } + return i, nil +} + func (m *TaskStatus) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -24143,11 +26074,11 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.TaskID.Size())) - n90, err := m.TaskID.MarshalTo(data[i:]) + n98, err := m.TaskID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n90 + i += n98 if m.State == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") } else { @@ -24171,11 +26102,11 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.AgentID.Size())) - n91, err := m.AgentID.MarshalTo(data[i:]) + n99, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n91 + i += n99 } if m.Timestamp != nil { data[i] = 0x31 @@ -24186,11 +26117,11 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.ExecutorID.Size())) - n92, err := m.ExecutorID.MarshalTo(data[i:]) + n100, err := m.ExecutorID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n92 + i += n100 } if m.Healthy != nil { data[i] = 0x40 @@ -24222,31 +26153,41 @@ func (m *TaskStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x62 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n93, err := m.Labels.MarshalTo(data[i:]) + n101, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n93 + i += n101 } if m.ContainerStatus != nil { data[i] = 0x6a i++ i = encodeVarintMesos(data, i, uint64(m.ContainerStatus.Size())) - n94, err := m.ContainerStatus.MarshalTo(data[i:]) + n102, err := m.ContainerStatus.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n94 + i += n102 } if m.UnreachableTime != nil { data[i] = 0x72 i++ i = encodeVarintMesos(data, i, uint64(m.UnreachableTime.Size())) - n95, err := m.UnreachableTime.MarshalTo(data[i:]) + n103, err := m.UnreachableTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n95 + i += n103 + } + if m.CheckStatus != nil { + data[i] = 0x7a + i++ + i = encodeVarintMesos(data, i, uint64(m.CheckStatus.Size())) + n104, err := m.CheckStatus.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n104 } return i, nil } @@ -24323,10 +26264,12 @@ func (m *Environment_Variable) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintMesos(data, i, uint64(len(m.Name))) i += copy(data[i:], m.Name) - data[i] = 0x12 - i++ - i = encodeVarintMesos(data, i, uint64(len(m.Value))) - i += copy(data[i:], m.Value) + if m.Value != nil { + data[i] = 0x12 + i++ + i = encodeVarintMesos(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) + } return i, nil } @@ -24542,21 +26485,21 @@ func (m *Image) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Appc.Size())) - n96, err := m.Appc.MarshalTo(data[i:]) + n105, err := m.Appc.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n96 + i += n105 } if m.Docker != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Docker.Size())) - n97, err := m.Docker.MarshalTo(data[i:]) + n106, err := m.Docker.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n97 + i += n106 } if m.Cached != nil { data[i] = 0x20 @@ -24600,11 +26543,11 @@ func (m *Image_Appc) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n98, err := m.Labels.MarshalTo(data[i:]) + n107, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n98 + i += n107 } return i, nil } @@ -24632,11 +26575,11 @@ func (m *Image_Docker) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.Credential.Size())) - n99, err := m.Credential.MarshalTo(data[i:]) + n108, err := m.Credential.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n99 + i += n108 } return i, nil } @@ -24677,21 +26620,21 @@ func (m *Volume) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Image.Size())) - n100, err := m.Image.MarshalTo(data[i:]) + n109, err := m.Image.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n100 + i += n109 } if m.Source != nil { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Source.Size())) - n101, err := m.Source.MarshalTo(data[i:]) + n110, err := m.Source.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n101 + i += n110 } return i, nil } @@ -24718,21 +26661,21 @@ func (m *Volume_Source) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.DockerVolume.Size())) - n102, err := m.DockerVolume.MarshalTo(data[i:]) + n111, err := m.DockerVolume.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n102 + i += n111 } if m.SandboxPath != nil { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.SandboxPath.Size())) - n103, err := m.SandboxPath.MarshalTo(data[i:]) + n112, err := m.SandboxPath.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n103 + i += n112 } return i, nil } @@ -24766,11 +26709,11 @@ func (m *Volume_Source_DockerVolume) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.DriverOptions.Size())) - n104, err := m.DriverOptions.MarshalTo(data[i:]) + n113, err := m.DriverOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n104 + i += n113 } return i, nil } @@ -24790,11 +26733,9 @@ func (m *Volume_Source_SandboxPath) MarshalTo(data []byte) (int, error) { _ = i var l int _ = l - if m.Type != nil { - data[i] = 0x8 - i++ - i = encodeVarintMesos(data, i, uint64(*m.Type)) - } + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(m.Type)) data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(len(m.Path))) @@ -24836,11 +26777,11 @@ func (m *NetworkInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n105, err := m.Labels.MarshalTo(data[i:]) + n114, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n105 + i += n114 } if len(m.IPAddresses) > 0 { for _, msg := range m.IPAddresses { @@ -24978,15 +26919,128 @@ func (m *LinuxInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.CapabilityInfo.Size())) - n106, err := m.CapabilityInfo.MarshalTo(data[i:]) + n115, err := m.CapabilityInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n106 + i += n115 } return i, nil } +func (m *RLimitInfo) 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 *RLimitInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Rlimits) > 0 { + for _, msg := range m.Rlimits { + 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 + } + } + return i, nil +} + +func (m *RLimitInfo_RLimit) 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 *RLimitInfo_RLimit) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(m.Type)) + if m.Hard != nil { + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Hard)) + } + if m.Soft != nil { + data[i] = 0x18 + i++ + i = encodeVarintMesos(data, i, uint64(*m.Soft)) + } + return i, nil +} + +func (m *TTYInfo) 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 *TTYInfo) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.WindowSize != nil { + data[i] = 0xa + i++ + i = encodeVarintMesos(data, i, uint64(m.WindowSize.Size())) + n116, err := m.WindowSize.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n116 + } + return i, nil +} + +func (m *TTYInfo_WindowSize) 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 *TTYInfo_WindowSize) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintMesos(data, i, uint64(m.Rows)) + data[i] = 0x10 + i++ + i = encodeVarintMesos(data, i, uint64(m.Columns)) + return i, nil +} + func (m *ContainerInfo) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -25025,11 +27079,11 @@ func (m *ContainerInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintMesos(data, i, uint64(m.Docker.Size())) - n107, err := m.Docker.MarshalTo(data[i:]) + n117, err := m.Docker.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n107 + i += n117 } if m.Hostname != nil { data[i] = 0x22 @@ -25041,11 +27095,11 @@ func (m *ContainerInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Mesos.Size())) - n108, err := m.Mesos.MarshalTo(data[i:]) + n118, err := m.Mesos.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n108 + i += n118 } if len(m.NetworkInfos) > 0 { for _, msg := range m.NetworkInfos { @@ -25063,11 +27117,31 @@ func (m *ContainerInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintMesos(data, i, uint64(m.LinuxInfo.Size())) - n109, err := m.LinuxInfo.MarshalTo(data[i:]) + n119, err := m.LinuxInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n109 + i += n119 + } + if m.RlimitInfo != nil { + data[i] = 0x4a + i++ + i = encodeVarintMesos(data, i, uint64(m.RlimitInfo.Size())) + n120, err := m.RlimitInfo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n120 + } + if m.TTYInfo != nil { + data[i] = 0x52 + i++ + i = encodeVarintMesos(data, i, uint64(m.TTYInfo.Size())) + n121, err := m.TTYInfo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n121 } return i, nil } @@ -25198,11 +27272,11 @@ func (m *ContainerInfo_MesosInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.Image.Size())) - n110, err := m.Image.MarshalTo(data[i:]) + n122, err := m.Image.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n110 + i += n122 } return i, nil } @@ -25238,17 +27312,27 @@ func (m *ContainerStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintMesos(data, i, uint64(m.CgroupInfo.Size())) - n111, err := m.CgroupInfo.MarshalTo(data[i:]) + n123, err := m.CgroupInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n111 + i += n123 } if m.ExecutorPID != nil { data[i] = 0x18 i++ i = encodeVarintMesos(data, i, uint64(*m.ExecutorPID)) } + if m.ContainerID != nil { + data[i] = 0x22 + i++ + i = encodeVarintMesos(data, i, uint64(m.ContainerID.Size())) + n124, err := m.ContainerID.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n124 + } return i, nil } @@ -25271,11 +27355,11 @@ func (m *CgroupInfo) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintMesos(data, i, uint64(m.NetCLS.Size())) - n112, err := m.NetCLS.MarshalTo(data[i:]) + n125, err := m.NetCLS.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n112 + i += n125 } return i, nil } @@ -25400,11 +27484,11 @@ func (m *Port) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n113, err := m.Labels.MarshalTo(data[i:]) + n126, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n113 + i += n126 } return i, nil } @@ -25485,21 +27569,21 @@ func (m *DiscoveryInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x32 i++ i = encodeVarintMesos(data, i, uint64(m.Ports.Size())) - n114, err := m.Ports.MarshalTo(data[i:]) + n127, err := m.Ports.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n114 + i += n127 } if m.Labels != nil { data[i] = 0x3a i++ i = encodeVarintMesos(data, i, uint64(m.Labels.Size())) - n115, err := m.Labels.MarshalTo(data[i:]) + n128, err := m.Labels.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n115 + i += n128 } return i, nil } @@ -25725,11 +27809,11 @@ func (m *FileInfo) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintMesos(data, i, uint64(m.Mtime.Size())) - n116, err := m.Mtime.MarshalTo(data[i:]) + n129, err := m.Mtime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n116 + i += n129 } if m.Mode != nil { data[i] = 0x28 @@ -25984,6 +28068,13 @@ func NewPopulatedFrameworkInfo(r randyMesos, easy bool) *FrameworkInfo { if r.Intn(10) != 0 { this.Labels = NewPopulatedLabels(r, easy) } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Roles = make([]string, v21) + for i := 0; i < v21; i++ { + this.Roles[i] = randStringMesos(r) + } + } if !easy && r.Intn(10) != 0 { } return this @@ -25991,56 +28082,109 @@ func NewPopulatedFrameworkInfo(r randyMesos, easy bool) *FrameworkInfo { func NewPopulatedFrameworkInfo_Capability(r randyMesos, easy bool) *FrameworkInfo_Capability { this := &FrameworkInfo_Capability{} - this.Type = FrameworkInfo_Capability_Type([]int32{0, 1, 2, 3, 4, 5}[r.Intn(6)]) + this.Type = FrameworkInfo_Capability_Type([]int32{0, 1, 2, 3, 4, 5, 6}[r.Intn(7)]) if !easy && r.Intn(10) != 0 { } return this } -func NewPopulatedHealthCheck(r randyMesos, easy bool) *HealthCheck { - this := &HealthCheck{} +func NewPopulatedCheckInfo(r randyMesos, easy bool) *CheckInfo { + this := &CheckInfo{} + this.Type = CheckInfo_Type([]int32{0, 1, 2}[r.Intn(3)]) if r.Intn(10) != 0 { - this.HTTP = NewPopulatedHealthCheck_HTTPCheckInfo(r, easy) + this.Command = NewPopulatedCheckInfo_Command(r, easy) } if r.Intn(10) != 0 { - v21 := float64(r.Float64()) - if r.Intn(2) == 0 { - v21 *= -1 - } - this.DelaySeconds = &v21 + this.HTTP = NewPopulatedCheckInfo_Http(r, easy) } if r.Intn(10) != 0 { v22 := float64(r.Float64()) if r.Intn(2) == 0 { v22 *= -1 } - this.IntervalSeconds = &v22 + this.DelaySeconds = &v22 } if r.Intn(10) != 0 { v23 := float64(r.Float64()) if r.Intn(2) == 0 { v23 *= -1 } - this.TimeoutSeconds = &v23 + this.IntervalSeconds = &v23 } if r.Intn(10) != 0 { - v24 := uint32(r.Uint32()) - this.ConsecutiveFailures = &v24 + v24 := float64(r.Float64()) + if r.Intn(2) == 0 { + v24 *= -1 + } + this.TimeoutSeconds = &v24 } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckInfo_Command(r randyMesos, easy bool) *CheckInfo_Command { + this := &CheckInfo_Command{} + v25 := NewPopulatedCommandInfo(r, easy) + this.Command = *v25 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckInfo_Http(r randyMesos, easy bool) *CheckInfo_Http { + this := &CheckInfo_Http{} + this.Port = uint32(r.Uint32()) if r.Intn(10) != 0 { - v25 := float64(r.Float64()) + v26 := randStringMesos(r) + this.Path = &v26 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedHealthCheck(r randyMesos, easy bool) *HealthCheck { + this := &HealthCheck{} + if r.Intn(10) != 0 { + this.HTTP = NewPopulatedHealthCheck_HTTPCheckInfo(r, easy) + } + if r.Intn(10) != 0 { + v27 := float64(r.Float64()) if r.Intn(2) == 0 { - v25 *= -1 + v27 *= -1 } - this.GracePeriodSeconds = &v25 + this.DelaySeconds = &v27 } if r.Intn(10) != 0 { - this.Command = NewPopulatedCommandInfo(r, easy) + v28 := float64(r.Float64()) + if r.Intn(2) == 0 { + v28 *= -1 + } + this.IntervalSeconds = &v28 } if r.Intn(10) != 0 { - v26 := HealthCheck_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v26 + v29 := float64(r.Float64()) + if r.Intn(2) == 0 { + v29 *= -1 + } + this.TimeoutSeconds = &v29 } + if r.Intn(10) != 0 { + v30 := uint32(r.Uint32()) + this.ConsecutiveFailures = &v30 + } + if r.Intn(10) != 0 { + v31 := float64(r.Float64()) + if r.Intn(2) == 0 { + v31 *= -1 + } + this.GracePeriodSeconds = &v31 + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCommandInfo(r, easy) + } + this.Type = HealthCheck_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) if r.Intn(10) != 0 { this.TCP = NewPopulatedHealthCheck_TCPCheckInfo(r, easy) } @@ -26053,17 +28197,17 @@ func NewPopulatedHealthCheck_HTTPCheckInfo(r randyMesos, easy bool) *HealthCheck this := &HealthCheck_HTTPCheckInfo{} this.Port = uint32(r.Uint32()) if r.Intn(10) != 0 { - v27 := randStringMesos(r) - this.Path = &v27 + v32 := randStringMesos(r) + this.Path = &v32 } if r.Intn(10) != 0 { - v28 := randStringMesos(r) - this.Scheme = &v28 + v33 := randStringMesos(r) + this.Scheme = &v33 } if r.Intn(10) != 0 { - v29 := r.Intn(100) - this.Statuses = make([]uint32, v29) - for i := 0; i < v29; i++ { + v34 := r.Intn(100) + this.Statuses = make([]uint32, v34) + for i := 0; i < v34; i++ { this.Statuses[i] = uint32(r.Uint32()) } } @@ -26093,32 +28237,32 @@ func NewPopulatedKillPolicy(r randyMesos, easy bool) *KillPolicy { func NewPopulatedCommandInfo(r randyMesos, easy bool) *CommandInfo { this := &CommandInfo{} if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.URIs = make([]CommandInfo_URI, v30) - for i := 0; i < v30; i++ { - v31 := NewPopulatedCommandInfo_URI(r, easy) - this.URIs[i] = *v31 + v35 := r.Intn(10) + this.URIs = make([]CommandInfo_URI, v35) + for i := 0; i < v35; i++ { + v36 := NewPopulatedCommandInfo_URI(r, easy) + this.URIs[i] = *v36 } } if r.Intn(10) != 0 { this.Environment = NewPopulatedEnvironment(r, easy) } if r.Intn(10) != 0 { - v32 := randStringMesos(r) - this.Value = &v32 + v37 := randStringMesos(r) + this.Value = &v37 } if r.Intn(10) != 0 { - v33 := randStringMesos(r) - this.User = &v33 + v38 := randStringMesos(r) + this.User = &v38 } if r.Intn(10) != 0 { - v34 := bool(bool(r.Intn(2) == 0)) - this.Shell = &v34 + v39 := bool(bool(r.Intn(2) == 0)) + this.Shell = &v39 } if r.Intn(10) != 0 { - v35 := r.Intn(10) - this.Arguments = make([]string, v35) - for i := 0; i < v35; i++ { + v40 := r.Intn(10) + this.Arguments = make([]string, v40) + for i := 0; i < v40; i++ { this.Arguments[i] = randStringMesos(r) } } @@ -26131,20 +28275,20 @@ func NewPopulatedCommandInfo_URI(r randyMesos, easy bool) *CommandInfo_URI { this := &CommandInfo_URI{} this.Value = randStringMesos(r) if r.Intn(10) != 0 { - v36 := bool(bool(r.Intn(2) == 0)) - this.Executable = &v36 + v41 := bool(bool(r.Intn(2) == 0)) + this.Executable = &v41 } if r.Intn(10) != 0 { - v37 := bool(bool(r.Intn(2) == 0)) - this.Extract = &v37 + v42 := bool(bool(r.Intn(2) == 0)) + this.Extract = &v42 } if r.Intn(10) != 0 { - v38 := bool(bool(r.Intn(2) == 0)) - this.Cache = &v38 + v43 := bool(bool(r.Intn(2) == 0)) + this.Cache = &v43 } if r.Intn(10) != 0 { - v39 := randStringMesos(r) - this.OutputFile = &v39 + v44 := randStringMesos(r) + this.OutputFile = &v44 } if !easy && r.Intn(10) != 0 { } @@ -26153,35 +28297,35 @@ func NewPopulatedCommandInfo_URI(r randyMesos, easy bool) *CommandInfo_URI { func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { this := &ExecutorInfo{} - v40 := NewPopulatedExecutorID(r, easy) - this.ExecutorID = *v40 + v45 := NewPopulatedExecutorID(r, easy) + this.ExecutorID = *v45 if r.Intn(10) != 0 { - v41 := r.Intn(100) - this.Data = make([]byte, v41) - for i := 0; i < v41; i++ { + v46 := r.Intn(100) + this.Data = make([]byte, v46) + for i := 0; i < v46; i++ { this.Data[i] = byte(r.Intn(256)) } } if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Resources = make([]Resource, v42) - for i := 0; i < v42; i++ { - v43 := NewPopulatedResource(r, easy) - this.Resources[i] = *v43 + v47 := r.Intn(10) + this.Resources = make([]Resource, v47) + for i := 0; i < v47; i++ { + v48 := NewPopulatedResource(r, easy) + this.Resources[i] = *v48 } } - v44 := NewPopulatedCommandInfo(r, easy) - this.Command = *v44 + v49 := NewPopulatedCommandInfo(r, easy) + this.Command = *v49 if r.Intn(10) != 0 { this.FrameworkID = NewPopulatedFrameworkID(r, easy) } if r.Intn(10) != 0 { - v45 := randStringMesos(r) - this.Name = &v45 + v50 := randStringMesos(r) + this.Name = &v50 } if r.Intn(10) != 0 { - v46 := randStringMesos(r) - this.Source = &v46 + v51 := randStringMesos(r) + this.Source = &v51 } if r.Intn(10) != 0 { this.Container = NewPopulatedContainerInfo(r, easy) @@ -26195,10 +28339,7 @@ func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { if r.Intn(10) != 0 { this.Labels = NewPopulatedLabels(r, easy) } - if r.Intn(10) != 0 { - v47 := ExecutorInfo_Type([]int32{0, 1, 2}[r.Intn(3)]) - this.Type = &v47 - } + this.Type = ExecutorInfo_Type([]int32{0, 1, 2}[r.Intn(3)]) if !easy && r.Intn(10) != 0 { } return this @@ -26208,19 +28349,19 @@ func NewPopulatedMasterInfo(r randyMesos, easy bool) *MasterInfo { this := &MasterInfo{} this.ID = randStringMesos(r) this.IP = uint32(r.Uint32()) - v48 := uint32(r.Uint32()) - this.Port = &v48 + v52 := uint32(r.Uint32()) + this.Port = &v52 if r.Intn(10) != 0 { - v49 := randStringMesos(r) - this.PID = &v49 + v53 := randStringMesos(r) + this.PID = &v53 } if r.Intn(10) != 0 { - v50 := randStringMesos(r) - this.Hostname = &v50 + v54 := randStringMesos(r) + this.Hostname = &v54 } if r.Intn(10) != 0 { - v51 := randStringMesos(r) - this.Version = &v51 + v55 := randStringMesos(r) + this.Version = &v55 } if r.Intn(10) != 0 { this.Address = NewPopulatedAddress(r, easy) @@ -26234,31 +28375,39 @@ func NewPopulatedAgentInfo(r randyMesos, easy bool) *AgentInfo { this := &AgentInfo{} this.Hostname = randStringMesos(r) if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Resources = make([]Resource, v52) - for i := 0; i < v52; i++ { - v53 := NewPopulatedResource(r, easy) - this.Resources[i] = *v53 + v56 := r.Intn(10) + this.Resources = make([]Resource, v56) + for i := 0; i < v56; i++ { + v57 := NewPopulatedResource(r, easy) + this.Resources[i] = *v57 } } if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Attributes = make([]Attribute, v54) - for i := 0; i < v54; i++ { - v55 := NewPopulatedAttribute(r, easy) - this.Attributes[i] = *v55 + v58 := r.Intn(10) + this.Attributes = make([]Attribute, v58) + for i := 0; i < v58; i++ { + v59 := NewPopulatedAttribute(r, easy) + this.Attributes[i] = *v59 } } if r.Intn(10) != 0 { this.ID = NewPopulatedAgentID(r, easy) } if r.Intn(10) != 0 { - v56 := int32(r.Int31()) + v60 := int32(r.Int31()) if r.Intn(2) == 0 { - v56 *= -1 + v60 *= -1 } - this.Port = &v56 + this.Port = &v60 + } + if !easy && r.Intn(10) != 0 { } + return this +} + +func NewPopulatedAgentInfo_Capability(r randyMesos, easy bool) *AgentInfo_Capability { + this := &AgentInfo_Capability{} + this.Type = AgentInfo_Capability_Type([]int32{0, 1}[r.Intn(2)]) if !easy && r.Intn(10) != 0 { } return this @@ -26307,11 +28456,11 @@ func NewPopulatedValue_Range(r randyMesos, easy bool) *Value_Range { func NewPopulatedValue_Ranges(r randyMesos, easy bool) *Value_Ranges { this := &Value_Ranges{} if r.Intn(10) != 0 { - v57 := r.Intn(10) - this.Range = make([]Value_Range, v57) - for i := 0; i < v57; i++ { - v58 := NewPopulatedValue_Range(r, easy) - this.Range[i] = *v58 + v61 := r.Intn(10) + this.Range = make([]Value_Range, v61) + for i := 0; i < v61; i++ { + v62 := NewPopulatedValue_Range(r, easy) + this.Range[i] = *v62 } } if !easy && r.Intn(10) != 0 { @@ -26322,9 +28471,9 @@ func NewPopulatedValue_Ranges(r randyMesos, easy bool) *Value_Ranges { func NewPopulatedValue_Set(r randyMesos, easy bool) *Value_Set { this := &Value_Set{} if r.Intn(10) != 0 { - v59 := r.Intn(10) - this.Item = make([]string, v59) - for i := 0; i < v59; i++ { + v63 := r.Intn(10) + this.Item = make([]string, v63) + for i := 0; i < v63; i++ { this.Item[i] = randStringMesos(r) } } @@ -26365,8 +28514,8 @@ func NewPopulatedAttribute(r randyMesos, easy bool) *Attribute { func NewPopulatedResource(r randyMesos, easy bool) *Resource { this := &Resource{} this.Name = randStringMesos(r) - v60 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Type = &v60 + v64 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v64 if r.Intn(10) != 0 { this.Scalar = NewPopulatedValue_Scalar(r, easy) } @@ -26377,8 +28526,8 @@ func NewPopulatedResource(r randyMesos, easy bool) *Resource { this.Set = NewPopulatedValue_Set(r, easy) } if r.Intn(10) != 0 { - v61 := randStringMesos(r) - this.Role = &v61 + v65 := randStringMesos(r) + this.Role = &v65 } if r.Intn(10) != 0 { this.Disk = NewPopulatedResource_DiskInfo(r, easy) @@ -26392,6 +28541,20 @@ func NewPopulatedResource(r randyMesos, easy bool) *Resource { if r.Intn(10) != 0 { this.Shared = NewPopulatedResource_SharedInfo(r, easy) } + if r.Intn(10) != 0 { + this.AllocationInfo = NewPopulatedResource_AllocationInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_AllocationInfo(r randyMesos, easy bool) *Resource_AllocationInfo { + this := &Resource_AllocationInfo{} + if r.Intn(10) != 0 { + v66 := randStringMesos(r) + this.Role = &v66 + } if !easy && r.Intn(10) != 0 { } return this @@ -26400,8 +28563,8 @@ func NewPopulatedResource(r randyMesos, easy bool) *Resource { func NewPopulatedResource_ReservationInfo(r randyMesos, easy bool) *Resource_ReservationInfo { this := &Resource_ReservationInfo{} if r.Intn(10) != 0 { - v62 := randStringMesos(r) - this.Principal = &v62 + v67 := randStringMesos(r) + this.Principal = &v67 } if r.Intn(10) != 0 { this.Labels = NewPopulatedLabels(r, easy) @@ -26431,8 +28594,8 @@ func NewPopulatedResource_DiskInfo_Persistence(r randyMesos, easy bool) *Resourc this := &Resource_DiskInfo_Persistence{} this.ID = randStringMesos(r) if r.Intn(10) != 0 { - v63 := randStringMesos(r) - this.Principal = &v63 + v68 := randStringMesos(r) + this.Principal = &v68 } if !easy && r.Intn(10) != 0 { } @@ -26441,8 +28604,8 @@ func NewPopulatedResource_DiskInfo_Persistence(r randyMesos, easy bool) *Resourc func NewPopulatedResource_DiskInfo_Source(r randyMesos, easy bool) *Resource_DiskInfo_Source { this := &Resource_DiskInfo_Source{} - v64 := Resource_DiskInfo_Source_Type([]int32{1, 2}[r.Intn(2)]) - this.Type = &v64 + v69 := Resource_DiskInfo_Source_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v69 if r.Intn(10) != 0 { this.Path = NewPopulatedResource_DiskInfo_Source_Path(r, easy) } @@ -26488,40 +28651,40 @@ func NewPopulatedTrafficControlStatistics(r randyMesos, easy bool) *TrafficContr this := &TrafficControlStatistics{} this.ID = randStringMesos(r) if r.Intn(10) != 0 { - v65 := uint64(uint64(r.Uint32())) - this.Backlog = &v65 + v70 := uint64(uint64(r.Uint32())) + this.Backlog = &v70 } if r.Intn(10) != 0 { - v66 := uint64(uint64(r.Uint32())) - this.Bytes = &v66 + v71 := uint64(uint64(r.Uint32())) + this.Bytes = &v71 } if r.Intn(10) != 0 { - v67 := uint64(uint64(r.Uint32())) - this.Drops = &v67 + v72 := uint64(uint64(r.Uint32())) + this.Drops = &v72 } if r.Intn(10) != 0 { - v68 := uint64(uint64(r.Uint32())) - this.Overlimits = &v68 + v73 := uint64(uint64(r.Uint32())) + this.Overlimits = &v73 } if r.Intn(10) != 0 { - v69 := uint64(uint64(r.Uint32())) - this.Packets = &v69 + v74 := uint64(uint64(r.Uint32())) + this.Packets = &v74 } if r.Intn(10) != 0 { - v70 := uint64(uint64(r.Uint32())) - this.Qlen = &v70 + v75 := uint64(uint64(r.Uint32())) + this.Qlen = &v75 } if r.Intn(10) != 0 { - v71 := uint64(uint64(r.Uint32())) - this.RateBPS = &v71 + v76 := uint64(uint64(r.Uint32())) + this.RateBPS = &v76 } if r.Intn(10) != 0 { - v72 := uint64(uint64(r.Uint32())) - this.RatePPS = &v72 + v77 := uint64(uint64(r.Uint32())) + this.RatePPS = &v77 } if r.Intn(10) != 0 { - v73 := uint64(uint64(r.Uint32())) - this.Requeues = &v73 + v78 := uint64(uint64(r.Uint32())) + this.Requeues = &v78 } if !easy && r.Intn(10) != 0 { } @@ -26530,509 +28693,509 @@ func NewPopulatedTrafficControlStatistics(r randyMesos, easy bool) *TrafficContr func NewPopulatedIpStatistics(r randyMesos, easy bool) *IpStatistics { this := &IpStatistics{} - if r.Intn(10) != 0 { - v74 := int64(r.Int63()) - if r.Intn(2) == 0 { - v74 *= -1 - } - this.Forwarding = &v74 - } - if r.Intn(10) != 0 { - v75 := int64(r.Int63()) - if r.Intn(2) == 0 { - v75 *= -1 - } - this.DefaultTTL = &v75 - } - if r.Intn(10) != 0 { - v76 := int64(r.Int63()) - if r.Intn(2) == 0 { - v76 *= -1 - } - this.InReceives = &v76 - } - if r.Intn(10) != 0 { - v77 := int64(r.Int63()) - if r.Intn(2) == 0 { - v77 *= -1 - } - this.InHdrErrors = &v77 - } - if r.Intn(10) != 0 { - v78 := int64(r.Int63()) - if r.Intn(2) == 0 { - v78 *= -1 - } - this.InAddrErrors = &v78 - } if r.Intn(10) != 0 { v79 := int64(r.Int63()) if r.Intn(2) == 0 { v79 *= -1 } - this.ForwDatagrams = &v79 + this.Forwarding = &v79 } if r.Intn(10) != 0 { v80 := int64(r.Int63()) if r.Intn(2) == 0 { v80 *= -1 } - this.InUnknownProtos = &v80 + this.DefaultTTL = &v80 } if r.Intn(10) != 0 { v81 := int64(r.Int63()) if r.Intn(2) == 0 { v81 *= -1 } - this.InDiscards = &v81 + this.InReceives = &v81 } if r.Intn(10) != 0 { v82 := int64(r.Int63()) if r.Intn(2) == 0 { v82 *= -1 } - this.InDelivers = &v82 + this.InHdrErrors = &v82 } if r.Intn(10) != 0 { v83 := int64(r.Int63()) if r.Intn(2) == 0 { v83 *= -1 } - this.OutRequests = &v83 + this.InAddrErrors = &v83 } if r.Intn(10) != 0 { v84 := int64(r.Int63()) if r.Intn(2) == 0 { v84 *= -1 } - this.OutDiscards = &v84 + this.ForwDatagrams = &v84 } if r.Intn(10) != 0 { v85 := int64(r.Int63()) if r.Intn(2) == 0 { v85 *= -1 } - this.OutNoRoutes = &v85 + this.InUnknownProtos = &v85 } if r.Intn(10) != 0 { v86 := int64(r.Int63()) if r.Intn(2) == 0 { v86 *= -1 } - this.ReasmTimeout = &v86 + this.InDiscards = &v86 } if r.Intn(10) != 0 { v87 := int64(r.Int63()) if r.Intn(2) == 0 { v87 *= -1 } - this.ReasmReqds = &v87 + this.InDelivers = &v87 } if r.Intn(10) != 0 { v88 := int64(r.Int63()) if r.Intn(2) == 0 { v88 *= -1 } - this.ReasmOKs = &v88 + this.OutRequests = &v88 } if r.Intn(10) != 0 { v89 := int64(r.Int63()) if r.Intn(2) == 0 { v89 *= -1 } - this.ReasmFails = &v89 + this.OutDiscards = &v89 } if r.Intn(10) != 0 { v90 := int64(r.Int63()) if r.Intn(2) == 0 { v90 *= -1 } - this.FragOKs = &v90 + this.OutNoRoutes = &v90 } if r.Intn(10) != 0 { v91 := int64(r.Int63()) if r.Intn(2) == 0 { v91 *= -1 } - this.FragFails = &v91 + this.ReasmTimeout = &v91 } if r.Intn(10) != 0 { v92 := int64(r.Int63()) if r.Intn(2) == 0 { v92 *= -1 } - this.FragCreates = &v92 + this.ReasmReqds = &v92 } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedIcmpStatistics(r randyMesos, easy bool) *IcmpStatistics { - this := &IcmpStatistics{} if r.Intn(10) != 0 { v93 := int64(r.Int63()) if r.Intn(2) == 0 { v93 *= -1 } - this.InMsgs = &v93 + this.ReasmOKs = &v93 } if r.Intn(10) != 0 { v94 := int64(r.Int63()) if r.Intn(2) == 0 { v94 *= -1 } - this.InErrors = &v94 + this.ReasmFails = &v94 } if r.Intn(10) != 0 { v95 := int64(r.Int63()) if r.Intn(2) == 0 { v95 *= -1 } - this.InCsumErrors = &v95 + this.FragOKs = &v95 } if r.Intn(10) != 0 { v96 := int64(r.Int63()) if r.Intn(2) == 0 { v96 *= -1 } - this.InDestUnreachs = &v96 + this.FragFails = &v96 } if r.Intn(10) != 0 { v97 := int64(r.Int63()) if r.Intn(2) == 0 { v97 *= -1 } - this.InTimeExcds = &v97 + this.FragCreates = &v97 + } + if !easy && r.Intn(10) != 0 { } + return this +} + +func NewPopulatedIcmpStatistics(r randyMesos, easy bool) *IcmpStatistics { + this := &IcmpStatistics{} if r.Intn(10) != 0 { v98 := int64(r.Int63()) if r.Intn(2) == 0 { v98 *= -1 } - this.InParmProbs = &v98 + this.InMsgs = &v98 } if r.Intn(10) != 0 { v99 := int64(r.Int63()) if r.Intn(2) == 0 { v99 *= -1 } - this.InSrcQuenchs = &v99 + this.InErrors = &v99 } if r.Intn(10) != 0 { v100 := int64(r.Int63()) if r.Intn(2) == 0 { v100 *= -1 } - this.InRedirects = &v100 + this.InCsumErrors = &v100 } if r.Intn(10) != 0 { v101 := int64(r.Int63()) if r.Intn(2) == 0 { v101 *= -1 } - this.InEchos = &v101 + this.InDestUnreachs = &v101 } if r.Intn(10) != 0 { v102 := int64(r.Int63()) if r.Intn(2) == 0 { v102 *= -1 } - this.InEchoReps = &v102 + this.InTimeExcds = &v102 } if r.Intn(10) != 0 { v103 := int64(r.Int63()) if r.Intn(2) == 0 { v103 *= -1 } - this.InTimestamps = &v103 + this.InParmProbs = &v103 } if r.Intn(10) != 0 { v104 := int64(r.Int63()) if r.Intn(2) == 0 { v104 *= -1 } - this.InTimestampReps = &v104 + this.InSrcQuenchs = &v104 } if r.Intn(10) != 0 { v105 := int64(r.Int63()) if r.Intn(2) == 0 { v105 *= -1 } - this.InAddrMasks = &v105 + this.InRedirects = &v105 } if r.Intn(10) != 0 { v106 := int64(r.Int63()) if r.Intn(2) == 0 { v106 *= -1 } - this.InAddrMaskReps = &v106 + this.InEchos = &v106 } if r.Intn(10) != 0 { v107 := int64(r.Int63()) if r.Intn(2) == 0 { v107 *= -1 } - this.OutMsgs = &v107 + this.InEchoReps = &v107 } if r.Intn(10) != 0 { v108 := int64(r.Int63()) if r.Intn(2) == 0 { v108 *= -1 } - this.OutErrors = &v108 + this.InTimestamps = &v108 } if r.Intn(10) != 0 { v109 := int64(r.Int63()) if r.Intn(2) == 0 { v109 *= -1 } - this.OutDestUnreachs = &v109 + this.InTimestampReps = &v109 } if r.Intn(10) != 0 { v110 := int64(r.Int63()) if r.Intn(2) == 0 { v110 *= -1 } - this.OutTimeExcds = &v110 + this.InAddrMasks = &v110 } if r.Intn(10) != 0 { v111 := int64(r.Int63()) if r.Intn(2) == 0 { v111 *= -1 } - this.OutParmProbs = &v111 + this.InAddrMaskReps = &v111 } if r.Intn(10) != 0 { v112 := int64(r.Int63()) if r.Intn(2) == 0 { v112 *= -1 } - this.OutSrcQuenchs = &v112 + this.OutMsgs = &v112 } if r.Intn(10) != 0 { v113 := int64(r.Int63()) if r.Intn(2) == 0 { v113 *= -1 } - this.OutRedirects = &v113 + this.OutErrors = &v113 } if r.Intn(10) != 0 { v114 := int64(r.Int63()) if r.Intn(2) == 0 { v114 *= -1 } - this.OutEchos = &v114 + this.OutDestUnreachs = &v114 } if r.Intn(10) != 0 { v115 := int64(r.Int63()) if r.Intn(2) == 0 { v115 *= -1 } - this.OutEchoReps = &v115 + this.OutTimeExcds = &v115 } if r.Intn(10) != 0 { v116 := int64(r.Int63()) if r.Intn(2) == 0 { v116 *= -1 } - this.OutTimestamps = &v116 + this.OutParmProbs = &v116 } if r.Intn(10) != 0 { v117 := int64(r.Int63()) if r.Intn(2) == 0 { v117 *= -1 } - this.OutTimestampReps = &v117 + this.OutSrcQuenchs = &v117 } if r.Intn(10) != 0 { v118 := int64(r.Int63()) if r.Intn(2) == 0 { v118 *= -1 } - this.OutAddrMasks = &v118 + this.OutRedirects = &v118 } if r.Intn(10) != 0 { v119 := int64(r.Int63()) if r.Intn(2) == 0 { v119 *= -1 } - this.OutAddrMaskReps = &v119 + this.OutEchos = &v119 } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedTcpStatistics(r randyMesos, easy bool) *TcpStatistics { - this := &TcpStatistics{} if r.Intn(10) != 0 { v120 := int64(r.Int63()) if r.Intn(2) == 0 { v120 *= -1 } - this.RtoAlgorithm = &v120 + this.OutEchoReps = &v120 } if r.Intn(10) != 0 { v121 := int64(r.Int63()) if r.Intn(2) == 0 { v121 *= -1 } - this.RtoMin = &v121 + this.OutTimestamps = &v121 } if r.Intn(10) != 0 { v122 := int64(r.Int63()) if r.Intn(2) == 0 { v122 *= -1 } - this.RtoMax = &v122 + this.OutTimestampReps = &v122 } if r.Intn(10) != 0 { v123 := int64(r.Int63()) if r.Intn(2) == 0 { v123 *= -1 } - this.MaxConn = &v123 + this.OutAddrMasks = &v123 } if r.Intn(10) != 0 { v124 := int64(r.Int63()) if r.Intn(2) == 0 { v124 *= -1 } - this.ActiveOpens = &v124 + this.OutAddrMaskReps = &v124 + } + if !easy && r.Intn(10) != 0 { } + return this +} + +func NewPopulatedTcpStatistics(r randyMesos, easy bool) *TcpStatistics { + this := &TcpStatistics{} if r.Intn(10) != 0 { v125 := int64(r.Int63()) if r.Intn(2) == 0 { v125 *= -1 } - this.PassiveOpens = &v125 + this.RtoAlgorithm = &v125 } if r.Intn(10) != 0 { v126 := int64(r.Int63()) if r.Intn(2) == 0 { v126 *= -1 } - this.AttemptFails = &v126 + this.RtoMin = &v126 } if r.Intn(10) != 0 { v127 := int64(r.Int63()) if r.Intn(2) == 0 { v127 *= -1 } - this.EstabResets = &v127 + this.RtoMax = &v127 } if r.Intn(10) != 0 { v128 := int64(r.Int63()) if r.Intn(2) == 0 { v128 *= -1 } - this.CurrEstab = &v128 + this.MaxConn = &v128 } if r.Intn(10) != 0 { v129 := int64(r.Int63()) if r.Intn(2) == 0 { v129 *= -1 } - this.InSegs = &v129 + this.ActiveOpens = &v129 } if r.Intn(10) != 0 { v130 := int64(r.Int63()) if r.Intn(2) == 0 { v130 *= -1 } - this.OutSegs = &v130 + this.PassiveOpens = &v130 } if r.Intn(10) != 0 { v131 := int64(r.Int63()) if r.Intn(2) == 0 { v131 *= -1 } - this.RetransSegs = &v131 + this.AttemptFails = &v131 } if r.Intn(10) != 0 { v132 := int64(r.Int63()) if r.Intn(2) == 0 { v132 *= -1 } - this.InErrs = &v132 + this.EstabResets = &v132 } if r.Intn(10) != 0 { v133 := int64(r.Int63()) if r.Intn(2) == 0 { v133 *= -1 } - this.OutRsts = &v133 + this.CurrEstab = &v133 } if r.Intn(10) != 0 { v134 := int64(r.Int63()) if r.Intn(2) == 0 { v134 *= -1 } - this.InCsumErrors = &v134 - } - if !easy && r.Intn(10) != 0 { + this.InSegs = &v134 } - return this -} - -func NewPopulatedUdpStatistics(r randyMesos, easy bool) *UdpStatistics { - this := &UdpStatistics{} if r.Intn(10) != 0 { v135 := int64(r.Int63()) if r.Intn(2) == 0 { v135 *= -1 } - this.InDatagrams = &v135 + this.OutSegs = &v135 } if r.Intn(10) != 0 { v136 := int64(r.Int63()) if r.Intn(2) == 0 { v136 *= -1 } - this.NoPorts = &v136 + this.RetransSegs = &v136 } if r.Intn(10) != 0 { v137 := int64(r.Int63()) if r.Intn(2) == 0 { v137 *= -1 } - this.InErrors = &v137 + this.InErrs = &v137 } if r.Intn(10) != 0 { v138 := int64(r.Int63()) if r.Intn(2) == 0 { v138 *= -1 } - this.OutDatagrams = &v138 + this.OutRsts = &v138 } if r.Intn(10) != 0 { v139 := int64(r.Int63()) if r.Intn(2) == 0 { v139 *= -1 } - this.RcvbufErrors = &v139 + this.InCsumErrors = &v139 } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUdpStatistics(r randyMesos, easy bool) *UdpStatistics { + this := &UdpStatistics{} if r.Intn(10) != 0 { v140 := int64(r.Int63()) if r.Intn(2) == 0 { v140 *= -1 } - this.SndbufErrors = &v140 + this.InDatagrams = &v140 } if r.Intn(10) != 0 { v141 := int64(r.Int63()) if r.Intn(2) == 0 { v141 *= -1 } - this.InCsumErrors = &v141 + this.NoPorts = &v141 } if r.Intn(10) != 0 { v142 := int64(r.Int63()) if r.Intn(2) == 0 { v142 *= -1 } - this.IgnoredMulti = &v142 + this.InErrors = &v142 + } + if r.Intn(10) != 0 { + v143 := int64(r.Int63()) + if r.Intn(2) == 0 { + v143 *= -1 + } + this.OutDatagrams = &v143 + } + if r.Intn(10) != 0 { + v144 := int64(r.Int63()) + if r.Intn(2) == 0 { + v144 *= -1 + } + this.RcvbufErrors = &v144 + } + if r.Intn(10) != 0 { + v145 := int64(r.Int63()) + if r.Intn(2) == 0 { + v145 *= -1 + } + this.SndbufErrors = &v145 + } + if r.Intn(10) != 0 { + v146 := int64(r.Int63()) + if r.Intn(2) == 0 { + v146 *= -1 + } + this.InCsumErrors = &v146 + } + if r.Intn(10) != 0 { + v147 := int64(r.Int63()) + if r.Intn(2) == 0 { + v147 *= -1 + } + this.IgnoredMulti = &v147 } if !easy && r.Intn(10) != 0 { } @@ -27065,197 +29228,197 @@ func NewPopulatedResourceStatistics(r randyMesos, easy bool) *ResourceStatistics this.Timestamp *= -1 } if r.Intn(10) != 0 { - v143 := float64(r.Float64()) + v148 := float64(r.Float64()) if r.Intn(2) == 0 { - v143 *= -1 + v148 *= -1 } - this.CPUsUserTimeSecs = &v143 + this.CPUsUserTimeSecs = &v148 } if r.Intn(10) != 0 { - v144 := float64(r.Float64()) + v149 := float64(r.Float64()) if r.Intn(2) == 0 { - v144 *= -1 + v149 *= -1 } - this.CPUsSystemTimeSecs = &v144 + this.CPUsSystemTimeSecs = &v149 } if r.Intn(10) != 0 { - v145 := float64(r.Float64()) + v150 := float64(r.Float64()) if r.Intn(2) == 0 { - v145 *= -1 + v150 *= -1 } - this.CPUsLimit = &v145 + this.CPUsLimit = &v150 } if r.Intn(10) != 0 { - v146 := uint64(uint64(r.Uint32())) - this.MemRSSBytes = &v146 + v151 := uint64(uint64(r.Uint32())) + this.MemRSSBytes = &v151 } if r.Intn(10) != 0 { - v147 := uint64(uint64(r.Uint32())) - this.MemLimitBytes = &v147 + v152 := uint64(uint64(r.Uint32())) + this.MemLimitBytes = &v152 } if r.Intn(10) != 0 { - v148 := uint32(r.Uint32()) - this.CPUsNrPeriods = &v148 + v153 := uint32(r.Uint32()) + this.CPUsNrPeriods = &v153 } if r.Intn(10) != 0 { - v149 := uint32(r.Uint32()) - this.CPUsNrThrottled = &v149 + v154 := uint32(r.Uint32()) + this.CPUsNrThrottled = &v154 } if r.Intn(10) != 0 { - v150 := float64(r.Float64()) + v155 := float64(r.Float64()) if r.Intn(2) == 0 { - v150 *= -1 + v155 *= -1 } - this.CPUsThrottledTimeSecs = &v150 + this.CPUsThrottledTimeSecs = &v155 } if r.Intn(10) != 0 { - v151 := uint64(uint64(r.Uint32())) - this.MemFileBytes = &v151 + v156 := uint64(uint64(r.Uint32())) + this.MemFileBytes = &v156 } if r.Intn(10) != 0 { - v152 := uint64(uint64(r.Uint32())) - this.MemAnonBytes = &v152 + v157 := uint64(uint64(r.Uint32())) + this.MemAnonBytes = &v157 } if r.Intn(10) != 0 { - v153 := uint64(uint64(r.Uint32())) - this.MemMappedFileBytes = &v153 + v158 := uint64(uint64(r.Uint32())) + this.MemMappedFileBytes = &v158 } if r.Intn(10) != 0 { this.Perf = NewPopulatedPerfStatistics(r, easy) } if r.Intn(10) != 0 { - v154 := uint64(uint64(r.Uint32())) - this.NetRxPackets = &v154 + v159 := uint64(uint64(r.Uint32())) + this.NetRxPackets = &v159 } if r.Intn(10) != 0 { - v155 := uint64(uint64(r.Uint32())) - this.NetRxBytes = &v155 + v160 := uint64(uint64(r.Uint32())) + this.NetRxBytes = &v160 } if r.Intn(10) != 0 { - v156 := uint64(uint64(r.Uint32())) - this.NetRxErrors = &v156 + v161 := uint64(uint64(r.Uint32())) + this.NetRxErrors = &v161 } if r.Intn(10) != 0 { - v157 := uint64(uint64(r.Uint32())) - this.NetRxDropped = &v157 + v162 := uint64(uint64(r.Uint32())) + this.NetRxDropped = &v162 } if r.Intn(10) != 0 { - v158 := uint64(uint64(r.Uint32())) - this.NetTxPackets = &v158 + v163 := uint64(uint64(r.Uint32())) + this.NetTxPackets = &v163 } if r.Intn(10) != 0 { - v159 := uint64(uint64(r.Uint32())) - this.NetTxBytes = &v159 + v164 := uint64(uint64(r.Uint32())) + this.NetTxBytes = &v164 } if r.Intn(10) != 0 { - v160 := uint64(uint64(r.Uint32())) - this.NetTxErrors = &v160 + v165 := uint64(uint64(r.Uint32())) + this.NetTxErrors = &v165 } if r.Intn(10) != 0 { - v161 := uint64(uint64(r.Uint32())) - this.NetTxDropped = &v161 + v166 := uint64(uint64(r.Uint32())) + this.NetTxDropped = &v166 } if r.Intn(10) != 0 { - v162 := float64(r.Float64()) + v167 := float64(r.Float64()) if r.Intn(2) == 0 { - v162 *= -1 + v167 *= -1 } - this.NetTCPRttMicrosecsP50 = &v162 + this.NetTCPRttMicrosecsP50 = &v167 } if r.Intn(10) != 0 { - v163 := float64(r.Float64()) + v168 := float64(r.Float64()) if r.Intn(2) == 0 { - v163 *= -1 + v168 *= -1 } - this.NetTCPRttMicrosecsP90 = &v163 + this.NetTCPRttMicrosecsP90 = &v168 } if r.Intn(10) != 0 { - v164 := float64(r.Float64()) + v169 := float64(r.Float64()) if r.Intn(2) == 0 { - v164 *= -1 + v169 *= -1 } - this.NetTCPRttMicrosecsP95 = &v164 + this.NetTCPRttMicrosecsP95 = &v169 } if r.Intn(10) != 0 { - v165 := float64(r.Float64()) + v170 := float64(r.Float64()) if r.Intn(2) == 0 { - v165 *= -1 + v170 *= -1 } - this.NetTCPRttMicrosecsP99 = &v165 + this.NetTCPRttMicrosecsP99 = &v170 } if r.Intn(10) != 0 { - v166 := uint64(uint64(r.Uint32())) - this.DiskLimitBytes = &v166 + v171 := uint64(uint64(r.Uint32())) + this.DiskLimitBytes = &v171 } if r.Intn(10) != 0 { - v167 := uint64(uint64(r.Uint32())) - this.DiskUsedBytes = &v167 + v172 := uint64(uint64(r.Uint32())) + this.DiskUsedBytes = &v172 } if r.Intn(10) != 0 { - v168 := float64(r.Float64()) + v173 := float64(r.Float64()) if r.Intn(2) == 0 { - v168 *= -1 + v173 *= -1 } - this.NetTCPActiveConnections = &v168 + this.NetTCPActiveConnections = &v173 } if r.Intn(10) != 0 { - v169 := float64(r.Float64()) + v174 := float64(r.Float64()) if r.Intn(2) == 0 { - v169 *= -1 + v174 *= -1 } - this.NetTCPTimeWaitConnections = &v169 + this.NetTCPTimeWaitConnections = &v174 } if r.Intn(10) != 0 { - v170 := uint32(r.Uint32()) - this.Processes = &v170 + v175 := uint32(r.Uint32()) + this.Processes = &v175 } if r.Intn(10) != 0 { - v171 := uint32(r.Uint32()) - this.Threads = &v171 + v176 := uint32(r.Uint32()) + this.Threads = &v176 } if r.Intn(10) != 0 { - v172 := uint64(uint64(r.Uint32())) - this.MemLowPressureCounter = &v172 + v177 := uint64(uint64(r.Uint32())) + this.MemLowPressureCounter = &v177 } if r.Intn(10) != 0 { - v173 := uint64(uint64(r.Uint32())) - this.MemMediumPressureCounter = &v173 + v178 := uint64(uint64(r.Uint32())) + this.MemMediumPressureCounter = &v178 } if r.Intn(10) != 0 { - v174 := uint64(uint64(r.Uint32())) - this.MemCriticalPressureCounter = &v174 + v179 := uint64(uint64(r.Uint32())) + this.MemCriticalPressureCounter = &v179 } if r.Intn(10) != 0 { - v175 := r.Intn(10) - this.NetTrafficControlStatistics = make([]TrafficControlStatistics, v175) - for i := 0; i < v175; i++ { - v176 := NewPopulatedTrafficControlStatistics(r, easy) - this.NetTrafficControlStatistics[i] = *v176 + v180 := r.Intn(10) + this.NetTrafficControlStatistics = make([]TrafficControlStatistics, v180) + for i := 0; i < v180; i++ { + v181 := NewPopulatedTrafficControlStatistics(r, easy) + this.NetTrafficControlStatistics[i] = *v181 } } if r.Intn(10) != 0 { - v177 := uint64(uint64(r.Uint32())) - this.MemTotalBytes = &v177 + v182 := uint64(uint64(r.Uint32())) + this.MemTotalBytes = &v182 } if r.Intn(10) != 0 { - v178 := uint64(uint64(r.Uint32())) - this.MemTotalMemswBytes = &v178 + v183 := uint64(uint64(r.Uint32())) + this.MemTotalMemswBytes = &v183 } if r.Intn(10) != 0 { - v179 := uint64(uint64(r.Uint32())) - this.MemSoftLimitBytes = &v179 + v184 := uint64(uint64(r.Uint32())) + this.MemSoftLimitBytes = &v184 } if r.Intn(10) != 0 { - v180 := uint64(uint64(r.Uint32())) - this.MemCacheBytes = &v180 + v185 := uint64(uint64(r.Uint32())) + this.MemCacheBytes = &v185 } if r.Intn(10) != 0 { - v181 := uint64(uint64(r.Uint32())) - this.MemSwapBytes = &v181 + v186 := uint64(uint64(r.Uint32())) + this.MemSwapBytes = &v186 } if r.Intn(10) != 0 { - v182 := uint64(uint64(r.Uint32())) - this.MemUnevictableBytes = &v182 + v187 := uint64(uint64(r.Uint32())) + this.MemUnevictableBytes = &v187 } if r.Intn(10) != 0 { this.NetSNMPStatistics = NewPopulatedSNMPStatistics(r, easy) @@ -27268,19 +29431,19 @@ func NewPopulatedResourceStatistics(r randyMesos, easy bool) *ResourceStatistics func NewPopulatedResourceUsage(r randyMesos, easy bool) *ResourceUsage { this := &ResourceUsage{} if r.Intn(10) != 0 { - v183 := r.Intn(10) - this.Executors = make([]ResourceUsage_Executor, v183) - for i := 0; i < v183; i++ { - v184 := NewPopulatedResourceUsage_Executor(r, easy) - this.Executors[i] = *v184 + v188 := r.Intn(10) + this.Executors = make([]ResourceUsage_Executor, v188) + for i := 0; i < v188; i++ { + v189 := NewPopulatedResourceUsage_Executor(r, easy) + this.Executors[i] = *v189 } } if r.Intn(10) != 0 { - v185 := r.Intn(10) - this.Total = make([]Resource, v185) - for i := 0; i < v185; i++ { - v186 := NewPopulatedResource(r, easy) - this.Total[i] = *v186 + v190 := r.Intn(10) + this.Total = make([]Resource, v190) + for i := 0; i < v190; i++ { + v191 := NewPopulatedResource(r, easy) + this.Total[i] = *v191 } } if !easy && r.Intn(10) != 0 { @@ -27290,27 +29453,27 @@ func NewPopulatedResourceUsage(r randyMesos, easy bool) *ResourceUsage { func NewPopulatedResourceUsage_Executor(r randyMesos, easy bool) *ResourceUsage_Executor { this := &ResourceUsage_Executor{} - v187 := NewPopulatedExecutorInfo(r, easy) - this.ExecutorInfo = *v187 + v192 := NewPopulatedExecutorInfo(r, easy) + this.ExecutorInfo = *v192 if r.Intn(10) != 0 { - v188 := r.Intn(10) - this.Allocated = make([]Resource, v188) - for i := 0; i < v188; i++ { - v189 := NewPopulatedResource(r, easy) - this.Allocated[i] = *v189 + v193 := r.Intn(10) + this.Allocated = make([]Resource, v193) + for i := 0; i < v193; i++ { + v194 := NewPopulatedResource(r, easy) + this.Allocated[i] = *v194 } } if r.Intn(10) != 0 { this.Statistics = NewPopulatedResourceStatistics(r, easy) } - v190 := NewPopulatedContainerID(r, easy) - this.ContainerID = *v190 + v195 := NewPopulatedContainerID(r, easy) + this.ContainerID = *v195 if r.Intn(10) != 0 { - v191 := r.Intn(10) - this.Tasks = make([]ResourceUsage_Executor_Task, v191) - for i := 0; i < v191; i++ { - v192 := NewPopulatedResourceUsage_Executor_Task(r, easy) - this.Tasks[i] = *v192 + v196 := r.Intn(10) + this.Tasks = make([]ResourceUsage_Executor_Task, v196) + for i := 0; i < v196; i++ { + v197 := NewPopulatedResourceUsage_Executor_Task(r, easy) + this.Tasks[i] = *v197 } } if !easy && r.Intn(10) != 0 { @@ -27321,14 +29484,14 @@ func NewPopulatedResourceUsage_Executor(r randyMesos, easy bool) *ResourceUsage_ func NewPopulatedResourceUsage_Executor_Task(r randyMesos, easy bool) *ResourceUsage_Executor_Task { this := &ResourceUsage_Executor_Task{} this.Name = randStringMesos(r) - v193 := NewPopulatedTaskID(r, easy) - this.ID = *v193 + v198 := NewPopulatedTaskID(r, easy) + this.ID = *v198 if r.Intn(10) != 0 { - v194 := r.Intn(10) - this.Resources = make([]Resource, v194) - for i := 0; i < v194; i++ { - v195 := NewPopulatedResource(r, easy) - this.Resources[i] = *v195 + v199 := r.Intn(10) + this.Resources = make([]Resource, v199) + for i := 0; i < v199; i++ { + v200 := NewPopulatedResource(r, easy) + this.Resources[i] = *v200 } } if r.Intn(10) != 0 { @@ -27349,215 +29512,215 @@ func NewPopulatedPerfStatistics(r randyMesos, easy bool) *PerfStatistics { if r.Intn(2) == 0 { this.Duration *= -1 } - if r.Intn(10) != 0 { - v196 := uint64(uint64(r.Uint32())) - this.Cycles = &v196 - } - if r.Intn(10) != 0 { - v197 := uint64(uint64(r.Uint32())) - this.StalledCyclesFrontend = &v197 - } - if r.Intn(10) != 0 { - v198 := uint64(uint64(r.Uint32())) - this.StalledCyclesBackend = &v198 - } - if r.Intn(10) != 0 { - v199 := uint64(uint64(r.Uint32())) - this.Instructions = &v199 - } - if r.Intn(10) != 0 { - v200 := uint64(uint64(r.Uint32())) - this.CacheReferences = &v200 - } if r.Intn(10) != 0 { v201 := uint64(uint64(r.Uint32())) - this.CacheMisses = &v201 + this.Cycles = &v201 } if r.Intn(10) != 0 { v202 := uint64(uint64(r.Uint32())) - this.Branches = &v202 + this.StalledCyclesFrontend = &v202 } if r.Intn(10) != 0 { v203 := uint64(uint64(r.Uint32())) - this.BranchMisses = &v203 + this.StalledCyclesBackend = &v203 } if r.Intn(10) != 0 { v204 := uint64(uint64(r.Uint32())) - this.BusCycles = &v204 + this.Instructions = &v204 } if r.Intn(10) != 0 { v205 := uint64(uint64(r.Uint32())) - this.RefCycles = &v205 + this.CacheReferences = &v205 } if r.Intn(10) != 0 { - v206 := float64(r.Float64()) - if r.Intn(2) == 0 { - v206 *= -1 - } - this.CPUClock = &v206 + v206 := uint64(uint64(r.Uint32())) + this.CacheMisses = &v206 } if r.Intn(10) != 0 { - v207 := float64(r.Float64()) - if r.Intn(2) == 0 { - v207 *= -1 - } - this.TaskClock = &v207 + v207 := uint64(uint64(r.Uint32())) + this.Branches = &v207 } if r.Intn(10) != 0 { v208 := uint64(uint64(r.Uint32())) - this.PageFaults = &v208 + this.BranchMisses = &v208 } if r.Intn(10) != 0 { v209 := uint64(uint64(r.Uint32())) - this.MinorFaults = &v209 + this.BusCycles = &v209 } if r.Intn(10) != 0 { v210 := uint64(uint64(r.Uint32())) - this.MajorFaults = &v210 + this.RefCycles = &v210 } if r.Intn(10) != 0 { - v211 := uint64(uint64(r.Uint32())) - this.ContextSwitches = &v211 + v211 := float64(r.Float64()) + if r.Intn(2) == 0 { + v211 *= -1 + } + this.CPUClock = &v211 } if r.Intn(10) != 0 { - v212 := uint64(uint64(r.Uint32())) - this.CPUMigrations = &v212 + v212 := float64(r.Float64()) + if r.Intn(2) == 0 { + v212 *= -1 + } + this.TaskClock = &v212 } if r.Intn(10) != 0 { v213 := uint64(uint64(r.Uint32())) - this.AlignmentFaults = &v213 + this.PageFaults = &v213 } if r.Intn(10) != 0 { v214 := uint64(uint64(r.Uint32())) - this.EmulationFaults = &v214 + this.MinorFaults = &v214 } if r.Intn(10) != 0 { v215 := uint64(uint64(r.Uint32())) - this.L1DcacheLoads = &v215 + this.MajorFaults = &v215 } if r.Intn(10) != 0 { v216 := uint64(uint64(r.Uint32())) - this.L1DcacheLoadMisses = &v216 + this.ContextSwitches = &v216 } if r.Intn(10) != 0 { v217 := uint64(uint64(r.Uint32())) - this.L1DcacheStores = &v217 + this.CPUMigrations = &v217 } if r.Intn(10) != 0 { v218 := uint64(uint64(r.Uint32())) - this.L1DcacheStoreMisses = &v218 + this.AlignmentFaults = &v218 } if r.Intn(10) != 0 { v219 := uint64(uint64(r.Uint32())) - this.L1DcachePrefetches = &v219 + this.EmulationFaults = &v219 } if r.Intn(10) != 0 { v220 := uint64(uint64(r.Uint32())) - this.L1DcachePrefetchMisses = &v220 + this.L1DcacheLoads = &v220 } if r.Intn(10) != 0 { v221 := uint64(uint64(r.Uint32())) - this.L1IcacheLoads = &v221 + this.L1DcacheLoadMisses = &v221 } if r.Intn(10) != 0 { v222 := uint64(uint64(r.Uint32())) - this.L1IcacheLoadMisses = &v222 + this.L1DcacheStores = &v222 } if r.Intn(10) != 0 { v223 := uint64(uint64(r.Uint32())) - this.L1IcachePrefetches = &v223 + this.L1DcacheStoreMisses = &v223 } if r.Intn(10) != 0 { v224 := uint64(uint64(r.Uint32())) - this.L1IcachePrefetchMisses = &v224 + this.L1DcachePrefetches = &v224 } if r.Intn(10) != 0 { v225 := uint64(uint64(r.Uint32())) - this.LLCLoads = &v225 + this.L1DcachePrefetchMisses = &v225 } if r.Intn(10) != 0 { v226 := uint64(uint64(r.Uint32())) - this.LLCLoadMisses = &v226 + this.L1IcacheLoads = &v226 } if r.Intn(10) != 0 { v227 := uint64(uint64(r.Uint32())) - this.LLCStores = &v227 + this.L1IcacheLoadMisses = &v227 } if r.Intn(10) != 0 { v228 := uint64(uint64(r.Uint32())) - this.LLCStoreMisses = &v228 + this.L1IcachePrefetches = &v228 } if r.Intn(10) != 0 { v229 := uint64(uint64(r.Uint32())) - this.LLCPrefetches = &v229 + this.L1IcachePrefetchMisses = &v229 } if r.Intn(10) != 0 { v230 := uint64(uint64(r.Uint32())) - this.LLCPrefetchMisses = &v230 + this.LLCLoads = &v230 } if r.Intn(10) != 0 { v231 := uint64(uint64(r.Uint32())) - this.DTLBLoads = &v231 + this.LLCLoadMisses = &v231 } if r.Intn(10) != 0 { v232 := uint64(uint64(r.Uint32())) - this.DTLBLoadMisses = &v232 + this.LLCStores = &v232 } if r.Intn(10) != 0 { v233 := uint64(uint64(r.Uint32())) - this.DTLBStores = &v233 + this.LLCStoreMisses = &v233 } if r.Intn(10) != 0 { v234 := uint64(uint64(r.Uint32())) - this.DTLBStoreMisses = &v234 + this.LLCPrefetches = &v234 } if r.Intn(10) != 0 { v235 := uint64(uint64(r.Uint32())) - this.DTLBPrefetches = &v235 + this.LLCPrefetchMisses = &v235 } if r.Intn(10) != 0 { v236 := uint64(uint64(r.Uint32())) - this.DTLBPrefetchMisses = &v236 + this.DTLBLoads = &v236 } if r.Intn(10) != 0 { v237 := uint64(uint64(r.Uint32())) - this.ITLBLoads = &v237 + this.DTLBLoadMisses = &v237 } if r.Intn(10) != 0 { v238 := uint64(uint64(r.Uint32())) - this.ITLBLoadMisses = &v238 + this.DTLBStores = &v238 } if r.Intn(10) != 0 { v239 := uint64(uint64(r.Uint32())) - this.BranchLoads = &v239 + this.DTLBStoreMisses = &v239 } if r.Intn(10) != 0 { v240 := uint64(uint64(r.Uint32())) - this.BranchLoadMisses = &v240 + this.DTLBPrefetches = &v240 } if r.Intn(10) != 0 { v241 := uint64(uint64(r.Uint32())) - this.NodeLoads = &v241 + this.DTLBPrefetchMisses = &v241 } if r.Intn(10) != 0 { v242 := uint64(uint64(r.Uint32())) - this.NodeLoadMisses = &v242 + this.ITLBLoads = &v242 } if r.Intn(10) != 0 { v243 := uint64(uint64(r.Uint32())) - this.NodeStores = &v243 + this.ITLBLoadMisses = &v243 } if r.Intn(10) != 0 { v244 := uint64(uint64(r.Uint32())) - this.NodeStoreMisses = &v244 + this.BranchLoads = &v244 } if r.Intn(10) != 0 { v245 := uint64(uint64(r.Uint32())) - this.NodePrefetches = &v245 + this.BranchLoadMisses = &v245 } if r.Intn(10) != 0 { v246 := uint64(uint64(r.Uint32())) - this.NodePrefetchMisses = &v246 + this.NodeLoads = &v246 + } + if r.Intn(10) != 0 { + v247 := uint64(uint64(r.Uint32())) + this.NodeLoadMisses = &v247 + } + if r.Intn(10) != 0 { + v248 := uint64(uint64(r.Uint32())) + this.NodeStores = &v248 + } + if r.Intn(10) != 0 { + v249 := uint64(uint64(r.Uint32())) + this.NodeStoreMisses = &v249 + } + if r.Intn(10) != 0 { + v250 := uint64(uint64(r.Uint32())) + this.NodePrefetches = &v250 + } + if r.Intn(10) != 0 { + v251 := uint64(uint64(r.Uint32())) + this.NodePrefetchMisses = &v251 } if !easy && r.Intn(10) != 0 { } @@ -27570,11 +29733,11 @@ func NewPopulatedRequest(r randyMesos, easy bool) *Request { this.AgentID = NewPopulatedAgentID(r, easy) } if r.Intn(10) != 0 { - v247 := r.Intn(10) - this.Resources = make([]Resource, v247) - for i := 0; i < v247; i++ { - v248 := NewPopulatedResource(r, easy) - this.Resources[i] = *v248 + v252 := r.Intn(10) + this.Resources = make([]Resource, v252) + for i := 0; i < v252; i++ { + v253 := NewPopulatedResource(r, easy) + this.Resources[i] = *v253 } } if !easy && r.Intn(10) != 0 { @@ -27584,35 +29747,35 @@ func NewPopulatedRequest(r randyMesos, easy bool) *Request { func NewPopulatedOffer(r randyMesos, easy bool) *Offer { this := &Offer{} - v249 := NewPopulatedOfferID(r, easy) - this.ID = *v249 - v250 := NewPopulatedFrameworkID(r, easy) - this.FrameworkID = *v250 - v251 := NewPopulatedAgentID(r, easy) - this.AgentID = *v251 + v254 := NewPopulatedOfferID(r, easy) + this.ID = *v254 + v255 := NewPopulatedFrameworkID(r, easy) + this.FrameworkID = *v255 + v256 := NewPopulatedAgentID(r, easy) + this.AgentID = *v256 this.Hostname = randStringMesos(r) if r.Intn(10) != 0 { - v252 := r.Intn(10) - this.Resources = make([]Resource, v252) - for i := 0; i < v252; i++ { - v253 := NewPopulatedResource(r, easy) - this.Resources[i] = *v253 + v257 := r.Intn(10) + this.Resources = make([]Resource, v257) + for i := 0; i < v257; i++ { + v258 := NewPopulatedResource(r, easy) + this.Resources[i] = *v258 } } if r.Intn(10) != 0 { - v254 := r.Intn(10) - this.ExecutorIDs = make([]ExecutorID, v254) - for i := 0; i < v254; i++ { - v255 := NewPopulatedExecutorID(r, easy) - this.ExecutorIDs[i] = *v255 + v259 := r.Intn(10) + this.ExecutorIDs = make([]ExecutorID, v259) + for i := 0; i < v259; i++ { + v260 := NewPopulatedExecutorID(r, easy) + this.ExecutorIDs[i] = *v260 } } if r.Intn(10) != 0 { - v256 := r.Intn(10) - this.Attributes = make([]Attribute, v256) - for i := 0; i < v256; i++ { - v257 := NewPopulatedAttribute(r, easy) - this.Attributes[i] = *v257 + v261 := r.Intn(10) + this.Attributes = make([]Attribute, v261) + for i := 0; i < v261; i++ { + v262 := NewPopulatedAttribute(r, easy) + this.Attributes[i] = *v262 } } if r.Intn(10) != 0 { @@ -27621,6 +29784,9 @@ func NewPopulatedOffer(r randyMesos, easy bool) *Offer { if r.Intn(10) != 0 { this.Unavailability = NewPopulatedUnavailability(r, easy) } + if r.Intn(10) != 0 { + this.AllocationInfo = NewPopulatedResource_AllocationInfo(r, easy) + } if !easy && r.Intn(10) != 0 { } return this @@ -27628,10 +29794,7 @@ func NewPopulatedOffer(r randyMesos, easy bool) *Offer { func NewPopulatedOffer_Operation(r randyMesos, easy bool) *Offer_Operation { this := &Offer_Operation{} - if r.Intn(10) != 0 { - v258 := Offer_Operation_Type([]int32{0, 1, 6, 2, 3, 4, 5}[r.Intn(7)]) - this.Type = &v258 - } + this.Type = Offer_Operation_Type([]int32{0, 1, 6, 2, 3, 4, 5}[r.Intn(7)]) if r.Intn(10) != 0 { this.Launch = NewPopulatedOffer_Operation_Launch(r, easy) } @@ -27658,11 +29821,11 @@ func NewPopulatedOffer_Operation(r randyMesos, easy bool) *Offer_Operation { func NewPopulatedOffer_Operation_Launch(r randyMesos, easy bool) *Offer_Operation_Launch { this := &Offer_Operation_Launch{} if r.Intn(10) != 0 { - v259 := r.Intn(10) - this.TaskInfos = make([]TaskInfo, v259) - for i := 0; i < v259; i++ { - v260 := NewPopulatedTaskInfo(r, easy) - this.TaskInfos[i] = *v260 + v263 := r.Intn(10) + this.TaskInfos = make([]TaskInfo, v263) + for i := 0; i < v263; i++ { + v264 := NewPopulatedTaskInfo(r, easy) + this.TaskInfos[i] = *v264 } } if !easy && r.Intn(10) != 0 { @@ -27672,10 +29835,10 @@ func NewPopulatedOffer_Operation_Launch(r randyMesos, easy bool) *Offer_Operatio func NewPopulatedOffer_Operation_LaunchGroup(r randyMesos, easy bool) *Offer_Operation_LaunchGroup { this := &Offer_Operation_LaunchGroup{} - v261 := NewPopulatedExecutorInfo(r, easy) - this.Executor = *v261 - v262 := NewPopulatedTaskGroupInfo(r, easy) - this.TaskGroup = *v262 + v265 := NewPopulatedExecutorInfo(r, easy) + this.Executor = *v265 + v266 := NewPopulatedTaskGroupInfo(r, easy) + this.TaskGroup = *v266 if !easy && r.Intn(10) != 0 { } return this @@ -27684,11 +29847,11 @@ func NewPopulatedOffer_Operation_LaunchGroup(r randyMesos, easy bool) *Offer_Ope func NewPopulatedOffer_Operation_Reserve(r randyMesos, easy bool) *Offer_Operation_Reserve { this := &Offer_Operation_Reserve{} if r.Intn(10) != 0 { - v263 := r.Intn(10) - this.Resources = make([]Resource, v263) - for i := 0; i < v263; i++ { - v264 := NewPopulatedResource(r, easy) - this.Resources[i] = *v264 + v267 := r.Intn(10) + this.Resources = make([]Resource, v267) + for i := 0; i < v267; i++ { + v268 := NewPopulatedResource(r, easy) + this.Resources[i] = *v268 } } if !easy && r.Intn(10) != 0 { @@ -27699,11 +29862,11 @@ func NewPopulatedOffer_Operation_Reserve(r randyMesos, easy bool) *Offer_Operati func NewPopulatedOffer_Operation_Unreserve(r randyMesos, easy bool) *Offer_Operation_Unreserve { this := &Offer_Operation_Unreserve{} if r.Intn(10) != 0 { - v265 := r.Intn(10) - this.Resources = make([]Resource, v265) - for i := 0; i < v265; i++ { - v266 := NewPopulatedResource(r, easy) - this.Resources[i] = *v266 + v269 := r.Intn(10) + this.Resources = make([]Resource, v269) + for i := 0; i < v269; i++ { + v270 := NewPopulatedResource(r, easy) + this.Resources[i] = *v270 } } if !easy && r.Intn(10) != 0 { @@ -27714,11 +29877,11 @@ func NewPopulatedOffer_Operation_Unreserve(r randyMesos, easy bool) *Offer_Opera func NewPopulatedOffer_Operation_Create(r randyMesos, easy bool) *Offer_Operation_Create { this := &Offer_Operation_Create{} if r.Intn(10) != 0 { - v267 := r.Intn(10) - this.Volumes = make([]Resource, v267) - for i := 0; i < v267; i++ { - v268 := NewPopulatedResource(r, easy) - this.Volumes[i] = *v268 + v271 := r.Intn(10) + this.Volumes = make([]Resource, v271) + for i := 0; i < v271; i++ { + v272 := NewPopulatedResource(r, easy) + this.Volumes[i] = *v272 } } if !easy && r.Intn(10) != 0 { @@ -27729,11 +29892,11 @@ func NewPopulatedOffer_Operation_Create(r randyMesos, easy bool) *Offer_Operatio func NewPopulatedOffer_Operation_Destroy(r randyMesos, easy bool) *Offer_Operation_Destroy { this := &Offer_Operation_Destroy{} if r.Intn(10) != 0 { - v269 := r.Intn(10) - this.Volumes = make([]Resource, v269) - for i := 0; i < v269; i++ { - v270 := NewPopulatedResource(r, easy) - this.Volumes[i] = *v270 + v273 := r.Intn(10) + this.Volumes = make([]Resource, v273) + for i := 0; i < v273; i++ { + v274 := NewPopulatedResource(r, easy) + this.Volumes[i] = *v274 } } if !easy && r.Intn(10) != 0 { @@ -27743,24 +29906,24 @@ func NewPopulatedOffer_Operation_Destroy(r randyMesos, easy bool) *Offer_Operati func NewPopulatedInverseOffer(r randyMesos, easy bool) *InverseOffer { this := &InverseOffer{} - v271 := NewPopulatedOfferID(r, easy) - this.OfferID = *v271 + v275 := NewPopulatedOfferID(r, easy) + this.OfferID = *v275 if r.Intn(10) != 0 { this.URL = NewPopulatedURL(r, easy) } - v272 := NewPopulatedFrameworkID(r, easy) - this.FrameworkID = *v272 + v276 := NewPopulatedFrameworkID(r, easy) + this.FrameworkID = *v276 if r.Intn(10) != 0 { this.AgentID = NewPopulatedAgentID(r, easy) } - v273 := NewPopulatedUnavailability(r, easy) - this.Unavailability = *v273 + v277 := NewPopulatedUnavailability(r, easy) + this.Unavailability = *v277 if r.Intn(10) != 0 { - v274 := r.Intn(10) - this.Resources = make([]Resource, v274) - for i := 0; i < v274; i++ { - v275 := NewPopulatedResource(r, easy) - this.Resources[i] = *v275 + v278 := r.Intn(10) + this.Resources = make([]Resource, v278) + for i := 0; i < v278; i++ { + v279 := NewPopulatedResource(r, easy) + this.Resources[i] = *v279 } } if !easy && r.Intn(10) != 0 { @@ -27771,25 +29934,25 @@ func NewPopulatedInverseOffer(r randyMesos, easy bool) *InverseOffer { func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { this := &TaskInfo{} this.Name = randStringMesos(r) - v276 := NewPopulatedTaskID(r, easy) - this.TaskID = *v276 - v277 := NewPopulatedAgentID(r, easy) - this.AgentID = *v277 + v280 := NewPopulatedTaskID(r, easy) + this.TaskID = *v280 + v281 := NewPopulatedAgentID(r, easy) + this.AgentID = *v281 if r.Intn(10) != 0 { - v278 := r.Intn(10) - this.Resources = make([]Resource, v278) - for i := 0; i < v278; i++ { - v279 := NewPopulatedResource(r, easy) - this.Resources[i] = *v279 + v282 := r.Intn(10) + this.Resources = make([]Resource, v282) + for i := 0; i < v282; i++ { + v283 := NewPopulatedResource(r, easy) + this.Resources[i] = *v283 } } if r.Intn(10) != 0 { this.Executor = NewPopulatedExecutorInfo(r, easy) } if r.Intn(10) != 0 { - v280 := r.Intn(100) - this.Data = make([]byte, v280) - for i := 0; i < v280; i++ { + v284 := r.Intn(100) + this.Data = make([]byte, v284) + for i := 0; i < v284; i++ { this.Data[i] = byte(r.Intn(256)) } } @@ -27811,6 +29974,9 @@ func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { if r.Intn(10) != 0 { this.KillPolicy = NewPopulatedKillPolicy(r, easy) } + if r.Intn(10) != 0 { + this.Check = NewPopulatedCheckInfo(r, easy) + } if !easy && r.Intn(10) != 0 { } return this @@ -27819,11 +29985,11 @@ func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { func NewPopulatedTaskGroupInfo(r randyMesos, easy bool) *TaskGroupInfo { this := &TaskGroupInfo{} if r.Intn(10) != 0 { - v281 := r.Intn(10) - this.Tasks = make([]TaskInfo, v281) - for i := 0; i < v281; i++ { - v282 := NewPopulatedTaskInfo(r, easy) - this.Tasks[i] = *v282 + v285 := r.Intn(10) + this.Tasks = make([]TaskInfo, v285) + for i := 0; i < v285; i++ { + v286 := NewPopulatedTaskInfo(r, easy) + this.Tasks[i] = *v286 } } if !easy && r.Intn(10) != 0 { @@ -27834,41 +30000,41 @@ func NewPopulatedTaskGroupInfo(r randyMesos, easy bool) *TaskGroupInfo { func NewPopulatedTask(r randyMesos, easy bool) *Task { this := &Task{} this.Name = randStringMesos(r) - v283 := NewPopulatedTaskID(r, easy) - this.TaskID = *v283 - v284 := NewPopulatedFrameworkID(r, easy) - this.FrameworkID = *v284 + v287 := NewPopulatedTaskID(r, easy) + this.TaskID = *v287 + v288 := NewPopulatedFrameworkID(r, easy) + this.FrameworkID = *v288 if r.Intn(10) != 0 { this.ExecutorID = NewPopulatedExecutorID(r, easy) } - v285 := NewPopulatedAgentID(r, easy) - this.AgentID = *v285 - v286 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) - this.State = &v286 + v289 := NewPopulatedAgentID(r, easy) + this.AgentID = *v289 + v290 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.State = &v290 if r.Intn(10) != 0 { - v287 := r.Intn(10) - this.Resources = make([]Resource, v287) - for i := 0; i < v287; i++ { - v288 := NewPopulatedResource(r, easy) - this.Resources[i] = *v288 + v291 := r.Intn(10) + this.Resources = make([]Resource, v291) + for i := 0; i < v291; i++ { + v292 := NewPopulatedResource(r, easy) + this.Resources[i] = *v292 } } if r.Intn(10) != 0 { - v289 := r.Intn(10) - this.Statuses = make([]TaskStatus, v289) - for i := 0; i < v289; i++ { - v290 := NewPopulatedTaskStatus(r, easy) - this.Statuses[i] = *v290 + v293 := r.Intn(10) + this.Statuses = make([]TaskStatus, v293) + for i := 0; i < v293; i++ { + v294 := NewPopulatedTaskStatus(r, easy) + this.Statuses[i] = *v294 } } if r.Intn(10) != 0 { - v291 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) - this.StatusUpdateState = &v291 + v295 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.StatusUpdateState = &v295 } if r.Intn(10) != 0 { - v292 := r.Intn(100) - this.StatusUpdateUUID = make([]byte, v292) - for i := 0; i < v292; i++ { + v296 := r.Intn(100) + this.StatusUpdateUUID = make([]byte, v296) + for i := 0; i < v296; i++ { this.StatusUpdateUUID[i] = byte(r.Intn(256)) } } @@ -27882,8 +30048,50 @@ func NewPopulatedTask(r randyMesos, easy bool) *Task { this.Container = NewPopulatedContainerInfo(r, easy) } if r.Intn(10) != 0 { - v293 := randStringMesos(r) - this.User = &v293 + v297 := randStringMesos(r) + this.User = &v297 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckStatusInfo(r randyMesos, easy bool) *CheckStatusInfo { + this := &CheckStatusInfo{} + if r.Intn(10) != 0 { + v298 := CheckInfo_Type([]int32{0, 1, 2}[r.Intn(3)]) + this.Type = &v298 + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCheckStatusInfo_Command(r, easy) + } + if r.Intn(10) != 0 { + this.HTTP = NewPopulatedCheckStatusInfo_Http(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckStatusInfo_Command(r randyMesos, easy bool) *CheckStatusInfo_Command { + this := &CheckStatusInfo_Command{} + if r.Intn(10) != 0 { + v299 := int32(r.Int31()) + if r.Intn(2) == 0 { + v299 *= -1 + } + this.ExitCode = &v299 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckStatusInfo_Http(r randyMesos, easy bool) *CheckStatusInfo_Http { + this := &CheckStatusInfo_Http{} + if r.Intn(10) != 0 { + v300 := uint32(r.Uint32()) + this.StatusCode = &v300 } if !easy && r.Intn(10) != 0 { } @@ -27892,50 +30100,50 @@ func NewPopulatedTask(r randyMesos, easy bool) *Task { func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { this := &TaskStatus{} - v294 := NewPopulatedTaskID(r, easy) - this.TaskID = *v294 - v295 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) - this.State = &v295 - if r.Intn(10) != 0 { - v296 := r.Intn(100) - this.Data = make([]byte, v296) - for i := 0; i < v296; i++ { + v301 := NewPopulatedTaskID(r, easy) + this.TaskID = *v301 + v302 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.State = &v302 + if r.Intn(10) != 0 { + v303 := r.Intn(100) + this.Data = make([]byte, v303) + for i := 0; i < v303; i++ { this.Data[i] = byte(r.Intn(256)) } } if r.Intn(10) != 0 { - v297 := randStringMesos(r) - this.Message = &v297 + v304 := randStringMesos(r) + this.Message = &v304 } if r.Intn(10) != 0 { this.AgentID = NewPopulatedAgentID(r, easy) } if r.Intn(10) != 0 { - v298 := float64(r.Float64()) + v305 := float64(r.Float64()) if r.Intn(2) == 0 { - v298 *= -1 + v305 *= -1 } - this.Timestamp = &v298 + this.Timestamp = &v305 } if r.Intn(10) != 0 { this.ExecutorID = NewPopulatedExecutorID(r, easy) } if r.Intn(10) != 0 { - v299 := bool(bool(r.Intn(2) == 0)) - this.Healthy = &v299 + v306 := bool(bool(r.Intn(2) == 0)) + this.Healthy = &v306 } if r.Intn(10) != 0 { - v300 := TaskStatus_Source([]int32{0, 1, 2}[r.Intn(3)]) - this.Source = &v300 + v307 := TaskStatus_Source([]int32{0, 1, 2}[r.Intn(3)]) + this.Source = &v307 } if r.Intn(10) != 0 { - v301 := TaskStatus_Reason([]int32{0, 21, 19, 20, 8, 17, 22, 23, 24, 1, 2, 3, 4, 5, 6, 7, 9, 18, 10, 11, 12, 13, 25, 26, 14, 15, 16}[r.Intn(27)]) - this.Reason = &v301 + v308 := TaskStatus_Reason([]int32{0, 21, 19, 20, 8, 17, 22, 23, 24, 1, 2, 3, 4, 5, 6, 27, 7, 9, 18, 10, 11, 12, 13, 28, 25, 26, 14, 15, 16}[r.Intn(29)]) + this.Reason = &v308 } if r.Intn(10) != 0 { - v302 := r.Intn(100) - this.UUID = make([]byte, v302) - for i := 0; i < v302; i++ { + v309 := r.Intn(100) + this.UUID = make([]byte, v309) + for i := 0; i < v309; i++ { this.UUID[i] = byte(r.Intn(256)) } } @@ -27948,6 +30156,9 @@ func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { if r.Intn(10) != 0 { this.UnreachableTime = NewPopulatedTimeInfo(r, easy) } + if r.Intn(10) != 0 { + this.CheckStatus = NewPopulatedCheckStatusInfo(r, easy) + } if !easy && r.Intn(10) != 0 { } return this @@ -27956,11 +30167,11 @@ func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { func NewPopulatedFilters(r randyMesos, easy bool) *Filters { this := &Filters{} if r.Intn(10) != 0 { - v303 := float64(r.Float64()) + v310 := float64(r.Float64()) if r.Intn(2) == 0 { - v303 *= -1 + v310 *= -1 } - this.RefuseSeconds = &v303 + this.RefuseSeconds = &v310 } if !easy && r.Intn(10) != 0 { } @@ -27970,11 +30181,11 @@ func NewPopulatedFilters(r randyMesos, easy bool) *Filters { func NewPopulatedEnvironment(r randyMesos, easy bool) *Environment { this := &Environment{} if r.Intn(10) != 0 { - v304 := r.Intn(10) - this.Variables = make([]Environment_Variable, v304) - for i := 0; i < v304; i++ { - v305 := NewPopulatedEnvironment_Variable(r, easy) - this.Variables[i] = *v305 + v311 := r.Intn(10) + this.Variables = make([]Environment_Variable, v311) + for i := 0; i < v311; i++ { + v312 := NewPopulatedEnvironment_Variable(r, easy) + this.Variables[i] = *v312 } } if !easy && r.Intn(10) != 0 { @@ -27985,7 +30196,10 @@ func NewPopulatedEnvironment(r randyMesos, easy bool) *Environment { func NewPopulatedEnvironment_Variable(r randyMesos, easy bool) *Environment_Variable { this := &Environment_Variable{} this.Name = randStringMesos(r) - this.Value = randStringMesos(r) + if r.Intn(10) != 0 { + v313 := randStringMesos(r) + this.Value = &v313 + } if !easy && r.Intn(10) != 0 { } return this @@ -28003,11 +30217,11 @@ func NewPopulatedParameter(r randyMesos, easy bool) *Parameter { func NewPopulatedParameters(r randyMesos, easy bool) *Parameters { this := &Parameters{} if r.Intn(10) != 0 { - v306 := r.Intn(10) - this.Parameter = make([]Parameter, v306) - for i := 0; i < v306; i++ { - v307 := NewPopulatedParameter(r, easy) - this.Parameter[i] = *v307 + v314 := r.Intn(10) + this.Parameter = make([]Parameter, v314) + for i := 0; i < v314; i++ { + v315 := NewPopulatedParameter(r, easy) + this.Parameter[i] = *v315 } } if !easy && r.Intn(10) != 0 { @@ -28019,8 +30233,8 @@ func NewPopulatedCredential(r randyMesos, easy bool) *Credential { this := &Credential{} this.Principal = randStringMesos(r) if r.Intn(10) != 0 { - v308 := randStringMesos(r) - this.Secret = &v308 + v316 := randStringMesos(r) + this.Secret = &v316 } if !easy && r.Intn(10) != 0 { } @@ -28030,11 +30244,11 @@ func NewPopulatedCredential(r randyMesos, easy bool) *Credential { func NewPopulatedCredentials(r randyMesos, easy bool) *Credentials { this := &Credentials{} if r.Intn(10) != 0 { - v309 := r.Intn(10) - this.Credentials = make([]Credential, v309) - for i := 0; i < v309; i++ { - v310 := NewPopulatedCredential(r, easy) - this.Credentials[i] = *v310 + v317 := r.Intn(10) + this.Credentials = make([]Credential, v317) + for i := 0; i < v317; i++ { + v318 := NewPopulatedCredential(r, easy) + this.Credentials[i] = *v318 } } if !easy && r.Intn(10) != 0 { @@ -28045,16 +30259,16 @@ func NewPopulatedCredentials(r randyMesos, easy bool) *Credentials { func NewPopulatedRateLimit(r randyMesos, easy bool) *RateLimit { this := &RateLimit{} if r.Intn(10) != 0 { - v311 := float64(r.Float64()) + v319 := float64(r.Float64()) if r.Intn(2) == 0 { - v311 *= -1 + v319 *= -1 } - this.QPS = &v311 + this.QPS = &v319 } this.Principal = randStringMesos(r) if r.Intn(10) != 0 { - v312 := uint64(uint64(r.Uint32())) - this.Capacity = &v312 + v320 := uint64(uint64(r.Uint32())) + this.Capacity = &v320 } if !easy && r.Intn(10) != 0 { } @@ -28064,23 +30278,23 @@ func NewPopulatedRateLimit(r randyMesos, easy bool) *RateLimit { func NewPopulatedRateLimits(r randyMesos, easy bool) *RateLimits { this := &RateLimits{} if r.Intn(10) != 0 { - v313 := r.Intn(10) - this.Limits = make([]RateLimit, v313) - for i := 0; i < v313; i++ { - v314 := NewPopulatedRateLimit(r, easy) - this.Limits[i] = *v314 + v321 := r.Intn(10) + this.Limits = make([]RateLimit, v321) + for i := 0; i < v321; i++ { + v322 := NewPopulatedRateLimit(r, easy) + this.Limits[i] = *v322 } } if r.Intn(10) != 0 { - v315 := float64(r.Float64()) + v323 := float64(r.Float64()) if r.Intn(2) == 0 { - v315 *= -1 + v323 *= -1 } - this.AggregateDefaultQPS = &v315 + this.AggregateDefaultQPS = &v323 } if r.Intn(10) != 0 { - v316 := uint64(uint64(r.Uint32())) - this.AggregateDefaultCapacity = &v316 + v324 := uint64(uint64(r.Uint32())) + this.AggregateDefaultCapacity = &v324 } if !easy && r.Intn(10) != 0 { } @@ -28089,8 +30303,8 @@ func NewPopulatedRateLimits(r randyMesos, easy bool) *RateLimits { func NewPopulatedImage(r randyMesos, easy bool) *Image { this := &Image{} - v317 := Image_Type([]int32{1, 2}[r.Intn(2)]) - this.Type = &v317 + v325 := Image_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v325 if r.Intn(10) != 0 { this.Appc = NewPopulatedImage_Appc(r, easy) } @@ -28098,8 +30312,8 @@ func NewPopulatedImage(r randyMesos, easy bool) *Image { this.Docker = NewPopulatedImage_Docker(r, easy) } if r.Intn(10) != 0 { - v318 := bool(bool(r.Intn(2) == 0)) - this.Cached = &v318 + v326 := bool(bool(r.Intn(2) == 0)) + this.Cached = &v326 } if !easy && r.Intn(10) != 0 { } @@ -28110,8 +30324,8 @@ func NewPopulatedImage_Appc(r randyMesos, easy bool) *Image_Appc { this := &Image_Appc{} this.Name = randStringMesos(r) if r.Intn(10) != 0 { - v319 := randStringMesos(r) - this.ID = &v319 + v327 := randStringMesos(r) + this.ID = &v327 } if r.Intn(10) != 0 { this.Labels = NewPopulatedLabels(r, easy) @@ -28136,11 +30350,11 @@ func NewPopulatedVolume(r randyMesos, easy bool) *Volume { this := &Volume{} this.ContainerPath = randStringMesos(r) if r.Intn(10) != 0 { - v320 := randStringMesos(r) - this.HostPath = &v320 + v328 := randStringMesos(r) + this.HostPath = &v328 } - v321 := Volume_Mode([]int32{1, 2}[r.Intn(2)]) - this.Mode = &v321 + v329 := Volume_Mode([]int32{1, 2}[r.Intn(2)]) + this.Mode = &v329 if r.Intn(10) != 0 { this.Image = NewPopulatedImage(r, easy) } @@ -28169,8 +30383,8 @@ func NewPopulatedVolume_Source(r randyMesos, easy bool) *Volume_Source { func NewPopulatedVolume_Source_DockerVolume(r randyMesos, easy bool) *Volume_Source_DockerVolume { this := &Volume_Source_DockerVolume{} if r.Intn(10) != 0 { - v322 := randStringMesos(r) - this.Driver = &v322 + v330 := randStringMesos(r) + this.Driver = &v330 } this.Name = randStringMesos(r) if r.Intn(10) != 0 { @@ -28183,10 +30397,7 @@ func NewPopulatedVolume_Source_DockerVolume(r randyMesos, easy bool) *Volume_Sou func NewPopulatedVolume_Source_SandboxPath(r randyMesos, easy bool) *Volume_Source_SandboxPath { this := &Volume_Source_SandboxPath{} - if r.Intn(10) != 0 { - v323 := Volume_Source_SandboxPath_Type([]int32{0, 1, 2}[r.Intn(3)]) - this.Type = &v323 - } + this.Type = Volume_Source_SandboxPath_Type([]int32{0, 1, 2}[r.Intn(3)]) this.Path = randStringMesos(r) if !easy && r.Intn(10) != 0 { } @@ -28196,9 +30407,9 @@ func NewPopulatedVolume_Source_SandboxPath(r randyMesos, easy bool) *Volume_Sour func NewPopulatedNetworkInfo(r randyMesos, easy bool) *NetworkInfo { this := &NetworkInfo{} if r.Intn(10) != 0 { - v324 := r.Intn(10) - this.Groups = make([]string, v324) - for i := 0; i < v324; i++ { + v331 := r.Intn(10) + this.Groups = make([]string, v331) + for i := 0; i < v331; i++ { this.Groups[i] = randStringMesos(r) } } @@ -28206,23 +30417,23 @@ func NewPopulatedNetworkInfo(r randyMesos, easy bool) *NetworkInfo { this.Labels = NewPopulatedLabels(r, easy) } if r.Intn(10) != 0 { - v325 := r.Intn(10) - this.IPAddresses = make([]NetworkInfo_IPAddress, v325) - for i := 0; i < v325; i++ { - v326 := NewPopulatedNetworkInfo_IPAddress(r, easy) - this.IPAddresses[i] = *v326 + v332 := r.Intn(10) + this.IPAddresses = make([]NetworkInfo_IPAddress, v332) + for i := 0; i < v332; i++ { + v333 := NewPopulatedNetworkInfo_IPAddress(r, easy) + this.IPAddresses[i] = *v333 } } if r.Intn(10) != 0 { - v327 := randStringMesos(r) - this.Name = &v327 + v334 := randStringMesos(r) + this.Name = &v334 } if r.Intn(10) != 0 { - v328 := r.Intn(10) - this.PortMappings = make([]NetworkInfo_PortMapping, v328) - for i := 0; i < v328; i++ { - v329 := NewPopulatedNetworkInfo_PortMapping(r, easy) - this.PortMappings[i] = *v329 + v335 := r.Intn(10) + this.PortMappings = make([]NetworkInfo_PortMapping, v335) + for i := 0; i < v335; i++ { + v336 := NewPopulatedNetworkInfo_PortMapping(r, easy) + this.PortMappings[i] = *v336 } } if !easy && r.Intn(10) != 0 { @@ -28233,12 +30444,12 @@ func NewPopulatedNetworkInfo(r randyMesos, easy bool) *NetworkInfo { func NewPopulatedNetworkInfo_IPAddress(r randyMesos, easy bool) *NetworkInfo_IPAddress { this := &NetworkInfo_IPAddress{} if r.Intn(10) != 0 { - v330 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) - this.Protocol = &v330 + v337 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) + this.Protocol = &v337 } if r.Intn(10) != 0 { - v331 := randStringMesos(r) - this.IPAddress = &v331 + v338 := randStringMesos(r) + this.IPAddress = &v338 } if !easy && r.Intn(10) != 0 { } @@ -28250,8 +30461,8 @@ func NewPopulatedNetworkInfo_PortMapping(r randyMesos, easy bool) *NetworkInfo_P this.HostPort = uint32(r.Uint32()) this.ContainerPort = uint32(r.Uint32()) if r.Intn(10) != 0 { - v332 := randStringMesos(r) - this.Protocol = &v332 + v339 := randStringMesos(r) + this.Protocol = &v339 } if !easy && r.Intn(10) != 0 { } @@ -28261,9 +30472,9 @@ func NewPopulatedNetworkInfo_PortMapping(r randyMesos, easy bool) *NetworkInfo_P func NewPopulatedCapabilityInfo(r randyMesos, easy bool) *CapabilityInfo { this := &CapabilityInfo{} if r.Intn(10) != 0 { - v333 := r.Intn(10) - this.Capabilities = make([]CapabilityInfo_Capability, v333) - for i := 0; i < v333; i++ { + v340 := r.Intn(10) + this.Capabilities = make([]CapabilityInfo_Capability, v340) + for i := 0; i < v340; i++ { this.Capabilities[i] = CapabilityInfo_Capability([]int32{0, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037}[r.Intn(39)]) } } @@ -28282,39 +30493,95 @@ func NewPopulatedLinuxInfo(r randyMesos, easy bool) *LinuxInfo { return this } +func NewPopulatedRLimitInfo(r randyMesos, easy bool) *RLimitInfo { + this := &RLimitInfo{} + if r.Intn(10) != 0 { + v341 := r.Intn(10) + this.Rlimits = make([]RLimitInfo_RLimit, v341) + for i := 0; i < v341; i++ { + v342 := NewPopulatedRLimitInfo_RLimit(r, easy) + this.Rlimits[i] = *v342 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedRLimitInfo_RLimit(r randyMesos, easy bool) *RLimitInfo_RLimit { + this := &RLimitInfo_RLimit{} + this.Type = RLimitInfo_RLimit_Type([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(17)]) + if r.Intn(10) != 0 { + v343 := uint64(uint64(r.Uint32())) + this.Hard = &v343 + } + if r.Intn(10) != 0 { + v344 := uint64(uint64(r.Uint32())) + this.Soft = &v344 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTTYInfo(r randyMesos, easy bool) *TTYInfo { + this := &TTYInfo{} + if r.Intn(10) != 0 { + this.WindowSize = NewPopulatedTTYInfo_WindowSize(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTTYInfo_WindowSize(r randyMesos, easy bool) *TTYInfo_WindowSize { + this := &TTYInfo_WindowSize{} + this.Rows = uint32(r.Uint32()) + this.Columns = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + } + return this +} + func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { this := &ContainerInfo{} - v334 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) - this.Type = &v334 + v345 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v345 if r.Intn(10) != 0 { - v335 := r.Intn(10) - this.Volumes = make([]Volume, v335) - for i := 0; i < v335; i++ { - v336 := NewPopulatedVolume(r, easy) - this.Volumes[i] = *v336 + v346 := r.Intn(10) + this.Volumes = make([]Volume, v346) + for i := 0; i < v346; i++ { + v347 := NewPopulatedVolume(r, easy) + this.Volumes[i] = *v347 } } if r.Intn(10) != 0 { this.Docker = NewPopulatedContainerInfo_DockerInfo(r, easy) } if r.Intn(10) != 0 { - v337 := randStringMesos(r) - this.Hostname = &v337 + v348 := randStringMesos(r) + this.Hostname = &v348 } if r.Intn(10) != 0 { this.Mesos = NewPopulatedContainerInfo_MesosInfo(r, easy) } if r.Intn(10) != 0 { - v338 := r.Intn(10) - this.NetworkInfos = make([]NetworkInfo, v338) - for i := 0; i < v338; i++ { - v339 := NewPopulatedNetworkInfo(r, easy) - this.NetworkInfos[i] = *v339 + v349 := r.Intn(10) + this.NetworkInfos = make([]NetworkInfo, v349) + for i := 0; i < v349; i++ { + v350 := NewPopulatedNetworkInfo(r, easy) + this.NetworkInfos[i] = *v350 } } if r.Intn(10) != 0 { this.LinuxInfo = NewPopulatedLinuxInfo(r, easy) } + if r.Intn(10) != 0 { + this.RlimitInfo = NewPopulatedRLimitInfo(r, easy) + } + if r.Intn(10) != 0 { + this.TTYInfo = NewPopulatedTTYInfo(r, easy) + } if !easy && r.Intn(10) != 0 { } return this @@ -28324,36 +30591,36 @@ func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInf this := &ContainerInfo_DockerInfo{} this.Image = randStringMesos(r) if r.Intn(10) != 0 { - v340 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3, 4}[r.Intn(4)]) - this.Network = &v340 + v351 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3, 4}[r.Intn(4)]) + this.Network = &v351 } if r.Intn(10) != 0 { - v341 := r.Intn(10) - this.PortMappings = make([]ContainerInfo_DockerInfo_PortMapping, v341) - for i := 0; i < v341; i++ { - v342 := NewPopulatedContainerInfo_DockerInfo_PortMapping(r, easy) - this.PortMappings[i] = *v342 + v352 := r.Intn(10) + this.PortMappings = make([]ContainerInfo_DockerInfo_PortMapping, v352) + for i := 0; i < v352; i++ { + v353 := NewPopulatedContainerInfo_DockerInfo_PortMapping(r, easy) + this.PortMappings[i] = *v353 } } if r.Intn(10) != 0 { - v343 := bool(bool(r.Intn(2) == 0)) - this.Privileged = &v343 + v354 := bool(bool(r.Intn(2) == 0)) + this.Privileged = &v354 } if r.Intn(10) != 0 { - v344 := r.Intn(10) - this.Parameters = make([]Parameter, v344) - for i := 0; i < v344; i++ { - v345 := NewPopulatedParameter(r, easy) - this.Parameters[i] = *v345 + v355 := r.Intn(10) + this.Parameters = make([]Parameter, v355) + for i := 0; i < v355; i++ { + v356 := NewPopulatedParameter(r, easy) + this.Parameters[i] = *v356 } } if r.Intn(10) != 0 { - v346 := bool(bool(r.Intn(2) == 0)) - this.ForcePullImage = &v346 + v357 := bool(bool(r.Intn(2) == 0)) + this.ForcePullImage = &v357 } if r.Intn(10) != 0 { - v347 := randStringMesos(r) - this.VolumeDriver = &v347 + v358 := randStringMesos(r) + this.VolumeDriver = &v358 } if !easy && r.Intn(10) != 0 { } @@ -28365,8 +30632,8 @@ func NewPopulatedContainerInfo_DockerInfo_PortMapping(r randyMesos, easy bool) * this.HostPort = uint32(r.Uint32()) this.ContainerPort = uint32(r.Uint32()) if r.Intn(10) != 0 { - v348 := randStringMesos(r) - this.Protocol = &v348 + v359 := randStringMesos(r) + this.Protocol = &v359 } if !easy && r.Intn(10) != 0 { } @@ -28386,19 +30653,22 @@ func NewPopulatedContainerInfo_MesosInfo(r randyMesos, easy bool) *ContainerInfo func NewPopulatedContainerStatus(r randyMesos, easy bool) *ContainerStatus { this := &ContainerStatus{} if r.Intn(10) != 0 { - v349 := r.Intn(10) - this.NetworkInfos = make([]NetworkInfo, v349) - for i := 0; i < v349; i++ { - v350 := NewPopulatedNetworkInfo(r, easy) - this.NetworkInfos[i] = *v350 + v360 := r.Intn(10) + this.NetworkInfos = make([]NetworkInfo, v360) + for i := 0; i < v360; i++ { + v361 := NewPopulatedNetworkInfo(r, easy) + this.NetworkInfos[i] = *v361 } } if r.Intn(10) != 0 { this.CgroupInfo = NewPopulatedCgroupInfo(r, easy) } if r.Intn(10) != 0 { - v351 := uint32(r.Uint32()) - this.ExecutorPID = &v351 + v362 := uint32(r.Uint32()) + this.ExecutorPID = &v362 + } + if r.Intn(10) != 0 { + this.ContainerID = NewPopulatedContainerID(r, easy) } if !easy && r.Intn(10) != 0 { } @@ -28418,8 +30688,8 @@ func NewPopulatedCgroupInfo(r randyMesos, easy bool) *CgroupInfo { func NewPopulatedCgroupInfo_NetCls(r randyMesos, easy bool) *CgroupInfo_NetCls { this := &CgroupInfo_NetCls{} if r.Intn(10) != 0 { - v352 := uint32(r.Uint32()) - this.ClassID = &v352 + v363 := uint32(r.Uint32()) + this.ClassID = &v363 } if !easy && r.Intn(10) != 0 { } @@ -28429,11 +30699,11 @@ func NewPopulatedCgroupInfo_NetCls(r randyMesos, easy bool) *CgroupInfo_NetCls { func NewPopulatedLabels(r randyMesos, easy bool) *Labels { this := &Labels{} if r.Intn(10) != 0 { - v353 := r.Intn(10) - this.Labels = make([]Label, v353) - for i := 0; i < v353; i++ { - v354 := NewPopulatedLabel(r, easy) - this.Labels[i] = *v354 + v364 := r.Intn(10) + this.Labels = make([]Label, v364) + for i := 0; i < v364; i++ { + v365 := NewPopulatedLabel(r, easy) + this.Labels[i] = *v365 } } if !easy && r.Intn(10) != 0 { @@ -28445,8 +30715,8 @@ func NewPopulatedLabel(r randyMesos, easy bool) *Label { this := &Label{} this.Key = randStringMesos(r) if r.Intn(10) != 0 { - v355 := randStringMesos(r) - this.Value = &v355 + v366 := randStringMesos(r) + this.Value = &v366 } if !easy && r.Intn(10) != 0 { } @@ -28457,16 +30727,16 @@ func NewPopulatedPort(r randyMesos, easy bool) *Port { this := &Port{} this.Number = uint32(r.Uint32()) if r.Intn(10) != 0 { - v356 := randStringMesos(r) - this.Name = &v356 + v367 := randStringMesos(r) + this.Name = &v367 } if r.Intn(10) != 0 { - v357 := randStringMesos(r) - this.Protocol = &v357 + v368 := randStringMesos(r) + this.Protocol = &v368 } if r.Intn(10) != 0 { - v358 := DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) - this.Visibility = &v358 + v369 := DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) + this.Visibility = &v369 } if r.Intn(10) != 0 { this.Labels = NewPopulatedLabels(r, easy) @@ -28479,11 +30749,11 @@ func NewPopulatedPort(r randyMesos, easy bool) *Port { func NewPopulatedPorts(r randyMesos, easy bool) *Ports { this := &Ports{} if r.Intn(10) != 0 { - v359 := r.Intn(10) - this.Ports = make([]Port, v359) - for i := 0; i < v359; i++ { - v360 := NewPopulatedPort(r, easy) - this.Ports[i] = *v360 + v370 := r.Intn(10) + this.Ports = make([]Port, v370) + for i := 0; i < v370; i++ { + v371 := NewPopulatedPort(r, easy) + this.Ports[i] = *v371 } } if !easy && r.Intn(10) != 0 { @@ -28495,20 +30765,20 @@ func NewPopulatedDiscoveryInfo(r randyMesos, easy bool) *DiscoveryInfo { this := &DiscoveryInfo{} this.Visibility = DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) if r.Intn(10) != 0 { - v361 := randStringMesos(r) - this.Name = &v361 + v372 := randStringMesos(r) + this.Name = &v372 } if r.Intn(10) != 0 { - v362 := randStringMesos(r) - this.Environment = &v362 + v373 := randStringMesos(r) + this.Environment = &v373 } if r.Intn(10) != 0 { - v363 := randStringMesos(r) - this.Location = &v363 + v374 := randStringMesos(r) + this.Location = &v374 } if r.Intn(10) != 0 { - v364 := randStringMesos(r) - this.Version = &v364 + v375 := randStringMesos(r) + this.Version = &v375 } if r.Intn(10) != 0 { this.Ports = NewPopulatedPorts(r, easy) @@ -28528,8 +30798,8 @@ func NewPopulatedWeightInfo(r randyMesos, easy bool) *WeightInfo { this.Weight *= -1 } if r.Intn(10) != 0 { - v365 := randStringMesos(r) - this.Role = &v365 + v376 := randStringMesos(r) + this.Role = &v376 } if !easy && r.Intn(10) != 0 { } @@ -28540,31 +30810,31 @@ func NewPopulatedVersionInfo(r randyMesos, easy bool) *VersionInfo { this := &VersionInfo{} this.Version = randStringMesos(r) if r.Intn(10) != 0 { - v366 := randStringMesos(r) - this.BuildDate = &v366 + v377 := randStringMesos(r) + this.BuildDate = &v377 } if r.Intn(10) != 0 { - v367 := float64(r.Float64()) + v378 := float64(r.Float64()) if r.Intn(2) == 0 { - v367 *= -1 + v378 *= -1 } - this.BuildTime = &v367 + this.BuildTime = &v378 } if r.Intn(10) != 0 { - v368 := randStringMesos(r) - this.BuildUser = &v368 + v379 := randStringMesos(r) + this.BuildUser = &v379 } if r.Intn(10) != 0 { - v369 := randStringMesos(r) - this.GitSHA = &v369 + v380 := randStringMesos(r) + this.GitSHA = &v380 } if r.Intn(10) != 0 { - v370 := randStringMesos(r) - this.GitBranch = &v370 + v381 := randStringMesos(r) + this.GitBranch = &v381 } if r.Intn(10) != 0 { - v371 := randStringMesos(r) - this.GitTag = &v371 + v382 := randStringMesos(r) + this.GitTag = &v382 } if !easy && r.Intn(10) != 0 { } @@ -28575,8 +30845,8 @@ func NewPopulatedFlag(r randyMesos, easy bool) *Flag { this := &Flag{} this.Name = randStringMesos(r) if r.Intn(10) != 0 { - v372 := randStringMesos(r) - this.Value = &v372 + v383 := randStringMesos(r) + this.Value = &v383 } if !easy && r.Intn(10) != 0 { } @@ -28591,19 +30861,19 @@ func NewPopulatedRole(r randyMesos, easy bool) *Role { this.Weight *= -1 } if r.Intn(10) != 0 { - v373 := r.Intn(10) - this.Frameworks = make([]FrameworkID, v373) - for i := 0; i < v373; i++ { - v374 := NewPopulatedFrameworkID(r, easy) - this.Frameworks[i] = *v374 + v384 := r.Intn(10) + this.Frameworks = make([]FrameworkID, v384) + for i := 0; i < v384; i++ { + v385 := NewPopulatedFrameworkID(r, easy) + this.Frameworks[i] = *v385 } } if r.Intn(10) != 0 { - v375 := r.Intn(10) - this.Resources = make([]Resource, v375) - for i := 0; i < v375; i++ { - v376 := NewPopulatedResource(r, easy) - this.Resources[i] = *v376 + v386 := r.Intn(10) + this.Resources = make([]Resource, v386) + for i := 0; i < v386; i++ { + v387 := NewPopulatedResource(r, easy) + this.Resources[i] = *v387 } } if !easy && r.Intn(10) != 0 { @@ -28615,11 +30885,11 @@ func NewPopulatedMetric(r randyMesos, easy bool) *Metric { this := &Metric{} this.Name = randStringMesos(r) if r.Intn(10) != 0 { - v377 := float64(r.Float64()) + v388 := float64(r.Float64()) if r.Intn(2) == 0 { - v377 *= -1 + v388 *= -1 } - this.Value = &v377 + this.Value = &v388 } if !easy && r.Intn(10) != 0 { } @@ -28630,30 +30900,30 @@ func NewPopulatedFileInfo(r randyMesos, easy bool) *FileInfo { this := &FileInfo{} this.Path = randStringMesos(r) if r.Intn(10) != 0 { - v378 := int32(r.Int31()) + v389 := int32(r.Int31()) if r.Intn(2) == 0 { - v378 *= -1 + v389 *= -1 } - this.Nlink = &v378 + this.Nlink = &v389 } if r.Intn(10) != 0 { - v379 := uint64(uint64(r.Uint32())) - this.Size_ = &v379 + v390 := uint64(uint64(r.Uint32())) + this.Size_ = &v390 } if r.Intn(10) != 0 { this.Mtime = NewPopulatedTimeInfo(r, easy) } if r.Intn(10) != 0 { - v380 := uint32(r.Uint32()) - this.Mode = &v380 + v391 := uint32(r.Uint32()) + this.Mode = &v391 } if r.Intn(10) != 0 { - v381 := randStringMesos(r) - this.UID = &v381 + v392 := randStringMesos(r) + this.UID = &v392 } if r.Intn(10) != 0 { - v382 := randStringMesos(r) - this.GID = &v382 + v393 := randStringMesos(r) + this.GID = &v393 } if !easy && r.Intn(10) != 0 { } @@ -28679,9 +30949,9 @@ func randUTF8RuneMesos(r randyMesos) rune { return rune(ru + 61) } func randStringMesos(r randyMesos) string { - v383 := r.Intn(100) - tmps := make([]rune, v383) - for i := 0; i < v383; i++ { + v394 := r.Intn(100) + tmps := make([]rune, v394) + for i := 0; i < v394; i++ { tmps[i] = randUTF8RuneMesos(r) } return string(tmps) @@ -28703,11 +30973,11 @@ func randFieldMesos(data []byte, r randyMesos, fieldNumber int, wire int) []byte switch wire { case 0: data = encodeVarintPopulateMesos(data, uint64(key)) - v384 := r.Int63() + v395 := r.Int63() if r.Intn(2) == 0 { - v384 *= -1 + v395 *= -1 } - data = encodeVarintPopulateMesos(data, uint64(v384)) + data = encodeVarintPopulateMesos(data, uint64(v395)) 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))) @@ -28921,6 +31191,12 @@ func (m *FrameworkInfo) Size() (n int) { l = m.Labels.Size() n += 1 + l + sovMesos(uint64(l)) } + if len(m.Roles) > 0 { + for _, s := range m.Roles { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) + } + } return n } @@ -28931,6 +31207,49 @@ func (m *FrameworkInfo_Capability) Size() (n int) { return n } +func (m *CheckInfo) Size() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Command != nil { + l = m.Command.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.HTTP != nil { + l = m.HTTP.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.DelaySeconds != nil { + n += 9 + } + if m.IntervalSeconds != nil { + n += 9 + } + if m.TimeoutSeconds != nil { + n += 9 + } + return n +} + +func (m *CheckInfo_Command) Size() (n int) { + var l int + _ = l + l = m.Command.Size() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *CheckInfo_Http) Size() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Port)) + if m.Path != nil { + l = len(*m.Path) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + func (m *HealthCheck) Size() (n int) { var l int _ = l @@ -28957,9 +31276,7 @@ func (m *HealthCheck) Size() (n int) { l = m.Command.Size() n += 1 + l + sovMesos(uint64(l)) } - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) - } + n += 1 + sovMesos(uint64(m.Type)) if m.TCP != nil { l = m.TCP.Size() n += 1 + l + sovMesos(uint64(l)) @@ -29103,9 +31420,7 @@ func (m *ExecutorInfo) Size() (n int) { l = m.Labels.Size() n += 1 + l + sovMesos(uint64(l)) } - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) - } + n += 1 + sovMesos(uint64(m.Type)) return n } @@ -29164,6 +31479,13 @@ func (m *AgentInfo) Size() (n int) { return n } +func (m *AgentInfo_Capability) Size() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + return n +} + func (m *Value) Size() (n int) { var l int _ = l @@ -29299,6 +31621,20 @@ func (m *Resource) Size() (n int) { l = m.Shared.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.AllocationInfo != nil { + l = m.AllocationInfo.Size() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource_AllocationInfo) Size() (n int) { + var l int + _ = l + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) + } return n } @@ -30092,15 +32428,17 @@ func (m *Offer) Size() (n int) { l = m.Unavailability.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.AllocationInfo != nil { + l = m.AllocationInfo.Size() + n += 1 + l + sovMesos(uint64(l)) + } return n } func (m *Offer_Operation) Size() (n int) { var l int _ = l - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) - } + n += 1 + sovMesos(uint64(m.Type)) if m.Launch != nil { l = m.Launch.Size() n += 1 + l + sovMesos(uint64(l)) @@ -30271,6 +32609,10 @@ func (m *TaskInfo) Size() (n int) { l = m.KillPolicy.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.Check != nil { + l = m.Check.Size() + n += 1 + l + sovMesos(uint64(l)) + } return n } @@ -30342,6 +32684,41 @@ func (m *Task) Size() (n int) { return n } +func (m *CheckStatusInfo) Size() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + if m.Command != nil { + l = m.Command.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.HTTP != nil { + l = m.HTTP.Size() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CheckStatusInfo_Command) Size() (n int) { + var l int + _ = l + if m.ExitCode != nil { + n += 1 + sovMesos(uint64(*m.ExitCode)) + } + return n +} + +func (m *CheckStatusInfo_Http) Size() (n int) { + var l int + _ = l + if m.StatusCode != nil { + n += 1 + sovMesos(uint64(*m.StatusCode)) + } + return n +} + func (m *TaskStatus) Size() (n int) { var l int _ = l @@ -30394,6 +32771,10 @@ func (m *TaskStatus) Size() (n int) { l = m.UnreachableTime.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.CheckStatus != nil { + l = m.CheckStatus.Size() + n += 1 + l + sovMesos(uint64(l)) + } return n } @@ -30423,8 +32804,10 @@ func (m *Environment_Variable) Size() (n int) { _ = l l = len(m.Name) n += 1 + l + sovMesos(uint64(l)) - l = len(m.Value) - n += 1 + l + sovMesos(uint64(l)) + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) + } return n } @@ -30611,9 +32994,7 @@ func (m *Volume_Source_DockerVolume) Size() (n int) { func (m *Volume_Source_SandboxPath) Size() (n int) { var l int _ = l - if m.Type != nil { - n += 1 + sovMesos(uint64(*m.Type)) - } + n += 1 + sovMesos(uint64(m.Type)) l = len(m.Path) n += 1 + l + sovMesos(uint64(l)) return n @@ -30697,6 +33078,49 @@ func (m *LinuxInfo) Size() (n int) { return n } +func (m *RLimitInfo) Size() (n int) { + var l int + _ = l + if len(m.Rlimits) > 0 { + for _, e := range m.Rlimits { + l = e.Size() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *RLimitInfo_RLimit) Size() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Hard != nil { + n += 1 + sovMesos(uint64(*m.Hard)) + } + if m.Soft != nil { + n += 1 + sovMesos(uint64(*m.Soft)) + } + return n +} + +func (m *TTYInfo) Size() (n int) { + var l int + _ = l + if m.WindowSize != nil { + l = m.WindowSize.Size() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *TTYInfo_WindowSize) Size() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Rows)) + n += 1 + sovMesos(uint64(m.Columns)) + return n +} + func (m *ContainerInfo) Size() (n int) { var l int _ = l @@ -30731,6 +33155,14 @@ func (m *ContainerInfo) Size() (n int) { l = m.LinuxInfo.Size() n += 1 + l + sovMesos(uint64(l)) } + if m.RlimitInfo != nil { + l = m.RlimitInfo.Size() + n += 1 + l + sovMesos(uint64(l)) + } + if m.TTYInfo != nil { + l = m.TTYInfo.Size() + n += 1 + l + sovMesos(uint64(l)) + } return n } @@ -30805,6 +33237,10 @@ func (m *ContainerStatus) Size() (n int) { if m.ExecutorPID != nil { n += 1 + sovMesos(uint64(*m.ExecutorPID)) } + if m.ContainerID != nil { + l = m.ContainerID.Size() + n += 1 + l + sovMesos(uint64(l)) + } return n } @@ -31201,6 +33637,7 @@ func (this *FrameworkInfo) String() string { `WebUiURL:` + valueToStringMesos(this.WebUiURL) + `,`, `Capabilities:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Capabilities), "FrameworkInfo_Capability", "FrameworkInfo_Capability", 1), `&`, ``, 1) + `,`, `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `Roles:` + fmt.Sprintf("%v", this.Roles) + `,`, `}`, }, "") return s @@ -31215,6 +33652,42 @@ func (this *FrameworkInfo_Capability) String() string { }, "") return s } +func (this *CheckInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckInfo{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CheckInfo_Command", "CheckInfo_Command", 1) + `,`, + `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "CheckInfo_Http", "CheckInfo_Http", 1) + `,`, + `DelaySeconds:` + valueToStringMesos(this.DelaySeconds) + `,`, + `IntervalSeconds:` + valueToStringMesos(this.IntervalSeconds) + `,`, + `TimeoutSeconds:` + valueToStringMesos(this.TimeoutSeconds) + `,`, + `}`, + }, "") + return s +} +func (this *CheckInfo_Command) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckInfo_Command{`, + `Command:` + strings.Replace(strings.Replace(this.Command.String(), "CommandInfo", "CommandInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *CheckInfo_Http) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckInfo_Http{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `Path:` + valueToStringMesos(this.Path) + `,`, + `}`, + }, "") + return s +} func (this *HealthCheck) String() string { if this == nil { return "nil" @@ -31227,7 +33700,7 @@ func (this *HealthCheck) String() string { `ConsecutiveFailures:` + valueToStringMesos(this.ConsecutiveFailures) + `,`, `GracePeriodSeconds:` + valueToStringMesos(this.GracePeriodSeconds) + `,`, `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, - `Type:` + valueToStringMesos(this.Type) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `TCP:` + strings.Replace(fmt.Sprintf("%v", this.TCP), "HealthCheck_TCPCheckInfo", "HealthCheck_TCPCheckInfo", 1) + `,`, `}`, }, "") @@ -31311,7 +33784,7 @@ func (this *ExecutorInfo) String() string { `Discovery:` + strings.Replace(fmt.Sprintf("%v", this.Discovery), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, `ShutdownGracePeriod:` + strings.Replace(fmt.Sprintf("%v", this.ShutdownGracePeriod), "DurationInfo", "DurationInfo", 1) + `,`, `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, - `Type:` + valueToStringMesos(this.Type) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `}`, }, "") return s @@ -31346,6 +33819,16 @@ func (this *AgentInfo) String() string { }, "") return s } +func (this *AgentInfo_Capability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AgentInfo_Capability{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `}`, + }, "") + return s +} func (this *Value) String() string { if this == nil { return "nil" @@ -31441,6 +33924,17 @@ func (this *Resource) String() string { `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) + `,`, `Shared:` + strings.Replace(fmt.Sprintf("%v", this.Shared), "Resource_SharedInfo", "Resource_SharedInfo", 1) + `,`, + `AllocationInfo:` + strings.Replace(fmt.Sprintf("%v", this.AllocationInfo), "Resource_AllocationInfo", "Resource_AllocationInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_AllocationInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_AllocationInfo{`, + `Role:` + valueToStringMesos(this.Role) + `,`, `}`, }, "") return s @@ -31842,6 +34336,7 @@ func (this *Offer) String() string { `Attributes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1), `&`, ``, 1) + `,`, `URL:` + strings.Replace(fmt.Sprintf("%v", this.URL), "URL", "URL", 1) + `,`, `Unavailability:` + strings.Replace(fmt.Sprintf("%v", this.Unavailability), "Unavailability", "Unavailability", 1) + `,`, + `AllocationInfo:` + strings.Replace(fmt.Sprintf("%v", this.AllocationInfo), "Resource_AllocationInfo", "Resource_AllocationInfo", 1) + `,`, `}`, }, "") return s @@ -31851,7 +34346,7 @@ func (this *Offer_Operation) String() string { return "nil" } s := strings.Join([]string{`&Offer_Operation{`, - `Type:` + valueToStringMesos(this.Type) + `,`, + `Type:` + fmt.Sprintf("%v", 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) + `,`, @@ -31955,6 +34450,7 @@ func (this *TaskInfo) String() string { `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, `Discovery:` + strings.Replace(fmt.Sprintf("%v", this.Discovery), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, `KillPolicy:` + strings.Replace(fmt.Sprintf("%v", this.KillPolicy), "KillPolicy", "KillPolicy", 1) + `,`, + `Check:` + strings.Replace(fmt.Sprintf("%v", this.Check), "CheckInfo", "CheckInfo", 1) + `,`, `}`, }, "") return s @@ -31992,6 +34488,38 @@ func (this *Task) String() string { }, "") return s } +func (this *CheckStatusInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckStatusInfo{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CheckStatusInfo_Command", "CheckStatusInfo_Command", 1) + `,`, + `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "CheckStatusInfo_Http", "CheckStatusInfo_Http", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CheckStatusInfo_Command) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckStatusInfo_Command{`, + `ExitCode:` + valueToStringMesos(this.ExitCode) + `,`, + `}`, + }, "") + return s +} +func (this *CheckStatusInfo_Http) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckStatusInfo_Http{`, + `StatusCode:` + valueToStringMesos(this.StatusCode) + `,`, + `}`, + }, "") + return s +} func (this *TaskStatus) String() string { if this == nil { return "nil" @@ -32011,6 +34539,7 @@ func (this *TaskStatus) String() string { `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, `ContainerStatus:` + strings.Replace(fmt.Sprintf("%v", this.ContainerStatus), "ContainerStatus", "ContainerStatus", 1) + `,`, `UnreachableTime:` + strings.Replace(fmt.Sprintf("%v", this.UnreachableTime), "TimeInfo", "TimeInfo", 1) + `,`, + `CheckStatus:` + strings.Replace(fmt.Sprintf("%v", this.CheckStatus), "CheckStatusInfo", "CheckStatusInfo", 1) + `,`, `}`, }, "") return s @@ -32041,7 +34570,7 @@ func (this *Environment_Variable) String() string { } s := strings.Join([]string{`&Environment_Variable{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, `}`, }, "") return s @@ -32191,7 +34720,7 @@ func (this *Volume_Source_SandboxPath) String() string { return "nil" } s := strings.Join([]string{`&Volume_Source_SandboxPath{`, - `Type:` + valueToStringMesos(this.Type) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Path:` + fmt.Sprintf("%v", this.Path) + `,`, `}`, }, "") @@ -32254,6 +34783,49 @@ func (this *LinuxInfo) String() string { }, "") return s } +func (this *RLimitInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RLimitInfo{`, + `Rlimits:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rlimits), "RLimitInfo_RLimit", "RLimitInfo_RLimit", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RLimitInfo_RLimit) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RLimitInfo_RLimit{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Hard:` + valueToStringMesos(this.Hard) + `,`, + `Soft:` + valueToStringMesos(this.Soft) + `,`, + `}`, + }, "") + return s +} +func (this *TTYInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TTYInfo{`, + `WindowSize:` + strings.Replace(fmt.Sprintf("%v", this.WindowSize), "TTYInfo_WindowSize", "TTYInfo_WindowSize", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TTYInfo_WindowSize) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TTYInfo_WindowSize{`, + `Rows:` + fmt.Sprintf("%v", this.Rows) + `,`, + `Columns:` + fmt.Sprintf("%v", this.Columns) + `,`, + `}`, + }, "") + return s +} func (this *ContainerInfo) String() string { if this == nil { return "nil" @@ -32266,6 +34838,8 @@ func (this *ContainerInfo) String() string { `Mesos:` + strings.Replace(fmt.Sprintf("%v", this.Mesos), "ContainerInfo_MesosInfo", "ContainerInfo_MesosInfo", 1) + `,`, `NetworkInfos:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NetworkInfos), "NetworkInfo", "NetworkInfo", 1), `&`, ``, 1) + `,`, `LinuxInfo:` + strings.Replace(fmt.Sprintf("%v", this.LinuxInfo), "LinuxInfo", "LinuxInfo", 1) + `,`, + `RlimitInfo:` + strings.Replace(fmt.Sprintf("%v", this.RlimitInfo), "RLimitInfo", "RLimitInfo", 1) + `,`, + `TTYInfo:` + strings.Replace(fmt.Sprintf("%v", this.TTYInfo), "TTYInfo", "TTYInfo", 1) + `,`, `}`, }, "") return s @@ -32316,6 +34890,7 @@ func (this *ContainerStatus) String() string { `NetworkInfos:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NetworkInfos), "NetworkInfo", "NetworkInfo", 1), `&`, ``, 1) + `,`, `CgroupInfo:` + strings.Replace(fmt.Sprintf("%v", this.CgroupInfo), "CgroupInfo", "CgroupInfo", 1) + `,`, `ExecutorPID:` + valueToStringMesos(this.ExecutorPID) + `,`, + `ContainerID:` + strings.Replace(fmt.Sprintf("%v", this.ContainerID), "ContainerID", "ContainerID", 1) + `,`, `}`, }, "") return s @@ -34228,6 +36803,35 @@ func (m *FrameworkInfo) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.Roles = append(m.Roles, string(data[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -34324,6 +36928,387 @@ func (m *FrameworkInfo_Capability) Unmarshal(data []byte) error { } return nil } +func (m *CheckInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: CheckInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Type |= (CheckInfo_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 = &CheckInfo_Command{} + } + if err := m.Command.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 = &CheckInfo_Http{} + } + if err := m.HTTP.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + 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 5: + 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 6: + 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 + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckInfo_Command) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Command: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Command: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 err := m.Command.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("command") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckInfo_Http) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Http: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Http: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Port |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + 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 shift >= 64 { + return ErrIntOverflowMesos + } + 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 + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *HealthCheck) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -34519,7 +37504,7 @@ func (m *HealthCheck) Unmarshal(data []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var v HealthCheck_Type + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -34529,12 +37514,11 @@ func (m *HealthCheck) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (HealthCheck_Type(b) & 0x7F) << shift + m.Type |= (HealthCheck_Type(b) & 0x7F) << shift if b < 0x80 { break } } - m.Type = &v case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TCP", wireType) @@ -35681,7 +38665,7 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var v ExecutorInfo_Type + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -35691,12 +38675,11 @@ func (m *ExecutorInfo) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (ExecutorInfo_Type(b) & 0x7F) << shift + m.Type |= (ExecutorInfo_Type(b) & 0x7F) << shift if b < 0x80 { break } } - m.Type = &v default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -36177,6 +39160,75 @@ func (m *AgentInfo) Unmarshal(data []byte) error { } return nil } +func (m *AgentInfo_Capability) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Capability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Type |= (AgentInfo_Capability_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Value) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) @@ -37378,6 +40430,39 @@ func (m *Resource) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.AllocationInfo == nil { + m.AllocationInfo = &Resource_AllocationInfo{} + } + if err := m.AllocationInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -37405,6 +40490,86 @@ func (m *Resource) Unmarshal(data []byte) error { } return nil } +func (m *Resource_AllocationInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: AllocationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Resource_ReservationInfo) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -43183,91 +46348,123 @@ func (m *Offer) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMesos(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMesos - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("agent_id") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Offer_Operation) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMesos - } - 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) - if wireType == 4 { - return fmt.Errorf("proto: Operation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) - } - 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 shift >= 64 { - return ErrIntOverflowMesos - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (Offer_Operation_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - case 2: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Launch", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllocationInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.AllocationInfo == nil { + m.AllocationInfo = &Resource_AllocationInfo{} + } + if err := m.AllocationInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("agent_id") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Operation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Type |= (Offer_Operation_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + 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 { @@ -44670,6 +47867,39 @@ func (m *TaskInfo) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.Check == nil { + m.Check = &CheckInfo{} + } + if err := m.Check.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -45263,8 +48493,284 @@ func (m *Task) Unmarshal(data []byte) error { } return nil } -func (m *TaskStatus) Unmarshal(data []byte) error { - var hasFields [1]uint64 +func (m *CheckStatusInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: CheckStatusInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckStatusInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v CheckInfo_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (CheckInfo_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 Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 = &CheckStatusInfo_Command{} + } + if err := m.Command.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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 = &CheckStatusInfo_Http{} + } + if err := m.HTTP.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckStatusInfo_Command) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Command: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Command: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ExitCode = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckStatusInfo_Http) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Http: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Http: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StatusCode = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TaskStatus) Unmarshal(data []byte) error { + var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { @@ -45676,134 +49182,9 @@ func (m *TaskStatus) Unmarshal(data []byte) error { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMesos(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMesos - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Filters) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMesos - } - 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) - if wireType == 4 { - return fmt.Errorf("proto: Filters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire) - } - 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: - iNdEx = preIndex - skippy, err := skipMesos(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMesos - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Environment) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMesos - } - 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) - if wireType == 4 { - return fmt.Errorf("proto: Environment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Environment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CheckStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -45827,8 +49208,10 @@ func (m *Environment) Unmarshal(data []byte) error { 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 { + if m.CheckStatus == nil { + m.CheckStatus = &CheckStatusInfo{} + } + if err := m.CheckStatus.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -45847,14 +49230,19 @@ func (m *Environment) Unmarshal(data []byte) error { iNdEx += skippy } } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") + } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } -func (m *Environment_Variable) Unmarshal(data []byte) error { - var hasFields [1]uint64 +func (m *Filters) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -45877,72 +49265,31 @@ func (m *Environment_Variable) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Variable: wiretype end group for non-group") + return fmt.Errorf("proto: Filters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Variable: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire) } 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 shift >= 64 { - return ErrIntOverflowMesos - } - 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.Name = string(data[iNdEx:postIndex]) - 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 shift >= 64 { - return ErrIntOverflowMesos - } - 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 + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field RefuseSeconds", wireType) } - postIndex := iNdEx + intStringLen - if postIndex > l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.Value = string(data[iNdEx:postIndex]) - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) + 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: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -45958,20 +49305,13 @@ func (m *Environment_Variable) Unmarshal(data []byte) error { iNdEx += skippy } } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") - } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } -func (m *Parameter) Unmarshal(data []byte) error { - var hasFields [1]uint64 +func (m *Environment) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -45994,17 +49334,17 @@ func (m *Parameter) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Parameter: wiretype end group for non-group") + return fmt.Errorf("proto: Environment: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Environment: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -46014,52 +49354,23 @@ func (m *Parameter) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMesos } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(data[iNdEx:postIndex]) - 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 shift >= 64 { - return ErrIntOverflowMesos - } - 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.Variables = append(m.Variables, Environment_Variable{}) + if err := m.Variables[len(m.Variables)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err } - m.Value = string(data[iNdEx:postIndex]) iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -46075,19 +49386,14 @@ func (m *Parameter) Unmarshal(data []byte) error { iNdEx += skippy } } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") - } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } -func (m *Parameters) Unmarshal(data []byte) error { +func (m *Environment_Variable) Unmarshal(data []byte) error { + var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { @@ -46110,17 +49416,17 @@ func (m *Parameters) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Parameters: wiretype end group for non-group") + return fmt.Errorf("proto: Variable: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Parameters: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Variable: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -46130,22 +49436,51 @@ func (m *Parameters) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthMesos } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen 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 + m.Name = string(data[iNdEx:postIndex]) + 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 shift >= 64 { + return ErrIntOverflowMesos + } + 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: iNdEx = preIndex @@ -46162,13 +49497,16 @@ func (m *Parameters) Unmarshal(data []byte) error { iNdEx += skippy } } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } -func (m *Credential) Unmarshal(data []byte) error { +func (m *Parameter) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 @@ -46192,15 +49530,15 @@ func (m *Credential) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Credential: wiretype end group for non-group") + return fmt.Errorf("proto: Parameter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -46225,12 +49563,12 @@ func (m *Credential) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Principal = string(data[iNdEx:postIndex]) + m.Key = string(data[iNdEx:postIndex]) iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -46255,9 +49593,9 @@ func (m *Credential) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(data[iNdEx:postIndex]) - m.Secret = &s + m.Value = string(data[iNdEx:postIndex]) iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -46274,7 +49612,10 @@ func (m *Credential) Unmarshal(data []byte) error { } } if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } if iNdEx > l { @@ -46282,7 +49623,7 @@ func (m *Credential) Unmarshal(data []byte) error { } return nil } -func (m *Credentials) Unmarshal(data []byte) error { +func (m *Parameters) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -46305,15 +49646,15 @@ func (m *Credentials) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Credentials: wiretype end group for non-group") + return fmt.Errorf("proto: Parameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Credentials: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Parameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Parameter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -46337,8 +49678,8 @@ func (m *Credentials) Unmarshal(data []byte) error { 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 { + m.Parameter = append(m.Parameter, Parameter{}) + if err := m.Parameter[len(m.Parameter)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -46363,7 +49704,7 @@ func (m *Credentials) Unmarshal(data []byte) error { } return nil } -func (m *RateLimit) Unmarshal(data []byte) error { +func (m *Credential) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 @@ -46387,32 +49728,227 @@ func (m *RateLimit) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RateLimit: wiretype end group for non-group") + return fmt.Errorf("proto: Credential: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RateLimit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) } 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 shift >= 64 { + return ErrIntOverflowMesos + } + 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.Principal = string(data[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.Secret = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Credentials) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Credentials: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credentials: illegal tag %d (wire type %d)", fieldNum, wire) + } + 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 shift >= 64 { + return ErrIntOverflowMesos + } + 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: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RateLimit) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: RateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RateLimit: illegal tag %d (wire type %d)", fieldNum, wire) + } + 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) } @@ -47552,7 +51088,7 @@ func (m *Volume_Source_SandboxPath) Unmarshal(data []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var v Volume_Source_SandboxPath_Type + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -47562,12 +51098,11 @@ func (m *Volume_Source_SandboxPath) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (Volume_Source_SandboxPath_Type(b) & 0x7F) << shift + m.Type |= (Volume_Source_SandboxPath_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 Path", wireType) @@ -47849,17 +51384,478 @@ func (m *NetworkInfo_IPAddress) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") + return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var v NetworkInfo_Protocol + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NetworkInfo_Protocol(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Protocol = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.IPAddress = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkInfo_PortMapping) Unmarshal(data []byte) error { + var hasFields [1]uint64 + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: PortMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) + } + m.HostPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.HostPort |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) + } + m.ContainerPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ContainerPort |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + 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 shift >= 64 { + return ErrIntOverflowMesos + } + 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: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("host_port") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CapabilityInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: CapabilityInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CapabilityInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + } + var v CapabilityInfo_Capability + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (CapabilityInfo_Capability(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Capabilities = append(m.Capabilities, v) + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: LinuxInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.CapabilityInfo == nil { + m.CapabilityInfo = &CapabilityInfo{} + } + if err := m.CapabilityInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RLimitInfo) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: RLimitInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RLimitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rlimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.Rlimits = append(m.Rlimits, RLimitInfo_RLimit{}) + if err := m.Rlimits[len(m.Rlimits)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RLimitInfo_RLimit) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: RLimit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RLimit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var v NetworkInfo_Protocol + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -47869,17 +51865,16 @@ func (m *NetworkInfo_IPAddress) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (NetworkInfo_Protocol(b) & 0x7F) << shift + m.Type |= (RLimitInfo_RLimit_Type(b) & 0x7F) << shift if b < 0x80 { break } } - m.Protocol = &v case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPAddress", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType) } - var stringLen uint64 + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -47889,22 +51884,32 @@ func (m *NetworkInfo_IPAddress) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + v |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMesos + m.Hard = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Soft", wireType) } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - s := string(data[iNdEx:postIndex]) - m.IPAddress = &s - iNdEx = postIndex + m.Soft = &v default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -47926,8 +51931,7 @@ func (m *NetworkInfo_IPAddress) Unmarshal(data []byte) error { } return nil } -func (m *NetworkInfo_PortMapping) Unmarshal(data []byte) error { - var hasFields [1]uint64 +func (m *TTYInfo) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { @@ -47950,57 +51954,17 @@ func (m *NetworkInfo_PortMapping) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PortMapping: wiretype end group for non-group") + return fmt.Errorf("proto: TTYInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TTYInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) - } - m.HostPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMesos - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.HostPort |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) - } - m.ContainerPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMesos - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ContainerPort |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - hasFields[0] |= uint64(0x00000002) - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WindowSize", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -48010,21 +51974,24 @@ func (m *NetworkInfo_PortMapping) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMesos } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - s := string(data[iNdEx:postIndex]) - m.Protocol = &s + if m.WindowSize == nil { + m.WindowSize = &TTYInfo_WindowSize{} + } + if err := m.WindowSize.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -48041,19 +52008,14 @@ func (m *NetworkInfo_PortMapping) Unmarshal(data []byte) error { iNdEx += skippy } } - if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("host_port") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_port") - } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } -func (m *CapabilityInfo) Unmarshal(data []byte) error { +func (m *TTYInfo_WindowSize) Unmarshal(data []byte) error { + var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { @@ -48076,17 +52038,17 @@ func (m *CapabilityInfo) Unmarshal(data []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CapabilityInfo: wiretype end group for non-group") + return fmt.Errorf("proto: WindowSize: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CapabilityInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: WindowSize: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rows", wireType) } - var v CapabilityInfo_Capability + m.Rows = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -48096,67 +52058,17 @@ func (m *CapabilityInfo) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (CapabilityInfo_Capability(b) & 0x7F) << shift + m.Rows |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } - m.Capabilities = append(m.Capabilities, v) - default: - iNdEx = preIndex - skippy, err := skipMesos(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMesos - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LinuxInfo) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMesos - } - 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) - if wireType == 4 { - return fmt.Errorf("proto: LinuxInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LinuxInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInfo", wireType) + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) } - var msglen int + m.Columns = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMesos @@ -48166,25 +52078,12 @@ func (m *LinuxInfo) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + m.Columns |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthMesos - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CapabilityInfo == nil { - m.CapabilityInfo = &CapabilityInfo{} - } - if err := m.CapabilityInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -48200,6 +52099,12 @@ func (m *LinuxInfo) Unmarshal(data []byte) error { iNdEx += skippy } } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("rows") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("columns") + } if iNdEx > l { return io.ErrUnexpectedEOF @@ -48448,6 +52353,72 @@ func (m *ContainerInfo) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RlimitInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.RlimitInfo == nil { + m.RlimitInfo = &RLimitInfo{} + } + if err := m.RlimitInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TTYInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.TTYInfo == nil { + m.TTYInfo = &TTYInfo{} + } + if err := m.TTYInfo.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) @@ -49033,6 +53004,39 @@ func (m *ContainerStatus) Unmarshal(data []byte) error { } } m.ExecutorPID = &v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + 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.ContainerID == nil { + m.ContainerID = &ContainerID{} + } + if err := m.ContainerID.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMesos(data[iNdEx:]) diff --git a/api/v1/lib/mesos.pb_ffjson.go b/api/v1/lib/mesos.pb_ffjson.go index ab5e27d0..ffced35d 100644 --- a/api/v1/lib/mesos.pb_ffjson.go +++ b/api/v1/lib/mesos.pb_ffjson.go @@ -1048,6 +1048,203 @@ done: return nil } +func (mj *AgentInfo_Capability) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *AgentInfo_Capability) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_AgentInfo_Capabilitybase = iota + ffj_t_AgentInfo_Capabilityno_such_key + + ffj_t_AgentInfo_Capability_Type +) + +var ffj_key_AgentInfo_Capability_Type = []byte("type") + +func (uj *AgentInfo_Capability) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *AgentInfo_Capability) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_AgentInfo_Capabilitybase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_AgentInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 't': + + if bytes.Equal(ffj_key_AgentInfo_Capability_Type, kn) { + currentKey = ffj_t_AgentInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_AgentInfo_Capability_Type, kn) { + currentKey = ffj_t_AgentInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_AgentInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_AgentInfo_Capability_Type: + goto handle_Type + + case ffj_t_AgentInfo_Capabilityno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.AgentInfo_Capability_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + func (mj *Attribute) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { @@ -2209,7 +2406,7 @@ done: return nil } -func (mj *CommandInfo) MarshalJSON() ([]byte, error) { +func (mj *CheckInfo) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { buf.WriteString("null") @@ -2221,7 +2418,7 @@ func (mj *CommandInfo) MarshalJSON() ([]byte, error) { } return buf.Bytes(), nil } -func (mj *CommandInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { +func (mj *CheckInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if mj == nil { buf.WriteString("null") return nil @@ -2230,35 +2427,40 @@ func (mj *CommandInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{ "uris":`) - if mj.URIs != nil { - buf.WriteString(`[`) - for i, v := range mj.URIs { - if i != 0 { - buf.WriteString(`,`) - } + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) { - err = v.MarshalJSONBuf(buf) + err = mj.Command.MarshalJSONBuf(buf) if err != nil { return err } } + buf.WriteByte(',') } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) } - buf.WriteByte(',') - if mj.Environment != nil { + if mj.HTTP != nil { if true { - buf.WriteString(`"environment":`) + buf.WriteString(`"http":`) { - err = mj.Environment.MarshalJSONBuf(buf) + err = mj.HTTP.MarshalJSONBuf(buf) if err != nil { return err } @@ -2267,43 +2469,24 @@ func (mj *CommandInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } - if mj.Shell != nil { + if mj.DelaySeconds != nil { if true { - if *mj.Shell { - buf.WriteString(`"shell":true`) - } else { - buf.WriteString(`"shell":false`) - } + buf.WriteString(`"delay_seconds":`) + fflib.AppendFloat(buf, float64(*mj.DelaySeconds), 'g', -1, 64) buf.WriteByte(',') } } - if mj.Value != nil { + if mj.IntervalSeconds != nil { if true { - buf.WriteString(`"value":`) - fflib.WriteJsonString(buf, string(*mj.Value)) + buf.WriteString(`"interval_seconds":`) + fflib.AppendFloat(buf, float64(*mj.IntervalSeconds), 'g', -1, 64) buf.WriteByte(',') } } - if len(mj.Arguments) != 0 { - buf.WriteString(`"arguments":`) - if mj.Arguments != nil { - buf.WriteString(`[`) - for i, v := range mj.Arguments { - if i != 0 { - buf.WriteString(`,`) - } - fflib.WriteJsonString(buf, string(v)) - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte(',') - } - if mj.User != nil { + if mj.TimeoutSeconds != nil { if true { - buf.WriteString(`"user":`) - fflib.WriteJsonString(buf, string(*mj.User)) + buf.WriteString(`"timeout_seconds":`) + fflib.AppendFloat(buf, float64(*mj.TimeoutSeconds), 'g', -1, 64) buf.WriteByte(',') } } @@ -2313,42 +2496,42 @@ func (mj *CommandInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { } const ( - ffj_t_CommandInfobase = iota - ffj_t_CommandInfono_such_key + ffj_t_CheckInfobase = iota + ffj_t_CheckInfono_such_key - ffj_t_CommandInfo_URIs + ffj_t_CheckInfo_Type - ffj_t_CommandInfo_Environment + ffj_t_CheckInfo_Command - ffj_t_CommandInfo_Shell + ffj_t_CheckInfo_HTTP - ffj_t_CommandInfo_Value + ffj_t_CheckInfo_DelaySeconds - ffj_t_CommandInfo_Arguments + ffj_t_CheckInfo_IntervalSeconds - ffj_t_CommandInfo_User + ffj_t_CheckInfo_TimeoutSeconds ) -var ffj_key_CommandInfo_URIs = []byte("uris") +var ffj_key_CheckInfo_Type = []byte("type") -var ffj_key_CommandInfo_Environment = []byte("environment") +var ffj_key_CheckInfo_Command = []byte("command") -var ffj_key_CommandInfo_Shell = []byte("shell") +var ffj_key_CheckInfo_HTTP = []byte("http") -var ffj_key_CommandInfo_Value = []byte("value") +var ffj_key_CheckInfo_DelaySeconds = []byte("delay_seconds") -var ffj_key_CommandInfo_Arguments = []byte("arguments") +var ffj_key_CheckInfo_IntervalSeconds = []byte("interval_seconds") -var ffj_key_CommandInfo_User = []byte("user") +var ffj_key_CheckInfo_TimeoutSeconds = []byte("timeout_seconds") -func (uj *CommandInfo) UnmarshalJSON(input []byte) error { +func (uj *CheckInfo) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) } -func (uj *CommandInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { +func (uj *CheckInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { var err error = nil - currentKey := ffj_t_CommandInfobase + currentKey := ffj_t_CheckInfobase _ = currentKey tok := fflib.FFTok_init wantedTok := fflib.FFTok_init @@ -2394,96 +2577,96 @@ mainparse: kn := fs.Output.Bytes() if len(kn) <= 0 { // "" case. hrm. - currentKey = ffj_t_CommandInfono_such_key + currentKey = ffj_t_CheckInfono_such_key state = fflib.FFParse_want_colon goto mainparse } else { switch kn[0] { - case 'a': + case 'c': - if bytes.Equal(ffj_key_CommandInfo_Arguments, kn) { - currentKey = ffj_t_CommandInfo_Arguments + if bytes.Equal(ffj_key_CheckInfo_Command, kn) { + currentKey = ffj_t_CheckInfo_Command state = fflib.FFParse_want_colon goto mainparse } - case 'e': + case 'd': - if bytes.Equal(ffj_key_CommandInfo_Environment, kn) { - currentKey = ffj_t_CommandInfo_Environment + if bytes.Equal(ffj_key_CheckInfo_DelaySeconds, kn) { + currentKey = ffj_t_CheckInfo_DelaySeconds state = fflib.FFParse_want_colon goto mainparse } - case 's': + case 'h': - if bytes.Equal(ffj_key_CommandInfo_Shell, kn) { - currentKey = ffj_t_CommandInfo_Shell + if bytes.Equal(ffj_key_CheckInfo_HTTP, kn) { + currentKey = ffj_t_CheckInfo_HTTP state = fflib.FFParse_want_colon goto mainparse } - case 'u': + case 'i': - if bytes.Equal(ffj_key_CommandInfo_URIs, kn) { - currentKey = ffj_t_CommandInfo_URIs + if bytes.Equal(ffj_key_CheckInfo_IntervalSeconds, kn) { + currentKey = ffj_t_CheckInfo_IntervalSeconds state = fflib.FFParse_want_colon goto mainparse + } - } else if bytes.Equal(ffj_key_CommandInfo_User, kn) { - currentKey = ffj_t_CommandInfo_User + case 't': + + if bytes.Equal(ffj_key_CheckInfo_Type, kn) { + currentKey = ffj_t_CheckInfo_Type state = fflib.FFParse_want_colon goto mainparse - } - - case 'v': - if bytes.Equal(ffj_key_CommandInfo_Value, kn) { - currentKey = ffj_t_CommandInfo_Value + } else if bytes.Equal(ffj_key_CheckInfo_TimeoutSeconds, kn) { + currentKey = ffj_t_CheckInfo_TimeoutSeconds state = fflib.FFParse_want_colon goto mainparse } } - if fflib.EqualFoldRight(ffj_key_CommandInfo_User, kn) { - currentKey = ffj_t_CommandInfo_User + if fflib.EqualFoldRight(ffj_key_CheckInfo_TimeoutSeconds, kn) { + currentKey = ffj_t_CheckInfo_TimeoutSeconds state = fflib.FFParse_want_colon goto mainparse } - if fflib.EqualFoldRight(ffj_key_CommandInfo_Arguments, kn) { - currentKey = ffj_t_CommandInfo_Arguments + if fflib.EqualFoldRight(ffj_key_CheckInfo_IntervalSeconds, kn) { + currentKey = ffj_t_CheckInfo_IntervalSeconds state = fflib.FFParse_want_colon goto mainparse } - if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_Value, kn) { - currentKey = ffj_t_CommandInfo_Value + if fflib.EqualFoldRight(ffj_key_CheckInfo_DelaySeconds, kn) { + currentKey = ffj_t_CheckInfo_DelaySeconds state = fflib.FFParse_want_colon goto mainparse } - if fflib.EqualFoldRight(ffj_key_CommandInfo_Shell, kn) { - currentKey = ffj_t_CommandInfo_Shell + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_HTTP, kn) { + currentKey = ffj_t_CheckInfo_HTTP state = fflib.FFParse_want_colon goto mainparse } - if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_Environment, kn) { - currentKey = ffj_t_CommandInfo_Environment + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Command, kn) { + currentKey = ffj_t_CheckInfo_Command state = fflib.FFParse_want_colon goto mainparse } - if fflib.EqualFoldRight(ffj_key_CommandInfo_URIs, kn) { - currentKey = ffj_t_CommandInfo_URIs + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Type, kn) { + currentKey = ffj_t_CheckInfo_Type state = fflib.FFParse_want_colon goto mainparse } - currentKey = ffj_t_CommandInfono_such_key + currentKey = ffj_t_CheckInfono_such_key state = fflib.FFParse_want_colon goto mainparse } @@ -2500,25 +2683,25 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { - case ffj_t_CommandInfo_URIs: - goto handle_URIs + case ffj_t_CheckInfo_Type: + goto handle_Type - case ffj_t_CommandInfo_Environment: - goto handle_Environment + case ffj_t_CheckInfo_Command: + goto handle_Command - case ffj_t_CommandInfo_Shell: - goto handle_Shell + case ffj_t_CheckInfo_HTTP: + goto handle_HTTP - case ffj_t_CommandInfo_Value: - goto handle_Value + case ffj_t_CheckInfo_DelaySeconds: + goto handle_DelaySeconds - case ffj_t_CommandInfo_Arguments: - goto handle_Arguments + case ffj_t_CheckInfo_IntervalSeconds: + goto handle_IntervalSeconds - case ffj_t_CommandInfo_User: - goto handle_User + case ffj_t_CheckInfo_TimeoutSeconds: + goto handle_TimeoutSeconds - case ffj_t_CommandInfono_such_key: + case ffj_t_CheckInfono_such_key: err = fs.SkipField(tok) if err != nil { return fs.WrapErr(err) @@ -2532,93 +2715,77 @@ mainparse: } } -handle_URIs: +handle_Type: - /* handler: uj.URIs type=[]mesos.CommandInfo_URI kind=slice quoted=false*/ + /* handler: uj.Type type=mesos.CheckInfo_Type kind=int32 quoted=false*/ { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - if tok == fflib.FFTok_null { - uj.URIs = nil - } else { - - uj.URIs = []CommandInfo_URI{} - wantVal := true + state = fflib.FFParse_after_value + goto mainparse + } - for { + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } - var tmp_uj__URIs CommandInfo_URI + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } + state = fflib.FFParse_after_value + goto mainparse - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } +handle_Command: - /* handler: tmp_uj__URIs type=mesos.CommandInfo_URI kind=struct quoted=false*/ + /* handler: uj.Command type=mesos.CheckInfo_Command kind=struct quoted=false*/ - { - if tok == fflib.FFTok_null { + { + if tok == fflib.FFTok_null { - state = fflib.FFParse_after_value - goto mainparse - } + uj.Command = nil - err = tmp_uj__URIs.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } + state = fflib.FFParse_after_value + goto mainparse + } - uj.URIs = append(uj.URIs, tmp_uj__URIs) + if uj.Command == nil { + uj.Command = new(CheckInfo_Command) + } - wantVal = false - } + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err } + state = fflib.FFParse_after_value } state = fflib.FFParse_after_value goto mainparse -handle_Environment: +handle_HTTP: - /* handler: uj.Environment type=mesos.Environment kind=struct quoted=false*/ + /* handler: uj.HTTP type=mesos.CheckInfo_Http kind=struct quoted=false*/ { if tok == fflib.FFTok_null { - uj.Environment = nil + uj.HTTP = nil state = fflib.FFParse_after_value goto mainparse } - if uj.Environment == nil { - uj.Environment = new(Environment) + if uj.HTTP == nil { + uj.HTTP = new(CheckInfo_Http) } - err = uj.Environment.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + err = uj.HTTP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) if err != nil { return err } @@ -2628,40 +2795,32 @@ handle_Environment: state = fflib.FFParse_after_value goto mainparse -handle_Shell: +handle_DelaySeconds: - /* handler: uj.Shell type=bool kind=bool quoted=false*/ + /* handler: uj.DelaySeconds type=float64 kind=float64 quoted=false*/ { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) } } { + if tok == fflib.FFTok_null { - uj.Shell = nil + uj.DelaySeconds = nil } else { - tmpb := fs.Output.Bytes() - - var tval bool - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - tval = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - tval = false + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) - } else { - err = errors.New("unexpected bytes for true/false value") + if err != nil { return fs.WrapErr(err) } - uj.Shell = &tval + ttypval := float64(tval) + uj.DelaySeconds = &ttypval } } @@ -2669,133 +2828,65 @@ handle_Shell: state = fflib.FFParse_after_value goto mainparse -handle_Value: +handle_IntervalSeconds: - /* handler: uj.Value type=string kind=string quoted=false*/ + /* handler: uj.IntervalSeconds type=float64 kind=float64 quoted=false*/ { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.Value = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.Value = &tval - + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) } } - state = fflib.FFParse_after_value - goto mainparse - -handle_Arguments: - - /* handler: uj.Arguments type=[]string kind=slice quoted=false*/ - { - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - if tok == fflib.FFTok_null { - uj.Arguments = nil - } else { - - uj.Arguments = []string{} - - wantVal := true - - for { - - var tmp_uj__Arguments string - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Arguments type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - } else { + uj.IntervalSeconds = nil - outBuf := fs.Output.Bytes() + } else { - tmp_uj__Arguments = string(string(outBuf)) + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) - } - } + if err != nil { + return fs.WrapErr(err) + } - uj.Arguments = append(uj.Arguments, tmp_uj__Arguments) + ttypval := float64(tval) + uj.IntervalSeconds = &ttypval - wantVal = false - } } } state = fflib.FFParse_after_value goto mainparse -handle_User: +handle_TimeoutSeconds: - /* handler: uj.User type=string kind=string quoted=false*/ + /* handler: uj.TimeoutSeconds type=float64 kind=float64 quoted=false*/ { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) } + } + + { if tok == fflib.FFTok_null { - uj.User = nil + uj.TimeoutSeconds = nil } else { - var tval string - outBuf := fs.Output.Bytes() + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) - tval = string(string(outBuf)) - uj.User = &tval + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.TimeoutSeconds = &ttypval } } @@ -2820,7 +2911,7 @@ done: return nil } -func (mj *CommandInfo_URI) MarshalJSON() ([]byte, error) { +func (mj *CheckInfo_Command) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { buf.WriteString("null") @@ -2832,7 +2923,7 @@ func (mj *CommandInfo_URI) MarshalJSON() ([]byte, error) { } return buf.Bytes(), nil } -func (mj *CommandInfo_URI) MarshalJSONBuf(buf fflib.EncodingBuffer) error { +func (mj *CheckInfo_Command) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if mj == nil { buf.WriteString("null") return nil @@ -2841,84 +2932,37 @@ func (mj *CommandInfo_URI) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{ "value":`) - fflib.WriteJsonString(buf, string(mj.Value)) - buf.WriteByte(',') - if mj.Executable != nil { - if true { - if *mj.Executable { - buf.WriteString(`"executable":true`) - } else { - buf.WriteString(`"executable":false`) - } - buf.WriteByte(',') - } - } - if mj.Extract != nil { - if true { - if *mj.Extract { - buf.WriteString(`"extract":true`) - } else { - buf.WriteString(`"extract":false`) - } - buf.WriteByte(',') - } - } - if mj.Cache != nil { - if true { - if *mj.Cache { - buf.WriteString(`"cache":true`) - } else { - buf.WriteString(`"cache":false`) - } - buf.WriteByte(',') - } - } - if mj.OutputFile != nil { - if true { - buf.WriteString(`"output_file":`) - fflib.WriteJsonString(buf, string(*mj.OutputFile)) - buf.WriteByte(',') + buf.WriteString(`{"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err } + } - buf.Rewind(1) buf.WriteByte('}') return nil } const ( - ffj_t_CommandInfo_URIbase = iota - ffj_t_CommandInfo_URIno_such_key - - ffj_t_CommandInfo_URI_Value - - ffj_t_CommandInfo_URI_Executable - - ffj_t_CommandInfo_URI_Extract + ffj_t_CheckInfo_Commandbase = iota + ffj_t_CheckInfo_Commandno_such_key - ffj_t_CommandInfo_URI_Cache - - ffj_t_CommandInfo_URI_OutputFile + ffj_t_CheckInfo_Command_Command ) -var ffj_key_CommandInfo_URI_Value = []byte("value") - -var ffj_key_CommandInfo_URI_Executable = []byte("executable") - -var ffj_key_CommandInfo_URI_Extract = []byte("extract") - -var ffj_key_CommandInfo_URI_Cache = []byte("cache") - -var ffj_key_CommandInfo_URI_OutputFile = []byte("output_file") +var ffj_key_CheckInfo_Command_Command = []byte("command") -func (uj *CommandInfo_URI) UnmarshalJSON(input []byte) error { +func (uj *CheckInfo_Command) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) } -func (uj *CommandInfo_URI) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { +func (uj *CheckInfo_Command) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { var err error = nil - currentKey := ffj_t_CommandInfo_URIbase + currentKey := ffj_t_CheckInfo_Commandbase _ = currentKey tok := fflib.FFTok_init wantedTok := fflib.FFTok_init @@ -2964,7 +3008,7 @@ mainparse: kn := fs.Output.Bytes() if len(kn) <= 0 { // "" case. hrm. - currentKey = ffj_t_CommandInfo_URIno_such_key + currentKey = ffj_t_CheckInfo_Commandno_such_key state = fflib.FFParse_want_colon goto mainparse } else { @@ -2972,74 +3016,21 @@ mainparse: case 'c': - if bytes.Equal(ffj_key_CommandInfo_URI_Cache, kn) { - currentKey = ffj_t_CommandInfo_URI_Cache - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'e': - - if bytes.Equal(ffj_key_CommandInfo_URI_Executable, kn) { - currentKey = ffj_t_CommandInfo_URI_Executable - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_CommandInfo_URI_Extract, kn) { - currentKey = ffj_t_CommandInfo_URI_Extract - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'o': - - if bytes.Equal(ffj_key_CommandInfo_URI_OutputFile, kn) { - currentKey = ffj_t_CommandInfo_URI_OutputFile - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'v': - - if bytes.Equal(ffj_key_CommandInfo_URI_Value, kn) { - currentKey = ffj_t_CommandInfo_URI_Value + if bytes.Equal(ffj_key_CheckInfo_Command_Command, kn) { + currentKey = ffj_t_CheckInfo_Command_Command state = fflib.FFParse_want_colon goto mainparse } } - if fflib.AsciiEqualFold(ffj_key_CommandInfo_URI_OutputFile, kn) { - currentKey = ffj_t_CommandInfo_URI_OutputFile - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Cache, kn) { - currentKey = ffj_t_CommandInfo_URI_Cache - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Extract, kn) { - currentKey = ffj_t_CommandInfo_URI_Extract - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Executable, kn) { - currentKey = ffj_t_CommandInfo_URI_Executable - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Value, kn) { - currentKey = ffj_t_CommandInfo_URI_Value + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Command_Command, kn) { + currentKey = ffj_t_CheckInfo_Command_Command state = fflib.FFParse_want_colon goto mainparse } - currentKey = ffj_t_CommandInfo_URIno_such_key + currentKey = ffj_t_CheckInfo_Commandno_such_key state = fflib.FFParse_want_colon goto mainparse } @@ -3056,22 +3047,10 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { - case ffj_t_CommandInfo_URI_Value: - goto handle_Value - - case ffj_t_CommandInfo_URI_Executable: - goto handle_Executable - - case ffj_t_CommandInfo_URI_Extract: - goto handle_Extract - - case ffj_t_CommandInfo_URI_Cache: - goto handle_Cache - - case ffj_t_CommandInfo_URI_OutputFile: - goto handle_OutputFile + case ffj_t_CheckInfo_Command_Command: + goto handle_Command - case ffj_t_CommandInfo_URIno_such_key: + case ffj_t_CheckInfo_Commandno_such_key: err = fs.SkipField(tok) if err != nil { return fs.WrapErr(err) @@ -3085,203 +3064,45 @@ mainparse: } } -handle_Value: +handle_Command: - /* handler: uj.Value type=string kind=string quoted=false*/ + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - if tok == fflib.FFTok_null { - } else { - - outBuf := fs.Output.Bytes() - - uj.Value = string(string(outBuf)) + state = fflib.FFParse_after_value + goto mainparse + } + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err } + state = fflib.FFParse_after_value } state = fflib.FFParse_after_value goto mainparse -handle_Executable: - - /* handler: uj.Executable type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) } - - { - if tok == fflib.FFTok_null { - - uj.Executable = nil - - } else { - tmpb := fs.Output.Bytes() - - var tval bool - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - tval = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - tval = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - uj.Executable = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Extract: - - /* handler: uj.Extract type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - uj.Extract = nil - - } else { - tmpb := fs.Output.Bytes() - - var tval bool - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - tval = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - tval = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - uj.Extract = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_Cache: - - /* handler: uj.Cache type=bool kind=bool quoted=false*/ - - { - if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) - } - } - - { - if tok == fflib.FFTok_null { - - uj.Cache = nil - - } else { - tmpb := fs.Output.Bytes() - - var tval bool - - if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { - - tval = true - - } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { - - tval = false - - } else { - err = errors.New("unexpected bytes for true/false value") - return fs.WrapErr(err) - } - - uj.Cache = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -handle_OutputFile: - - /* handler: uj.OutputFile type=string kind=string quoted=false*/ - - { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - - if tok == fflib.FFTok_null { - - uj.OutputFile = nil - - } else { - - var tval string - outBuf := fs.Output.Bytes() - - tval = string(string(outBuf)) - uj.OutputFile = &tval - - } - } - - state = fflib.FFParse_after_value - goto mainparse - -wantedvalue: - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) -wrongtokenerror: - return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) -tokerror: - if fs.BigError != nil { - return fs.WrapErr(fs.BigError) - } - err = fs.Error.ToError() - if err != nil { - return fs.WrapErr(err) + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) } panic("ffjson-generated: unreachable, please report bug.") done: return nil } -func (mj *ContainerID) MarshalJSON() ([]byte, error) { +func (mj *CheckInfo_Http) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { buf.WriteString("null") @@ -3293,7 +3114,7 @@ func (mj *ContainerID) MarshalJSON() ([]byte, error) { } return buf.Bytes(), nil } -func (mj *ContainerID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { +func (mj *CheckInfo_Http) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if mj == nil { buf.WriteString("null") return nil @@ -3302,21 +3123,13 @@ func (mj *ContainerID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{ "value":`) - fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteString(`{ "port":`) + fflib.FormatBits2(buf, uint64(mj.Port), 10, false) buf.WriteByte(',') - if mj.Parent != nil { + if mj.Path != nil { if true { - buf.WriteString(`"parent":`) - - { - - err = mj.Parent.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } + buf.WriteString(`"path":`) + fflib.WriteJsonString(buf, string(*mj.Path)) buf.WriteByte(',') } } @@ -3326,26 +3139,26 @@ func (mj *ContainerID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { } const ( - ffj_t_ContainerIDbase = iota - ffj_t_ContainerIDno_such_key + ffj_t_CheckInfo_Httpbase = iota + ffj_t_CheckInfo_Httpno_such_key - ffj_t_ContainerID_Value + ffj_t_CheckInfo_Http_Port - ffj_t_ContainerID_Parent + ffj_t_CheckInfo_Http_Path ) -var ffj_key_ContainerID_Value = []byte("value") +var ffj_key_CheckInfo_Http_Port = []byte("port") -var ffj_key_ContainerID_Parent = []byte("parent") +var ffj_key_CheckInfo_Http_Path = []byte("path") -func (uj *ContainerID) UnmarshalJSON(input []byte) error { +func (uj *CheckInfo_Http) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) } -func (uj *ContainerID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { +func (uj *CheckInfo_Http) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { var err error = nil - currentKey := ffj_t_ContainerIDbase + currentKey := ffj_t_CheckInfo_Httpbase _ = currentKey tok := fflib.FFTok_init wantedTok := fflib.FFTok_init @@ -3391,7 +3204,7 @@ mainparse: kn := fs.Output.Bytes() if len(kn) <= 0 { // "" case. hrm. - currentKey = ffj_t_ContainerIDno_such_key + currentKey = ffj_t_CheckInfo_Httpno_such_key state = fflib.FFParse_want_colon goto mainparse } else { @@ -3399,35 +3212,32 @@ mainparse: case 'p': - if bytes.Equal(ffj_key_ContainerID_Parent, kn) { - currentKey = ffj_t_ContainerID_Parent + if bytes.Equal(ffj_key_CheckInfo_Http_Port, kn) { + currentKey = ffj_t_CheckInfo_Http_Port state = fflib.FFParse_want_colon goto mainparse - } - - case 'v': - if bytes.Equal(ffj_key_ContainerID_Value, kn) { - currentKey = ffj_t_ContainerID_Value + } else if bytes.Equal(ffj_key_CheckInfo_Http_Path, kn) { + currentKey = ffj_t_CheckInfo_Http_Path state = fflib.FFParse_want_colon goto mainparse } } - if fflib.SimpleLetterEqualFold(ffj_key_ContainerID_Parent, kn) { - currentKey = ffj_t_ContainerID_Parent + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Http_Path, kn) { + currentKey = ffj_t_CheckInfo_Http_Path state = fflib.FFParse_want_colon goto mainparse } - if fflib.SimpleLetterEqualFold(ffj_key_ContainerID_Value, kn) { - currentKey = ffj_t_ContainerID_Value + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Http_Port, kn) { + currentKey = ffj_t_CheckInfo_Http_Port state = fflib.FFParse_want_colon goto mainparse } - currentKey = ffj_t_ContainerIDno_such_key + currentKey = ffj_t_CheckInfo_Httpno_such_key state = fflib.FFParse_want_colon goto mainparse } @@ -3444,13 +3254,13 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { - case ffj_t_ContainerID_Value: - goto handle_Value + case ffj_t_CheckInfo_Http_Port: + goto handle_Port - case ffj_t_ContainerID_Parent: - goto handle_Parent + case ffj_t_CheckInfo_Http_Path: + goto handle_Path - case ffj_t_ContainerIDno_such_key: + case ffj_t_CheckInfo_Httpno_such_key: err = fs.SkipField(tok) if err != nil { return fs.WrapErr(err) @@ -3464,25 +3274,29 @@ mainparse: } } -handle_Value: +handle_Port: - /* handler: uj.Value type=string kind=string quoted=false*/ + /* handler: uj.Port type=uint32 kind=uint32 quoted=false*/ { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) } + } + + { if tok == fflib.FFTok_null { } else { - outBuf := fs.Output.Bytes() + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) - uj.Value = string(string(outBuf)) + if err != nil { + return fs.WrapErr(err) + } + + uj.Port = uint32(tval) } } @@ -3490,28 +3304,31 @@ handle_Value: state = fflib.FFParse_after_value goto mainparse -handle_Parent: +handle_Path: - /* handler: uj.Parent type=mesos.ContainerID kind=struct quoted=false*/ + /* handler: uj.Path type=string kind=string quoted=false*/ { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + if tok == fflib.FFTok_null { - uj.Parent = nil + uj.Path = nil - state = fflib.FFParse_after_value - goto mainparse - } + } else { - if uj.Parent == nil { - uj.Parent = new(ContainerID) - } + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Path = &tval - err = uj.Parent.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err } - state = fflib.FFParse_after_value } state = fflib.FFParse_after_value @@ -3534,7 +3351,7 @@ done: return nil } -func (mj *ContainerInfo) MarshalJSON() ([]byte, error) { +func (mj *CheckStatusInfo) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { buf.WriteString("null") @@ -3546,7 +3363,7 @@ func (mj *ContainerInfo) MarshalJSON() ([]byte, error) { } return buf.Bytes(), nil } -func (mj *ContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { +func (mj *CheckStatusInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if mj == nil { buf.WriteString("null") return nil @@ -3572,57 +3389,13 @@ func (mj *ContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } - buf.WriteString(`"volumes":`) - if mj.Volumes != nil { - buf.WriteString(`[`) - for i, v := range mj.Volumes { - if i != 0 { - buf.WriteString(`,`) - } - - { - - err = v.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte(',') - if mj.Hostname != nil { - if true { - buf.WriteString(`"hostname":`) - fflib.WriteJsonString(buf, string(*mj.Hostname)) - buf.WriteByte(',') - } - } - if mj.Docker != nil { - if true { - buf.WriteString(`"docker":`) - - { - - err = mj.Docker.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteByte(',') - } - } - if mj.Mesos != nil { + if mj.Command != nil { if true { - buf.WriteString(`"mesos":`) + buf.WriteString(`"command":`) { - err = mj.Mesos.MarshalJSONBuf(buf) + err = mj.Command.MarshalJSONBuf(buf) if err != nil { return err } @@ -3631,35 +3404,13 @@ func (mj *ContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } - buf.WriteString(`"network_infos":`) - if mj.NetworkInfos != nil { - buf.WriteString(`[`) - for i, v := range mj.NetworkInfos { - if i != 0 { - buf.WriteString(`,`) - } - - { - - err = v.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) - } - buf.WriteByte(',') - if mj.LinuxInfo != nil { + if mj.HTTP != nil { if true { - buf.WriteString(`"linux_info":`) + buf.WriteString(`"http":`) { - err = mj.LinuxInfo.MarshalJSONBuf(buf) + err = mj.HTTP.MarshalJSONBuf(buf) if err != nil { return err } @@ -3674,46 +3425,30 @@ func (mj *ContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { } const ( - ffj_t_ContainerInfobase = iota - ffj_t_ContainerInfono_such_key - - ffj_t_ContainerInfo_Type - - ffj_t_ContainerInfo_Volumes - - ffj_t_ContainerInfo_Hostname - - ffj_t_ContainerInfo_Docker + ffj_t_CheckStatusInfobase = iota + ffj_t_CheckStatusInfono_such_key - ffj_t_ContainerInfo_Mesos + ffj_t_CheckStatusInfo_Type - ffj_t_ContainerInfo_NetworkInfos + ffj_t_CheckStatusInfo_Command - ffj_t_ContainerInfo_LinuxInfo + ffj_t_CheckStatusInfo_HTTP ) -var ffj_key_ContainerInfo_Type = []byte("type") - -var ffj_key_ContainerInfo_Volumes = []byte("volumes") - -var ffj_key_ContainerInfo_Hostname = []byte("hostname") - -var ffj_key_ContainerInfo_Docker = []byte("docker") - -var ffj_key_ContainerInfo_Mesos = []byte("mesos") +var ffj_key_CheckStatusInfo_Type = []byte("type") -var ffj_key_ContainerInfo_NetworkInfos = []byte("network_infos") +var ffj_key_CheckStatusInfo_Command = []byte("command") -var ffj_key_ContainerInfo_LinuxInfo = []byte("linux_info") +var ffj_key_CheckStatusInfo_HTTP = []byte("http") -func (uj *ContainerInfo) UnmarshalJSON(input []byte) error { +func (uj *CheckStatusInfo) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) } -func (uj *ContainerInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { +func (uj *CheckStatusInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { var err error = nil - currentKey := ffj_t_ContainerInfobase + currentKey := ffj_t_CheckStatusInfobase _ = currentKey tok := fflib.FFTok_init wantedTok := fflib.FFTok_init @@ -3759,113 +3494,57 @@ mainparse: kn := fs.Output.Bytes() if len(kn) <= 0 { // "" case. hrm. - currentKey = ffj_t_ContainerInfono_such_key + currentKey = ffj_t_CheckStatusInfono_such_key state = fflib.FFParse_want_colon goto mainparse } else { switch kn[0] { - case 'd': + case 'c': - if bytes.Equal(ffj_key_ContainerInfo_Docker, kn) { - currentKey = ffj_t_ContainerInfo_Docker + if bytes.Equal(ffj_key_CheckStatusInfo_Command, kn) { + currentKey = ffj_t_CheckStatusInfo_Command state = fflib.FFParse_want_colon goto mainparse } case 'h': - if bytes.Equal(ffj_key_ContainerInfo_Hostname, kn) { - currentKey = ffj_t_ContainerInfo_Hostname - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'l': - - if bytes.Equal(ffj_key_ContainerInfo_LinuxInfo, kn) { - currentKey = ffj_t_ContainerInfo_LinuxInfo - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'm': - - if bytes.Equal(ffj_key_ContainerInfo_Mesos, kn) { - currentKey = ffj_t_ContainerInfo_Mesos - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'n': - - if bytes.Equal(ffj_key_ContainerInfo_NetworkInfos, kn) { - currentKey = ffj_t_ContainerInfo_NetworkInfos + if bytes.Equal(ffj_key_CheckStatusInfo_HTTP, kn) { + currentKey = ffj_t_CheckStatusInfo_HTTP state = fflib.FFParse_want_colon goto mainparse } case 't': - if bytes.Equal(ffj_key_ContainerInfo_Type, kn) { - currentKey = ffj_t_ContainerInfo_Type - state = fflib.FFParse_want_colon - goto mainparse - } - - case 'v': - - if bytes.Equal(ffj_key_ContainerInfo_Volumes, kn) { - currentKey = ffj_t_ContainerInfo_Volumes + if bytes.Equal(ffj_key_CheckStatusInfo_Type, kn) { + currentKey = ffj_t_CheckStatusInfo_Type state = fflib.FFParse_want_colon goto mainparse } } - if fflib.AsciiEqualFold(ffj_key_ContainerInfo_LinuxInfo, kn) { - currentKey = ffj_t_ContainerInfo_LinuxInfo - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_ContainerInfo_NetworkInfos, kn) { - currentKey = ffj_t_ContainerInfo_NetworkInfos - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_ContainerInfo_Mesos, kn) { - currentKey = ffj_t_ContainerInfo_Mesos - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_ContainerInfo_Docker, kn) { - currentKey = ffj_t_ContainerInfo_Docker - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_ContainerInfo_Hostname, kn) { - currentKey = ffj_t_ContainerInfo_Hostname + if fflib.SimpleLetterEqualFold(ffj_key_CheckStatusInfo_HTTP, kn) { + currentKey = ffj_t_CheckStatusInfo_HTTP state = fflib.FFParse_want_colon goto mainparse } - if fflib.EqualFoldRight(ffj_key_ContainerInfo_Volumes, kn) { - currentKey = ffj_t_ContainerInfo_Volumes + if fflib.SimpleLetterEqualFold(ffj_key_CheckStatusInfo_Command, kn) { + currentKey = ffj_t_CheckStatusInfo_Command state = fflib.FFParse_want_colon goto mainparse } - if fflib.SimpleLetterEqualFold(ffj_key_ContainerInfo_Type, kn) { - currentKey = ffj_t_ContainerInfo_Type + if fflib.SimpleLetterEqualFold(ffj_key_CheckStatusInfo_Type, kn) { + currentKey = ffj_t_CheckStatusInfo_Type state = fflib.FFParse_want_colon goto mainparse } - currentKey = ffj_t_ContainerInfono_such_key + currentKey = ffj_t_CheckStatusInfono_such_key state = fflib.FFParse_want_colon goto mainparse } @@ -3882,28 +3561,16 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { - case ffj_t_ContainerInfo_Type: + case ffj_t_CheckStatusInfo_Type: goto handle_Type - case ffj_t_ContainerInfo_Volumes: - goto handle_Volumes - - case ffj_t_ContainerInfo_Hostname: - goto handle_Hostname - - case ffj_t_ContainerInfo_Docker: - goto handle_Docker - - case ffj_t_ContainerInfo_Mesos: - goto handle_Mesos - - case ffj_t_ContainerInfo_NetworkInfos: - goto handle_NetworkInfos + case ffj_t_CheckStatusInfo_Command: + goto handle_Command - case ffj_t_ContainerInfo_LinuxInfo: - goto handle_LinuxInfo + case ffj_t_CheckStatusInfo_HTTP: + goto handle_HTTP - case ffj_t_ContainerInfono_such_key: + case ffj_t_CheckStatusInfono_such_key: err = fs.SkipField(tok) if err != nil { return fs.WrapErr(err) @@ -3919,7 +3586,7 @@ mainparse: handle_Type: - /* handler: uj.Type type=mesos.ContainerInfo_Type kind=int32 quoted=false*/ + /* handler: uj.Type type=mesos.CheckInfo_Type kind=int32 quoted=false*/ { if tok == fflib.FFTok_null { @@ -3936,7 +3603,7 @@ handle_Type: } if uj.Type == nil { - uj.Type = new(ContainerInfo_Type) + uj.Type = new(CheckInfo_Type) } err = uj.Type.UnmarshalJSON(tbuf) @@ -3949,95 +3616,2379 @@ handle_Type: state = fflib.FFParse_after_value goto mainparse -handle_Volumes: +handle_Command: - /* handler: uj.Volumes type=[]mesos.Volume kind=slice quoted=false*/ + /* handler: uj.Command type=mesos.CheckStatusInfo_Command kind=struct quoted=false*/ { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - if tok == fflib.FFTok_null { - uj.Volumes = nil - } else { - - uj.Volumes = []Volume{} - - wantVal := true - - for { - - var tmp_uj__Volumes Volume - - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } - - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } - - /* handler: tmp_uj__Volumes type=mesos.Volume kind=struct quoted=false*/ - - { - if tok == fflib.FFTok_null { - state = fflib.FFParse_after_value - goto mainparse - } + uj.Command = nil - err = tmp_uj__Volumes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } + state = fflib.FFParse_after_value + goto mainparse + } - uj.Volumes = append(uj.Volumes, tmp_uj__Volumes) + if uj.Command == nil { + uj.Command = new(CheckStatusInfo_Command) + } - wantVal = false - } + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err } + state = fflib.FFParse_after_value } state = fflib.FFParse_after_value goto mainparse -handle_Hostname: +handle_HTTP: - /* handler: uj.Hostname type=string kind=string quoted=false*/ + /* handler: uj.HTTP type=mesos.CheckStatusInfo_Http kind=struct quoted=false*/ { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - if tok == fflib.FFTok_null { - uj.Hostname = nil + uj.HTTP = nil - } else { + state = fflib.FFParse_after_value + goto mainparse + } - var tval string - outBuf := fs.Output.Bytes() + if uj.HTTP == nil { + uj.HTTP = new(CheckStatusInfo_Http) + } + + err = uj.HTTP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *CheckStatusInfo_Command) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckStatusInfo_Command) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ExitCode != nil { + if true { + buf.WriteString(`"exit_code":`) + fflib.FormatBits2(buf, uint64(*mj.ExitCode), 10, *mj.ExitCode < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckStatusInfo_Commandbase = iota + ffj_t_CheckStatusInfo_Commandno_such_key + + ffj_t_CheckStatusInfo_Command_ExitCode +) + +var ffj_key_CheckStatusInfo_Command_ExitCode = []byte("exit_code") + +func (uj *CheckStatusInfo_Command) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckStatusInfo_Command) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckStatusInfo_Commandbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckStatusInfo_Commandno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_CheckStatusInfo_Command_ExitCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Command_ExitCode + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_CheckStatusInfo_Command_ExitCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Command_ExitCode + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckStatusInfo_Commandno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckStatusInfo_Command_ExitCode: + goto handle_ExitCode + + case ffj_t_CheckStatusInfo_Commandno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ExitCode: + + /* handler: uj.ExitCode type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ExitCode = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.ExitCode = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *CheckStatusInfo_Http) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckStatusInfo_Http) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.StatusCode != nil { + if true { + buf.WriteString(`"status_code":`) + fflib.FormatBits2(buf, uint64(*mj.StatusCode), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckStatusInfo_Httpbase = iota + ffj_t_CheckStatusInfo_Httpno_such_key + + ffj_t_CheckStatusInfo_Http_StatusCode +) + +var ffj_key_CheckStatusInfo_Http_StatusCode = []byte("status_code") + +func (uj *CheckStatusInfo_Http) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckStatusInfo_Http) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckStatusInfo_Httpbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckStatusInfo_Httpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 's': + + if bytes.Equal(ffj_key_CheckStatusInfo_Http_StatusCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Http_StatusCode + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CheckStatusInfo_Http_StatusCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Http_StatusCode + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckStatusInfo_Httpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckStatusInfo_Http_StatusCode: + goto handle_StatusCode + + case ffj_t_CheckStatusInfo_Httpno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_StatusCode: + + /* handler: uj.StatusCode type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.StatusCode = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.StatusCode = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *CommandInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CommandInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "uris":`) + if mj.URIs != nil { + buf.WriteString(`[`) + for i, v := range mj.URIs { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Environment != nil { + if true { + buf.WriteString(`"environment":`) + + { + + err = mj.Environment.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Shell != nil { + if true { + if *mj.Shell { + buf.WriteString(`"shell":true`) + } else { + buf.WriteString(`"shell":false`) + } + buf.WriteByte(',') + } + } + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.WriteJsonString(buf, string(*mj.Value)) + buf.WriteByte(',') + } + } + if len(mj.Arguments) != 0 { + buf.WriteString(`"arguments":`) + if mj.Arguments != nil { + buf.WriteString(`[`) + for i, v := range mj.Arguments { + if i != 0 { + buf.WriteString(`,`) + } + fflib.WriteJsonString(buf, string(v)) + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.User != nil { + if true { + buf.WriteString(`"user":`) + fflib.WriteJsonString(buf, string(*mj.User)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CommandInfobase = iota + ffj_t_CommandInfono_such_key + + ffj_t_CommandInfo_URIs + + ffj_t_CommandInfo_Environment + + ffj_t_CommandInfo_Shell + + ffj_t_CommandInfo_Value + + ffj_t_CommandInfo_Arguments + + ffj_t_CommandInfo_User +) + +var ffj_key_CommandInfo_URIs = []byte("uris") + +var ffj_key_CommandInfo_Environment = []byte("environment") + +var ffj_key_CommandInfo_Shell = []byte("shell") + +var ffj_key_CommandInfo_Value = []byte("value") + +var ffj_key_CommandInfo_Arguments = []byte("arguments") + +var ffj_key_CommandInfo_User = []byte("user") + +func (uj *CommandInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CommandInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CommandInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CommandInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_CommandInfo_Arguments, kn) { + currentKey = ffj_t_CommandInfo_Arguments + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_CommandInfo_Environment, kn) { + currentKey = ffj_t_CommandInfo_Environment + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_CommandInfo_Shell, kn) { + currentKey = ffj_t_CommandInfo_Shell + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_CommandInfo_URIs, kn) { + currentKey = ffj_t_CommandInfo_URIs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CommandInfo_User, kn) { + currentKey = ffj_t_CommandInfo_User + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_CommandInfo_Value, kn) { + currentKey = ffj_t_CommandInfo_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_User, kn) { + currentKey = ffj_t_CommandInfo_User + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_Arguments, kn) { + currentKey = ffj_t_CommandInfo_Arguments + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_Value, kn) { + currentKey = ffj_t_CommandInfo_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_Shell, kn) { + currentKey = ffj_t_CommandInfo_Shell + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_Environment, kn) { + currentKey = ffj_t_CommandInfo_Environment + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_URIs, kn) { + currentKey = ffj_t_CommandInfo_URIs + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CommandInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CommandInfo_URIs: + goto handle_URIs + + case ffj_t_CommandInfo_Environment: + goto handle_Environment + + case ffj_t_CommandInfo_Shell: + goto handle_Shell + + case ffj_t_CommandInfo_Value: + goto handle_Value + + case ffj_t_CommandInfo_Arguments: + goto handle_Arguments + + case ffj_t_CommandInfo_User: + goto handle_User + + case ffj_t_CommandInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_URIs: + + /* handler: uj.URIs type=[]mesos.CommandInfo_URI kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.URIs = nil + } else { + + uj.URIs = []CommandInfo_URI{} + + wantVal := true + + for { + + var tmp_uj__URIs CommandInfo_URI + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__URIs type=mesos.CommandInfo_URI kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__URIs.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.URIs = append(uj.URIs, tmp_uj__URIs) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Environment: + + /* handler: uj.Environment type=mesos.Environment kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Environment = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Environment == nil { + uj.Environment = new(Environment) + } + + err = uj.Environment.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Shell: + + /* handler: uj.Shell type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Shell = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Shell = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Value = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Value = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Arguments: + + /* handler: uj.Arguments type=[]string kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Arguments = nil + } else { + + uj.Arguments = []string{} + + wantVal := true + + for { + + var tmp_uj__Arguments string + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Arguments type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + tmp_uj__Arguments = string(string(outBuf)) + + } + } + + uj.Arguments = append(uj.Arguments, tmp_uj__Arguments) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_User: + + /* handler: uj.User type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.User = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.User = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *CommandInfo_URI) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CommandInfo_URI) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte(',') + if mj.Executable != nil { + if true { + if *mj.Executable { + buf.WriteString(`"executable":true`) + } else { + buf.WriteString(`"executable":false`) + } + buf.WriteByte(',') + } + } + if mj.Extract != nil { + if true { + if *mj.Extract { + buf.WriteString(`"extract":true`) + } else { + buf.WriteString(`"extract":false`) + } + buf.WriteByte(',') + } + } + if mj.Cache != nil { + if true { + if *mj.Cache { + buf.WriteString(`"cache":true`) + } else { + buf.WriteString(`"cache":false`) + } + buf.WriteByte(',') + } + } + if mj.OutputFile != nil { + if true { + buf.WriteString(`"output_file":`) + fflib.WriteJsonString(buf, string(*mj.OutputFile)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CommandInfo_URIbase = iota + ffj_t_CommandInfo_URIno_such_key + + ffj_t_CommandInfo_URI_Value + + ffj_t_CommandInfo_URI_Executable + + ffj_t_CommandInfo_URI_Extract + + ffj_t_CommandInfo_URI_Cache + + ffj_t_CommandInfo_URI_OutputFile +) + +var ffj_key_CommandInfo_URI_Value = []byte("value") + +var ffj_key_CommandInfo_URI_Executable = []byte("executable") + +var ffj_key_CommandInfo_URI_Extract = []byte("extract") + +var ffj_key_CommandInfo_URI_Cache = []byte("cache") + +var ffj_key_CommandInfo_URI_OutputFile = []byte("output_file") + +func (uj *CommandInfo_URI) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CommandInfo_URI) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CommandInfo_URIbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CommandInfo_URIno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CommandInfo_URI_Cache, kn) { + currentKey = ffj_t_CommandInfo_URI_Cache + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_CommandInfo_URI_Executable, kn) { + currentKey = ffj_t_CommandInfo_URI_Executable + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CommandInfo_URI_Extract, kn) { + currentKey = ffj_t_CommandInfo_URI_Extract + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'o': + + if bytes.Equal(ffj_key_CommandInfo_URI_OutputFile, kn) { + currentKey = ffj_t_CommandInfo_URI_OutputFile + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_CommandInfo_URI_Value, kn) { + currentKey = ffj_t_CommandInfo_URI_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_CommandInfo_URI_OutputFile, kn) { + currentKey = ffj_t_CommandInfo_URI_OutputFile + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Cache, kn) { + currentKey = ffj_t_CommandInfo_URI_Cache + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Extract, kn) { + currentKey = ffj_t_CommandInfo_URI_Extract + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Executable, kn) { + currentKey = ffj_t_CommandInfo_URI_Executable + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Value, kn) { + currentKey = ffj_t_CommandInfo_URI_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CommandInfo_URIno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CommandInfo_URI_Value: + goto handle_Value + + case ffj_t_CommandInfo_URI_Executable: + goto handle_Executable + + case ffj_t_CommandInfo_URI_Extract: + goto handle_Extract + + case ffj_t_CommandInfo_URI_Cache: + goto handle_Cache + + case ffj_t_CommandInfo_URI_OutputFile: + goto handle_OutputFile + + case ffj_t_CommandInfo_URIno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Executable: + + /* handler: uj.Executable type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Executable = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Executable = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Extract: + + /* handler: uj.Extract type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Extract = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Extract = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Cache: + + /* handler: uj.Cache type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Cache = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Cache = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutputFile: + + /* handler: uj.OutputFile type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.OutputFile = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.OutputFile = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *ContainerID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte(',') + if mj.Parent != nil { + if true { + buf.WriteString(`"parent":`) + + { + + err = mj.Parent.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerIDbase = iota + ffj_t_ContainerIDno_such_key + + ffj_t_ContainerID_Value + + ffj_t_ContainerID_Parent +) + +var ffj_key_ContainerID_Value = []byte("value") + +var ffj_key_ContainerID_Parent = []byte("parent") + +func (uj *ContainerID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_ContainerID_Parent, kn) { + currentKey = ffj_t_ContainerID_Parent + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_ContainerID_Value, kn) { + currentKey = ffj_t_ContainerID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerID_Parent, kn) { + currentKey = ffj_t_ContainerID_Parent + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerID_Value, kn) { + currentKey = ffj_t_ContainerID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerID_Value: + goto handle_Value + + case ffj_t_ContainerID_Parent: + goto handle_Parent + + case ffj_t_ContainerIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Parent: + + /* handler: uj.Parent type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Parent = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Parent == nil { + uj.Parent = new(ContainerID) + } + + err = uj.Parent.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *ContainerInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Type != nil { + if true { + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"volumes":`) + if mj.Volumes != nil { + buf.WriteString(`[`) + for i, v := range mj.Volumes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Hostname != nil { + if true { + buf.WriteString(`"hostname":`) + fflib.WriteJsonString(buf, string(*mj.Hostname)) + buf.WriteByte(',') + } + } + if mj.Docker != nil { + if true { + buf.WriteString(`"docker":`) + + { + + err = mj.Docker.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Mesos != nil { + if true { + buf.WriteString(`"mesos":`) + + { + + err = mj.Mesos.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"network_infos":`) + if mj.NetworkInfos != nil { + buf.WriteString(`[`) + for i, v := range mj.NetworkInfos { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.LinuxInfo != nil { + if true { + buf.WriteString(`"linux_info":`) + + { + + err = mj.LinuxInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.RlimitInfo != nil { + if true { + buf.WriteString(`"rlimit_info":`) + + { + + err = mj.RlimitInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.TTYInfo != nil { + if true { + buf.WriteString(`"tty_info":`) + + { + + err = mj.TTYInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerInfobase = iota + ffj_t_ContainerInfono_such_key + + ffj_t_ContainerInfo_Type + + ffj_t_ContainerInfo_Volumes + + ffj_t_ContainerInfo_Hostname + + ffj_t_ContainerInfo_Docker + + ffj_t_ContainerInfo_Mesos + + ffj_t_ContainerInfo_NetworkInfos + + ffj_t_ContainerInfo_LinuxInfo + + ffj_t_ContainerInfo_RlimitInfo + + ffj_t_ContainerInfo_TTYInfo +) + +var ffj_key_ContainerInfo_Type = []byte("type") + +var ffj_key_ContainerInfo_Volumes = []byte("volumes") + +var ffj_key_ContainerInfo_Hostname = []byte("hostname") + +var ffj_key_ContainerInfo_Docker = []byte("docker") + +var ffj_key_ContainerInfo_Mesos = []byte("mesos") + +var ffj_key_ContainerInfo_NetworkInfos = []byte("network_infos") + +var ffj_key_ContainerInfo_LinuxInfo = []byte("linux_info") + +var ffj_key_ContainerInfo_RlimitInfo = []byte("rlimit_info") + +var ffj_key_ContainerInfo_TTYInfo = []byte("tty_info") + +func (uj *ContainerInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_ContainerInfo_Docker, kn) { + currentKey = ffj_t_ContainerInfo_Docker + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_ContainerInfo_Hostname, kn) { + currentKey = ffj_t_ContainerInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_ContainerInfo_LinuxInfo, kn) { + currentKey = ffj_t_ContainerInfo_LinuxInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_ContainerInfo_Mesos, kn) { + currentKey = ffj_t_ContainerInfo_Mesos + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ContainerInfo_NetworkInfos, kn) { + currentKey = ffj_t_ContainerInfo_NetworkInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_ContainerInfo_RlimitInfo, kn) { + currentKey = ffj_t_ContainerInfo_RlimitInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ContainerInfo_Type, kn) { + currentKey = ffj_t_ContainerInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ContainerInfo_TTYInfo, kn) { + currentKey = ffj_t_ContainerInfo_TTYInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_ContainerInfo_Volumes, kn) { + currentKey = ffj_t_ContainerInfo_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_TTYInfo, kn) { + currentKey = ffj_t_ContainerInfo_TTYInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_RlimitInfo, kn) { + currentKey = ffj_t_ContainerInfo_RlimitInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_LinuxInfo, kn) { + currentKey = ffj_t_ContainerInfo_LinuxInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_NetworkInfos, kn) { + currentKey = ffj_t_ContainerInfo_NetworkInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Mesos, kn) { + currentKey = ffj_t_ContainerInfo_Mesos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Docker, kn) { + currentKey = ffj_t_ContainerInfo_Docker + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Hostname, kn) { + currentKey = ffj_t_ContainerInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Volumes, kn) { + currentKey = ffj_t_ContainerInfo_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerInfo_Type, kn) { + currentKey = ffj_t_ContainerInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerInfo_Type: + goto handle_Type + + case ffj_t_ContainerInfo_Volumes: + goto handle_Volumes + + case ffj_t_ContainerInfo_Hostname: + goto handle_Hostname + + case ffj_t_ContainerInfo_Docker: + goto handle_Docker + + case ffj_t_ContainerInfo_Mesos: + goto handle_Mesos + + case ffj_t_ContainerInfo_NetworkInfos: + goto handle_NetworkInfos + + case ffj_t_ContainerInfo_LinuxInfo: + goto handle_LinuxInfo + + case ffj_t_ContainerInfo_RlimitInfo: + goto handle_RlimitInfo + + case ffj_t_ContainerInfo_TTYInfo: + goto handle_TTYInfo + + case ffj_t_ContainerInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.ContainerInfo_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Type = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Type == nil { + uj.Type = new(ContainerInfo_Type) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Volumes: + + /* handler: uj.Volumes type=[]mesos.Volume kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Volumes = nil + } else { + + uj.Volumes = []Volume{} + + wantVal := true + + for { + + var tmp_uj__Volumes Volume + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Volumes type=mesos.Volume kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Volumes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Volumes = append(uj.Volumes, tmp_uj__Volumes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Hostname = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() tval = string(string(outBuf)) uj.Hostname = &tval @@ -4198,6 +6149,60 @@ handle_LinuxInfo: state = fflib.FFParse_after_value goto mainparse +handle_RlimitInfo: + + /* handler: uj.RlimitInfo type=mesos.RLimitInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.RlimitInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.RlimitInfo == nil { + uj.RlimitInfo = new(RLimitInfo) + } + + err = uj.RlimitInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TTYInfo: + + /* handler: uj.TTYInfo type=mesos.TTYInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.TTYInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TTYInfo == nil { + uj.TTYInfo = new(TTYInfo) + } + + err = uj.TTYInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + wantedvalue: return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) wrongtokenerror: @@ -5424,7 +7429,23 @@ func (mj *ContainerStatus) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{ "network_infos":`) + buf.WriteString(`{ `) + if mj.ContainerID != nil { + if true { + buf.WriteString(`"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"network_infos":`) if mj.NetworkInfos != nil { buf.WriteString(`[`) for i, v := range mj.NetworkInfos { @@ -5477,6 +7498,8 @@ const ( ffj_t_ContainerStatusbase = iota ffj_t_ContainerStatusno_such_key + ffj_t_ContainerStatus_ContainerID + ffj_t_ContainerStatus_NetworkInfos ffj_t_ContainerStatus_CgroupInfo @@ -5484,6 +7507,8 @@ const ( ffj_t_ContainerStatus_ExecutorPID ) +var ffj_key_ContainerStatus_ContainerID = []byte("container_id") + var ffj_key_ContainerStatus_NetworkInfos = []byte("network_infos") var ffj_key_ContainerStatus_CgroupInfo = []byte("cgroup_info") @@ -5551,7 +7576,12 @@ mainparse: case 'c': - if bytes.Equal(ffj_key_ContainerStatus_CgroupInfo, kn) { + if bytes.Equal(ffj_key_ContainerStatus_ContainerID, kn) { + currentKey = ffj_t_ContainerStatus_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ContainerStatus_CgroupInfo, kn) { currentKey = ffj_t_ContainerStatus_CgroupInfo state = fflib.FFParse_want_colon goto mainparse @@ -5593,6 +7623,12 @@ mainparse: goto mainparse } + if fflib.AsciiEqualFold(ffj_key_ContainerStatus_ContainerID, kn) { + currentKey = ffj_t_ContainerStatus_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + currentKey = ffj_t_ContainerStatusno_such_key state = fflib.FFParse_want_colon goto mainparse @@ -5610,6 +7646,9 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { + case ffj_t_ContainerStatus_ContainerID: + goto handle_ContainerID + case ffj_t_ContainerStatus_NetworkInfos: goto handle_NetworkInfos @@ -5633,6 +7672,33 @@ mainparse: } } +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ContainerID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ContainerID == nil { + uj.ContainerID = new(ContainerID) + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + handle_NetworkInfos: /* handler: uj.NetworkInfos type=[]mesos.NetworkInfo kind=slice quoted=false*/ @@ -7291,10 +9357,17 @@ func (mj *Environment_Variable) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{"name":`) + buf.WriteString(`{ "name":`) fflib.WriteJsonString(buf, string(mj.Name)) - buf.WriteString(`,"value":`) - fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte(',') + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.WriteJsonString(buf, string(*mj.Value)) + buf.WriteByte(',') + } + } + buf.Rewind(1) buf.WriteByte('}') return nil } @@ -7478,11 +9551,15 @@ handle_Value: if tok == fflib.FFTok_null { + uj.Value = nil + } else { + var tval string outBuf := fs.Output.Bytes() - uj.Value = string(string(outBuf)) + tval = string(string(outBuf)) + uj.Value = &tval } } @@ -7716,24 +9793,18 @@ func (mj *ExecutorInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{ `) - if mj.Type != nil { - if true { - buf.WriteString(`"type":`) - - { + buf.WriteString(`{ "type":`) - obj, err = mj.Type.MarshalJSON() - if err != nil { - return err - } - buf.Write(obj) + { - } - buf.WriteByte(',') + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err } + buf.Write(obj) + } - buf.WriteString(`"executor_id":`) + buf.WriteString(`,"executor_id":`) { @@ -8233,8 +10304,6 @@ handle_Type: { if tok == fflib.FFTok_null { - uj.Type = nil - state = fflib.FFParse_after_value goto mainparse } @@ -8244,10 +10313,6 @@ handle_Type: return fs.WrapErr(err) } - if uj.Type == nil { - uj.Type = new(ExecutorInfo_Type) - } - err = uj.Type.UnmarshalJSON(tbuf) if err != nil { return fs.WrapErr(err) @@ -9863,6 +11928,22 @@ func (mj *FrameworkInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } + if len(mj.Roles) != 0 { + buf.WriteString(`"roles":`) + if mj.Roles != nil { + buf.WriteString(`[`) + for i, v := range mj.Roles { + if i != 0 { + buf.WriteString(`,`) + } + fflib.WriteJsonString(buf, string(v)) + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } if mj.Hostname != nil { if true { buf.WriteString(`"hostname":`) @@ -9942,6 +12023,8 @@ const ( ffj_t_FrameworkInfo_Role + ffj_t_FrameworkInfo_Roles + ffj_t_FrameworkInfo_Hostname ffj_t_FrameworkInfo_Principal @@ -9965,6 +12048,8 @@ var ffj_key_FrameworkInfo_Checkpoint = []byte("checkpoint") var ffj_key_FrameworkInfo_Role = []byte("role") +var ffj_key_FrameworkInfo_Roles = []byte("roles") + var ffj_key_FrameworkInfo_Hostname = []byte("hostname") var ffj_key_FrameworkInfo_Principal = []byte("principal") @@ -10101,6 +12186,11 @@ mainparse: currentKey = ffj_t_FrameworkInfo_Role state = fflib.FFParse_want_colon goto mainparse + + } else if bytes.Equal(ffj_key_FrameworkInfo_Roles, kn) { + currentKey = ffj_t_FrameworkInfo_Roles + state = fflib.FFParse_want_colon + goto mainparse } case 'u': @@ -10151,6 +12241,12 @@ mainparse: goto mainparse } + if fflib.EqualFoldRight(ffj_key_FrameworkInfo_Roles, kn) { + currentKey = ffj_t_FrameworkInfo_Roles + state = fflib.FFParse_want_colon + goto mainparse + } + if fflib.SimpleLetterEqualFold(ffj_key_FrameworkInfo_Role, kn) { currentKey = ffj_t_FrameworkInfo_Role state = fflib.FFParse_want_colon @@ -10222,6 +12318,9 @@ mainparse: case ffj_t_FrameworkInfo_Role: goto handle_Role + case ffj_t_FrameworkInfo_Roles: + goto handle_Roles + case ffj_t_FrameworkInfo_Hostname: goto handle_Hostname @@ -10434,6 +12533,80 @@ handle_Role: state = fflib.FFParse_after_value goto mainparse +handle_Roles: + + /* handler: uj.Roles type=[]string kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Roles = nil + } else { + + uj.Roles = []string{} + + wantVal := true + + for { + + var tmp_uj__Roles string + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Roles type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + tmp_uj__Roles = string(string(outBuf)) + + } + } + + uj.Roles = append(uj.Roles, tmp_uj__Roles) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + handle_Hostname: /* handler: uj.Hostname type=string kind=string quoted=false*/ @@ -10891,22 +13064,18 @@ func (mj *HealthCheck) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } - if mj.Type != nil { - if true { - buf.WriteString(`"type":`) - - { + buf.WriteString(`"type":`) - obj, err = mj.Type.MarshalJSON() - if err != nil { - return err - } - buf.Write(obj) + { - } - buf.WriteByte(',') + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err } + buf.Write(obj) + } + buf.WriteByte(',') if mj.Command != nil { if true { buf.WriteString(`"command":`) @@ -11406,8 +13575,6 @@ handle_Type: { if tok == fflib.FFTok_null { - uj.Type = nil - state = fflib.FFParse_after_value goto mainparse } @@ -11417,10 +13584,6 @@ handle_Type: return fs.WrapErr(err) } - if uj.Type == nil { - uj.Type = new(HealthCheck_Type) - } - err = uj.Type.UnmarshalJSON(tbuf) if err != nil { return fs.WrapErr(err) @@ -20204,6 +22367,21 @@ func (mj *Offer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } + if mj.AllocationInfo != nil { + if true { + buf.WriteString(`"allocation_info":`) + + { + + err = mj.AllocationInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } buf.Rewind(1) buf.WriteByte('}') return nil @@ -20230,6 +22408,8 @@ const ( ffj_t_Offer_ExecutorIDs ffj_t_Offer_Unavailability + + ffj_t_Offer_AllocationInfo ) var ffj_key_Offer_ID = []byte("id") @@ -20250,6 +22430,8 @@ var ffj_key_Offer_ExecutorIDs = []byte("executor_ids") var ffj_key_Offer_Unavailability = []byte("unavailability") +var ffj_key_Offer_AllocationInfo = []byte("allocation_info") + func (uj *Offer) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) @@ -20320,6 +22502,11 @@ mainparse: currentKey = ffj_t_Offer_Attributes state = fflib.FFParse_want_colon goto mainparse + + } else if bytes.Equal(ffj_key_Offer_AllocationInfo, kn) { + currentKey = ffj_t_Offer_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse } case 'e': @@ -20377,6 +22564,12 @@ mainparse: } + if fflib.AsciiEqualFold(ffj_key_Offer_AllocationInfo, kn) { + currentKey = ffj_t_Offer_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse + } + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Unavailability, kn) { currentKey = ffj_t_Offer_Unavailability state = fflib.FFParse_want_colon @@ -20475,6 +22668,9 @@ mainparse: case ffj_t_Offer_Unavailability: goto handle_Unavailability + case ffj_t_Offer_AllocationInfo: + goto handle_AllocationInfo + case ffj_t_Offerno_such_key: err = fs.SkipField(tok) if err != nil { @@ -20839,6 +23035,33 @@ handle_Unavailability: state = fflib.FFParse_after_value goto mainparse +handle_AllocationInfo: + + /* handler: uj.AllocationInfo type=mesos.Resource_AllocationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AllocationInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AllocationInfo == nil { + uj.AllocationInfo = new(Resource_AllocationInfo) + } + + err = uj.AllocationInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + wantedvalue: return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) wrongtokenerror: @@ -21065,23 +23288,18 @@ func (mj *Offer_Operation) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{ `) - if mj.Type != nil { - if true { - buf.WriteString(`"type":`) - - { + buf.WriteString(`{ "type":`) - obj, err = mj.Type.MarshalJSON() - if err != nil { - return err - } - buf.Write(obj) + { - } - buf.WriteByte(',') + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err } + buf.Write(obj) + } + buf.WriteByte(',') if mj.Launch != nil { if true { buf.WriteString(`"launch":`) @@ -21425,8 +23643,6 @@ handle_Type: { if tok == fflib.FFTok_null { - uj.Type = nil - state = fflib.FFParse_after_value goto mainparse } @@ -21436,10 +23652,6 @@ handle_Type: return fs.WrapErr(err) } - if uj.Type == nil { - uj.Type = new(Offer_Operation_Type) - } - err = uj.Type.UnmarshalJSON(tbuf) if err != nil { return fs.WrapErr(err) @@ -27394,29 +29606,571 @@ mainparse: kn := fs.Output.Bytes() if len(kn) <= 0 { // "" case. hrm. - currentKey = ffj_t_Portsno_such_key + currentKey = ffj_t_Portsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_Ports_Ports, kn) { + currentKey = ffj_t_Ports_Ports + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Ports_Ports, kn) { + currentKey = ffj_t_Ports_Ports + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Portsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Ports_Ports: + goto handle_Ports + + case ffj_t_Portsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Ports: + + /* handler: uj.Ports type=[]mesos.Port kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Ports = nil + } else { + + uj.Ports = []Port{} + + wantVal := true + + for { + + var tmp_uj__Ports Port + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Ports type=mesos.Port kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Ports.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Ports = append(uj.Ports, tmp_uj__Ports) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *RLimitInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *RLimitInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"rlimits":`) + if mj.Rlimits != nil { + buf.WriteString(`[`) + for i, v := range mj.Rlimits { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_RLimitInfobase = iota + ffj_t_RLimitInfono_such_key + + ffj_t_RLimitInfo_Rlimits +) + +var ffj_key_RLimitInfo_Rlimits = []byte("rlimits") + +func (uj *RLimitInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *RLimitInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_RLimitInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_RLimitInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_RLimitInfo_Rlimits, kn) { + currentKey = ffj_t_RLimitInfo_Rlimits + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_RLimitInfo_Rlimits, kn) { + currentKey = ffj_t_RLimitInfo_Rlimits + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_RLimitInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_RLimitInfo_Rlimits: + goto handle_Rlimits + + case ffj_t_RLimitInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Rlimits: + + /* handler: uj.Rlimits type=[]mesos.RLimitInfo_RLimit kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Rlimits = nil + } else { + + uj.Rlimits = []RLimitInfo_RLimit{} + + wantVal := true + + for { + + var tmp_uj__Rlimits RLimitInfo_RLimit + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Rlimits type=mesos.RLimitInfo_RLimit kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Rlimits.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Rlimits = append(uj.Rlimits, tmp_uj__Rlimits) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *RLimitInfo_RLimit) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *RLimitInfo_RLimit) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Hard != nil { + if true { + buf.WriteString(`"hard":`) + fflib.FormatBits2(buf, uint64(*mj.Hard), 10, false) + buf.WriteByte(',') + } + } + if mj.Soft != nil { + if true { + buf.WriteString(`"soft":`) + fflib.FormatBits2(buf, uint64(*mj.Soft), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_RLimitInfo_RLimitbase = iota + ffj_t_RLimitInfo_RLimitno_such_key + + ffj_t_RLimitInfo_RLimit_Type + + ffj_t_RLimitInfo_RLimit_Hard + + ffj_t_RLimitInfo_RLimit_Soft +) + +var ffj_key_RLimitInfo_RLimit_Type = []byte("type") + +var ffj_key_RLimitInfo_RLimit_Hard = []byte("hard") + +var ffj_key_RLimitInfo_RLimit_Soft = []byte("soft") + +func (uj *RLimitInfo_RLimit) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *RLimitInfo_RLimit) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_RLimitInfo_RLimitbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_RLimitInfo_RLimitno_such_key state = fflib.FFParse_want_colon goto mainparse } else { switch kn[0] { - case 'p': + case 'h': - if bytes.Equal(ffj_key_Ports_Ports, kn) { - currentKey = ffj_t_Ports_Ports + if bytes.Equal(ffj_key_RLimitInfo_RLimit_Hard, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Hard + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_RLimitInfo_RLimit_Soft, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Soft + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_RLimitInfo_RLimit_Type, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Type state = fflib.FFParse_want_colon goto mainparse } } - if fflib.EqualFoldRight(ffj_key_Ports_Ports, kn) { - currentKey = ffj_t_Ports_Ports + if fflib.EqualFoldRight(ffj_key_RLimitInfo_RLimit_Soft, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Soft state = fflib.FFParse_want_colon goto mainparse } - currentKey = ffj_t_Portsno_such_key + if fflib.SimpleLetterEqualFold(ffj_key_RLimitInfo_RLimit_Hard, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Hard + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_RLimitInfo_RLimit_Type, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_RLimitInfo_RLimitno_such_key state = fflib.FFParse_want_colon goto mainparse } @@ -27433,10 +30187,16 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { - case ffj_t_Ports_Ports: - goto handle_Ports + case ffj_t_RLimitInfo_RLimit_Type: + goto handle_Type - case ffj_t_Portsno_such_key: + case ffj_t_RLimitInfo_RLimit_Hard: + goto handle_Hard + + case ffj_t_RLimitInfo_RLimit_Soft: + goto handle_Soft + + case ffj_t_RLimitInfo_RLimitno_such_key: err = fs.SkipField(tok) if err != nil { return fs.WrapErr(err) @@ -27450,69 +30210,92 @@ mainparse: } } -handle_Ports: +handle_Type: - /* handler: uj.Ports type=[]mesos.Port kind=slice quoted=false*/ + /* handler: uj.Type type=mesos.RLimitInfo_RLimit_Type kind=int32 quoted=false*/ { + if tok == fflib.FFTok_null { - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Hard: + + /* handler: uj.Hard type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { if tok == fflib.FFTok_null { - uj.Ports = nil + + uj.Hard = nil + } else { - uj.Ports = []Port{} + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) - wantVal := true + if err != nil { + return fs.WrapErr(err) + } - for { + ttypval := uint64(tval) + uj.Hard = &ttypval - var tmp_uj__Ports Port + } + } - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } + state = fflib.FFParse_after_value + goto mainparse - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } +handle_Soft: - /* handler: tmp_uj__Ports type=mesos.Port kind=struct quoted=false*/ + /* handler: uj.Soft type=uint64 kind=uint64 quoted=false*/ - { - if tok == fflib.FFTok_null { + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } - state = fflib.FFParse_after_value - goto mainparse - } + { - err = tmp_uj__Ports.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value - } + if tok == fflib.FFTok_null { - uj.Ports = append(uj.Ports, tmp_uj__Ports) + uj.Soft = nil - wantVal = false + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) } + + ttypval := uint64(tval) + uj.Soft = &ttypval + } } @@ -28626,6 +31409,21 @@ func (mj *Resource) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } + if mj.AllocationInfo != nil { + if true { + buf.WriteString(`"allocation_info":`) + + { + + err = mj.AllocationInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } if mj.Reservation != nil { if true { buf.WriteString(`"reservation":`) @@ -28707,6 +31505,8 @@ const ( ffj_t_Resource_Role + ffj_t_Resource_AllocationInfo + ffj_t_Resource_Reservation ffj_t_Resource_Disk @@ -28728,6 +31528,8 @@ var ffj_key_Resource_Set = []byte("set") var ffj_key_Resource_Role = []byte("role") +var ffj_key_Resource_AllocationInfo = []byte("allocation_info") + var ffj_key_Resource_Reservation = []byte("reservation") var ffj_key_Resource_Disk = []byte("disk") @@ -28795,6 +31597,14 @@ mainparse: } else { switch kn[0] { + case 'a': + + if bytes.Equal(ffj_key_Resource_AllocationInfo, kn) { + currentKey = ffj_t_Resource_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse + } + case 'd': if bytes.Equal(ffj_key_Resource_Disk, kn) { @@ -28886,6 +31696,12 @@ mainparse: goto mainparse } + if fflib.AsciiEqualFold(ffj_key_Resource_AllocationInfo, kn) { + currentKey = ffj_t_Resource_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse + } + if fflib.SimpleLetterEqualFold(ffj_key_Resource_Role, kn) { currentKey = ffj_t_Resource_Role state = fflib.FFParse_want_colon @@ -28957,6 +31773,9 @@ mainparse: case ffj_t_Resource_Role: goto handle_Role + case ffj_t_Resource_AllocationInfo: + goto handle_AllocationInfo + case ffj_t_Resource_Reservation: goto handle_Reservation @@ -29152,6 +31971,33 @@ handle_Role: state = fflib.FFParse_after_value goto mainparse +handle_AllocationInfo: + + /* handler: uj.AllocationInfo type=mesos.Resource_AllocationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AllocationInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AllocationInfo == nil { + uj.AllocationInfo = new(Resource_AllocationInfo) + } + + err = uj.AllocationInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + handle_Reservation: /* handler: uj.Reservation type=mesos.Resource_ReservationInfo kind=struct quoted=false*/ @@ -33225,6 +36071,205 @@ done: return nil } +func (mj *Resource_AllocationInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_AllocationInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Role != nil { + if true { + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_AllocationInfobase = iota + ffj_t_Resource_AllocationInfono_such_key + + ffj_t_Resource_AllocationInfo_Role +) + +var ffj_key_Resource_AllocationInfo_Role = []byte("role") + +func (uj *Resource_AllocationInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_AllocationInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_AllocationInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_AllocationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Resource_AllocationInfo_Role, kn) { + currentKey = ffj_t_Resource_AllocationInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_AllocationInfo_Role, kn) { + currentKey = ffj_t_Resource_AllocationInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_AllocationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_AllocationInfo_Role: + goto handle_Role + + case ffj_t_Resource_AllocationInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + func (mj *Resource_DiskInfo) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { @@ -35007,37 +38052,500 @@ mainparse: } - currentKey = ffj_t_Resource_SharedInfono_such_key - state = fflib.FFParse_want_colon - goto mainparse - } + currentKey = ffj_t_Resource_SharedInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_SharedInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *Role) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Role) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"weight":`) + fflib.AppendFloat(buf, float64(mj.Weight), 'g', -1, 64) + buf.WriteString(`,"frameworks":`) + if mj.Frameworks != nil { + buf.WriteString(`[`) + for i, v := range mj.Frameworks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Rolebase = iota + ffj_t_Roleno_such_key + + ffj_t_Role_Name + + ffj_t_Role_Weight + + ffj_t_Role_Frameworks + + ffj_t_Role_Resources +) + +var ffj_key_Role_Name = []byte("name") + +var ffj_key_Role_Weight = []byte("weight") + +var ffj_key_Role_Frameworks = []byte("frameworks") + +var ffj_key_Role_Resources = []byte("resources") + +func (uj *Role) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Role) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Rolebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Roleno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'f': + + if bytes.Equal(ffj_key_Role_Frameworks, kn) { + currentKey = ffj_t_Role_Frameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Role_Name, kn) { + currentKey = ffj_t_Role_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Role_Resources, kn) { + currentKey = ffj_t_Role_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'w': + + if bytes.Equal(ffj_key_Role_Weight, kn) { + currentKey = ffj_t_Role_Weight + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Role_Resources, kn) { + currentKey = ffj_t_Role_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Role_Frameworks, kn) { + currentKey = ffj_t_Role_Frameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Role_Weight, kn) { + currentKey = ffj_t_Role_Weight + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Role_Name, kn) { + currentKey = ffj_t_Role_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Roleno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Role_Name: + goto handle_Name + + case ffj_t_Role_Weight: + goto handle_Weight + + case ffj_t_Role_Frameworks: + goto handle_Frameworks + + case ffj_t_Role_Resources: + goto handle_Resources + + case ffj_t_Roleno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Weight: + + /* handler: uj.Weight type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Weight = float64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Frameworks: + + /* handler: uj.Frameworks type=[]mesos.FrameworkID kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Frameworks = nil + } else { + + uj.Frameworks = []FrameworkID{} + + wantVal := true + + for { + + var tmp_uj__Frameworks FrameworkID + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Frameworks type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Frameworks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Frameworks = append(uj.Frameworks, tmp_uj__Frameworks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ - case fflib.FFParse_want_colon: - if tok != fflib.FFTok_colon { - wantedTok = fflib.FFTok_colon - goto wrongtokenerror - } - state = fflib.FFParse_want_value - continue - case fflib.FFParse_want_value: + { + if tok == fflib.FFTok_null { - if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { - switch currentKey { + state = fflib.FFParse_after_value + goto mainparse + } - case ffj_t_Resource_SharedInfono_such_key: - err = fs.SkipField(tok) + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) if err != nil { - return fs.WrapErr(err) + return err } state = fflib.FFParse_after_value - goto mainparse } - } else { - goto wantedvalue + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false } } } + state = fflib.FFParse_after_value + goto mainparse + wantedvalue: return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) wrongtokenerror: @@ -35055,7 +38563,7 @@ done: return nil } -func (mj *Role) MarshalJSON() ([]byte, error) { +func (mj *SNMPStatistics) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { buf.WriteString("null") @@ -35067,7 +38575,7 @@ func (mj *Role) MarshalJSON() ([]byte, error) { } return buf.Bytes(), nil } -func (mj *Role) MarshalJSONBuf(buf fflib.EncodingBuffer) error { +func (mj *SNMPStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if mj == nil { buf.WriteString("null") return nil @@ -35076,85 +38584,101 @@ func (mj *Role) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{"name":`) - fflib.WriteJsonString(buf, string(mj.Name)) - buf.WriteString(`,"weight":`) - fflib.AppendFloat(buf, float64(mj.Weight), 'g', -1, 64) - buf.WriteString(`,"frameworks":`) - if mj.Frameworks != nil { - buf.WriteString(`[`) - for i, v := range mj.Frameworks { - if i != 0 { - buf.WriteString(`,`) + buf.WriteString(`{ `) + if mj.IPStats != nil { + if true { + buf.WriteString(`"ip_stats":`) + + { + + err = mj.IPStats.MarshalJSONBuf(buf) + if err != nil { + return err + } + } + buf.WriteByte(',') + } + } + if mj.ICMPStats != nil { + if true { + buf.WriteString(`"icmp_stats":`) { - err = v.MarshalJSONBuf(buf) + err = mj.ICMPStats.MarshalJSONBuf(buf) if err != nil { return err } } + buf.WriteByte(',') } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) } - buf.WriteString(`,"resources":`) - if mj.Resources != nil { - buf.WriteString(`[`) - for i, v := range mj.Resources { - if i != 0 { - buf.WriteString(`,`) + if mj.TCPStats != nil { + if true { + buf.WriteString(`"tcp_stats":`) + + { + + err = mj.TCPStats.MarshalJSONBuf(buf) + if err != nil { + return err + } + } + buf.WriteByte(',') + } + } + if mj.UDPStats != nil { + if true { + buf.WriteString(`"udp_stats":`) { - err = v.MarshalJSONBuf(buf) + err = mj.UDPStats.MarshalJSONBuf(buf) if err != nil { return err } } + buf.WriteByte(',') } - buf.WriteString(`]`) - } else { - buf.WriteString(`null`) } + buf.Rewind(1) buf.WriteByte('}') return nil } const ( - ffj_t_Rolebase = iota - ffj_t_Roleno_such_key + ffj_t_SNMPStatisticsbase = iota + ffj_t_SNMPStatisticsno_such_key - ffj_t_Role_Name + ffj_t_SNMPStatistics_IPStats - ffj_t_Role_Weight + ffj_t_SNMPStatistics_ICMPStats - ffj_t_Role_Frameworks + ffj_t_SNMPStatistics_TCPStats - ffj_t_Role_Resources + ffj_t_SNMPStatistics_UDPStats ) -var ffj_key_Role_Name = []byte("name") +var ffj_key_SNMPStatistics_IPStats = []byte("ip_stats") -var ffj_key_Role_Weight = []byte("weight") +var ffj_key_SNMPStatistics_ICMPStats = []byte("icmp_stats") -var ffj_key_Role_Frameworks = []byte("frameworks") +var ffj_key_SNMPStatistics_TCPStats = []byte("tcp_stats") -var ffj_key_Role_Resources = []byte("resources") +var ffj_key_SNMPStatistics_UDPStats = []byte("udp_stats") -func (uj *Role) UnmarshalJSON(input []byte) error { +func (uj *SNMPStatistics) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) } -func (uj *Role) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { +func (uj *SNMPStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { var err error = nil - currentKey := ffj_t_Rolebase + currentKey := ffj_t_SNMPStatisticsbase _ = currentKey tok := fflib.FFTok_init wantedTok := fflib.FFTok_init @@ -35200,71 +38724,68 @@ mainparse: kn := fs.Output.Bytes() if len(kn) <= 0 { // "" case. hrm. - currentKey = ffj_t_Roleno_such_key + currentKey = ffj_t_SNMPStatisticsno_such_key state = fflib.FFParse_want_colon goto mainparse } else { switch kn[0] { - case 'f': + case 'i': - if bytes.Equal(ffj_key_Role_Frameworks, kn) { - currentKey = ffj_t_Role_Frameworks + if bytes.Equal(ffj_key_SNMPStatistics_IPStats, kn) { + currentKey = ffj_t_SNMPStatistics_IPStats state = fflib.FFParse_want_colon goto mainparse - } - - case 'n': - if bytes.Equal(ffj_key_Role_Name, kn) { - currentKey = ffj_t_Role_Name + } else if bytes.Equal(ffj_key_SNMPStatistics_ICMPStats, kn) { + currentKey = ffj_t_SNMPStatistics_ICMPStats state = fflib.FFParse_want_colon goto mainparse } - case 'r': + case 't': - if bytes.Equal(ffj_key_Role_Resources, kn) { - currentKey = ffj_t_Role_Resources + if bytes.Equal(ffj_key_SNMPStatistics_TCPStats, kn) { + currentKey = ffj_t_SNMPStatistics_TCPStats state = fflib.FFParse_want_colon goto mainparse } - case 'w': + case 'u': - if bytes.Equal(ffj_key_Role_Weight, kn) { - currentKey = ffj_t_Role_Weight + if bytes.Equal(ffj_key_SNMPStatistics_UDPStats, kn) { + currentKey = ffj_t_SNMPStatistics_UDPStats state = fflib.FFParse_want_colon goto mainparse } } - if fflib.EqualFoldRight(ffj_key_Role_Resources, kn) { - currentKey = ffj_t_Role_Resources + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_UDPStats, kn) { + currentKey = ffj_t_SNMPStatistics_UDPStats state = fflib.FFParse_want_colon goto mainparse } - if fflib.EqualFoldRight(ffj_key_Role_Frameworks, kn) { - currentKey = ffj_t_Role_Frameworks + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_TCPStats, kn) { + currentKey = ffj_t_SNMPStatistics_TCPStats state = fflib.FFParse_want_colon goto mainparse } - if fflib.SimpleLetterEqualFold(ffj_key_Role_Weight, kn) { - currentKey = ffj_t_Role_Weight + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_ICMPStats, kn) { + currentKey = ffj_t_SNMPStatistics_ICMPStats state = fflib.FFParse_want_colon goto mainparse } - if fflib.SimpleLetterEqualFold(ffj_key_Role_Name, kn) { - currentKey = ffj_t_Role_Name + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_IPStats, kn) { + currentKey = ffj_t_SNMPStatistics_IPStats state = fflib.FFParse_want_colon goto mainparse } - currentKey = ffj_t_Roleno_such_key + currentKey = ffj_t_SNMPStatisticsno_such_key state = fflib.FFParse_want_colon goto mainparse } @@ -35281,19 +38802,19 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { - case ffj_t_Role_Name: - goto handle_Name + case ffj_t_SNMPStatistics_IPStats: + goto handle_IPStats - case ffj_t_Role_Weight: - goto handle_Weight + case ffj_t_SNMPStatistics_ICMPStats: + goto handle_ICMPStats - case ffj_t_Role_Frameworks: - goto handle_Frameworks + case ffj_t_SNMPStatistics_TCPStats: + goto handle_TCPStats - case ffj_t_Role_Resources: - goto handle_Resources + case ffj_t_SNMPStatistics_UDPStats: + goto handle_UDPStats - case ffj_t_Roleno_such_key: + case ffj_t_SNMPStatisticsno_such_key: err = fs.SkipField(tok) if err != nil { return fs.WrapErr(err) @@ -35307,195 +38828,313 @@ mainparse: } } -handle_Name: +handle_IPStats: - /* handler: uj.Name type=string kind=string quoted=false*/ + /* handler: uj.IPStats type=mesos.IpStatistics kind=struct quoted=false*/ { - - { - if tok != fflib.FFTok_string && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) - } - } - if tok == fflib.FFTok_null { - } else { + uj.IPStats = nil - outBuf := fs.Output.Bytes() + state = fflib.FFParse_after_value + goto mainparse + } - uj.Name = string(string(outBuf)) + if uj.IPStats == nil { + uj.IPStats = new(IpStatistics) + } + err = uj.IPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err } + state = fflib.FFParse_after_value } state = fflib.FFParse_after_value goto mainparse -handle_Weight: +handle_ICMPStats: - /* handler: uj.Weight type=float64 kind=float64 quoted=false*/ + /* handler: uj.ICMPStats type=mesos.IcmpStatistics kind=struct quoted=false*/ { - if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + if tok == fflib.FFTok_null { + + uj.ICMPStats = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ICMPStats == nil { + uj.ICMPStats = new(IcmpStatistics) + } + + err = uj.ICMPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err } + state = fflib.FFParse_after_value } - { + state = fflib.FFParse_after_value + goto mainparse - if tok == fflib.FFTok_null { +handle_TCPStats: - } else { + /* handler: uj.TCPStats type=mesos.TcpStatistics kind=struct quoted=false*/ - tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + { + if tok == fflib.FFTok_null { - if err != nil { - return fs.WrapErr(err) - } + uj.TCPStats = nil - uj.Weight = float64(tval) + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TCPStats == nil { + uj.TCPStats = new(TcpStatistics) + } + err = uj.TCPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err } + state = fflib.FFParse_after_value } state = fflib.FFParse_after_value goto mainparse -handle_Frameworks: +handle_UDPStats: - /* handler: uj.Frameworks type=[]mesos.FrameworkID kind=slice quoted=false*/ + /* handler: uj.UDPStats type=mesos.UdpStatistics kind=struct quoted=false*/ { - - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } - } - if tok == fflib.FFTok_null { - uj.Frameworks = nil - } else { - - uj.Frameworks = []FrameworkID{} - wantVal := true + uj.UDPStats = nil - for { + state = fflib.FFParse_after_value + goto mainparse + } - var tmp_uj__Frameworks FrameworkID + if uj.UDPStats == nil { + uj.UDPStats = new(UdpStatistics) + } - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } + err = uj.UDPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) - } - continue - } else { - wantVal = true - } + state = fflib.FFParse_after_value + goto mainparse - /* handler: tmp_uj__Frameworks type=mesos.FrameworkID kind=struct quoted=false*/ +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} - { - if tok == fflib.FFTok_null { +func (mj *TTYInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TTYInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.WindowSize != nil { + if true { + buf.WriteString(`"window_size":`) - state = fflib.FFParse_after_value - goto mainparse - } + { - err = tmp_uj__Frameworks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err - } - state = fflib.FFParse_after_value + err = mj.WindowSize.MarshalJSONBuf(buf) + if err != nil { + return err } - uj.Frameworks = append(uj.Frameworks, tmp_uj__Frameworks) - - wantVal = false } + buf.WriteByte(',') } } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} - state = fflib.FFParse_after_value - goto mainparse +const ( + ffj_t_TTYInfobase = iota + ffj_t_TTYInfono_such_key -handle_Resources: + ffj_t_TTYInfo_WindowSize +) - /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ +var ffj_key_TTYInfo_WindowSize = []byte("window_size") - { +func (uj *TTYInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} - { - if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { - return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) - } +func (uj *TTYInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TTYInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror } - if tok == fflib.FFTok_null { - uj.Resources = nil - } else { + switch state { - uj.Resources = []Resource{} + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue - wantVal := true + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } - for { + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } - var tmp_uj__Resources Resource + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TTYInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { - tok = fs.Scan() - if tok == fflib.FFTok_error { - goto tokerror - } - if tok == fflib.FFTok_right_brace { - break - } + case 'w': - if tok == fflib.FFTok_comma { - if wantVal == true { - // TODO(pquerna): this isn't an ideal error message, this handles - // things like [,,,] as an array value. - return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + if bytes.Equal(ffj_key_TTYInfo_WindowSize, kn) { + currentKey = ffj_t_TTYInfo_WindowSize + state = fflib.FFParse_want_colon + goto mainparse } - continue - } else { - wantVal = true + } - /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + if fflib.EqualFoldRight(ffj_key_TTYInfo_WindowSize, kn) { + currentKey = ffj_t_TTYInfo_WindowSize + state = fflib.FFParse_want_colon + goto mainparse + } - { - if tok == fflib.FFTok_null { + currentKey = ffj_t_TTYInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } - state = fflib.FFParse_after_value - goto mainparse - } + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: - err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TTYInfo_WindowSize: + goto handle_WindowSize + + case ffj_t_TTYInfono_such_key: + err = fs.SkipField(tok) if err != nil { - return err + return fs.WrapErr(err) } state = fflib.FFParse_after_value + goto mainparse } + } else { + goto wantedvalue + } + } + } - uj.Resources = append(uj.Resources, tmp_uj__Resources) +handle_WindowSize: - wantVal = false - } + /* handler: uj.WindowSize type=mesos.TTYInfo_WindowSize kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.WindowSize = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.WindowSize == nil { + uj.WindowSize = new(TTYInfo_WindowSize) + } + + err = uj.WindowSize.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err } + state = fflib.FFParse_after_value } state = fflib.FFParse_after_value @@ -35518,7 +39157,7 @@ done: return nil } -func (mj *SNMPStatistics) MarshalJSON() ([]byte, error) { +func (mj *TTYInfo_WindowSize) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { buf.WriteString("null") @@ -35530,7 +39169,7 @@ func (mj *SNMPStatistics) MarshalJSON() ([]byte, error) { } return buf.Bytes(), nil } -func (mj *SNMPStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { +func (mj *TTYInfo_WindowSize) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if mj == nil { buf.WriteString("null") return nil @@ -35539,101 +39178,35 @@ func (mj *SNMPStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { var obj []byte _ = obj _ = err - buf.WriteString(`{ `) - if mj.IPStats != nil { - if true { - buf.WriteString(`"ip_stats":`) - - { - - err = mj.IPStats.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteByte(',') - } - } - if mj.ICMPStats != nil { - if true { - buf.WriteString(`"icmp_stats":`) - - { - - err = mj.ICMPStats.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteByte(',') - } - } - if mj.TCPStats != nil { - if true { - buf.WriteString(`"tcp_stats":`) - - { - - err = mj.TCPStats.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteByte(',') - } - } - if mj.UDPStats != nil { - if true { - buf.WriteString(`"udp_stats":`) - - { - - err = mj.UDPStats.MarshalJSONBuf(buf) - if err != nil { - return err - } - - } - buf.WriteByte(',') - } - } - buf.Rewind(1) + buf.WriteString(`{"rows":`) + fflib.FormatBits2(buf, uint64(mj.Rows), 10, false) + buf.WriteString(`,"columns":`) + fflib.FormatBits2(buf, uint64(mj.Columns), 10, false) buf.WriteByte('}') return nil } const ( - ffj_t_SNMPStatisticsbase = iota - ffj_t_SNMPStatisticsno_such_key - - ffj_t_SNMPStatistics_IPStats + ffj_t_TTYInfo_WindowSizebase = iota + ffj_t_TTYInfo_WindowSizeno_such_key - ffj_t_SNMPStatistics_ICMPStats - - ffj_t_SNMPStatistics_TCPStats + ffj_t_TTYInfo_WindowSize_Rows - ffj_t_SNMPStatistics_UDPStats + ffj_t_TTYInfo_WindowSize_Columns ) -var ffj_key_SNMPStatistics_IPStats = []byte("ip_stats") - -var ffj_key_SNMPStatistics_ICMPStats = []byte("icmp_stats") +var ffj_key_TTYInfo_WindowSize_Rows = []byte("rows") -var ffj_key_SNMPStatistics_TCPStats = []byte("tcp_stats") - -var ffj_key_SNMPStatistics_UDPStats = []byte("udp_stats") +var ffj_key_TTYInfo_WindowSize_Columns = []byte("columns") -func (uj *SNMPStatistics) UnmarshalJSON(input []byte) error { +func (uj *TTYInfo_WindowSize) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) } -func (uj *SNMPStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { +func (uj *TTYInfo_WindowSize) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { var err error = nil - currentKey := ffj_t_SNMPStatisticsbase + currentKey := ffj_t_TTYInfo_WindowSizebase _ = currentKey tok := fflib.FFTok_init wantedTok := fflib.FFTok_init @@ -35679,68 +39252,43 @@ mainparse: kn := fs.Output.Bytes() if len(kn) <= 0 { // "" case. hrm. - currentKey = ffj_t_SNMPStatisticsno_such_key + currentKey = ffj_t_TTYInfo_WindowSizeno_such_key state = fflib.FFParse_want_colon goto mainparse } else { switch kn[0] { - case 'i': - - if bytes.Equal(ffj_key_SNMPStatistics_IPStats, kn) { - currentKey = ffj_t_SNMPStatistics_IPStats - state = fflib.FFParse_want_colon - goto mainparse - - } else if bytes.Equal(ffj_key_SNMPStatistics_ICMPStats, kn) { - currentKey = ffj_t_SNMPStatistics_ICMPStats - state = fflib.FFParse_want_colon - goto mainparse - } - - case 't': + case 'c': - if bytes.Equal(ffj_key_SNMPStatistics_TCPStats, kn) { - currentKey = ffj_t_SNMPStatistics_TCPStats + if bytes.Equal(ffj_key_TTYInfo_WindowSize_Columns, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Columns state = fflib.FFParse_want_colon goto mainparse } - case 'u': + case 'r': - if bytes.Equal(ffj_key_SNMPStatistics_UDPStats, kn) { - currentKey = ffj_t_SNMPStatistics_UDPStats + if bytes.Equal(ffj_key_TTYInfo_WindowSize_Rows, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Rows state = fflib.FFParse_want_colon goto mainparse } } - if fflib.EqualFoldRight(ffj_key_SNMPStatistics_UDPStats, kn) { - currentKey = ffj_t_SNMPStatistics_UDPStats - state = fflib.FFParse_want_colon - goto mainparse - } - - if fflib.EqualFoldRight(ffj_key_SNMPStatistics_TCPStats, kn) { - currentKey = ffj_t_SNMPStatistics_TCPStats + if fflib.EqualFoldRight(ffj_key_TTYInfo_WindowSize_Columns, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Columns state = fflib.FFParse_want_colon goto mainparse } - if fflib.EqualFoldRight(ffj_key_SNMPStatistics_ICMPStats, kn) { - currentKey = ffj_t_SNMPStatistics_ICMPStats + if fflib.EqualFoldRight(ffj_key_TTYInfo_WindowSize_Rows, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Rows state = fflib.FFParse_want_colon goto mainparse } - if fflib.EqualFoldRight(ffj_key_SNMPStatistics_IPStats, kn) { - currentKey = ffj_t_SNMPStatistics_IPStats - state = fflib.FFParse_want_colon - goto mainparse - } - - currentKey = ffj_t_SNMPStatisticsno_such_key + currentKey = ffj_t_TTYInfo_WindowSizeno_such_key state = fflib.FFParse_want_colon goto mainparse } @@ -35757,19 +39305,13 @@ mainparse: if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { switch currentKey { - case ffj_t_SNMPStatistics_IPStats: - goto handle_IPStats + case ffj_t_TTYInfo_WindowSize_Rows: + goto handle_Rows - case ffj_t_SNMPStatistics_ICMPStats: - goto handle_ICMPStats + case ffj_t_TTYInfo_WindowSize_Columns: + goto handle_Columns - case ffj_t_SNMPStatistics_TCPStats: - goto handle_TCPStats - - case ffj_t_SNMPStatistics_UDPStats: - goto handle_UDPStats - - case ffj_t_SNMPStatisticsno_such_key: + case ffj_t_TTYInfo_WindowSizeno_such_key: err = fs.SkipField(tok) if err != nil { return fs.WrapErr(err) @@ -35783,109 +39325,61 @@ mainparse: } } -handle_IPStats: +handle_Rows: - /* handler: uj.IPStats type=mesos.IpStatistics kind=struct quoted=false*/ + /* handler: uj.Rows type=uint32 kind=uint32 quoted=false*/ { - if tok == fflib.FFTok_null { - - uj.IPStats = nil - - state = fflib.FFParse_after_value - goto mainparse - } - - if uj.IPStats == nil { - uj.IPStats = new(IpStatistics) - } - - err = uj.IPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) } - state = fflib.FFParse_after_value } - state = fflib.FFParse_after_value - goto mainparse - -handle_ICMPStats: - - /* handler: uj.ICMPStats type=mesos.IcmpStatistics kind=struct quoted=false*/ - { + if tok == fflib.FFTok_null { - uj.ICMPStats = nil + } else { - state = fflib.FFParse_after_value - goto mainparse - } + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) - if uj.ICMPStats == nil { - uj.ICMPStats = new(IcmpStatistics) - } + if err != nil { + return fs.WrapErr(err) + } + + uj.Rows = uint32(tval) - err = uj.ICMPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err } - state = fflib.FFParse_after_value } state = fflib.FFParse_after_value goto mainparse -handle_TCPStats: +handle_Columns: - /* handler: uj.TCPStats type=mesos.TcpStatistics kind=struct quoted=false*/ + /* handler: uj.Columns type=uint32 kind=uint32 quoted=false*/ { - if tok == fflib.FFTok_null { - - uj.TCPStats = nil - - state = fflib.FFParse_after_value - goto mainparse - } - - if uj.TCPStats == nil { - uj.TCPStats = new(TcpStatistics) - } - - err = uj.TCPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) } - state = fflib.FFParse_after_value } - state = fflib.FFParse_after_value - goto mainparse - -handle_UDPStats: - - /* handler: uj.UDPStats type=mesos.UdpStatistics kind=struct quoted=false*/ - { + if tok == fflib.FFTok_null { - uj.UDPStats = nil + } else { - state = fflib.FFParse_after_value - goto mainparse - } + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) - if uj.UDPStats == nil { - uj.UDPStats = new(UdpStatistics) - } + if err != nil { + return fs.WrapErr(err) + } + + uj.Columns = uint32(tval) - err = uj.UDPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) - if err != nil { - return err } - state = fflib.FFParse_after_value } state = fflib.FFParse_after_value @@ -37546,6 +41040,21 @@ func (mj *TaskInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } + if mj.Check != nil { + if true { + buf.WriteString(`"check":`) + + { + + err = mj.Check.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } if mj.KillPolicy != nil { if true { buf.WriteString(`"kill_policy":`) @@ -37631,6 +41140,8 @@ const ( ffj_t_TaskInfo_HealthCheck + ffj_t_TaskInfo_Check + ffj_t_TaskInfo_KillPolicy ffj_t_TaskInfo_Data @@ -37656,6 +41167,8 @@ var ffj_key_TaskInfo_Container = []byte("container") var ffj_key_TaskInfo_HealthCheck = []byte("health_check") +var ffj_key_TaskInfo_Check = []byte("check") + var ffj_key_TaskInfo_KillPolicy = []byte("kill_policy") var ffj_key_TaskInfo_Data = []byte("data") @@ -37742,6 +41255,11 @@ mainparse: currentKey = ffj_t_TaskInfo_Container state = fflib.FFParse_want_colon goto mainparse + + } else if bytes.Equal(ffj_key_TaskInfo_Check, kn) { + currentKey = ffj_t_TaskInfo_Check + state = fflib.FFParse_want_colon + goto mainparse } case 'd': @@ -37839,6 +41357,12 @@ mainparse: goto mainparse } + if fflib.EqualFoldRight(ffj_key_TaskInfo_Check, kn) { + currentKey = ffj_t_TaskInfo_Check + state = fflib.FFParse_want_colon + goto mainparse + } + if fflib.EqualFoldRight(ffj_key_TaskInfo_HealthCheck, kn) { currentKey = ffj_t_TaskInfo_HealthCheck state = fflib.FFParse_want_colon @@ -37928,6 +41452,9 @@ mainparse: case ffj_t_TaskInfo_HealthCheck: goto handle_HealthCheck + case ffj_t_TaskInfo_Check: + goto handle_Check + case ffj_t_TaskInfo_KillPolicy: goto handle_KillPolicy @@ -38199,6 +41726,33 @@ handle_HealthCheck: state = fflib.FFParse_after_value goto mainparse +handle_Check: + + /* handler: uj.Check type=mesos.CheckInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Check = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Check == nil { + uj.Check = new(CheckInfo) + } + + err = uj.Check.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + handle_KillPolicy: /* handler: uj.KillPolicy type=mesos.KillPolicy kind=struct quoted=false*/ @@ -38491,6 +42045,21 @@ func (mj *TaskStatus) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } + if mj.CheckStatus != nil { + if true { + buf.WriteString(`"check_status":`) + + { + + err = mj.CheckStatus.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } if mj.Labels != nil { if true { buf.WriteString(`"labels":`) @@ -38567,6 +42136,8 @@ const ( ffj_t_TaskStatus_Healthy + ffj_t_TaskStatus_CheckStatus + ffj_t_TaskStatus_Labels ffj_t_TaskStatus_ContainerStatus @@ -38596,6 +42167,8 @@ var ffj_key_TaskStatus_UUID = []byte("uuid") var ffj_key_TaskStatus_Healthy = []byte("healthy") +var ffj_key_TaskStatus_CheckStatus = []byte("check_status") + var ffj_key_TaskStatus_Labels = []byte("labels") var ffj_key_TaskStatus_ContainerStatus = []byte("container_status") @@ -38671,7 +42244,12 @@ mainparse: case 'c': - if bytes.Equal(ffj_key_TaskStatus_ContainerStatus, kn) { + if bytes.Equal(ffj_key_TaskStatus_CheckStatus, kn) { + currentKey = ffj_t_TaskStatus_CheckStatus + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskStatus_ContainerStatus, kn) { currentKey = ffj_t_TaskStatus_ContainerStatus state = fflib.FFParse_want_colon goto mainparse @@ -38784,6 +42362,12 @@ mainparse: goto mainparse } + if fflib.EqualFoldRight(ffj_key_TaskStatus_CheckStatus, kn) { + currentKey = ffj_t_TaskStatus_CheckStatus + state = fflib.FFParse_want_colon + goto mainparse + } + if fflib.SimpleLetterEqualFold(ffj_key_TaskStatus_Healthy, kn) { currentKey = ffj_t_TaskStatus_Healthy state = fflib.FFParse_want_colon @@ -38900,6 +42484,9 @@ mainparse: case ffj_t_TaskStatus_Healthy: goto handle_Healthy + case ffj_t_TaskStatus_CheckStatus: + goto handle_CheckStatus + case ffj_t_TaskStatus_Labels: goto handle_Labels @@ -39258,6 +42845,33 @@ handle_Healthy: state = fflib.FFParse_after_value goto mainparse +handle_CheckStatus: + + /* handler: uj.CheckStatus type=mesos.CheckStatusInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.CheckStatus = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.CheckStatus == nil { + uj.CheckStatus = new(CheckStatusInfo) + } + + err = uj.CheckStatus.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + handle_Labels: /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ @@ -45859,24 +49473,18 @@ func (mj *Volume_Source_SandboxPath) MarshalJSONBuf(buf fflib.EncodingBuffer) er var obj []byte _ = obj _ = err - buf.WriteByte('{') - if mj.Type != nil { - if true { - buf.WriteString(`"type":`) - - { + buf.WriteString(`{"type":`) - obj, err = mj.Type.MarshalJSON() - if err != nil { - return err - } - buf.Write(obj) + { - } - buf.WriteByte(',') + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err } + buf.Write(obj) + } - buf.WriteString(`"path":`) + buf.WriteString(`,"path":`) fflib.WriteJsonString(buf, string(mj.Path)) buf.WriteByte('}') return nil @@ -46028,8 +49636,6 @@ handle_Type: { if tok == fflib.FFTok_null { - uj.Type = nil - state = fflib.FFParse_after_value goto mainparse } @@ -46039,10 +49645,6 @@ handle_Type: return fs.WrapErr(err) } - if uj.Type == nil { - uj.Type = new(Volume_Source_SandboxPath_Type) - } - err = uj.Type.UnmarshalJSON(tbuf) if err != nil { return fs.WrapErr(err) diff --git a/api/v1/lib/mesos.proto b/api/v1/lib/mesos.proto index 189d6e8a..3b6a22c1 100644 --- a/api/v1/lib/mesos.proto +++ b/api/v1/lib/mesos.proto @@ -268,9 +268,19 @@ message FrameworkInfo { // the cost of a (usually small) increase in disk I/O. optional bool checkpoint = 5 [default = false]; - // Used to group frameworks for allocation decisions, depending on - // the allocation policy being used. + // Roles are the entities to which allocations are made. + // The framework must have at least one role in order to + // be offered resources. Note that `role` is deprecated + // in favor of `roles` and only one of these fields must + // be used. Since we cannot distinguish between empty + // `roles` and the default unset `role`, we require that + // frameworks set the `MULTI_ROLE` capability if + // setting the `roles` field. + // + // NOTE: The implmentation for supporting `roles` + // is not complete, DO NOT USE the `roles` field. optional string role = 6 [default = "*"]; + repeated string roles = 12; // EXPERIMENTAL. // Used to indicate the current host from which the scheduler is // registered in the Mesos Web UI. If set to an empty string Mesos @@ -342,6 +352,18 @@ message FrameworkInfo { // failed over). PARTITION_AWARE = 5; + // This expresses the ability for the framework to be + // "multi-tenant" via using the newly introduced `roles` + // field, and examining `Offer.allocation_info` to determine + // which role the offers are being made to. We also + // expect that "single-tenant" schedulers eventually + // provide this and move away from the deprecated + // `role` field. + // + // NOTE: The implementation for supporting multiple + // roles is not complete, DO NOT USE THIS. + MULTI_ROLE = 6; // EXPERIMENTAL. + option (gogoproto.goproto_enum_prefix) = true; } @@ -362,6 +384,82 @@ message FrameworkInfo { } +/** + * Describes a general non-interpreting non-killing check for a task or + * executor (or any arbitrary process/command). A type is picked by + * specifying one of the optional fields. Specifying more than one type + * is an error. + * + * NOTE: This API is unstable and the related feature is experimental. + */ +message CheckInfo { + enum Type { + UNKNOWN = 0; + COMMAND = 1; + HTTP = 2; + + // TODO(alexr): Consider supporting TCP checks and custom user checks. + // The latter should probably be paired with a `data` field and + // complemented by a `data` response in `CheckStatusInfo`. + + option (gogoproto.goproto_enum_prefix) = true; + } + + // Describes a command check. If applicable, enters mount and/or network + // namespaces of the task. + message Command { + required CommandInfo command = 1 [(gogoproto.nullable) = false]; + } + + // Describes an HTTP check. Sends a GET request to + // http://:port/path. Note that is not configurable and is + // resolved automatically to 127.0.0.1. + message Http { + // Port to send the HTTP request. + required uint32 port = 1 [(gogoproto.nullable) = false]; + + // HTTP request path. + optional string path = 2; + + // TODO(alexr): Add support for HTTP method. While adding POST + // and PUT is simple, supporting payload is more involved. + + // TODO(alexr): Add support for custom HTTP headers. + + // TODO(alexr): Consider adding an optional message to describe TLS + // options and thus enabling https. Such message might contain certificate + // validation, TLS version. + } + + // The type of the check. + optional Type type = 1 [(gogoproto.nullable) = false]; + + // Command check. + optional Command command = 2; + + // HTTP check. + optional Http http = 3 [(gogoproto.customname) = "HTTP"]; + + // Amount of time to wait to start checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STARTING` if the latter + // is used by the executor. + optional double delay_seconds = 4 [default = 15.0]; + + // Interval between check attempts, i.e., amount of time to wait after + // the previous check finished or timed out to start the next check. + optional double interval_seconds = 5 [default = 10.0]; + + // Amount of time to wait for the check to complete. Zero means infinite + // timeout. + // + // After this timeout, the check attempt is aborted and no result is + // reported. Note that this may be considered a state change and hence + // may trigger a check status change delivery to the corresponding + // scheduler. See `CheckStatusInfo` for more details. + optional double timeout_seconds = 6 [default = 20.0]; +} + + /** * Describes a health check for a task or executor (or any arbitrary * process/command). A type is picked by specifying one of the @@ -426,26 +524,36 @@ message HealthCheck { // allows doing something similar to the HTTP strategy but // encapsulates all the details in a single string field. - // Amount of time to wait until starting the health checks. + // Amount of time to wait to start health checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STATING` if the latter is + // used by the executor. optional double delay_seconds = 2 [default = 15.0]; - // Interval between health checks. + // Interval between health checks, i.e., amount of time to wait after + // the previous health check finished or timed out to start the next + // health check. optional double interval_seconds = 3 [default = 10.0]; - // Amount of time to wait for the health check to complete. + // Amount of time to wait for the health check to complete. After this + // timeout, the health check is aborted and treated as a failure. Zero + // means infinite timeout. optional double timeout_seconds = 4 [default = 20.0]; - // Number of consecutive failures until signaling kill task. + // Number of consecutive failures until the task is killed by the executor. optional uint32 consecutive_failures = 5 [default = 3]; - // Amount of time to allow failed health checks since launch. + // Amount of time after the task is launched during which health check + // failures are ignored. Once the a check succeeds for the first time, + // the grace period does not apply anymore. Note that it includes + // `delay_seconds`, i.e., setting `grace_period_seconds` < `delay_seconds` + // has no effect. optional double grace_period_seconds = 6 [default = 10.0]; // TODO(alexr): Add an optional `KillPolicy` that should be used // if the task is killed because of a health check failure. // The type of health check. - optional Type type = 8; + optional Type type = 8 [(gogoproto.nullable) = false]; // Command health check. optional CommandInfo command = 7; @@ -573,6 +681,9 @@ message ExecutorInfo { // // 2) Default executor only accepts a *single* `LAUNCH` or `LAUNCH_GROUP` // offer operation. + // + // 3) If `container` is set, `container.type` must be `MESOS` + // and `container.mesos.image` must not be set. DEFAULT = 1; // For frameworks that need custom functionality to run tasks, a `CUSTOM` @@ -590,7 +701,7 @@ message ExecutorInfo { // // TODO(vinod): Add support for explicitly setting `type` to `DEFAULT ` // in `LAUNCH` offer operation. - optional Type type = 15; + optional Type type = 15 [(gogoproto.nullable) = false]; required ExecutorID executor_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ExecutorID"]; optional FrameworkID framework_id = 8 [(gogoproto.customname) = "FrameworkID"]; // TODO(benh): Make this required. @@ -693,6 +804,28 @@ message AgentInfo { repeated Resource resources = 3 [(gogoproto.nullable) = false]; repeated Attribute attributes = 5 [(gogoproto.nullable) = false]; optional AgentID id = 6 [(gogoproto.customname) = "ID"]; + + message Capability { + enum Type { + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + UNKNOWN = 0; + + // This expresses the ability for the agent to be able + // to launch tasks of a 'multi-role' framework. + // + // NOTE: The implementation for supporting multiple + // roles is not complete, DO NOT USE THIS. + MULTI_ROLE = 1; // EXPERIMENTAL. + + option (gogoproto.goproto_enum_prefix) = true; + } + + // Enum fields should be optional, see: MESOS-4997. + optional Type type = 1 [(gogoproto.nullable) = false]; + } } @@ -785,6 +918,24 @@ message Resource { // be offered to frameworks that belong to this role. optional string role = 6 [default = "*"]; + // This was initially introduced to support MULTI_ROLE capable + // frameworks. Frameworks that are not MULTI_ROLE capable can + // continue to assume that the offered resources are allocated + // to their role. + // + // NOTE: Implementation of this is in-progress, DO NOT USE! + message AllocationInfo { + // If set, this resource is allocated to a role. Note that in the + // future, this may be unset and the scheduler may be responsible + // for allocating to one of its roles. + optional string role = 1; + + // In the future, we may add additional fields here, e.g. priority + // tier, type of allocation (quota / fair share). + } + + optional AllocationInfo allocation_info = 11; + message ReservationInfo { // Describes a dynamic reservation. A dynamic reservation is // acquired by an operator via the '/reserve' HTTP endpoint or by @@ -883,7 +1034,7 @@ message Resource { required string root = 1 [(gogoproto.nullable) = false]; } - required Type type = 1; // nullable since default of PATH == 1 + required Type type = 1; optional Path path = 2; optional Mount mount = 3; } @@ -1305,6 +1456,14 @@ message Offer { // `Unavailability` for more details. optional Unavailability unavailability = 9; + // An offer represents resources allocated to *one* of the + // roles managed by the scheduler. (Therefore, each + // `Offer.resources[i].allocation_info` will match the + // top level `Offer.allocation_info`). + // + // NOTE: Implementation of this is in-progress, DO NOT USE! + optional Resource.AllocationInfo allocation_info = 10; + // Defines an operation that can be performed against offers. message Operation { enum Type { @@ -1352,7 +1511,7 @@ message Offer { repeated Resource volumes = 1 [(gogoproto.nullable) = false]; } - optional Type type = 1; + optional Type type = 1 [(gogoproto.nullable) = false]; optional Launch launch = 2; optional LaunchGroup launch_group = 7; optional Reserve reserve = 3; @@ -1438,8 +1597,18 @@ message TaskInfo { // the executor's responsibility to implement the health checking. optional HealthCheck health_check = 8; + // A general check for the task. Implemented for all built-in executors. + // For tasks that specify an executor, it is the executor's responsibility + // to implement checking support. Executors should (all built-in executors + // will) neither interpret nor act on the check's result. + // + // NOTE: Check support in built-in executors is experimental. + // + // TODO(alexr): Consider supporting multiple checks per task. + optional CheckInfo check = 13; + // A kill policy for the task. Implemented for executor-less - // command-based and docker tasks. For tasks that specify other + // command-based and docker tasks. For tasks that specify an // executor, it is the executor's responsibility to implement // the kill policy. optional KillPolicy kill_policy = 12; @@ -1547,7 +1716,7 @@ enum TaskState { TASK_KILLED = 4; // TERMINAL: The task was killed by the executor. TASK_ERROR = 7; // TERMINAL: The task description contains an error. - // In Mesos 1.2, this will only be sent when the framework does NOT + // In Mesos 1.3, this will only be sent when the framework does NOT // opt-in to the PARTITION_AWARE capability. TASK_LOST = 5; // TERMINAL: The task failed but can be rescheduled. @@ -1565,10 +1734,12 @@ enum TaskState { // may or may not still be running. TASK_UNREACHABLE = 10; - // The task was running on an agent that has been shutdown (e.g., - // the agent become partitioned, rebooted, and then reconnected to - // the master; any tasks running before the reboot will transition - // from UNREACHABLE to GONE). The task is no longer running. + // The task is no longer running. This can occur if the agent has + // been terminated along with all of its tasks (e.g., the host that + // was running the agent was rebooted). It might also occur if the + // task was terminated due to an agent or containerizer error, or if + // the task was preempted by the QoS controller in an + // oversubscription scenario. TASK_GONE = 11; // TERMINAL. // The task was running on an agent that the master cannot contact; @@ -1588,6 +1759,49 @@ enum TaskState { } +/** +* Describes the status of a check. Type and the corresponding field, i.e., +* `command` or `http` must be set. If the result of the check is not available +* (e.g., the check timed out), these fields must contain empty messages, i.e., +* `exit_code` or `status_code` will be unset. +* +* NOTE: This API is unstable and the related feature is experimental. +*/ +message CheckStatusInfo { + message Command { + // Exit code of a command check. + optional int32 exit_code = 1; + } + + message Http { + // HTTP status code of an HTTP check. + optional uint32 status_code = 1; + } + + // TODO(alexr): Consider adding a `data` field, which can contain, e.g., + // truncated stdout/stderr output for command checks or HTTP response body + // for HTTP checks. Alternatively, it can be an even shorter `message` field + // containing the last line of stdout or Reason-Phrase of the status line of + // the HTTP response. + + // The type of the check this status corresponds to. + optional CheckInfo.Type type = 1; + + // Status of a command check. + optional Command command = 2; + + // Status of an HTTP check. + optional Http http = 3 [(gogoproto.customname) = "HTTP"]; + + // TODO(alexr): Consider introducing a "last changed at" timestamp, since + // task status update's timestamp may not correspond to the last check's + // state, e.g., for reconciliation. + + // TODO(alexr): Consider introducing a `reason` enum here to explicitly + // distinguish between completed, delayed, and timed out checks. +} + + /** * Describes the current status of a task. */ @@ -1623,6 +1837,7 @@ message TaskStatus { REASON_GC_ERROR = 4; REASON_INVALID_FRAMEWORKID = 5; REASON_INVALID_OFFERS = 6; + REASON_IO_SWITCHBOARD_EXITED = 27; REASON_MASTER_DISCONNECTED = 7; REASON_RECONCILIATION = 9; REASON_RESOURCES_UNKNOWN = 18; @@ -1630,6 +1845,7 @@ message TaskStatus { REASON_AGENT_REMOVED = 11; REASON_AGENT_RESTARTED = 12; REASON_AGENT_UNKNOWN = 13; + REASON_TASK_CHECK_STATUS_UPDATED = 28; REASON_TASK_GROUP_INVALID = 25; REASON_TASK_GROUP_UNAUTHORIZED = 26; REASON_TASK_INVALID = 14; @@ -1658,11 +1874,23 @@ message TaskStatus { // to a valid RFC-4122 UUID if using the HTTP API. optional bytes uuid = 11 [(gogoproto.customname) = "UUID"]; - // Describes whether the task has been determined to be healthy - // (true) or unhealthy (false) according to the HealthCheck field in - // the command info. + // Describes whether the task has been determined to be healthy (true) or + // unhealthy (false) according to the `health_check` field in `TaskInfo`. optional bool healthy = 8; + // Contains check status for the check specified in the corresponding + // `TaskInfo`. If no check has been specified, this field must be + // absent, otherwise it must be present even if the check status is + // not available yet. If the status update is triggered for a different + // reason than `REASON_TASK_CHECK_STATUS_UPDATED`, this field will contain + // the last known value. + // + // NOTE: A check-related task status update is triggered if and only if + // the value or presence of any field in `CheckStatusInfo` changes. + // + // NOTE: Check support in built-in executors is experimental. + optional CheckStatusInfo check_status = 15; + // Labels are free-form key value pairs which are exposed through // master and agent endpoints. Labels will not be interpreted or // acted upon by Mesos itself. As opposed to the data field, labels @@ -1706,7 +1934,10 @@ message Filters { message Environment { message Variable { required string name = 1 [(gogoproto.nullable) = false]; - required string value = 2 [(gogoproto.nullable) = false]; + // NOTE: The `value` field was made optional in Mesos 1.2 but it + // is currently enforced to be set. This constraint will be + // removed in a future version. + optional string value = 2; } repeated Variable variables = 1 [(gogoproto.nullable) = false]; @@ -1839,7 +2070,7 @@ message Image { optional Credential credential = 2; } - required Type type = 1; // nullable since the default APPC == 1 + required Type type = 1; // Only one of the following image messages should be set to match // the type. @@ -1922,7 +2153,7 @@ message Volume { option (gogoproto.goproto_enum_prefix) = true; } - optional Type type = 1; + optional Type type = 1 [(gogoproto.nullable) = false]; // A path relative to the corresponding container's sandbox. // Note that upwards traversal (i.e. ../../abc) is not allowed. @@ -2098,9 +2329,72 @@ message LinuxInfo { } +/** +* Encapsulation for POSIX rlimits, see +* http://pubs.opengroup.org/onlinepubs/009695399/functions/getrlimit.html. +* Note that some types might only be defined for Linux. +* We use a custom prefix to avoid conflict with existing system macros +* (e.g., `RLIMIT_CPU` or `NOFILE`). +*/ +message RLimitInfo { + message RLimit { + enum Type { + UNKNOWN = 0; + RLMT_AS = 1; + RLMT_CORE = 2; + RLMT_CPU = 3; + RLMT_DATA = 4; + RLMT_FSIZE = 5; + RLMT_LOCKS = 6; + RLMT_MEMLOCK = 7; + RLMT_MSGQUEUE = 8; + RLMT_NICE = 9; + RLMT_NOFILE = 10; + RLMT_NPROC = 11; + RLMT_RSS = 12; + RLMT_RTPRIO = 13; + RLMT_RTTIME = 14; + RLMT_SIGPENDING = 15; + RLMT_STACK = 16; + option (gogoproto.goproto_enum_prefix) = true; + } + optional Type type = 1 [(gogoproto.nullable) = false]; + + // Either both are set or both are not set. + // If both are not set, it represents unlimited. + // If both are set, we require `soft` <= `hard`. + optional uint64 hard = 2; + optional uint64 soft = 3; + } + + repeated RLimit rlimits = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Describes the information about (pseudo) TTY that can + * be attached to a process running in a container. + */ +message TTYInfo { + message WindowSize { + required uint32 rows = 1 [(gogoproto.nullable) = false]; + required uint32 columns = 2 [(gogoproto.nullable) = false]; + } + + optional WindowSize window_size = 1; +} + + /** * Describes a container configuration and allows extensible * configurations for different container implementations. + * + * NOTE: `ContainerInfo` may be specified, e.g., by a task, even if no + * container image is provided. In this case neither `MesosInfo` nor + * `DockerInfo` is set, the required `type` must be `MESOS`. This is to + * address a case when a task without an image, e.g., a shell script + * with URIs, wants to use features originally designed for containers, + * for example custom network isolation via `NetworkInfo`. */ message ContainerInfo { // All container implementation types. @@ -2155,7 +2449,7 @@ message ContainerInfo { optional Image image = 1; } - required Type type = 1; // nullable since the default DOCKER == 1 + required Type type = 1; repeated Volume volumes = 2 [(gogoproto.nullable) = false]; optional string hostname = 4; @@ -2170,6 +2464,12 @@ message ContainerInfo { // Linux specific information for the container. optional LinuxInfo linux_info = 8; + + // (POSIX only) rlimits of the container. + optional RLimitInfo rlimit_info = 9; + + // If specified a tty will be attached to the container entrypoint. + optional TTYInfo tty_info = 10 [(gogoproto.customname) = "TTYInfo"]; } @@ -2179,6 +2479,8 @@ message ContainerInfo { * TaskStatus message. */ message ContainerStatus { + optional ContainerID container_id = 4 [(gogoproto.customname) = "ContainerID"]; + // This field can be reliably used to identify the container IP address. repeated NetworkInfo network_infos = 1 [(gogoproto.nullable) = false]; diff --git a/api/v1/lib/mesospb_test.go b/api/v1/lib/mesospb_test.go index 60b6ac0d..c1518928 100644 --- a/api/v1/lib/mesospb_test.go +++ b/api/v1/lib/mesospb_test.go @@ -23,6 +23,7 @@ It has these top-level messages: MachineID MachineInfo FrameworkInfo + CheckInfo HealthCheck KillPolicy CommandInfo @@ -47,6 +48,7 @@ It has these top-level messages: TaskInfo TaskGroupInfo Task + CheckStatusInfo TaskStatus Filters Environment @@ -61,6 +63,8 @@ It has these top-level messages: NetworkInfo CapabilityInfo LinuxInfo + RLimitInfo + TTYInfo ContainerInfo ContainerStatus CgroupInfo @@ -1625,15 +1629,15 @@ func BenchmarkFrameworkInfo_CapabilityProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestHealthCheckProto(t *testing.T) { +func TestCheckInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, false) + p := NewPopulatedCheckInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck{} + msg := &CheckInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1659,10 +1663,10 @@ func TestHealthCheckProto(t *testing.T) { } } -func TestHealthCheckMarshalTo(t *testing.T) { +func TestCheckInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck(popr, false) + p := NewPopulatedCheckInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1672,7 +1676,7 @@ func TestHealthCheckMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck{} + msg := &CheckInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1687,12 +1691,12 @@ func TestHealthCheckMarshalTo(t *testing.T) { } } -func BenchmarkHealthCheckProtoMarshal(b *testing.B) { +func BenchmarkCheckInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*HealthCheck, 10000) + pops := make([]*CheckInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHealthCheck(popr, false) + pops[i] = NewPopulatedCheckInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1705,18 +1709,18 @@ func BenchmarkHealthCheckProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkHealthCheckProtoUnmarshal(b *testing.B) { +func BenchmarkCheckInfoProtoUnmarshal(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(NewPopulatedHealthCheck(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCheckInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &HealthCheck{} + msg := &CheckInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1727,15 +1731,15 @@ func BenchmarkHealthCheckProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestHealthCheck_HTTPCheckInfoProto(t *testing.T) { +func TestCheckInfo_CommandProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTPCheckInfo(popr, false) + p := NewPopulatedCheckInfo_Command(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck_HTTPCheckInfo{} + msg := &CheckInfo_Command{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1761,10 +1765,10 @@ func TestHealthCheck_HTTPCheckInfoProto(t *testing.T) { } } -func TestHealthCheck_HTTPCheckInfoMarshalTo(t *testing.T) { +func TestCheckInfo_CommandMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_HTTPCheckInfo(popr, false) + p := NewPopulatedCheckInfo_Command(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1774,7 +1778,7 @@ func TestHealthCheck_HTTPCheckInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck_HTTPCheckInfo{} + msg := &CheckInfo_Command{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1789,12 +1793,12 @@ func TestHealthCheck_HTTPCheckInfoMarshalTo(t *testing.T) { } } -func BenchmarkHealthCheck_HTTPCheckInfoProtoMarshal(b *testing.B) { +func BenchmarkCheckInfo_CommandProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*HealthCheck_HTTPCheckInfo, 10000) + pops := make([]*CheckInfo_Command, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHealthCheck_HTTPCheckInfo(popr, false) + pops[i] = NewPopulatedCheckInfo_Command(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1807,18 +1811,18 @@ func BenchmarkHealthCheck_HTTPCheckInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkHealthCheck_HTTPCheckInfoProtoUnmarshal(b *testing.B) { +func BenchmarkCheckInfo_CommandProtoUnmarshal(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(NewPopulatedHealthCheck_HTTPCheckInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCheckInfo_Command(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &HealthCheck_HTTPCheckInfo{} + msg := &CheckInfo_Command{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1829,15 +1833,15 @@ func BenchmarkHealthCheck_HTTPCheckInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestHealthCheck_TCPCheckInfoProto(t *testing.T) { +func TestCheckInfo_HttpProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_TCPCheckInfo(popr, false) + p := NewPopulatedCheckInfo_Http(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck_TCPCheckInfo{} + msg := &CheckInfo_Http{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1863,10 +1867,10 @@ func TestHealthCheck_TCPCheckInfoProto(t *testing.T) { } } -func TestHealthCheck_TCPCheckInfoMarshalTo(t *testing.T) { +func TestCheckInfo_HttpMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHealthCheck_TCPCheckInfo(popr, false) + p := NewPopulatedCheckInfo_Http(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1876,7 +1880,7 @@ func TestHealthCheck_TCPCheckInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &HealthCheck_TCPCheckInfo{} + msg := &CheckInfo_Http{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1891,12 +1895,12 @@ func TestHealthCheck_TCPCheckInfoMarshalTo(t *testing.T) { } } -func BenchmarkHealthCheck_TCPCheckInfoProtoMarshal(b *testing.B) { +func BenchmarkCheckInfo_HttpProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*HealthCheck_TCPCheckInfo, 10000) + pops := make([]*CheckInfo_Http, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedHealthCheck_TCPCheckInfo(popr, false) + pops[i] = NewPopulatedCheckInfo_Http(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -1909,18 +1913,18 @@ func BenchmarkHealthCheck_TCPCheckInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkHealthCheck_TCPCheckInfoProtoUnmarshal(b *testing.B) { +func BenchmarkCheckInfo_HttpProtoUnmarshal(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(NewPopulatedHealthCheck_TCPCheckInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCheckInfo_Http(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &HealthCheck_TCPCheckInfo{} + msg := &CheckInfo_Http{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -1931,15 +1935,15 @@ func BenchmarkHealthCheck_TCPCheckInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestKillPolicyProto(t *testing.T) { +func TestHealthCheckProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKillPolicy(popr, false) + p := NewPopulatedHealthCheck(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &KillPolicy{} + msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1965,10 +1969,10 @@ func TestKillPolicyProto(t *testing.T) { } } -func TestKillPolicyMarshalTo(t *testing.T) { +func TestHealthCheckMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKillPolicy(popr, false) + p := NewPopulatedHealthCheck(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -1978,7 +1982,7 @@ func TestKillPolicyMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &KillPolicy{} + msg := &HealthCheck{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -1993,12 +1997,12 @@ func TestKillPolicyMarshalTo(t *testing.T) { } } -func BenchmarkKillPolicyProtoMarshal(b *testing.B) { +func BenchmarkHealthCheckProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*KillPolicy, 10000) + pops := make([]*HealthCheck, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKillPolicy(popr, false) + pops[i] = NewPopulatedHealthCheck(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2011,18 +2015,18 @@ func BenchmarkKillPolicyProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkKillPolicyProtoUnmarshal(b *testing.B) { +func BenchmarkHealthCheckProtoUnmarshal(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(NewPopulatedKillPolicy(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheck(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &KillPolicy{} + msg := &HealthCheck{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2033,15 +2037,15 @@ func BenchmarkKillPolicyProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfoProto(t *testing.T) { +func TestHealthCheck_HTTPCheckInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, false) + p := NewPopulatedHealthCheck_HTTPCheckInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo{} + msg := &HealthCheck_HTTPCheckInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2067,10 +2071,10 @@ func TestCommandInfoProto(t *testing.T) { } } -func TestCommandInfoMarshalTo(t *testing.T) { +func TestHealthCheck_HTTPCheckInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo(popr, false) + p := NewPopulatedHealthCheck_HTTPCheckInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2080,7 +2084,7 @@ func TestCommandInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo{} + msg := &HealthCheck_HTTPCheckInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2095,12 +2099,12 @@ func TestCommandInfoMarshalTo(t *testing.T) { } } -func BenchmarkCommandInfoProtoMarshal(b *testing.B) { +func BenchmarkHealthCheck_HTTPCheckInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo, 10000) + pops := make([]*HealthCheck_HTTPCheckInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCommandInfo(popr, false) + pops[i] = NewPopulatedHealthCheck_HTTPCheckInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2113,18 +2117,18 @@ func BenchmarkCommandInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCommandInfoProtoUnmarshal(b *testing.B) { +func BenchmarkHealthCheck_HTTPCheckInfoProtoUnmarshal(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(NewPopulatedCommandInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheck_HTTPCheckInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &CommandInfo{} + msg := &HealthCheck_HTTPCheckInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2135,15 +2139,15 @@ func BenchmarkCommandInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCommandInfo_URIProto(t *testing.T) { +func TestHealthCheck_TCPCheckInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, false) + p := NewPopulatedHealthCheck_TCPCheckInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_URI{} + msg := &HealthCheck_TCPCheckInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2169,10 +2173,10 @@ func TestCommandInfo_URIProto(t *testing.T) { } } -func TestCommandInfo_URIMarshalTo(t *testing.T) { +func TestHealthCheck_TCPCheckInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCommandInfo_URI(popr, false) + p := NewPopulatedHealthCheck_TCPCheckInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2182,7 +2186,7 @@ func TestCommandInfo_URIMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CommandInfo_URI{} + msg := &HealthCheck_TCPCheckInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2197,12 +2201,12 @@ func TestCommandInfo_URIMarshalTo(t *testing.T) { } } -func BenchmarkCommandInfo_URIProtoMarshal(b *testing.B) { +func BenchmarkHealthCheck_TCPCheckInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CommandInfo_URI, 10000) + pops := make([]*HealthCheck_TCPCheckInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCommandInfo_URI(popr, false) + pops[i] = NewPopulatedHealthCheck_TCPCheckInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2215,18 +2219,18 @@ func BenchmarkCommandInfo_URIProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCommandInfo_URIProtoUnmarshal(b *testing.B) { +func BenchmarkHealthCheck_TCPCheckInfoProtoUnmarshal(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(NewPopulatedCommandInfo_URI(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedHealthCheck_TCPCheckInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &CommandInfo_URI{} + msg := &HealthCheck_TCPCheckInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2237,15 +2241,15 @@ func BenchmarkCommandInfo_URIProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestExecutorInfoProto(t *testing.T) { +func TestKillPolicyProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, false) + p := NewPopulatedKillPolicy(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ExecutorInfo{} + msg := &KillPolicy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2271,10 +2275,10 @@ func TestExecutorInfoProto(t *testing.T) { } } -func TestExecutorInfoMarshalTo(t *testing.T) { +func TestKillPolicyMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExecutorInfo(popr, false) + p := NewPopulatedKillPolicy(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2284,7 +2288,7 @@ func TestExecutorInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ExecutorInfo{} + msg := &KillPolicy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2299,12 +2303,12 @@ func TestExecutorInfoMarshalTo(t *testing.T) { } } -func BenchmarkExecutorInfoProtoMarshal(b *testing.B) { +func BenchmarkKillPolicyProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ExecutorInfo, 10000) + pops := make([]*KillPolicy, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedExecutorInfo(popr, false) + pops[i] = NewPopulatedKillPolicy(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2317,18 +2321,18 @@ func BenchmarkExecutorInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkExecutorInfoProtoUnmarshal(b *testing.B) { +func BenchmarkKillPolicyProtoUnmarshal(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(NewPopulatedExecutorInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKillPolicy(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ExecutorInfo{} + msg := &KillPolicy{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2339,15 +2343,15 @@ func BenchmarkExecutorInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestMasterInfoProto(t *testing.T) { +func TestCommandInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, false) + p := NewPopulatedCommandInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &MasterInfo{} + msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2373,10 +2377,10 @@ func TestMasterInfoProto(t *testing.T) { } } -func TestMasterInfoMarshalTo(t *testing.T) { +func TestCommandInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMasterInfo(popr, false) + p := NewPopulatedCommandInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2386,7 +2390,7 @@ func TestMasterInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &MasterInfo{} + msg := &CommandInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2401,12 +2405,12 @@ func TestMasterInfoMarshalTo(t *testing.T) { } } -func BenchmarkMasterInfoProtoMarshal(b *testing.B) { +func BenchmarkCommandInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*MasterInfo, 10000) + pops := make([]*CommandInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMasterInfo(popr, false) + pops[i] = NewPopulatedCommandInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2419,18 +2423,18 @@ func BenchmarkMasterInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkMasterInfoProtoUnmarshal(b *testing.B) { +func BenchmarkCommandInfoProtoUnmarshal(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(NewPopulatedMasterInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &MasterInfo{} + msg := &CommandInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2441,15 +2445,15 @@ func BenchmarkMasterInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAgentInfoProto(t *testing.T) { +func TestCommandInfo_URIProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAgentInfo(popr, false) + p := NewPopulatedCommandInfo_URI(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AgentInfo{} + msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2475,10 +2479,10 @@ func TestAgentInfoProto(t *testing.T) { } } -func TestAgentInfoMarshalTo(t *testing.T) { +func TestCommandInfo_URIMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAgentInfo(popr, false) + p := NewPopulatedCommandInfo_URI(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2488,7 +2492,7 @@ func TestAgentInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &AgentInfo{} + msg := &CommandInfo_URI{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2503,12 +2507,12 @@ func TestAgentInfoMarshalTo(t *testing.T) { } } -func BenchmarkAgentInfoProtoMarshal(b *testing.B) { +func BenchmarkCommandInfo_URIProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*AgentInfo, 10000) + pops := make([]*CommandInfo_URI, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAgentInfo(popr, false) + pops[i] = NewPopulatedCommandInfo_URI(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2521,18 +2525,18 @@ func BenchmarkAgentInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAgentInfoProtoUnmarshal(b *testing.B) { +func BenchmarkCommandInfo_URIProtoUnmarshal(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(NewPopulatedAgentInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCommandInfo_URI(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &AgentInfo{} + msg := &CommandInfo_URI{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2543,15 +2547,15 @@ func BenchmarkAgentInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValueProto(t *testing.T) { +func TestExecutorInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, false) + p := NewPopulatedExecutorInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value{} + msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2577,10 +2581,10 @@ func TestValueProto(t *testing.T) { } } -func TestValueMarshalTo(t *testing.T) { +func TestExecutorInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue(popr, false) + p := NewPopulatedExecutorInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2590,7 +2594,7 @@ func TestValueMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value{} + msg := &ExecutorInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2605,12 +2609,12 @@ func TestValueMarshalTo(t *testing.T) { } } -func BenchmarkValueProtoMarshal(b *testing.B) { +func BenchmarkExecutorInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value, 10000) + pops := make([]*ExecutorInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue(popr, false) + pops[i] = NewPopulatedExecutorInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2623,18 +2627,18 @@ func BenchmarkValueProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValueProtoUnmarshal(b *testing.B) { +func BenchmarkExecutorInfoProtoUnmarshal(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(NewPopulatedValue(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedExecutorInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value{} + msg := &ExecutorInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2645,15 +2649,15 @@ func BenchmarkValueProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_ScalarProto(t *testing.T) { +func TestMasterInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, false) + p := NewPopulatedMasterInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Scalar{} + msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2679,10 +2683,10 @@ func TestValue_ScalarProto(t *testing.T) { } } -func TestValue_ScalarMarshalTo(t *testing.T) { +func TestMasterInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Scalar(popr, false) + p := NewPopulatedMasterInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2692,7 +2696,7 @@ func TestValue_ScalarMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Scalar{} + msg := &MasterInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2707,12 +2711,12 @@ func TestValue_ScalarMarshalTo(t *testing.T) { } } -func BenchmarkValue_ScalarProtoMarshal(b *testing.B) { +func BenchmarkMasterInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Scalar, 10000) + pops := make([]*MasterInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Scalar(popr, false) + pops[i] = NewPopulatedMasterInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2725,18 +2729,18 @@ func BenchmarkValue_ScalarProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_ScalarProtoUnmarshal(b *testing.B) { +func BenchmarkMasterInfoProtoUnmarshal(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(NewPopulatedValue_Scalar(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMasterInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Scalar{} + msg := &MasterInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2747,15 +2751,15 @@ func BenchmarkValue_ScalarProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_RangeProto(t *testing.T) { +func TestAgentInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Range(popr, false) + p := NewPopulatedAgentInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Range{} + msg := &AgentInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2781,10 +2785,10 @@ func TestValue_RangeProto(t *testing.T) { } } -func TestValue_RangeMarshalTo(t *testing.T) { +func TestAgentInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Range(popr, false) + p := NewPopulatedAgentInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2794,7 +2798,7 @@ func TestValue_RangeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Range{} + msg := &AgentInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2809,12 +2813,12 @@ func TestValue_RangeMarshalTo(t *testing.T) { } } -func BenchmarkValue_RangeProtoMarshal(b *testing.B) { +func BenchmarkAgentInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Range, 10000) + pops := make([]*AgentInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Range(popr, false) + pops[i] = NewPopulatedAgentInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2827,18 +2831,18 @@ func BenchmarkValue_RangeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_RangeProtoUnmarshal(b *testing.B) { +func BenchmarkAgentInfoProtoUnmarshal(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(NewPopulatedValue_Range(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAgentInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Range{} + msg := &AgentInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2849,15 +2853,15 @@ func BenchmarkValue_RangeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_RangesProto(t *testing.T) { +func TestAgentInfo_CapabilityProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Ranges(popr, false) + p := NewPopulatedAgentInfo_Capability(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Ranges{} + msg := &AgentInfo_Capability{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2883,10 +2887,10 @@ func TestValue_RangesProto(t *testing.T) { } } -func TestValue_RangesMarshalTo(t *testing.T) { +func TestAgentInfo_CapabilityMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Ranges(popr, false) + p := NewPopulatedAgentInfo_Capability(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2896,7 +2900,7 @@ func TestValue_RangesMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Ranges{} + msg := &AgentInfo_Capability{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2911,12 +2915,12 @@ func TestValue_RangesMarshalTo(t *testing.T) { } } -func BenchmarkValue_RangesProtoMarshal(b *testing.B) { +func BenchmarkAgentInfo_CapabilityProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Ranges, 10000) + pops := make([]*AgentInfo_Capability, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Ranges(popr, false) + pops[i] = NewPopulatedAgentInfo_Capability(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -2929,18 +2933,18 @@ func BenchmarkValue_RangesProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_RangesProtoUnmarshal(b *testing.B) { +func BenchmarkAgentInfo_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(NewPopulatedValue_Ranges(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAgentInfo_Capability(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Ranges{} + msg := &AgentInfo_Capability{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -2951,15 +2955,15 @@ func BenchmarkValue_RangesProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_SetProto(t *testing.T) { +func TestValueProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Set(popr, false) + p := NewPopulatedValue(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Set{} + msg := &Value{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -2985,10 +2989,10 @@ func TestValue_SetProto(t *testing.T) { } } -func TestValue_SetMarshalTo(t *testing.T) { +func TestValueMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Set(popr, false) + p := NewPopulatedValue(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -2998,7 +3002,7 @@ func TestValue_SetMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Set{} + msg := &Value{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3013,12 +3017,12 @@ func TestValue_SetMarshalTo(t *testing.T) { } } -func BenchmarkValue_SetProtoMarshal(b *testing.B) { +func BenchmarkValueProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Set, 10000) + pops := make([]*Value, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Set(popr, false) + pops[i] = NewPopulatedValue(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3031,18 +3035,18 @@ func BenchmarkValue_SetProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_SetProtoUnmarshal(b *testing.B) { +func BenchmarkValueProtoUnmarshal(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(NewPopulatedValue_Set(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Set{} + msg := &Value{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3053,15 +3057,15 @@ func BenchmarkValue_SetProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestValue_TextProto(t *testing.T) { +func TestValue_ScalarProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Text(popr, false) + p := NewPopulatedValue_Scalar(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Text{} + msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3087,10 +3091,10 @@ func TestValue_TextProto(t *testing.T) { } } -func TestValue_TextMarshalTo(t *testing.T) { +func TestValue_ScalarMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedValue_Text(popr, false) + p := NewPopulatedValue_Scalar(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3100,7 +3104,7 @@ func TestValue_TextMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Text{} + msg := &Value_Scalar{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3115,12 +3119,12 @@ func TestValue_TextMarshalTo(t *testing.T) { } } -func BenchmarkValue_TextProtoMarshal(b *testing.B) { +func BenchmarkValue_ScalarProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Value_Text, 10000) + pops := make([]*Value_Scalar, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedValue_Text(popr, false) + pops[i] = NewPopulatedValue_Scalar(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3133,18 +3137,18 @@ func BenchmarkValue_TextProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkValue_TextProtoUnmarshal(b *testing.B) { +func BenchmarkValue_ScalarProtoUnmarshal(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(NewPopulatedValue_Text(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Scalar(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Value_Text{} + msg := &Value_Scalar{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3155,15 +3159,15 @@ func BenchmarkValue_TextProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAttributeProto(t *testing.T) { +func TestValue_RangeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, false) + p := NewPopulatedValue_Range(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Attribute{} + msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3189,10 +3193,10 @@ func TestAttributeProto(t *testing.T) { } } -func TestAttributeMarshalTo(t *testing.T) { +func TestValue_RangeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, false) + p := NewPopulatedValue_Range(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3202,7 +3206,7 @@ func TestAttributeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Attribute{} + msg := &Value_Range{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3217,12 +3221,12 @@ func TestAttributeMarshalTo(t *testing.T) { } } -func BenchmarkAttributeProtoMarshal(b *testing.B) { +func BenchmarkValue_RangeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Attribute, 10000) + pops := make([]*Value_Range, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAttribute(popr, false) + pops[i] = NewPopulatedValue_Range(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3235,18 +3239,18 @@ func BenchmarkAttributeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkAttributeProtoUnmarshal(b *testing.B) { +func BenchmarkValue_RangeProtoUnmarshal(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(NewPopulatedAttribute(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Range(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Attribute{} + msg := &Value_Range{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3257,15 +3261,15 @@ func BenchmarkAttributeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceProto(t *testing.T) { +func TestValue_RangesProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, false) + p := NewPopulatedValue_Ranges(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource{} + msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3291,10 +3295,10 @@ func TestResourceProto(t *testing.T) { } } -func TestResourceMarshalTo(t *testing.T) { +func TestValue_RangesMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, false) + p := NewPopulatedValue_Ranges(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3304,7 +3308,7 @@ func TestResourceMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource{} + msg := &Value_Ranges{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3319,12 +3323,12 @@ func TestResourceMarshalTo(t *testing.T) { } } -func BenchmarkResourceProtoMarshal(b *testing.B) { +func BenchmarkValue_RangesProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource, 10000) + pops := make([]*Value_Ranges, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource(popr, false) + pops[i] = NewPopulatedValue_Ranges(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3337,18 +3341,18 @@ func BenchmarkResourceProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceProtoUnmarshal(b *testing.B) { +func BenchmarkValue_RangesProtoUnmarshal(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(NewPopulatedResource(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Ranges(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource{} + msg := &Value_Ranges{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3359,15 +3363,15 @@ func BenchmarkResourceProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_ReservationInfoProto(t *testing.T) { +func TestValue_SetProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_ReservationInfo(popr, false) + p := NewPopulatedValue_Set(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_ReservationInfo{} + msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3393,10 +3397,10 @@ func TestResource_ReservationInfoProto(t *testing.T) { } } -func TestResource_ReservationInfoMarshalTo(t *testing.T) { +func TestValue_SetMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_ReservationInfo(popr, false) + p := NewPopulatedValue_Set(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3406,7 +3410,7 @@ func TestResource_ReservationInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_ReservationInfo{} + msg := &Value_Set{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3421,12 +3425,12 @@ func TestResource_ReservationInfoMarshalTo(t *testing.T) { } } -func BenchmarkResource_ReservationInfoProtoMarshal(b *testing.B) { +func BenchmarkValue_SetProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_ReservationInfo, 10000) + pops := make([]*Value_Set, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_ReservationInfo(popr, false) + pops[i] = NewPopulatedValue_Set(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3439,18 +3443,18 @@ func BenchmarkResource_ReservationInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_ReservationInfoProtoUnmarshal(b *testing.B) { +func BenchmarkValue_SetProtoUnmarshal(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(NewPopulatedResource_ReservationInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Set(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_ReservationInfo{} + msg := &Value_Set{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3461,15 +3465,15 @@ func BenchmarkResource_ReservationInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_DiskInfoProto(t *testing.T) { +func TestValue_TextProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo(popr, false) + p := NewPopulatedValue_Text(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo{} + msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3495,10 +3499,10 @@ func TestResource_DiskInfoProto(t *testing.T) { } } -func TestResource_DiskInfoMarshalTo(t *testing.T) { +func TestValue_TextMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo(popr, false) + p := NewPopulatedValue_Text(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3508,7 +3512,7 @@ func TestResource_DiskInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo{} + msg := &Value_Text{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3523,12 +3527,12 @@ func TestResource_DiskInfoMarshalTo(t *testing.T) { } } -func BenchmarkResource_DiskInfoProtoMarshal(b *testing.B) { +func BenchmarkValue_TextProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_DiskInfo, 10000) + pops := make([]*Value_Text, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_DiskInfo(popr, false) + pops[i] = NewPopulatedValue_Text(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3541,18 +3545,18 @@ func BenchmarkResource_DiskInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_DiskInfoProtoUnmarshal(b *testing.B) { +func BenchmarkValue_TextProtoUnmarshal(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(NewPopulatedResource_DiskInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedValue_Text(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_DiskInfo{} + msg := &Value_Text{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3563,15 +3567,15 @@ func BenchmarkResource_DiskInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_DiskInfo_PersistenceProto(t *testing.T) { +func TestAttributeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + p := NewPopulatedAttribute(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Persistence{} + msg := &Attribute{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3597,10 +3601,10 @@ func TestResource_DiskInfo_PersistenceProto(t *testing.T) { } } -func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { +func TestAttributeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Persistence(popr, false) + p := NewPopulatedAttribute(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3610,7 +3614,7 @@ func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Persistence{} + msg := &Attribute{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3625,12 +3629,12 @@ func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { } } -func BenchmarkResource_DiskInfo_PersistenceProtoMarshal(b *testing.B) { +func BenchmarkAttributeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_DiskInfo_Persistence, 10000) + pops := make([]*Attribute, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_DiskInfo_Persistence(popr, false) + pops[i] = NewPopulatedAttribute(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3643,18 +3647,18 @@ func BenchmarkResource_DiskInfo_PersistenceProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_DiskInfo_PersistenceProtoUnmarshal(b *testing.B) { +func BenchmarkAttributeProtoUnmarshal(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(NewPopulatedResource_DiskInfo_Persistence(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAttribute(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_DiskInfo_Persistence{} + msg := &Attribute{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3665,15 +3669,15 @@ func BenchmarkResource_DiskInfo_PersistenceProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_DiskInfo_SourceProto(t *testing.T) { +func TestResourceProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Source(popr, false) + p := NewPopulatedResource(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Source{} + msg := &Resource{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3699,10 +3703,10 @@ func TestResource_DiskInfo_SourceProto(t *testing.T) { } } -func TestResource_DiskInfo_SourceMarshalTo(t *testing.T) { +func TestResourceMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Source(popr, false) + p := NewPopulatedResource(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3712,7 +3716,7 @@ func TestResource_DiskInfo_SourceMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Source{} + msg := &Resource{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3727,12 +3731,12 @@ func TestResource_DiskInfo_SourceMarshalTo(t *testing.T) { } } -func BenchmarkResource_DiskInfo_SourceProtoMarshal(b *testing.B) { +func BenchmarkResourceProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_DiskInfo_Source, 10000) + pops := make([]*Resource, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_DiskInfo_Source(popr, false) + pops[i] = NewPopulatedResource(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3745,18 +3749,18 @@ func BenchmarkResource_DiskInfo_SourceProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_DiskInfo_SourceProtoUnmarshal(b *testing.B) { +func BenchmarkResourceProtoUnmarshal(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(NewPopulatedResource_DiskInfo_Source(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_DiskInfo_Source{} + msg := &Resource{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3767,15 +3771,15 @@ func BenchmarkResource_DiskInfo_SourceProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_DiskInfo_Source_PathProto(t *testing.T) { +func TestResource_AllocationInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Source_Path(popr, false) + p := NewPopulatedResource_AllocationInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Source_Path{} + msg := &Resource_AllocationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3801,10 +3805,10 @@ func TestResource_DiskInfo_Source_PathProto(t *testing.T) { } } -func TestResource_DiskInfo_Source_PathMarshalTo(t *testing.T) { +func TestResource_AllocationInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Source_Path(popr, false) + p := NewPopulatedResource_AllocationInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3814,7 +3818,7 @@ func TestResource_DiskInfo_Source_PathMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Source_Path{} + msg := &Resource_AllocationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3829,12 +3833,12 @@ func TestResource_DiskInfo_Source_PathMarshalTo(t *testing.T) { } } -func BenchmarkResource_DiskInfo_Source_PathProtoMarshal(b *testing.B) { +func BenchmarkResource_AllocationInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_DiskInfo_Source_Path, 10000) + pops := make([]*Resource_AllocationInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_DiskInfo_Source_Path(popr, false) + pops[i] = NewPopulatedResource_AllocationInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3847,18 +3851,18 @@ func BenchmarkResource_DiskInfo_Source_PathProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_DiskInfo_Source_PathProtoUnmarshal(b *testing.B) { +func BenchmarkResource_AllocationInfoProtoUnmarshal(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(NewPopulatedResource_DiskInfo_Source_Path(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_AllocationInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_DiskInfo_Source_Path{} + msg := &Resource_AllocationInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3869,15 +3873,15 @@ func BenchmarkResource_DiskInfo_Source_PathProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_DiskInfo_Source_MountProto(t *testing.T) { +func TestResource_ReservationInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Source_Mount(popr, false) + p := NewPopulatedResource_ReservationInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Source_Mount{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3903,10 +3907,10 @@ func TestResource_DiskInfo_Source_MountProto(t *testing.T) { } } -func TestResource_DiskInfo_Source_MountMarshalTo(t *testing.T) { +func TestResource_ReservationInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_DiskInfo_Source_Mount(popr, false) + p := NewPopulatedResource_ReservationInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -3916,7 +3920,7 @@ func TestResource_DiskInfo_Source_MountMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_DiskInfo_Source_Mount{} + msg := &Resource_ReservationInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -3931,12 +3935,12 @@ func TestResource_DiskInfo_Source_MountMarshalTo(t *testing.T) { } } -func BenchmarkResource_DiskInfo_Source_MountProtoMarshal(b *testing.B) { +func BenchmarkResource_ReservationInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_DiskInfo_Source_Mount, 10000) + pops := make([]*Resource_ReservationInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_DiskInfo_Source_Mount(popr, false) + pops[i] = NewPopulatedResource_ReservationInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -3949,18 +3953,18 @@ func BenchmarkResource_DiskInfo_Source_MountProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_DiskInfo_Source_MountProtoUnmarshal(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(NewPopulatedResource_DiskInfo_Source_Mount(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_ReservationInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_DiskInfo_Source_Mount{} + msg := &Resource_ReservationInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -3971,15 +3975,15 @@ func BenchmarkResource_DiskInfo_Source_MountProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_RevocableInfoProto(t *testing.T) { +func TestResource_DiskInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_RevocableInfo(popr, false) + p := NewPopulatedResource_DiskInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_RevocableInfo{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4005,10 +4009,10 @@ func TestResource_RevocableInfoProto(t *testing.T) { } } -func TestResource_RevocableInfoMarshalTo(t *testing.T) { +func TestResource_DiskInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_RevocableInfo(popr, false) + p := NewPopulatedResource_DiskInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4018,7 +4022,7 @@ func TestResource_RevocableInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_RevocableInfo{} + msg := &Resource_DiskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4033,12 +4037,12 @@ func TestResource_RevocableInfoMarshalTo(t *testing.T) { } } -func BenchmarkResource_RevocableInfoProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_RevocableInfo, 10000) + pops := make([]*Resource_DiskInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_RevocableInfo(popr, false) + pops[i] = NewPopulatedResource_DiskInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4051,18 +4055,18 @@ func BenchmarkResource_RevocableInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_RevocableInfoProtoUnmarshal(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(NewPopulatedResource_RevocableInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_RevocableInfo{} + msg := &Resource_DiskInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4073,15 +4077,15 @@ func BenchmarkResource_RevocableInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResource_SharedInfoProto(t *testing.T) { +func TestResource_DiskInfo_PersistenceProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_SharedInfo(popr, false) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_SharedInfo{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4107,10 +4111,10 @@ func TestResource_SharedInfoProto(t *testing.T) { } } -func TestResource_SharedInfoMarshalTo(t *testing.T) { +func TestResource_DiskInfo_PersistenceMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource_SharedInfo(popr, false) + p := NewPopulatedResource_DiskInfo_Persistence(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4120,7 +4124,7 @@ func TestResource_SharedInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Resource_SharedInfo{} + msg := &Resource_DiskInfo_Persistence{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4135,12 +4139,12 @@ func TestResource_SharedInfoMarshalTo(t *testing.T) { } } -func BenchmarkResource_SharedInfoProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_PersistenceProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Resource_SharedInfo, 10000) + pops := make([]*Resource_DiskInfo_Persistence, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResource_SharedInfo(popr, false) + pops[i] = NewPopulatedResource_DiskInfo_Persistence(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4153,18 +4157,18 @@ func BenchmarkResource_SharedInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResource_SharedInfoProtoUnmarshal(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(NewPopulatedResource_SharedInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo_Persistence(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Resource_SharedInfo{} + msg := &Resource_DiskInfo_Persistence{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4175,15 +4179,15 @@ func BenchmarkResource_SharedInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTrafficControlStatisticsProto(t *testing.T) { +func TestResource_DiskInfo_SourceProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTrafficControlStatistics(popr, false) + p := NewPopulatedResource_DiskInfo_Source(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TrafficControlStatistics{} + msg := &Resource_DiskInfo_Source{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4209,10 +4213,10 @@ func TestTrafficControlStatisticsProto(t *testing.T) { } } -func TestTrafficControlStatisticsMarshalTo(t *testing.T) { +func TestResource_DiskInfo_SourceMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTrafficControlStatistics(popr, false) + p := NewPopulatedResource_DiskInfo_Source(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4222,7 +4226,7 @@ func TestTrafficControlStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TrafficControlStatistics{} + msg := &Resource_DiskInfo_Source{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4237,12 +4241,12 @@ func TestTrafficControlStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkTrafficControlStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_SourceProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TrafficControlStatistics, 10000) + pops := make([]*Resource_DiskInfo_Source, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTrafficControlStatistics(popr, false) + pops[i] = NewPopulatedResource_DiskInfo_Source(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4255,18 +4259,18 @@ func BenchmarkTrafficControlStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTrafficControlStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_SourceProtoUnmarshal(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(NewPopulatedTrafficControlStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo_Source(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TrafficControlStatistics{} + msg := &Resource_DiskInfo_Source{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4277,15 +4281,15 @@ func BenchmarkTrafficControlStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestIpStatisticsProto(t *testing.T) { +func TestResource_DiskInfo_Source_PathProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIpStatistics(popr, false) + p := NewPopulatedResource_DiskInfo_Source_Path(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &IpStatistics{} + msg := &Resource_DiskInfo_Source_Path{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4311,10 +4315,10 @@ func TestIpStatisticsProto(t *testing.T) { } } -func TestIpStatisticsMarshalTo(t *testing.T) { +func TestResource_DiskInfo_Source_PathMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIpStatistics(popr, false) + p := NewPopulatedResource_DiskInfo_Source_Path(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4324,7 +4328,7 @@ func TestIpStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &IpStatistics{} + msg := &Resource_DiskInfo_Source_Path{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4339,12 +4343,12 @@ func TestIpStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkIpStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_Source_PathProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*IpStatistics, 10000) + pops := make([]*Resource_DiskInfo_Source_Path, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedIpStatistics(popr, false) + pops[i] = NewPopulatedResource_DiskInfo_Source_Path(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4357,18 +4361,18 @@ func BenchmarkIpStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkIpStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_Source_PathProtoUnmarshal(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(NewPopulatedIpStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo_Source_Path(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &IpStatistics{} + msg := &Resource_DiskInfo_Source_Path{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4379,15 +4383,15 @@ func BenchmarkIpStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestIcmpStatisticsProto(t *testing.T) { +func TestResource_DiskInfo_Source_MountProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIcmpStatistics(popr, false) + p := NewPopulatedResource_DiskInfo_Source_Mount(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &IcmpStatistics{} + msg := &Resource_DiskInfo_Source_Mount{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4413,10 +4417,10 @@ func TestIcmpStatisticsProto(t *testing.T) { } } -func TestIcmpStatisticsMarshalTo(t *testing.T) { +func TestResource_DiskInfo_Source_MountMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIcmpStatistics(popr, false) + p := NewPopulatedResource_DiskInfo_Source_Mount(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4426,7 +4430,7 @@ func TestIcmpStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &IcmpStatistics{} + msg := &Resource_DiskInfo_Source_Mount{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4441,12 +4445,12 @@ func TestIcmpStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkIcmpStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_Source_MountProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*IcmpStatistics, 10000) + pops := make([]*Resource_DiskInfo_Source_Mount, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedIcmpStatistics(popr, false) + pops[i] = NewPopulatedResource_DiskInfo_Source_Mount(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4459,18 +4463,18 @@ func BenchmarkIcmpStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkIcmpStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_DiskInfo_Source_MountProtoUnmarshal(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(NewPopulatedIcmpStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_DiskInfo_Source_Mount(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &IcmpStatistics{} + msg := &Resource_DiskInfo_Source_Mount{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4481,15 +4485,15 @@ func BenchmarkIcmpStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTcpStatisticsProto(t *testing.T) { +func TestResource_RevocableInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTcpStatistics(popr, false) + p := NewPopulatedResource_RevocableInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TcpStatistics{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4515,10 +4519,10 @@ func TestTcpStatisticsProto(t *testing.T) { } } -func TestTcpStatisticsMarshalTo(t *testing.T) { +func TestResource_RevocableInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTcpStatistics(popr, false) + p := NewPopulatedResource_RevocableInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4528,7 +4532,7 @@ func TestTcpStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TcpStatistics{} + msg := &Resource_RevocableInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4543,12 +4547,12 @@ func TestTcpStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkTcpStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_RevocableInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TcpStatistics, 10000) + pops := make([]*Resource_RevocableInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTcpStatistics(popr, false) + pops[i] = NewPopulatedResource_RevocableInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4561,18 +4565,18 @@ func BenchmarkTcpStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTcpStatisticsProtoUnmarshal(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(NewPopulatedTcpStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_RevocableInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TcpStatistics{} + msg := &Resource_RevocableInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4583,15 +4587,15 @@ func BenchmarkTcpStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestUdpStatisticsProto(t *testing.T) { +func TestResource_SharedInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUdpStatistics(popr, false) + p := NewPopulatedResource_SharedInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &UdpStatistics{} + msg := &Resource_SharedInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4617,10 +4621,10 @@ func TestUdpStatisticsProto(t *testing.T) { } } -func TestUdpStatisticsMarshalTo(t *testing.T) { +func TestResource_SharedInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUdpStatistics(popr, false) + p := NewPopulatedResource_SharedInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4630,7 +4634,7 @@ func TestUdpStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &UdpStatistics{} + msg := &Resource_SharedInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4645,12 +4649,12 @@ func TestUdpStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkUdpStatisticsProtoMarshal(b *testing.B) { +func BenchmarkResource_SharedInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*UdpStatistics, 10000) + pops := make([]*Resource_SharedInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUdpStatistics(popr, false) + pops[i] = NewPopulatedResource_SharedInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4663,18 +4667,18 @@ func BenchmarkUdpStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkUdpStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkResource_SharedInfoProtoUnmarshal(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(NewPopulatedUdpStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedResource_SharedInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &UdpStatistics{} + msg := &Resource_SharedInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4685,15 +4689,15 @@ func BenchmarkUdpStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestSNMPStatisticsProto(t *testing.T) { +func TestTrafficControlStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSNMPStatistics(popr, false) + p := NewPopulatedTrafficControlStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &SNMPStatistics{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4719,10 +4723,10 @@ func TestSNMPStatisticsProto(t *testing.T) { } } -func TestSNMPStatisticsMarshalTo(t *testing.T) { +func TestTrafficControlStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSNMPStatistics(popr, false) + p := NewPopulatedTrafficControlStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4732,7 +4736,7 @@ func TestSNMPStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &SNMPStatistics{} + msg := &TrafficControlStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4747,12 +4751,12 @@ func TestSNMPStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkSNMPStatisticsProtoMarshal(b *testing.B) { +func BenchmarkTrafficControlStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*SNMPStatistics, 10000) + pops := make([]*TrafficControlStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedSNMPStatistics(popr, false) + pops[i] = NewPopulatedTrafficControlStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4765,18 +4769,18 @@ func BenchmarkSNMPStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkSNMPStatisticsProtoUnmarshal(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(NewPopulatedSNMPStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTrafficControlStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &SNMPStatistics{} + msg := &TrafficControlStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4787,15 +4791,15 @@ func BenchmarkSNMPStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceStatisticsProto(t *testing.T) { +func TestIpStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceStatistics(popr, false) + p := NewPopulatedIpStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} + msg := &IpStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4821,10 +4825,10 @@ func TestResourceStatisticsProto(t *testing.T) { } } -func TestResourceStatisticsMarshalTo(t *testing.T) { +func TestIpStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceStatistics(popr, false) + p := NewPopulatedIpStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4834,7 +4838,7 @@ func TestResourceStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceStatistics{} + msg := &IpStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4849,12 +4853,12 @@ func TestResourceStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { +func BenchmarkIpStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceStatistics, 10000) + pops := make([]*IpStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceStatistics(popr, false) + pops[i] = NewPopulatedIpStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4867,18 +4871,18 @@ func BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { +func BenchmarkIpStatisticsProtoUnmarshal(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(NewPopulatedIpStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceStatistics{} + msg := &IpStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4889,15 +4893,15 @@ func BenchmarkResourceStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceUsageProto(t *testing.T) { +func TestIcmpStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage(popr, false) + p := NewPopulatedIcmpStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage{} + msg := &IcmpStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4923,10 +4927,10 @@ func TestResourceUsageProto(t *testing.T) { } } -func TestResourceUsageMarshalTo(t *testing.T) { +func TestIcmpStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage(popr, false) + p := NewPopulatedIcmpStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -4936,7 +4940,7 @@ func TestResourceUsageMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage{} + msg := &IcmpStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -4951,12 +4955,12 @@ func TestResourceUsageMarshalTo(t *testing.T) { } } -func BenchmarkResourceUsageProtoMarshal(b *testing.B) { +func BenchmarkIcmpStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceUsage, 10000) + pops := make([]*IcmpStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceUsage(popr, false) + pops[i] = NewPopulatedIcmpStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -4969,18 +4973,18 @@ func BenchmarkResourceUsageProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { +func BenchmarkIcmpStatisticsProtoUnmarshal(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(NewPopulatedIcmpStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceUsage{} + msg := &IcmpStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -4991,15 +4995,15 @@ func BenchmarkResourceUsageProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceUsage_ExecutorProto(t *testing.T) { +func TestTcpStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor(popr, false) + p := NewPopulatedTcpStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage_Executor{} + msg := &TcpStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5025,10 +5029,10 @@ func TestResourceUsage_ExecutorProto(t *testing.T) { } } -func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { +func TestTcpStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor(popr, false) + p := NewPopulatedTcpStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5038,7 +5042,7 @@ func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage_Executor{} + msg := &TcpStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5053,12 +5057,12 @@ func TestResourceUsage_ExecutorMarshalTo(t *testing.T) { } } -func BenchmarkResourceUsage_ExecutorProtoMarshal(b *testing.B) { +func BenchmarkTcpStatisticsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceUsage_Executor, 10000) + pops := make([]*TcpStatistics, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceUsage_Executor(popr, false) + pops[i] = NewPopulatedTcpStatistics(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5071,18 +5075,18 @@ func BenchmarkResourceUsage_ExecutorProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceUsage_ExecutorProtoUnmarshal(b *testing.B) { +func BenchmarkTcpStatisticsProtoUnmarshal(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_Executor(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTcpStatistics(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceUsage_Executor{} + msg := &TcpStatistics{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5093,15 +5097,15 @@ func BenchmarkResourceUsage_ExecutorProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestResourceUsage_Executor_TaskProto(t *testing.T) { +func TestUdpStatisticsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor_Task(popr, false) + p := NewPopulatedUdpStatistics(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage_Executor_Task{} + msg := &UdpStatistics{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5127,10 +5131,10 @@ func TestResourceUsage_Executor_TaskProto(t *testing.T) { } } -func TestResourceUsage_Executor_TaskMarshalTo(t *testing.T) { +func TestUdpStatisticsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceUsage_Executor_Task(popr, false) + p := NewPopulatedUdpStatistics(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5140,7 +5144,517 @@ func TestResourceUsage_Executor_TaskMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &ResourceUsage_Executor_Task{} + msg := &UdpStatistics{} + 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 BenchmarkUdpStatisticsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UdpStatistics, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUdpStatistics(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 BenchmarkUdpStatisticsProtoUnmarshal(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(NewPopulatedUdpStatistics(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UdpStatistics{} + 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 TestSNMPStatisticsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSNMPStatistics(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SNMPStatistics{} + 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 TestSNMPStatisticsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSNMPStatistics(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 := &SNMPStatistics{} + 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 BenchmarkSNMPStatisticsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*SNMPStatistics, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedSNMPStatistics(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 BenchmarkSNMPStatisticsProtoUnmarshal(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(NewPopulatedSNMPStatistics(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &SNMPStatistics{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceStatistics{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceStatistics{} + 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 BenchmarkResourceStatisticsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ResourceStatistics, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedResourceStatistics(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 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(NewPopulatedResourceStatistics(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ResourceStatistics{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceUsage{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceUsage{} + 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 BenchmarkResourceUsageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ResourceUsage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedResourceUsage(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 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(NewPopulatedResourceUsage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ResourceUsage{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceUsage_Executor{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceUsage_Executor{} + 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 BenchmarkResourceUsage_ExecutorProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ResourceUsage_Executor, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedResourceUsage_Executor(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 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(NewPopulatedResourceUsage_Executor(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ResourceUsage_Executor{} + 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 TestResourceUsage_Executor_TaskProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor_Task(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ResourceUsage_Executor_Task{} + 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 TestResourceUsage_Executor_TaskMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResourceUsage_Executor_Task(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 := &ResourceUsage_Executor_Task{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5158,9 +5672,621 @@ func TestResourceUsage_Executor_TaskMarshalTo(t *testing.T) { func BenchmarkResourceUsage_Executor_TaskProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ResourceUsage_Executor_Task, 10000) + pops := make([]*ResourceUsage_Executor_Task, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedResourceUsage_Executor_Task(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 BenchmarkResourceUsage_Executor_TaskProtoUnmarshal(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_Executor_Task(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ResourceUsage_Executor_Task{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &PerfStatistics{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &PerfStatistics{} + 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 BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*PerfStatistics, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedPerfStatistics(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 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(NewPopulatedPerfStatistics(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &PerfStatistics{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Request{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Request{} + 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 BenchmarkRequestProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Request, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRequest(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 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(NewPopulatedRequest(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Request{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer{} + 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 BenchmarkOfferProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOffer(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 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(NewPopulatedOffer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Offer{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation{} + 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 BenchmarkOffer_OperationProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOffer_Operation(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 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(NewPopulatedOffer_Operation(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Offer_Operation{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Launch{} + 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 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 { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_Launch{} + 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 BenchmarkOffer_Operation_LaunchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation_Launch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOffer_Operation_Launch(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 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(NewPopulatedOffer_Operation_Launch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Offer_Operation_Launch{} + 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 TestOffer_Operation_LaunchGroupProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_LaunchGroup(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Offer_Operation_LaunchGroup{} + 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 TestOffer_Operation_LaunchGroupMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOffer_Operation_LaunchGroup(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 := &Offer_Operation_LaunchGroup{} + 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 BenchmarkOffer_Operation_LaunchGroupProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Offer_Operation_LaunchGroup, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedResourceUsage_Executor_Task(popr, false) + pops[i] = NewPopulatedOffer_Operation_LaunchGroup(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5173,18 +6299,18 @@ func BenchmarkResourceUsage_Executor_TaskProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkResourceUsage_Executor_TaskProtoUnmarshal(b *testing.B) { +func BenchmarkOffer_Operation_LaunchGroupProtoUnmarshal(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_Executor_Task(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_LaunchGroup(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &ResourceUsage_Executor_Task{} + msg := &Offer_Operation_LaunchGroup{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5195,15 +6321,15 @@ func BenchmarkResourceUsage_Executor_TaskProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestPerfStatisticsProto(t *testing.T) { +func TestOffer_Operation_ReserveProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPerfStatistics(popr, false) + p := NewPopulatedOffer_Operation_Reserve(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5229,10 +6355,10 @@ func TestPerfStatisticsProto(t *testing.T) { } } -func TestPerfStatisticsMarshalTo(t *testing.T) { +func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPerfStatistics(popr, false) + p := NewPopulatedOffer_Operation_Reserve(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5242,7 +6368,7 @@ func TestPerfStatisticsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &PerfStatistics{} + msg := &Offer_Operation_Reserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5257,12 +6383,12 @@ func TestPerfStatisticsMarshalTo(t *testing.T) { } } -func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_ReserveProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*PerfStatistics, 10000) + pops := make([]*Offer_Operation_Reserve, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedPerfStatistics(popr, false) + pops[i] = NewPopulatedOffer_Operation_Reserve(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5275,18 +6401,18 @@ func BenchmarkPerfStatisticsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkPerfStatisticsProtoUnmarshal(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(NewPopulatedPerfStatistics(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Reserve(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &PerfStatistics{} + msg := &Offer_Operation_Reserve{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5297,15 +6423,15 @@ func BenchmarkPerfStatisticsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRequestProto(t *testing.T) { +func TestOffer_Operation_UnreserveProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRequest(popr, false) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Request{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5331,10 +6457,10 @@ func TestRequestProto(t *testing.T) { } } -func TestRequestMarshalTo(t *testing.T) { +func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRequest(popr, false) + p := NewPopulatedOffer_Operation_Unreserve(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5344,7 +6470,7 @@ func TestRequestMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Request{} + msg := &Offer_Operation_Unreserve{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5359,12 +6485,12 @@ func TestRequestMarshalTo(t *testing.T) { } } -func BenchmarkRequestProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_UnreserveProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Request, 10000) + pops := make([]*Offer_Operation_Unreserve, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRequest(popr, false) + pops[i] = NewPopulatedOffer_Operation_Unreserve(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5377,18 +6503,18 @@ func BenchmarkRequestProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRequestProtoUnmarshal(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(NewPopulatedRequest(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Unreserve(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Request{} + msg := &Offer_Operation_Unreserve{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5399,15 +6525,15 @@ func BenchmarkRequestProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOfferProto(t *testing.T) { +func TestOffer_Operation_CreateProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer(popr, false) + p := NewPopulatedOffer_Operation_Create(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5433,10 +6559,10 @@ func TestOfferProto(t *testing.T) { } } -func TestOfferMarshalTo(t *testing.T) { +func TestOffer_Operation_CreateMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer(popr, false) + p := NewPopulatedOffer_Operation_Create(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5446,7 +6572,7 @@ func TestOfferMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer{} + msg := &Offer_Operation_Create{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5461,12 +6587,12 @@ func TestOfferMarshalTo(t *testing.T) { } } -func BenchmarkOfferProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_CreateProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer, 10000) + pops := make([]*Offer_Operation_Create, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer(popr, false) + pops[i] = NewPopulatedOffer_Operation_Create(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5479,18 +6605,18 @@ func BenchmarkOfferProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOfferProtoUnmarshal(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(NewPopulatedOffer(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Create(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer{} + msg := &Offer_Operation_Create{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5501,15 +6627,15 @@ func BenchmarkOfferProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_OperationProto(t *testing.T) { +func TestOffer_Operation_DestroyProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation(popr, false) + p := NewPopulatedOffer_Operation_Destroy(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5535,10 +6661,10 @@ func TestOffer_OperationProto(t *testing.T) { } } -func TestOffer_OperationMarshalTo(t *testing.T) { +func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation(popr, false) + p := NewPopulatedOffer_Operation_Destroy(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5548,7 +6674,7 @@ func TestOffer_OperationMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation{} + msg := &Offer_Operation_Destroy{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5563,12 +6689,12 @@ func TestOffer_OperationMarshalTo(t *testing.T) { } } -func BenchmarkOffer_OperationProtoMarshal(b *testing.B) { +func BenchmarkOffer_Operation_DestroyProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation, 10000) + pops := make([]*Offer_Operation_Destroy, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation(popr, false) + pops[i] = NewPopulatedOffer_Operation_Destroy(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5581,18 +6707,18 @@ func BenchmarkOffer_OperationProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_OperationProtoUnmarshal(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(NewPopulatedOffer_Operation(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOffer_Operation_Destroy(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation{} + msg := &Offer_Operation_Destroy{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5603,15 +6729,15 @@ func BenchmarkOffer_OperationProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_LaunchProto(t *testing.T) { +func TestInverseOfferProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Launch(popr, false) + p := NewPopulatedInverseOffer(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Launch{} + msg := &InverseOffer{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5637,10 +6763,112 @@ func TestOffer_Operation_LaunchProto(t *testing.T) { } } -func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { +func TestInverseOfferMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOffer(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 := &InverseOffer{} + 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 BenchmarkInverseOfferProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*InverseOffer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedInverseOffer(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 BenchmarkInverseOfferProtoUnmarshal(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(NewPopulatedInverseOffer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &InverseOffer{} + 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 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 { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TaskInfo{} + 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 TestTaskInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Launch(popr, false) + p := NewPopulatedTaskInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5650,7 +6878,7 @@ func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Launch{} + msg := &TaskInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5665,12 +6893,12 @@ func TestOffer_Operation_LaunchMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_LaunchProtoMarshal(b *testing.B) { +func BenchmarkTaskInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Launch, 10000) + pops := make([]*TaskInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Launch(popr, false) + pops[i] = NewPopulatedTaskInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5683,18 +6911,18 @@ func BenchmarkOffer_Operation_LaunchProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_LaunchProtoUnmarshal(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(NewPopulatedOffer_Operation_Launch(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Launch{} + msg := &TaskInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5705,15 +6933,15 @@ func BenchmarkOffer_Operation_LaunchProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_LaunchGroupProto(t *testing.T) { +func TestTaskGroupInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_LaunchGroup(popr, false) + p := NewPopulatedTaskGroupInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_LaunchGroup{} + msg := &TaskGroupInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5739,10 +6967,10 @@ func TestOffer_Operation_LaunchGroupProto(t *testing.T) { } } -func TestOffer_Operation_LaunchGroupMarshalTo(t *testing.T) { +func TestTaskGroupInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_LaunchGroup(popr, false) + p := NewPopulatedTaskGroupInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5752,7 +6980,7 @@ func TestOffer_Operation_LaunchGroupMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_LaunchGroup{} + msg := &TaskGroupInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5767,12 +6995,12 @@ func TestOffer_Operation_LaunchGroupMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_LaunchGroupProtoMarshal(b *testing.B) { +func BenchmarkTaskGroupInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_LaunchGroup, 10000) + pops := make([]*TaskGroupInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_LaunchGroup(popr, false) + pops[i] = NewPopulatedTaskGroupInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5785,18 +7013,18 @@ func BenchmarkOffer_Operation_LaunchGroupProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_LaunchGroupProtoUnmarshal(b *testing.B) { +func BenchmarkTaskGroupInfoProtoUnmarshal(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_Operation_LaunchGroup(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskGroupInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_LaunchGroup{} + msg := &TaskGroupInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5807,15 +7035,15 @@ func BenchmarkOffer_Operation_LaunchGroupProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_ReserveProto(t *testing.T) { +func TestTaskProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Reserve(popr, false) + p := NewPopulatedTask(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Reserve{} + msg := &Task{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5841,10 +7069,10 @@ func TestOffer_Operation_ReserveProto(t *testing.T) { } } -func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { +func TestTaskMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Reserve(popr, false) + p := NewPopulatedTask(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5854,7 +7082,7 @@ func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Reserve{} + msg := &Task{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5869,12 +7097,12 @@ func TestOffer_Operation_ReserveMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_ReserveProtoMarshal(b *testing.B) { +func BenchmarkTaskProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Reserve, 10000) + pops := make([]*Task, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Reserve(popr, false) + pops[i] = NewPopulatedTask(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5887,18 +7115,18 @@ func BenchmarkOffer_Operation_ReserveProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_ReserveProtoUnmarshal(b *testing.B) { +func BenchmarkTaskProtoUnmarshal(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_Operation_Reserve(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTask(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Reserve{} + msg := &Task{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -5909,15 +7137,15 @@ func BenchmarkOffer_Operation_ReserveProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_UnreserveProto(t *testing.T) { +func TestCheckStatusInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Unreserve(popr, false) + p := NewPopulatedCheckStatusInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Unreserve{} + msg := &CheckStatusInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5943,10 +7171,10 @@ func TestOffer_Operation_UnreserveProto(t *testing.T) { } } -func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { +func TestCheckStatusInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Unreserve(popr, false) + p := NewPopulatedCheckStatusInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -5956,7 +7184,7 @@ func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Unreserve{} + msg := &CheckStatusInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -5971,12 +7199,12 @@ func TestOffer_Operation_UnreserveMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_UnreserveProtoMarshal(b *testing.B) { +func BenchmarkCheckStatusInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Unreserve, 10000) + pops := make([]*CheckStatusInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Unreserve(popr, false) + pops[i] = NewPopulatedCheckStatusInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -5989,18 +7217,18 @@ func BenchmarkOffer_Operation_UnreserveProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_UnreserveProtoUnmarshal(b *testing.B) { +func BenchmarkCheckStatusInfoProtoUnmarshal(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_Operation_Unreserve(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCheckStatusInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Unreserve{} + msg := &CheckStatusInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6011,15 +7239,15 @@ func BenchmarkOffer_Operation_UnreserveProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_CreateProto(t *testing.T) { +func TestCheckStatusInfo_CommandProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, false) + p := NewPopulatedCheckStatusInfo_Command(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Create{} + msg := &CheckStatusInfo_Command{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6045,10 +7273,10 @@ func TestOffer_Operation_CreateProto(t *testing.T) { } } -func TestOffer_Operation_CreateMarshalTo(t *testing.T) { +func TestCheckStatusInfo_CommandMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, false) + p := NewPopulatedCheckStatusInfo_Command(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6058,7 +7286,7 @@ func TestOffer_Operation_CreateMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Create{} + msg := &CheckStatusInfo_Command{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6073,12 +7301,12 @@ func TestOffer_Operation_CreateMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_CreateProtoMarshal(b *testing.B) { +func BenchmarkCheckStatusInfo_CommandProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Create, 10000) + pops := make([]*CheckStatusInfo_Command, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Create(popr, false) + pops[i] = NewPopulatedCheckStatusInfo_Command(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6091,18 +7319,18 @@ func BenchmarkOffer_Operation_CreateProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_CreateProtoUnmarshal(b *testing.B) { +func BenchmarkCheckStatusInfo_CommandProtoUnmarshal(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_Operation_Create(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCheckStatusInfo_Command(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Create{} + msg := &CheckStatusInfo_Command{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6113,15 +7341,15 @@ func BenchmarkOffer_Operation_CreateProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_DestroyProto(t *testing.T) { +func TestCheckStatusInfo_HttpProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, false) + p := NewPopulatedCheckStatusInfo_Http(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Destroy{} + msg := &CheckStatusInfo_Http{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6147,10 +7375,10 @@ func TestOffer_Operation_DestroyProto(t *testing.T) { } } -func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { +func TestCheckStatusInfo_HttpMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, false) + p := NewPopulatedCheckStatusInfo_Http(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6160,7 +7388,7 @@ func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Offer_Operation_Destroy{} + msg := &CheckStatusInfo_Http{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6175,12 +7403,12 @@ func TestOffer_Operation_DestroyMarshalTo(t *testing.T) { } } -func BenchmarkOffer_Operation_DestroyProtoMarshal(b *testing.B) { +func BenchmarkCheckStatusInfo_HttpProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Destroy, 10000) + pops := make([]*CheckStatusInfo_Http, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOffer_Operation_Destroy(popr, false) + pops[i] = NewPopulatedCheckStatusInfo_Http(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6193,18 +7421,18 @@ func BenchmarkOffer_Operation_DestroyProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkOffer_Operation_DestroyProtoUnmarshal(b *testing.B) { +func BenchmarkCheckStatusInfo_HttpProtoUnmarshal(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_Operation_Destroy(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCheckStatusInfo_Http(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Offer_Operation_Destroy{} + msg := &CheckStatusInfo_Http{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6215,15 +7443,15 @@ func BenchmarkOffer_Operation_DestroyProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestInverseOfferProto(t *testing.T) { +func TestTaskStatusProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedInverseOffer(popr, false) + p := NewPopulatedTaskStatus(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &InverseOffer{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6249,10 +7477,10 @@ func TestInverseOfferProto(t *testing.T) { } } -func TestInverseOfferMarshalTo(t *testing.T) { +func TestTaskStatusMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedInverseOffer(popr, false) + p := NewPopulatedTaskStatus(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6262,7 +7490,7 @@ func TestInverseOfferMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &InverseOffer{} + msg := &TaskStatus{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6277,12 +7505,12 @@ func TestInverseOfferMarshalTo(t *testing.T) { } } -func BenchmarkInverseOfferProtoMarshal(b *testing.B) { +func BenchmarkTaskStatusProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*InverseOffer, 10000) + pops := make([]*TaskStatus, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedInverseOffer(popr, false) + pops[i] = NewPopulatedTaskStatus(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6295,18 +7523,18 @@ func BenchmarkInverseOfferProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkInverseOfferProtoUnmarshal(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(NewPopulatedInverseOffer(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTaskStatus(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &InverseOffer{} + msg := &TaskStatus{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6317,15 +7545,15 @@ func BenchmarkInverseOfferProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskInfoProto(t *testing.T) { +func TestFiltersProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, false) + p := NewPopulatedFilters(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskInfo{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6351,10 +7579,10 @@ func TestTaskInfoProto(t *testing.T) { } } -func TestTaskInfoMarshalTo(t *testing.T) { +func TestFiltersMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, false) + p := NewPopulatedFilters(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6364,7 +7592,7 @@ func TestTaskInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskInfo{} + msg := &Filters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6379,12 +7607,12 @@ func TestTaskInfoMarshalTo(t *testing.T) { } } -func BenchmarkTaskInfoProtoMarshal(b *testing.B) { +func BenchmarkFiltersProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskInfo, 10000) + pops := make([]*Filters, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTaskInfo(popr, false) + pops[i] = NewPopulatedFilters(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6397,18 +7625,18 @@ func BenchmarkTaskInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskInfoProtoUnmarshal(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(NewPopulatedTaskInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFilters(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TaskInfo{} + msg := &Filters{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6419,15 +7647,15 @@ func BenchmarkTaskInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskGroupInfoProto(t *testing.T) { +func TestEnvironmentProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskGroupInfo(popr, false) + p := NewPopulatedEnvironment(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskGroupInfo{} + msg := &Environment{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6453,10 +7681,10 @@ func TestTaskGroupInfoProto(t *testing.T) { } } -func TestTaskGroupInfoMarshalTo(t *testing.T) { +func TestEnvironmentMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskGroupInfo(popr, false) + p := NewPopulatedEnvironment(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6466,7 +7694,7 @@ func TestTaskGroupInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskGroupInfo{} + msg := &Environment{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6481,12 +7709,12 @@ func TestTaskGroupInfoMarshalTo(t *testing.T) { } } -func BenchmarkTaskGroupInfoProtoMarshal(b *testing.B) { +func BenchmarkEnvironmentProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskGroupInfo, 10000) + pops := make([]*Environment, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTaskGroupInfo(popr, false) + pops[i] = NewPopulatedEnvironment(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6499,18 +7727,18 @@ func BenchmarkTaskGroupInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskGroupInfoProtoUnmarshal(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(NewPopulatedTaskGroupInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TaskGroupInfo{} + msg := &Environment{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6521,15 +7749,15 @@ func BenchmarkTaskGroupInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskProto(t *testing.T) { +func TestEnvironment_VariableProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTask(popr, false) + p := NewPopulatedEnvironment_Variable(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Task{} + msg := &Environment_Variable{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6555,10 +7783,10 @@ func TestTaskProto(t *testing.T) { } } -func TestTaskMarshalTo(t *testing.T) { +func TestEnvironment_VariableMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTask(popr, false) + p := NewPopulatedEnvironment_Variable(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6568,7 +7796,7 @@ func TestTaskMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Task{} + msg := &Environment_Variable{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6583,12 +7811,12 @@ func TestTaskMarshalTo(t *testing.T) { } } -func BenchmarkTaskProtoMarshal(b *testing.B) { +func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Task, 10000) + pops := make([]*Environment_Variable, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTask(popr, false) + pops[i] = NewPopulatedEnvironment_Variable(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6601,18 +7829,18 @@ func BenchmarkTaskProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskProtoUnmarshal(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(NewPopulatedTask(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedEnvironment_Variable(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Task{} + msg := &Environment_Variable{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6623,15 +7851,15 @@ func BenchmarkTaskProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskStatusProto(t *testing.T) { +func TestParameterProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskStatus(popr, false) + p := NewPopulatedParameter(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskStatus{} + msg := &Parameter{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6657,10 +7885,10 @@ func TestTaskStatusProto(t *testing.T) { } } -func TestTaskStatusMarshalTo(t *testing.T) { +func TestParameterMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskStatus(popr, false) + p := NewPopulatedParameter(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6670,7 +7898,7 @@ func TestTaskStatusMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &TaskStatus{} + msg := &Parameter{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6685,12 +7913,12 @@ func TestTaskStatusMarshalTo(t *testing.T) { } } -func BenchmarkTaskStatusProtoMarshal(b *testing.B) { +func BenchmarkParameterProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskStatus, 10000) + pops := make([]*Parameter, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedTaskStatus(popr, false) + pops[i] = NewPopulatedParameter(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6703,18 +7931,18 @@ func BenchmarkTaskStatusProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkTaskStatusProtoUnmarshal(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(NewPopulatedTaskStatus(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameter(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &TaskStatus{} + msg := &Parameter{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6725,15 +7953,15 @@ func BenchmarkTaskStatusProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFiltersProto(t *testing.T) { +func TestParametersProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFilters(popr, false) + p := NewPopulatedParameters(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Filters{} + msg := &Parameters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6759,10 +7987,10 @@ func TestFiltersProto(t *testing.T) { } } -func TestFiltersMarshalTo(t *testing.T) { +func TestParametersMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFilters(popr, false) + p := NewPopulatedParameters(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6772,7 +8000,7 @@ func TestFiltersMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Filters{} + msg := &Parameters{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6787,12 +8015,12 @@ func TestFiltersMarshalTo(t *testing.T) { } } -func BenchmarkFiltersProtoMarshal(b *testing.B) { +func BenchmarkParametersProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Filters, 10000) + pops := make([]*Parameters, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedFilters(popr, false) + pops[i] = NewPopulatedParameters(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6805,18 +8033,18 @@ func BenchmarkFiltersProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkFiltersProtoUnmarshal(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(NewPopulatedFilters(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedParameters(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Filters{} + msg := &Parameters{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6827,15 +8055,15 @@ func BenchmarkFiltersProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEnvironmentProto(t *testing.T) { +func TestCredentialProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment(popr, false) + p := NewPopulatedCredential(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} + msg := &Credential{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6861,10 +8089,10 @@ func TestEnvironmentProto(t *testing.T) { } } -func TestEnvironmentMarshalTo(t *testing.T) { +func TestCredentialMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment(popr, false) + p := NewPopulatedCredential(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6874,7 +8102,7 @@ func TestEnvironmentMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment{} + msg := &Credential{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6889,12 +8117,12 @@ func TestEnvironmentMarshalTo(t *testing.T) { } } -func BenchmarkEnvironmentProtoMarshal(b *testing.B) { +func BenchmarkCredentialProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Environment, 10000) + pops := make([]*Credential, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedEnvironment(popr, false) + pops[i] = NewPopulatedCredential(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -6907,18 +8135,18 @@ func BenchmarkEnvironmentProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkEnvironmentProtoUnmarshal(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(NewPopulatedEnvironment(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredential(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Environment{} + msg := &Credential{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -6929,15 +8157,15 @@ func BenchmarkEnvironmentProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestEnvironment_VariableProto(t *testing.T) { +func TestCredentialsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment_Variable(popr, false) + p := NewPopulatedCredentials(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment_Variable{} + msg := &Credentials{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6963,10 +8191,10 @@ func TestEnvironment_VariableProto(t *testing.T) { } } -func TestEnvironment_VariableMarshalTo(t *testing.T) { +func TestCredentialsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnvironment_Variable(popr, false) + p := NewPopulatedCredentials(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -6976,7 +8204,7 @@ func TestEnvironment_VariableMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Environment_Variable{} + msg := &Credentials{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -6991,12 +8219,12 @@ func TestEnvironment_VariableMarshalTo(t *testing.T) { } } -func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { +func BenchmarkCredentialsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Environment_Variable, 10000) + pops := make([]*Credentials, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedEnvironment_Variable(popr, false) + pops[i] = NewPopulatedCredentials(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7009,18 +8237,18 @@ func BenchmarkEnvironment_VariableProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkEnvironment_VariableProtoUnmarshal(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(NewPopulatedEnvironment_Variable(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCredentials(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Environment_Variable{} + msg := &Credentials{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7031,15 +8259,15 @@ func BenchmarkEnvironment_VariableProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestParameterProto(t *testing.T) { +func TestRateLimitProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameter(popr, false) + p := NewPopulatedRateLimit(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} + msg := &RateLimit{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7065,10 +8293,10 @@ func TestParameterProto(t *testing.T) { } } -func TestParameterMarshalTo(t *testing.T) { +func TestRateLimitMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameter(popr, false) + p := NewPopulatedRateLimit(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7078,7 +8306,7 @@ func TestParameterMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameter{} + msg := &RateLimit{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7093,12 +8321,12 @@ func TestParameterMarshalTo(t *testing.T) { } } -func BenchmarkParameterProtoMarshal(b *testing.B) { +func BenchmarkRateLimitProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Parameter, 10000) + pops := make([]*RateLimit, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedParameter(popr, false) + pops[i] = NewPopulatedRateLimit(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7111,18 +8339,18 @@ func BenchmarkParameterProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkParameterProtoUnmarshal(b *testing.B) { +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(NewPopulatedParameter(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimit(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Parameter{} + msg := &RateLimit{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7133,15 +8361,15 @@ func BenchmarkParameterProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestParametersProto(t *testing.T) { +func TestRateLimitsProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameters(popr, false) + p := NewPopulatedRateLimits(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameters{} + msg := &RateLimits{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7167,10 +8395,10 @@ func TestParametersProto(t *testing.T) { } } -func TestParametersMarshalTo(t *testing.T) { +func TestRateLimitsMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedParameters(popr, false) + p := NewPopulatedRateLimits(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7180,7 +8408,7 @@ func TestParametersMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Parameters{} + msg := &RateLimits{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7195,12 +8423,12 @@ func TestParametersMarshalTo(t *testing.T) { } } -func BenchmarkParametersProtoMarshal(b *testing.B) { +func BenchmarkRateLimitsProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Parameters, 10000) + pops := make([]*RateLimits, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedParameters(popr, false) + pops[i] = NewPopulatedRateLimits(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7213,18 +8441,18 @@ func BenchmarkParametersProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkParametersProtoUnmarshal(b *testing.B) { +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(NewPopulatedParameters(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRateLimits(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Parameters{} + msg := &RateLimits{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7235,15 +8463,15 @@ func BenchmarkParametersProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCredentialProto(t *testing.T) { +func TestImageProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredential(popr, false) + p := NewPopulatedImage(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} + msg := &Image{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7269,10 +8497,10 @@ func TestCredentialProto(t *testing.T) { } } -func TestCredentialMarshalTo(t *testing.T) { +func TestImageMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredential(popr, false) + p := NewPopulatedImage(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7282,7 +8510,7 @@ func TestCredentialMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credential{} + msg := &Image{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7297,12 +8525,12 @@ func TestCredentialMarshalTo(t *testing.T) { } } -func BenchmarkCredentialProtoMarshal(b *testing.B) { +func BenchmarkImageProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Credential, 10000) + pops := make([]*Image, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCredential(popr, false) + pops[i] = NewPopulatedImage(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7315,18 +8543,18 @@ func BenchmarkCredentialProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCredentialProtoUnmarshal(b *testing.B) { +func BenchmarkImageProtoUnmarshal(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(NewPopulatedImage(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Credential{} + msg := &Image{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7337,15 +8565,15 @@ func BenchmarkCredentialProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCredentialsProto(t *testing.T) { +func TestImage_AppcProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredentials(popr, false) + p := NewPopulatedImage_Appc(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credentials{} + msg := &Image_Appc{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7371,10 +8599,10 @@ func TestCredentialsProto(t *testing.T) { } } -func TestCredentialsMarshalTo(t *testing.T) { +func TestImage_AppcMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCredentials(popr, false) + p := NewPopulatedImage_Appc(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7384,7 +8612,7 @@ func TestCredentialsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Credentials{} + msg := &Image_Appc{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7399,12 +8627,12 @@ func TestCredentialsMarshalTo(t *testing.T) { } } -func BenchmarkCredentialsProtoMarshal(b *testing.B) { +func BenchmarkImage_AppcProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Credentials, 10000) + pops := make([]*Image_Appc, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCredentials(popr, false) + pops[i] = NewPopulatedImage_Appc(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7417,18 +8645,18 @@ func BenchmarkCredentialsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { +func BenchmarkImage_AppcProtoUnmarshal(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(NewPopulatedImage_Appc(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Credentials{} + msg := &Image_Appc{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7439,15 +8667,15 @@ func BenchmarkCredentialsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRateLimitProto(t *testing.T) { +func TestImage_DockerProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimit(popr, false) + p := NewPopulatedImage_Docker(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} + msg := &Image_Docker{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7473,10 +8701,10 @@ func TestRateLimitProto(t *testing.T) { } } -func TestRateLimitMarshalTo(t *testing.T) { +func TestImage_DockerMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimit(popr, false) + p := NewPopulatedImage_Docker(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7486,7 +8714,7 @@ func TestRateLimitMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimit{} + msg := &Image_Docker{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7501,12 +8729,12 @@ func TestRateLimitMarshalTo(t *testing.T) { } } -func BenchmarkRateLimitProtoMarshal(b *testing.B) { +func BenchmarkImage_DockerProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RateLimit, 10000) + pops := make([]*Image_Docker, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRateLimit(popr, false) + pops[i] = NewPopulatedImage_Docker(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7519,18 +8747,18 @@ func BenchmarkRateLimitProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { +func BenchmarkImage_DockerProtoUnmarshal(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(NewPopulatedImage_Docker(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &RateLimit{} + msg := &Image_Docker{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7541,15 +8769,15 @@ func BenchmarkRateLimitProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestRateLimitsProto(t *testing.T) { +func TestVolumeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimits(popr, false) + p := NewPopulatedVolume(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimits{} + msg := &Volume{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7575,10 +8803,10 @@ func TestRateLimitsProto(t *testing.T) { } } -func TestRateLimitsMarshalTo(t *testing.T) { +func TestVolumeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRateLimits(popr, false) + p := NewPopulatedVolume(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7588,7 +8816,7 @@ func TestRateLimitsMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &RateLimits{} + msg := &Volume{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7603,12 +8831,12 @@ func TestRateLimitsMarshalTo(t *testing.T) { } } -func BenchmarkRateLimitsProtoMarshal(b *testing.B) { +func BenchmarkVolumeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*RateLimits, 10000) + pops := make([]*Volume, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRateLimits(popr, false) + pops[i] = NewPopulatedVolume(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7621,18 +8849,18 @@ func BenchmarkRateLimitsProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { +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(NewPopulatedRateLimits(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &RateLimits{} + msg := &Volume{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7643,15 +8871,15 @@ func BenchmarkRateLimitsProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestImageProto(t *testing.T) { +func TestVolume_SourceProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage(popr, false) + p := NewPopulatedVolume_Source(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image{} + msg := &Volume_Source{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7677,10 +8905,10 @@ func TestImageProto(t *testing.T) { } } -func TestImageMarshalTo(t *testing.T) { +func TestVolume_SourceMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage(popr, false) + p := NewPopulatedVolume_Source(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7690,7 +8918,7 @@ func TestImageMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image{} + msg := &Volume_Source{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7705,12 +8933,12 @@ func TestImageMarshalTo(t *testing.T) { } } -func BenchmarkImageProtoMarshal(b *testing.B) { +func BenchmarkVolume_SourceProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Image, 10000) + pops := make([]*Volume_Source, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedImage(popr, false) + pops[i] = NewPopulatedVolume_Source(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7723,18 +8951,18 @@ func BenchmarkImageProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkImageProtoUnmarshal(b *testing.B) { +func BenchmarkVolume_SourceProtoUnmarshal(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(NewPopulatedImage(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume_Source(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Image{} + msg := &Volume_Source{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7745,15 +8973,15 @@ func BenchmarkImageProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestImage_AppcProto(t *testing.T) { +func TestVolume_Source_DockerVolumeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Appc(popr, false) + p := NewPopulatedVolume_Source_DockerVolume(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_Appc{} + msg := &Volume_Source_DockerVolume{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7779,10 +9007,10 @@ func TestImage_AppcProto(t *testing.T) { } } -func TestImage_AppcMarshalTo(t *testing.T) { +func TestVolume_Source_DockerVolumeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Appc(popr, false) + p := NewPopulatedVolume_Source_DockerVolume(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7792,7 +9020,7 @@ func TestImage_AppcMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_Appc{} + msg := &Volume_Source_DockerVolume{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7807,12 +9035,12 @@ func TestImage_AppcMarshalTo(t *testing.T) { } } -func BenchmarkImage_AppcProtoMarshal(b *testing.B) { +func BenchmarkVolume_Source_DockerVolumeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Image_Appc, 10000) + pops := make([]*Volume_Source_DockerVolume, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedImage_Appc(popr, false) + pops[i] = NewPopulatedVolume_Source_DockerVolume(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7825,18 +9053,18 @@ func BenchmarkImage_AppcProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkImage_AppcProtoUnmarshal(b *testing.B) { +func BenchmarkVolume_Source_DockerVolumeProtoUnmarshal(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(NewPopulatedImage_Appc(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume_Source_DockerVolume(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Image_Appc{} + msg := &Volume_Source_DockerVolume{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7847,15 +9075,15 @@ func BenchmarkImage_AppcProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestImage_DockerProto(t *testing.T) { +func TestVolume_Source_SandboxPathProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, false) + p := NewPopulatedVolume_Source_SandboxPath(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_Docker{} + msg := &Volume_Source_SandboxPath{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7881,10 +9109,10 @@ func TestImage_DockerProto(t *testing.T) { } } -func TestImage_DockerMarshalTo(t *testing.T) { +func TestVolume_Source_SandboxPathMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, false) + p := NewPopulatedVolume_Source_SandboxPath(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7894,7 +9122,7 @@ func TestImage_DockerMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Image_Docker{} + msg := &Volume_Source_SandboxPath{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7909,12 +9137,12 @@ func TestImage_DockerMarshalTo(t *testing.T) { } } -func BenchmarkImage_DockerProtoMarshal(b *testing.B) { +func BenchmarkVolume_Source_SandboxPathProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Image_Docker, 10000) + pops := make([]*Volume_Source_SandboxPath, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedImage_Docker(popr, false) + pops[i] = NewPopulatedVolume_Source_SandboxPath(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -7927,18 +9155,18 @@ func BenchmarkImage_DockerProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkImage_DockerProtoUnmarshal(b *testing.B) { +func BenchmarkVolume_Source_SandboxPathProtoUnmarshal(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(NewPopulatedImage_Docker(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedVolume_Source_SandboxPath(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Image_Docker{} + msg := &Volume_Source_SandboxPath{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -7949,15 +9177,15 @@ func BenchmarkImage_DockerProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestVolumeProto(t *testing.T) { +func TestNetworkInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, false) + p := NewPopulatedNetworkInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} + msg := &NetworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -7983,10 +9211,10 @@ func TestVolumeProto(t *testing.T) { } } -func TestVolumeMarshalTo(t *testing.T) { +func TestNetworkInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, false) + p := NewPopulatedNetworkInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -7996,7 +9224,7 @@ func TestVolumeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume{} + msg := &NetworkInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8011,12 +9239,12 @@ func TestVolumeMarshalTo(t *testing.T) { } } -func BenchmarkVolumeProtoMarshal(b *testing.B) { +func BenchmarkNetworkInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Volume, 10000) + pops := make([]*NetworkInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolume(popr, false) + pops[i] = NewPopulatedNetworkInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8029,18 +9257,18 @@ func BenchmarkVolumeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkVolumeProtoUnmarshal(b *testing.B) { +func BenchmarkNetworkInfoProtoUnmarshal(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(NewPopulatedNetworkInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Volume{} + msg := &NetworkInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8051,15 +9279,15 @@ func BenchmarkVolumeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestVolume_SourceProto(t *testing.T) { +func TestNetworkInfo_IPAddressProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source(popr, false) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume_Source{} + msg := &NetworkInfo_IPAddress{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8085,10 +9313,10 @@ func TestVolume_SourceProto(t *testing.T) { } } -func TestVolume_SourceMarshalTo(t *testing.T) { +func TestNetworkInfo_IPAddressMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source(popr, false) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8098,7 +9326,7 @@ func TestVolume_SourceMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume_Source{} + msg := &NetworkInfo_IPAddress{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8113,12 +9341,12 @@ func TestVolume_SourceMarshalTo(t *testing.T) { } } -func BenchmarkVolume_SourceProtoMarshal(b *testing.B) { +func BenchmarkNetworkInfo_IPAddressProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Volume_Source, 10000) + pops := make([]*NetworkInfo_IPAddress, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolume_Source(popr, false) + pops[i] = NewPopulatedNetworkInfo_IPAddress(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8131,18 +9359,18 @@ func BenchmarkVolume_SourceProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkVolume_SourceProtoUnmarshal(b *testing.B) { +func BenchmarkNetworkInfo_IPAddressProtoUnmarshal(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_Source(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNetworkInfo_IPAddress(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Volume_Source{} + msg := &NetworkInfo_IPAddress{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8153,15 +9381,15 @@ func BenchmarkVolume_SourceProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestVolume_Source_DockerVolumeProto(t *testing.T) { +func TestNetworkInfo_PortMappingProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_DockerVolume(popr, false) + p := NewPopulatedNetworkInfo_PortMapping(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume_Source_DockerVolume{} + msg := &NetworkInfo_PortMapping{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8187,10 +9415,10 @@ func TestVolume_Source_DockerVolumeProto(t *testing.T) { } } -func TestVolume_Source_DockerVolumeMarshalTo(t *testing.T) { +func TestNetworkInfo_PortMappingMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_DockerVolume(popr, false) + p := NewPopulatedNetworkInfo_PortMapping(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8200,7 +9428,7 @@ func TestVolume_Source_DockerVolumeMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume_Source_DockerVolume{} + msg := &NetworkInfo_PortMapping{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8215,12 +9443,12 @@ func TestVolume_Source_DockerVolumeMarshalTo(t *testing.T) { } } -func BenchmarkVolume_Source_DockerVolumeProtoMarshal(b *testing.B) { +func BenchmarkNetworkInfo_PortMappingProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Volume_Source_DockerVolume, 10000) + pops := make([]*NetworkInfo_PortMapping, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolume_Source_DockerVolume(popr, false) + pops[i] = NewPopulatedNetworkInfo_PortMapping(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8233,18 +9461,18 @@ func BenchmarkVolume_Source_DockerVolumeProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkVolume_Source_DockerVolumeProtoUnmarshal(b *testing.B) { +func BenchmarkNetworkInfo_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(NewPopulatedVolume_Source_DockerVolume(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNetworkInfo_PortMapping(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Volume_Source_DockerVolume{} + msg := &NetworkInfo_PortMapping{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8255,15 +9483,15 @@ func BenchmarkVolume_Source_DockerVolumeProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestVolume_Source_SandboxPathProto(t *testing.T) { +func TestCapabilityInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_SandboxPath(popr, false) + p := NewPopulatedCapabilityInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume_Source_SandboxPath{} + msg := &CapabilityInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8289,10 +9517,10 @@ func TestVolume_Source_SandboxPathProto(t *testing.T) { } } -func TestVolume_Source_SandboxPathMarshalTo(t *testing.T) { +func TestCapabilityInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_SandboxPath(popr, false) + p := NewPopulatedCapabilityInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8302,7 +9530,7 @@ func TestVolume_Source_SandboxPathMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Volume_Source_SandboxPath{} + msg := &CapabilityInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8317,12 +9545,12 @@ func TestVolume_Source_SandboxPathMarshalTo(t *testing.T) { } } -func BenchmarkVolume_Source_SandboxPathProtoMarshal(b *testing.B) { +func BenchmarkCapabilityInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Volume_Source_SandboxPath, 10000) + pops := make([]*CapabilityInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedVolume_Source_SandboxPath(popr, false) + pops[i] = NewPopulatedCapabilityInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8335,18 +9563,18 @@ func BenchmarkVolume_Source_SandboxPathProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkVolume_Source_SandboxPathProtoUnmarshal(b *testing.B) { +func BenchmarkCapabilityInfoProtoUnmarshal(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_Source_SandboxPath(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCapabilityInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &Volume_Source_SandboxPath{} + msg := &CapabilityInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8357,15 +9585,15 @@ func BenchmarkVolume_Source_SandboxPathProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestNetworkInfoProto(t *testing.T) { +func TestLinuxInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo(popr, false) + p := NewPopulatedLinuxInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &NetworkInfo{} + msg := &LinuxInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8391,10 +9619,10 @@ func TestNetworkInfoProto(t *testing.T) { } } -func TestNetworkInfoMarshalTo(t *testing.T) { +func TestLinuxInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo(popr, false) + p := NewPopulatedLinuxInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8404,7 +9632,7 @@ func TestNetworkInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &NetworkInfo{} + msg := &LinuxInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8419,12 +9647,12 @@ func TestNetworkInfoMarshalTo(t *testing.T) { } } -func BenchmarkNetworkInfoProtoMarshal(b *testing.B) { +func BenchmarkLinuxInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*NetworkInfo, 10000) + pops := make([]*LinuxInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNetworkInfo(popr, false) + pops[i] = NewPopulatedLinuxInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8437,18 +9665,18 @@ func BenchmarkNetworkInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkNetworkInfoProtoUnmarshal(b *testing.B) { +func BenchmarkLinuxInfoProtoUnmarshal(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(NewPopulatedNetworkInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLinuxInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &NetworkInfo{} + msg := &LinuxInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8459,15 +9687,15 @@ func BenchmarkNetworkInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestNetworkInfo_IPAddressProto(t *testing.T) { +func TestRLimitInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_IPAddress(popr, false) + p := NewPopulatedRLimitInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &NetworkInfo_IPAddress{} + msg := &RLimitInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8493,10 +9721,10 @@ func TestNetworkInfo_IPAddressProto(t *testing.T) { } } -func TestNetworkInfo_IPAddressMarshalTo(t *testing.T) { +func TestRLimitInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_IPAddress(popr, false) + p := NewPopulatedRLimitInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8506,7 +9734,7 @@ func TestNetworkInfo_IPAddressMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &NetworkInfo_IPAddress{} + msg := &RLimitInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8521,12 +9749,12 @@ func TestNetworkInfo_IPAddressMarshalTo(t *testing.T) { } } -func BenchmarkNetworkInfo_IPAddressProtoMarshal(b *testing.B) { +func BenchmarkRLimitInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*NetworkInfo_IPAddress, 10000) + pops := make([]*RLimitInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNetworkInfo_IPAddress(popr, false) + pops[i] = NewPopulatedRLimitInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8539,18 +9767,18 @@ func BenchmarkNetworkInfo_IPAddressProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkNetworkInfo_IPAddressProtoUnmarshal(b *testing.B) { +func BenchmarkRLimitInfoProtoUnmarshal(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(NewPopulatedNetworkInfo_IPAddress(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRLimitInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &NetworkInfo_IPAddress{} + msg := &RLimitInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8561,15 +9789,15 @@ func BenchmarkNetworkInfo_IPAddressProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestNetworkInfo_PortMappingProto(t *testing.T) { +func TestRLimitInfo_RLimitProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_PortMapping(popr, false) + p := NewPopulatedRLimitInfo_RLimit(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &NetworkInfo_PortMapping{} + msg := &RLimitInfo_RLimit{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8595,10 +9823,10 @@ func TestNetworkInfo_PortMappingProto(t *testing.T) { } } -func TestNetworkInfo_PortMappingMarshalTo(t *testing.T) { +func TestRLimitInfo_RLimitMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_PortMapping(popr, false) + p := NewPopulatedRLimitInfo_RLimit(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8608,7 +9836,7 @@ func TestNetworkInfo_PortMappingMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &NetworkInfo_PortMapping{} + msg := &RLimitInfo_RLimit{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8623,12 +9851,12 @@ func TestNetworkInfo_PortMappingMarshalTo(t *testing.T) { } } -func BenchmarkNetworkInfo_PortMappingProtoMarshal(b *testing.B) { +func BenchmarkRLimitInfo_RLimitProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*NetworkInfo_PortMapping, 10000) + pops := make([]*RLimitInfo_RLimit, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNetworkInfo_PortMapping(popr, false) + pops[i] = NewPopulatedRLimitInfo_RLimit(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8641,18 +9869,18 @@ func BenchmarkNetworkInfo_PortMappingProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkNetworkInfo_PortMappingProtoUnmarshal(b *testing.B) { +func BenchmarkRLimitInfo_RLimitProtoUnmarshal(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(NewPopulatedNetworkInfo_PortMapping(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRLimitInfo_RLimit(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &NetworkInfo_PortMapping{} + msg := &RLimitInfo_RLimit{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8663,15 +9891,15 @@ func BenchmarkNetworkInfo_PortMappingProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestCapabilityInfoProto(t *testing.T) { +func TestTTYInfoProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCapabilityInfo(popr, false) + p := NewPopulatedTTYInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CapabilityInfo{} + msg := &TTYInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8697,10 +9925,10 @@ func TestCapabilityInfoProto(t *testing.T) { } } -func TestCapabilityInfoMarshalTo(t *testing.T) { +func TestTTYInfoMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCapabilityInfo(popr, false) + p := NewPopulatedTTYInfo(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8710,7 +9938,7 @@ func TestCapabilityInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &CapabilityInfo{} + msg := &TTYInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8725,12 +9953,12 @@ func TestCapabilityInfoMarshalTo(t *testing.T) { } } -func BenchmarkCapabilityInfoProtoMarshal(b *testing.B) { +func BenchmarkTTYInfoProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*CapabilityInfo, 10000) + pops := make([]*TTYInfo, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCapabilityInfo(popr, false) + pops[i] = NewPopulatedTTYInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8743,18 +9971,18 @@ func BenchmarkCapabilityInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkCapabilityInfoProtoUnmarshal(b *testing.B) { +func BenchmarkTTYInfoProtoUnmarshal(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(NewPopulatedCapabilityInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTTYInfo(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &CapabilityInfo{} + msg := &TTYInfo{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -8765,15 +9993,15 @@ func BenchmarkCapabilityInfoProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestLinuxInfoProto(t *testing.T) { +func TestTTYInfo_WindowSizeProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInfo(popr, false) + p := NewPopulatedTTYInfo_WindowSize(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &LinuxInfo{} + msg := &TTYInfo_WindowSize{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8799,10 +10027,10 @@ func TestLinuxInfoProto(t *testing.T) { } } -func TestLinuxInfoMarshalTo(t *testing.T) { +func TestTTYInfo_WindowSizeMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInfo(popr, false) + p := NewPopulatedTTYInfo_WindowSize(popr, false) size := p.Size() data := make([]byte, size) for i := range data { @@ -8812,7 +10040,7 @@ func TestLinuxInfoMarshalTo(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &LinuxInfo{} + msg := &TTYInfo_WindowSize{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -8827,12 +10055,12 @@ func TestLinuxInfoMarshalTo(t *testing.T) { } } -func BenchmarkLinuxInfoProtoMarshal(b *testing.B) { +func BenchmarkTTYInfo_WindowSizeProtoMarshal(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*LinuxInfo, 10000) + pops := make([]*TTYInfo_WindowSize, 10000) for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedLinuxInfo(popr, false) + pops[i] = NewPopulatedTTYInfo_WindowSize(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -8845,18 +10073,18 @@ func BenchmarkLinuxInfoProtoMarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func BenchmarkLinuxInfoProtoUnmarshal(b *testing.B) { +func BenchmarkTTYInfo_WindowSizeProtoUnmarshal(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(NewPopulatedLinuxInfo(popr, false)) + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTTYInfo_WindowSize(popr, false)) if err != nil { panic(err) } datas[i] = data } - msg := &LinuxInfo{} + msg := &TTYInfo_WindowSize{} b.ResetTimer() for i := 0; i < b.N; i++ { total += len(datas[i%10000]) @@ -11018,6 +12246,69 @@ func TestFrameworkInfo_CapabilityJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestCheckInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo(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 := &CheckInfo{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCheckInfo_CommandJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo_Command(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 := &CheckInfo_Command{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCheckInfo_HttpJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo_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 := &CheckInfo_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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestHealthCheckJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -11207,6 +12498,27 @@ func TestAgentInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestAgentInfo_CapabilityJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAgentInfo_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 := &AgentInfo_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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestValueJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -11321,7 +12633,28 @@ func TestValue_TextJSON(t *testing.T) { if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } - msg := &Value_Text{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +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) @@ -11333,16 +12666,16 @@ func TestValue_TextJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestAttributeJSON(t *testing.T) { +func TestResourceJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAttribute(popr, true) + 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 := &Attribute{} + msg := &Resource{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -11354,16 +12687,16 @@ func TestAttributeJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } -func TestResourceJSON(t *testing.T) { +func TestResource_AllocationInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResource(popr, true) + p := NewPopulatedResource_AllocationInfo(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{} + msg := &Resource_AllocationInfo{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) @@ -12047,6 +13380,69 @@ func TestTaskJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestCheckStatusInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo(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 := &CheckStatusInfo{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCheckStatusInfo_CommandJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo_Command(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 := &CheckStatusInfo_Command{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCheckStatusInfo_HttpJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo_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 := &CheckStatusInfo_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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestTaskStatusJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -12509,6 +13905,90 @@ func TestLinuxInfoJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestRLimitInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRLimitInfo(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 := &RLimitInfo{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRLimitInfo_RLimitJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRLimitInfo_RLimit(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 := &RLimitInfo_RLimit{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTTYInfoJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTTYInfo(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 := &TTYInfo{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTTYInfo_WindowSizeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTTYInfo_WindowSize(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 := &TTYInfo_WindowSize{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestContainerInfoJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -13397,6 +14877,108 @@ func TestFrameworkInfo_CapabilityProtoCompactText(t *testing.T) { } } +func TestCheckInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CheckInfo{} + 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("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 TestCheckInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CheckInfo{} + 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("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 TestCheckInfo_CommandProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo_Command(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CheckInfo_Command{} + 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("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 TestCheckInfo_CommandProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo_Command(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CheckInfo_Command{} + 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("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 TestCheckInfo_HttpProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo_Http(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CheckInfo_Http{} + 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("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 TestCheckInfo_HttpProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckInfo_Http(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CheckInfo_Http{} + 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("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 TestHealthCheckProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -13657,7 +15239,41 @@ func TestMasterInfoProtoCompactText(t *testing.T) { popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMasterInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &MasterInfo{} + msg := &MasterInfo{} + 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("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 TestAgentInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAgentInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AgentInfo{} + 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("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 TestAgentInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAgentInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AgentInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -13669,12 +15285,12 @@ func TestMasterInfoProtoCompactText(t *testing.T) { } } -func TestAgentInfoProtoText(t *testing.T) { +func TestAgentInfo_CapabilityProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAgentInfo(popr, true) + p := NewPopulatedAgentInfo_Capability(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AgentInfo{} + msg := &AgentInfo_Capability{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -13686,12 +15302,12 @@ func TestAgentInfoProtoText(t *testing.T) { } } -func TestAgentInfoProtoCompactText(t *testing.T) { +func TestAgentInfo_CapabilityProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAgentInfo(popr, true) + p := NewPopulatedAgentInfo_Capability(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AgentInfo{} + msg := &AgentInfo_Capability{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -13975,6 +15591,40 @@ func TestResourceProtoCompactText(t *testing.T) { } } +func TestResource_AllocationInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_AllocationInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Resource_AllocationInfo{} + 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("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 TestResource_AllocationInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_AllocationInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Resource_AllocationInfo{} + 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("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 TestResource_ReservationInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -15063,6 +16713,108 @@ func TestTaskProtoCompactText(t *testing.T) { } } +func TestCheckStatusInfoProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CheckStatusInfo{} + 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("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 TestCheckStatusInfoProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CheckStatusInfo{} + 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("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 TestCheckStatusInfo_CommandProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo_Command(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CheckStatusInfo_Command{} + 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("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 TestCheckStatusInfo_CommandProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo_Command(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CheckStatusInfo_Command{} + 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("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 TestCheckStatusInfo_HttpProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo_Http(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CheckStatusInfo_Http{} + 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("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 TestCheckStatusInfo_HttpProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCheckStatusInfo_Http(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CheckStatusInfo_Http{} + 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("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 TestTaskStatusProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -15457,9 +17209,145 @@ func TestImage_AppcProtoText(t *testing.T) { func TestImage_AppcProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Appc(popr, true) + p := NewPopulatedImage_Appc(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Image_Appc{} + 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("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 TestImage_DockerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage_Docker(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Image_Docker{} + 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("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 TestImage_DockerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedImage_Docker(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Image_Docker{} + 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("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 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 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 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) + } + 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 TestVolume_SourceProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume_Source(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Volume_Source{} + 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("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 TestVolume_SourceProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume_Source(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Volume_Source{} + 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("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 TestVolume_Source_DockerVolumeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume_Source_DockerVolume(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Volume_Source_DockerVolume{} + 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("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 TestVolume_Source_DockerVolumeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedVolume_Source_DockerVolume(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Image_Appc{} + msg := &Volume_Source_DockerVolume{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15471,12 +17359,12 @@ func TestImage_AppcProtoCompactText(t *testing.T) { } } -func TestImage_DockerProtoText(t *testing.T) { +func TestVolume_Source_SandboxPathProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, true) + p := NewPopulatedVolume_Source_SandboxPath(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Image_Docker{} + msg := &Volume_Source_SandboxPath{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15488,12 +17376,12 @@ func TestImage_DockerProtoText(t *testing.T) { } } -func TestImage_DockerProtoCompactText(t *testing.T) { +func TestVolume_Source_SandboxPathProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedImage_Docker(popr, true) + p := NewPopulatedVolume_Source_SandboxPath(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Image_Docker{} + msg := &Volume_Source_SandboxPath{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15505,12 +17393,12 @@ func TestImage_DockerProtoCompactText(t *testing.T) { } } -func TestVolumeProtoText(t *testing.T) { +func TestNetworkInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, true) + p := NewPopulatedNetworkInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Volume{} + msg := &NetworkInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15522,12 +17410,12 @@ func TestVolumeProtoText(t *testing.T) { } } -func TestVolumeProtoCompactText(t *testing.T) { +func TestNetworkInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume(popr, true) + p := NewPopulatedNetworkInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Volume{} + msg := &NetworkInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15539,12 +17427,12 @@ func TestVolumeProtoCompactText(t *testing.T) { } } -func TestVolume_SourceProtoText(t *testing.T) { +func TestNetworkInfo_IPAddressProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source(popr, true) + p := NewPopulatedNetworkInfo_IPAddress(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Volume_Source{} + msg := &NetworkInfo_IPAddress{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15556,12 +17444,12 @@ func TestVolume_SourceProtoText(t *testing.T) { } } -func TestVolume_SourceProtoCompactText(t *testing.T) { +func TestNetworkInfo_IPAddressProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source(popr, true) + p := NewPopulatedNetworkInfo_IPAddress(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Volume_Source{} + msg := &NetworkInfo_IPAddress{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15573,12 +17461,12 @@ func TestVolume_SourceProtoCompactText(t *testing.T) { } } -func TestVolume_Source_DockerVolumeProtoText(t *testing.T) { +func TestNetworkInfo_PortMappingProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_DockerVolume(popr, true) + p := NewPopulatedNetworkInfo_PortMapping(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Volume_Source_DockerVolume{} + msg := &NetworkInfo_PortMapping{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15590,12 +17478,12 @@ func TestVolume_Source_DockerVolumeProtoText(t *testing.T) { } } -func TestVolume_Source_DockerVolumeProtoCompactText(t *testing.T) { +func TestNetworkInfo_PortMappingProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_DockerVolume(popr, true) + p := NewPopulatedNetworkInfo_PortMapping(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Volume_Source_DockerVolume{} + msg := &NetworkInfo_PortMapping{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15607,12 +17495,12 @@ func TestVolume_Source_DockerVolumeProtoCompactText(t *testing.T) { } } -func TestVolume_Source_SandboxPathProtoText(t *testing.T) { +func TestCapabilityInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_SandboxPath(popr, true) + p := NewPopulatedCapabilityInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Volume_Source_SandboxPath{} + msg := &CapabilityInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15624,12 +17512,12 @@ func TestVolume_Source_SandboxPathProtoText(t *testing.T) { } } -func TestVolume_Source_SandboxPathProtoCompactText(t *testing.T) { +func TestCapabilityInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVolume_Source_SandboxPath(popr, true) + p := NewPopulatedCapabilityInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Volume_Source_SandboxPath{} + msg := &CapabilityInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15641,12 +17529,12 @@ func TestVolume_Source_SandboxPathProtoCompactText(t *testing.T) { } } -func TestNetworkInfoProtoText(t *testing.T) { +func TestLinuxInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo(popr, true) + p := NewPopulatedLinuxInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NetworkInfo{} + msg := &LinuxInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15658,12 +17546,12 @@ func TestNetworkInfoProtoText(t *testing.T) { } } -func TestNetworkInfoProtoCompactText(t *testing.T) { +func TestLinuxInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo(popr, true) + p := NewPopulatedLinuxInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NetworkInfo{} + msg := &LinuxInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15675,12 +17563,12 @@ func TestNetworkInfoProtoCompactText(t *testing.T) { } } -func TestNetworkInfo_IPAddressProtoText(t *testing.T) { +func TestRLimitInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_IPAddress(popr, true) + p := NewPopulatedRLimitInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NetworkInfo_IPAddress{} + msg := &RLimitInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15692,12 +17580,12 @@ func TestNetworkInfo_IPAddressProtoText(t *testing.T) { } } -func TestNetworkInfo_IPAddressProtoCompactText(t *testing.T) { +func TestRLimitInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_IPAddress(popr, true) + p := NewPopulatedRLimitInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NetworkInfo_IPAddress{} + msg := &RLimitInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15709,12 +17597,12 @@ func TestNetworkInfo_IPAddressProtoCompactText(t *testing.T) { } } -func TestNetworkInfo_PortMappingProtoText(t *testing.T) { +func TestRLimitInfo_RLimitProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_PortMapping(popr, true) + p := NewPopulatedRLimitInfo_RLimit(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NetworkInfo_PortMapping{} + msg := &RLimitInfo_RLimit{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15726,12 +17614,12 @@ func TestNetworkInfo_PortMappingProtoText(t *testing.T) { } } -func TestNetworkInfo_PortMappingProtoCompactText(t *testing.T) { +func TestRLimitInfo_RLimitProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInfo_PortMapping(popr, true) + p := NewPopulatedRLimitInfo_RLimit(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NetworkInfo_PortMapping{} + msg := &RLimitInfo_RLimit{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15743,12 +17631,12 @@ func TestNetworkInfo_PortMappingProtoCompactText(t *testing.T) { } } -func TestCapabilityInfoProtoText(t *testing.T) { +func TestTTYInfoProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCapabilityInfo(popr, true) + p := NewPopulatedTTYInfo(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &CapabilityInfo{} + msg := &TTYInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15760,12 +17648,12 @@ func TestCapabilityInfoProtoText(t *testing.T) { } } -func TestCapabilityInfoProtoCompactText(t *testing.T) { +func TestTTYInfoProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCapabilityInfo(popr, true) + p := NewPopulatedTTYInfo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &CapabilityInfo{} + msg := &TTYInfo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15777,12 +17665,12 @@ func TestCapabilityInfoProtoCompactText(t *testing.T) { } } -func TestLinuxInfoProtoText(t *testing.T) { +func TestTTYInfo_WindowSizeProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInfo(popr, true) + p := NewPopulatedTTYInfo_WindowSize(popr, true) data := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &LinuxInfo{} + msg := &TTYInfo_WindowSize{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -15794,12 +17682,12 @@ func TestLinuxInfoProtoText(t *testing.T) { } } -func TestLinuxInfoProtoCompactText(t *testing.T) { +func TestTTYInfo_WindowSizeProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedLinuxInfo(popr, true) + p := NewPopulatedTTYInfo_WindowSize(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &LinuxInfo{} + msg := &TTYInfo_WindowSize{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } @@ -16648,6 +18536,51 @@ func TestFrameworkInfo_CapabilityVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } +func TestCheckInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CheckInfo{} + 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 TestCheckInfo_CommandVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo_Command(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CheckInfo_Command{} + 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 TestCheckInfo_HttpVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo_Http(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CheckInfo_Http{} + 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 *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedHealthCheck(popr, false) @@ -16783,6 +18716,21 @@ func TestAgentInfoVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } +func TestAgentInfo_CapabilityVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAgentInfo_Capability(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AgentInfo_Capability{} + 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 *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue(popr, false) @@ -16903,6 +18851,21 @@ func TestResourceVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } +func TestResource_AllocationInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_AllocationInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Resource_AllocationInfo{} + 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 TestResource_ReservationInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedResource_ReservationInfo(popr, false) @@ -17383,6 +19346,51 @@ func TestTaskVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } +func TestCheckStatusInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CheckStatusInfo{} + 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 TestCheckStatusInfo_CommandVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo_Command(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CheckStatusInfo_Command{} + 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 TestCheckStatusInfo_HttpVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo_Http(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CheckStatusInfo_Http{} + 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 *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTaskStatus(popr, false) @@ -17640,12 +19648,72 @@ func TestVolume_Source_SandboxPathVerboseEqual(t *testing.T) { } func TestNetworkInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNetworkInfo(popr, false) + p := NewPopulatedNetworkInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NetworkInfo{} + 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 TestNetworkInfo_IPAddressVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNetworkInfo_IPAddress(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NetworkInfo_IPAddress{} + 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 TestNetworkInfo_PortMappingVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNetworkInfo_PortMapping(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NetworkInfo_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 TestCapabilityInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCapabilityInfo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CapabilityInfo{} + 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 TestLinuxInfoVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLinuxInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &NetworkInfo{} + msg := &LinuxInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } @@ -17653,14 +19721,14 @@ func TestNetworkInfoVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestNetworkInfo_IPAddressVerboseEqual(t *testing.T) { +func TestRLimitInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNetworkInfo_IPAddress(popr, false) + p := NewPopulatedRLimitInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &NetworkInfo_IPAddress{} + msg := &RLimitInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } @@ -17668,14 +19736,14 @@ func TestNetworkInfo_IPAddressVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestNetworkInfo_PortMappingVerboseEqual(t *testing.T) { +func TestRLimitInfo_RLimitVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNetworkInfo_PortMapping(popr, false) + p := NewPopulatedRLimitInfo_RLimit(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &NetworkInfo_PortMapping{} + msg := &RLimitInfo_RLimit{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } @@ -17683,14 +19751,14 @@ func TestNetworkInfo_PortMappingVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestCapabilityInfoVerboseEqual(t *testing.T) { +func TestTTYInfoVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCapabilityInfo(popr, false) + p := NewPopulatedTTYInfo(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &CapabilityInfo{} + msg := &TTYInfo{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } @@ -17698,14 +19766,14 @@ func TestCapabilityInfoVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } -func TestLinuxInfoVerboseEqual(t *testing.T) { +func TestTTYInfo_WindowSizeVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLinuxInfo(popr, false) + p := NewPopulatedTTYInfo_WindowSize(popr, false) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } - msg := &LinuxInfo{} + msg := &TTYInfo_WindowSize{} if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { panic(err) } @@ -18178,6 +20246,45 @@ func TestFrameworkInfo_CapabilityGoString(t *testing.T) { panic(err) } } +func TestCheckInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo(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 TestCheckInfo_CommandGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo_Command(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 TestCheckInfo_HttpGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo_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 TestHealthCheckGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedHealthCheck(popr, false) @@ -18295,6 +20402,19 @@ func TestAgentInfoGoString(t *testing.T) { panic(err) } } +func TestAgentInfo_CapabilityGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAgentInfo_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 TestValueGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedValue(popr, false) @@ -18399,6 +20519,19 @@ func TestResourceGoString(t *testing.T) { panic(err) } } +func TestResource_AllocationInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_AllocationInfo(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) @@ -18815,6 +20948,45 @@ func TestTaskGoString(t *testing.T) { panic(err) } } +func TestCheckStatusInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo(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 TestCheckStatusInfo_CommandGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo_Command(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 TestCheckStatusInfo_HttpGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo_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 TestTaskStatusGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedTaskStatus(popr, false) @@ -19101,6 +21273,58 @@ func TestLinuxInfoGoString(t *testing.T) { panic(err) } } +func TestRLimitInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRLimitInfo(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 TestRLimitInfo_RLimitGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRLimitInfo_RLimit(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 TestTTYInfoGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTTYInfo(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 TestTTYInfo_WindowSizeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTTYInfo_WindowSize(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) @@ -19506,7 +21730,115 @@ func BenchmarkExecutorIDSize(b *testing.B) { total := 0 pops := make([]*ExecutorID, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedExecutorID(popr, false) + 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 TestTimeInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimeInfo(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 BenchmarkTimeInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*TimeInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimeInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDurationInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDurationInfo(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 BenchmarkDurationInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DurationInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDurationInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19515,10 +21847,10 @@ func BenchmarkExecutorIDSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestContainerIDSize(t *testing.T) { +func TestAddressSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedContainerID(popr, true) + p := NewPopulatedAddress(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19537,12 +21869,12 @@ func TestContainerIDSize(t *testing.T) { } } -func BenchmarkContainerIDSize(b *testing.B) { +func BenchmarkAddressSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*ContainerID, 1000) + pops := make([]*Address, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainerID(popr, false) + pops[i] = NewPopulatedAddress(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19551,10 +21883,10 @@ func BenchmarkContainerIDSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTimeInfoSize(t *testing.T) { +func TestURLSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeInfo(popr, true) + p := NewPopulatedURL(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19573,12 +21905,12 @@ func TestTimeInfoSize(t *testing.T) { } } -func BenchmarkTimeInfoSize(b *testing.B) { +func BenchmarkURLSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TimeInfo, 1000) + pops := make([]*URL, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTimeInfo(popr, false) + pops[i] = NewPopulatedURL(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19587,10 +21919,10 @@ func BenchmarkTimeInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestDurationInfoSize(t *testing.T) { +func TestUnavailabilitySize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDurationInfo(popr, true) + p := NewPopulatedUnavailability(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19609,12 +21941,12 @@ func TestDurationInfoSize(t *testing.T) { } } -func BenchmarkDurationInfoSize(b *testing.B) { +func BenchmarkUnavailabilitySize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*DurationInfo, 1000) + pops := make([]*Unavailability, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDurationInfo(popr, false) + pops[i] = NewPopulatedUnavailability(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19623,10 +21955,10 @@ func BenchmarkDurationInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestAddressSize(t *testing.T) { +func TestMachineIDSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddress(popr, true) + p := NewPopulatedMachineID(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19645,12 +21977,12 @@ func TestAddressSize(t *testing.T) { } } -func BenchmarkAddressSize(b *testing.B) { +func BenchmarkMachineIDSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Address, 1000) + pops := make([]*MachineID, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAddress(popr, false) + pops[i] = NewPopulatedMachineID(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19659,10 +21991,10 @@ func BenchmarkAddressSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestURLSize(t *testing.T) { +func TestMachineInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedURL(popr, true) + p := NewPopulatedMachineInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19681,12 +22013,12 @@ func TestURLSize(t *testing.T) { } } -func BenchmarkURLSize(b *testing.B) { +func BenchmarkMachineInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*URL, 1000) + pops := make([]*MachineInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedURL(popr, false) + pops[i] = NewPopulatedMachineInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19695,10 +22027,10 @@ func BenchmarkURLSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestUnavailabilitySize(t *testing.T) { +func TestFrameworkInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUnavailability(popr, true) + p := NewPopulatedFrameworkInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19717,12 +22049,12 @@ func TestUnavailabilitySize(t *testing.T) { } } -func BenchmarkUnavailabilitySize(b *testing.B) { +func BenchmarkFrameworkInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Unavailability, 1000) + pops := make([]*FrameworkInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUnavailability(popr, false) + pops[i] = NewPopulatedFrameworkInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19731,10 +22063,10 @@ func BenchmarkUnavailabilitySize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestMachineIDSize(t *testing.T) { +func TestFrameworkInfo_CapabilitySize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMachineID(popr, true) + 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 { @@ -19753,12 +22085,12 @@ func TestMachineIDSize(t *testing.T) { } } -func BenchmarkMachineIDSize(b *testing.B) { +func BenchmarkFrameworkInfo_CapabilitySize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*MachineID, 1000) + pops := make([]*FrameworkInfo_Capability, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMachineID(popr, false) + pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19767,10 +22099,10 @@ func BenchmarkMachineIDSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestMachineInfoSize(t *testing.T) { +func TestCheckInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMachineInfo(popr, true) + p := NewPopulatedCheckInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19789,12 +22121,12 @@ func TestMachineInfoSize(t *testing.T) { } } -func BenchmarkMachineInfoSize(b *testing.B) { +func BenchmarkCheckInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*MachineInfo, 1000) + pops := make([]*CheckInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMachineInfo(popr, false) + pops[i] = NewPopulatedCheckInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19803,10 +22135,10 @@ func BenchmarkMachineInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfoSize(t *testing.T) { +func TestCheckInfo_CommandSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo(popr, true) + p := NewPopulatedCheckInfo_Command(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19825,12 +22157,12 @@ func TestFrameworkInfoSize(t *testing.T) { } } -func BenchmarkFrameworkInfoSize(b *testing.B) { +func BenchmarkCheckInfo_CommandSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkInfo, 1000) + pops := make([]*CheckInfo_Command, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkInfo(popr, false) + pops[i] = NewPopulatedCheckInfo_Command(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -19839,10 +22171,10 @@ func BenchmarkFrameworkInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestFrameworkInfo_CapabilitySize(t *testing.T) { +func TestCheckInfo_HttpSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedFrameworkInfo_Capability(popr, true) + p := NewPopulatedCheckInfo_Http(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -19861,12 +22193,12 @@ func TestFrameworkInfo_CapabilitySize(t *testing.T) { } } -func BenchmarkFrameworkInfo_CapabilitySize(b *testing.B) { +func BenchmarkCheckInfo_HttpSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*FrameworkInfo_Capability, 1000) + pops := make([]*CheckInfo_Http, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedFrameworkInfo_Capability(popr, false) + pops[i] = NewPopulatedCheckInfo_Http(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -20199,6 +22531,42 @@ func BenchmarkAgentInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestAgentInfo_CapabilitySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAgentInfo_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 BenchmarkAgentInfo_CapabilitySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AgentInfo_Capability, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAgentInfo_Capability(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)) @@ -20487,6 +22855,42 @@ func BenchmarkResourceSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestResource_AllocationInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedResource_AllocationInfo(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_AllocationInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Resource_AllocationInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedResource_AllocationInfo(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)) @@ -21414,7 +23818,115 @@ func BenchmarkOffer_Operation_UnreserveSize(b *testing.B) { total := 0 pops := make([]*Offer_Operation_Unreserve, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOffer_Operation_Unreserve(popr, false) + 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 TestInverseOfferSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedInverseOffer(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 BenchmarkInverseOfferSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*InverseOffer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedInverseOffer(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -21423,10 +23935,10 @@ func BenchmarkOffer_Operation_UnreserveSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_CreateSize(t *testing.T) { +func TestTaskInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Create(popr, true) + p := NewPopulatedTaskInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -21445,12 +23957,12 @@ func TestOffer_Operation_CreateSize(t *testing.T) { } } -func BenchmarkOffer_Operation_CreateSize(b *testing.B) { +func BenchmarkTaskInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Create, 1000) + pops := make([]*TaskInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOffer_Operation_Create(popr, false) + pops[i] = NewPopulatedTaskInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -21459,10 +23971,10 @@ func BenchmarkOffer_Operation_CreateSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestOffer_Operation_DestroySize(t *testing.T) { +func TestTaskGroupInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedOffer_Operation_Destroy(popr, true) + p := NewPopulatedTaskGroupInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -21481,12 +23993,12 @@ func TestOffer_Operation_DestroySize(t *testing.T) { } } -func BenchmarkOffer_Operation_DestroySize(b *testing.B) { +func BenchmarkTaskGroupInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Offer_Operation_Destroy, 1000) + pops := make([]*TaskGroupInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOffer_Operation_Destroy(popr, false) + pops[i] = NewPopulatedTaskGroupInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -21495,10 +24007,10 @@ func BenchmarkOffer_Operation_DestroySize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestInverseOfferSize(t *testing.T) { +func TestTaskSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedInverseOffer(popr, true) + p := NewPopulatedTask(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -21517,12 +24029,12 @@ func TestInverseOfferSize(t *testing.T) { } } -func BenchmarkInverseOfferSize(b *testing.B) { +func BenchmarkTaskSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*InverseOffer, 1000) + pops := make([]*Task, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedInverseOffer(popr, false) + pops[i] = NewPopulatedTask(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -21531,10 +24043,10 @@ func BenchmarkInverseOfferSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskInfoSize(t *testing.T) { +func TestCheckStatusInfoSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskInfo(popr, true) + p := NewPopulatedCheckStatusInfo(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -21553,12 +24065,12 @@ func TestTaskInfoSize(t *testing.T) { } } -func BenchmarkTaskInfoSize(b *testing.B) { +func BenchmarkCheckStatusInfoSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskInfo, 1000) + pops := make([]*CheckStatusInfo, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTaskInfo(popr, false) + pops[i] = NewPopulatedCheckStatusInfo(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -21567,10 +24079,10 @@ func BenchmarkTaskInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskGroupInfoSize(t *testing.T) { +func TestCheckStatusInfo_CommandSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTaskGroupInfo(popr, true) + p := NewPopulatedCheckStatusInfo_Command(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -21589,12 +24101,12 @@ func TestTaskGroupInfoSize(t *testing.T) { } } -func BenchmarkTaskGroupInfoSize(b *testing.B) { +func BenchmarkCheckStatusInfo_CommandSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*TaskGroupInfo, 1000) + pops := make([]*CheckStatusInfo_Command, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTaskGroupInfo(popr, false) + pops[i] = NewPopulatedCheckStatusInfo_Command(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -21603,10 +24115,10 @@ func BenchmarkTaskGroupInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } -func TestTaskSize(t *testing.T) { +func TestCheckStatusInfo_HttpSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTask(popr, true) + p := NewPopulatedCheckStatusInfo_Http(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) data, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { @@ -21625,12 +24137,12 @@ func TestTaskSize(t *testing.T) { } } -func BenchmarkTaskSize(b *testing.B) { +func BenchmarkCheckStatusInfo_HttpSize(b *testing.B) { popr := math_rand.New(math_rand.NewSource(616)) total := 0 - pops := make([]*Task, 1000) + pops := make([]*CheckStatusInfo_Http, 1000) for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedTask(popr, false) + pops[i] = NewPopulatedCheckStatusInfo_Http(popr, false) } b.ResetTimer() for i := 0; i < b.N; i++ { @@ -22431,6 +24943,150 @@ func BenchmarkLinuxInfoSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestRLimitInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRLimitInfo(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 BenchmarkRLimitInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RLimitInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRLimitInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRLimitInfo_RLimitSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRLimitInfo_RLimit(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 BenchmarkRLimitInfo_RLimitSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RLimitInfo_RLimit, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRLimitInfo_RLimit(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTTYInfoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTTYInfo(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 BenchmarkTTYInfoSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*TTYInfo, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTTYInfo(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTTYInfo_WindowSizeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTTYInfo_WindowSize(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 BenchmarkTTYInfo_WindowSizeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*TTYInfo_WindowSize, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTTYInfo_WindowSize(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)) @@ -23214,6 +25870,33 @@ func TestFrameworkInfo_CapabilityStringer(t *testing.T) { t.Fatalf("String want %v got %v", s1, s2) } } +func TestCheckInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCheckInfo_CommandStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo_Command(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCheckInfo_HttpStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckInfo_Http(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) @@ -23295,6 +25978,15 @@ func TestAgentInfoStringer(t *testing.T) { t.Fatalf("String want %v got %v", s1, s2) } } +func TestAgentInfo_CapabilityStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAgentInfo_Capability(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) @@ -23367,6 +26059,15 @@ func TestResourceStringer(t *testing.T) { t.Fatalf("String want %v got %v", s1, s2) } } +func TestResource_AllocationInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedResource_AllocationInfo(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) @@ -23655,6 +26356,33 @@ func TestTaskStringer(t *testing.T) { t.Fatalf("String want %v got %v", s1, s2) } } +func TestCheckStatusInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCheckStatusInfo_CommandStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo_Command(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCheckStatusInfo_HttpStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCheckStatusInfo_Http(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) @@ -23853,6 +26581,42 @@ func TestLinuxInfoStringer(t *testing.T) { t.Fatalf("String want %v got %v", s1, s2) } } +func TestRLimitInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRLimitInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestRLimitInfo_RLimitStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRLimitInfo_RLimit(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTTYInfoStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTTYInfo(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTTYInfo_WindowSizeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTTYInfo_WindowSize(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} func TestContainerInfoStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedContainerInfo(popr, false) diff --git a/api/v1/lib/resourcetest/resourcetest.go b/api/v1/lib/resourcetest/resourcetest.go index 9c5aa57b..b18daa41 100644 --- a/api/v1/lib/resourcetest/resourcetest.go +++ b/api/v1/lib/resourcetest/resourcetest.go @@ -94,7 +94,7 @@ func ReservedBy(principal string) *mesos.Resource_ReservationInfo { func Reserve(r mesos.Resources) *mesos.Offer_Operation { return &mesos.Offer_Operation{ - Type: mesos.Offer_Operation_RESERVE.Enum(), + Type: mesos.Offer_Operation_RESERVE, Reserve: &mesos.Offer_Operation_Reserve{ Resources: r, }, @@ -103,7 +103,7 @@ func Reserve(r mesos.Resources) *mesos.Offer_Operation { func Unreserve(r mesos.Resources) *mesos.Offer_Operation { return &mesos.Offer_Operation{ - Type: mesos.Offer_Operation_UNRESERVE.Enum(), + Type: mesos.Offer_Operation_UNRESERVE, Unreserve: &mesos.Offer_Operation_Unreserve{ Resources: r, }, @@ -112,7 +112,7 @@ func Unreserve(r mesos.Resources) *mesos.Offer_Operation { func Create(r mesos.Resources) *mesos.Offer_Operation { return &mesos.Offer_Operation{ - Type: mesos.Offer_Operation_CREATE.Enum(), + Type: mesos.Offer_Operation_CREATE, Create: &mesos.Offer_Operation_Create{ Volumes: r, }, diff --git a/api/v1/lib/scheduler/calls/calls.go b/api/v1/lib/scheduler/calls/calls.go index 42fdbfc0..37d7bfa5 100644 --- a/api/v1/lib/scheduler/calls/calls.go +++ b/api/v1/lib/scheduler/calls/calls.go @@ -12,7 +12,7 @@ import ( // Filters sets a scheduler.Call's internal Filters, required for Accept and Decline calls. func Filters(fo ...mesos.FilterOpt) scheduler.CallOpt { return func(c *scheduler.Call) { - switch *c.Type { + switch c.Type { case scheduler.Call_ACCEPT: c.Accept.Filters = mesos.OptionalFilters(fo...) case scheduler.Call_ACCEPT_INVERSE_OFFERS: @@ -55,7 +55,7 @@ func Framework(id string) scheduler.CallOpt { // The call's FrameworkID is automatically filled in from the info specification. func Subscribe(info *mesos.FrameworkInfo) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_SUBSCRIBE.Enum(), + Type: scheduler.Call_SUBSCRIBE, FrameworkID: info.GetID(), Subscribe: &scheduler.Call_Subscribe{FrameworkInfo: info}, } @@ -112,7 +112,7 @@ func Accept(ops ...AcceptOpt) *scheduler.Call { offerIDs = append(offerIDs, id) } return &scheduler.Call{ - Type: scheduler.Call_ACCEPT.Enum(), + Type: scheduler.Call_ACCEPT, Accept: &scheduler.Call_Accept{ OfferIDs: offerIDs, Operations: ab.operations, @@ -124,7 +124,7 @@ func Accept(ops ...AcceptOpt) *scheduler.Call { // Callers are expected to fill in the FrameworkID and Filters. func AcceptInverseOffers(offerIDs ...mesos.OfferID) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_ACCEPT_INVERSE_OFFERS.Enum(), + Type: scheduler.Call_ACCEPT_INVERSE_OFFERS, AcceptInverseOffers: &scheduler.Call_AcceptInverseOffers{ InverseOfferIDs: offerIDs, }, @@ -135,7 +135,7 @@ func AcceptInverseOffers(offerIDs ...mesos.OfferID) *scheduler.Call { // Callers are expected to fill in the FrameworkID and Filters. func DeclineInverseOffers(offerIDs ...mesos.OfferID) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_DECLINE_INVERSE_OFFERS.Enum(), + Type: scheduler.Call_DECLINE_INVERSE_OFFERS, DeclineInverseOffers: &scheduler.Call_DeclineInverseOffers{ InverseOfferIDs: offerIDs, }, @@ -145,7 +145,7 @@ func DeclineInverseOffers(offerIDs ...mesos.OfferID) *scheduler.Call { // OpLaunch returns a launch operation builder for the given tasks func OpLaunch(ti ...mesos.TaskInfo) mesos.Offer_Operation { return mesos.Offer_Operation{ - Type: mesos.Offer_Operation_LAUNCH.Enum(), + Type: mesos.Offer_Operation_LAUNCH, Launch: &mesos.Offer_Operation_Launch{ TaskInfos: ti, }, @@ -154,7 +154,7 @@ func OpLaunch(ti ...mesos.TaskInfo) mesos.Offer_Operation { func OpLaunchGroup(ei mesos.ExecutorInfo, ti ...mesos.TaskInfo) mesos.Offer_Operation { return mesos.Offer_Operation{ - Type: mesos.Offer_Operation_LAUNCH_GROUP.Enum(), + Type: mesos.Offer_Operation_LAUNCH_GROUP, LaunchGroup: &mesos.Offer_Operation_LaunchGroup{ Executor: ei, TaskGroup: mesos.TaskGroupInfo{ @@ -166,7 +166,7 @@ func OpLaunchGroup(ei mesos.ExecutorInfo, ti ...mesos.TaskInfo) mesos.Offer_Oper func OpReserve(rs ...mesos.Resource) mesos.Offer_Operation { return mesos.Offer_Operation{ - Type: mesos.Offer_Operation_RESERVE.Enum(), + Type: mesos.Offer_Operation_RESERVE, Reserve: &mesos.Offer_Operation_Reserve{ Resources: rs, }, @@ -175,7 +175,7 @@ func OpReserve(rs ...mesos.Resource) mesos.Offer_Operation { func OpUnreserve(rs ...mesos.Resource) mesos.Offer_Operation { return mesos.Offer_Operation{ - Type: mesos.Offer_Operation_UNRESERVE.Enum(), + Type: mesos.Offer_Operation_UNRESERVE, Unreserve: &mesos.Offer_Operation_Unreserve{ Resources: rs, }, @@ -184,7 +184,7 @@ func OpUnreserve(rs ...mesos.Resource) mesos.Offer_Operation { func OpCreate(rs ...mesos.Resource) mesos.Offer_Operation { return mesos.Offer_Operation{ - Type: mesos.Offer_Operation_CREATE.Enum(), + Type: mesos.Offer_Operation_CREATE, Create: &mesos.Offer_Operation_Create{ Volumes: rs, }, @@ -193,7 +193,7 @@ func OpCreate(rs ...mesos.Resource) mesos.Offer_Operation { func OpDestroy(rs ...mesos.Resource) mesos.Offer_Operation { return mesos.Offer_Operation{ - Type: mesos.Offer_Operation_DESTROY.Enum(), + Type: mesos.Offer_Operation_DESTROY, Destroy: &mesos.Offer_Operation_Destroy{ Volumes: rs, }, @@ -204,7 +204,7 @@ func OpDestroy(rs ...mesos.Resource) mesos.Offer_Operation { // Callers are expected to fill in the FrameworkID. func Revive() *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_REVIVE.Enum(), + Type: scheduler.Call_REVIVE, } } @@ -212,7 +212,7 @@ func Revive() *scheduler.Call { // Callers are expected to fill in the FrameworkID. func Suppress() *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_SUPPRESS.Enum(), + Type: scheduler.Call_SUPPRESS, } } @@ -220,7 +220,7 @@ func Suppress() *scheduler.Call { // Callers are expected to fill in the FrameworkID and Filters. func Decline(offerIDs ...mesos.OfferID) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_DECLINE.Enum(), + Type: scheduler.Call_DECLINE, Decline: &scheduler.Call_Decline{ OfferIDs: offerIDs, }, @@ -231,7 +231,7 @@ func Decline(offerIDs ...mesos.OfferID) *scheduler.Call { // Callers are expected to fill in the FrameworkID. func Kill(taskID, agentID string) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_KILL.Enum(), + Type: scheduler.Call_KILL, Kill: &scheduler.Call_Kill{ TaskID: mesos.TaskID{Value: taskID}, AgentID: optionalAgentID(agentID), @@ -243,7 +243,7 @@ func Kill(taskID, agentID string) *scheduler.Call { // Callers are expected to fill in the FrameworkID. func Shutdown(executorID, agentID string) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_SHUTDOWN.Enum(), + Type: scheduler.Call_SHUTDOWN, Shutdown: &scheduler.Call_Shutdown{ ExecutorID: mesos.ExecutorID{Value: executorID}, AgentID: mesos.AgentID{Value: agentID}, @@ -255,7 +255,7 @@ func Shutdown(executorID, agentID string) *scheduler.Call { // Callers are expected to fill in the FrameworkID. func Acknowledge(agentID, taskID string, uuid []byte) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_ACKNOWLEDGE.Enum(), + Type: scheduler.Call_ACKNOWLEDGE, Acknowledge: &scheduler.Call_Acknowledge{ AgentID: mesos.AgentID{Value: agentID}, TaskID: mesos.TaskID{Value: taskID}, @@ -289,7 +289,7 @@ func ReconcileTasks(tasks map[string]string) scheduler.ReconcileOpt { // Callers are expected to fill in the FrameworkID. func Reconcile(opts ...scheduler.ReconcileOpt) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_RECONCILE.Enum(), + Type: scheduler.Call_RECONCILE, Reconcile: (&scheduler.Call_Reconcile{}).With(opts...), } } @@ -298,7 +298,7 @@ func Reconcile(opts ...scheduler.ReconcileOpt) *scheduler.Call { // Callers are expected to fill in the FrameworkID. func Message(agentID, executorID string, data []byte) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_MESSAGE.Enum(), + Type: scheduler.Call_MESSAGE, Message: &scheduler.Call_Message{ AgentID: mesos.AgentID{Value: agentID}, ExecutorID: mesos.ExecutorID{Value: executorID}, @@ -311,7 +311,7 @@ func Message(agentID, executorID string, data []byte) *scheduler.Call { // Callers are expected to fill in the FrameworkID. func Request(requests ...mesos.Request) *scheduler.Call { return &scheduler.Call{ - Type: scheduler.Call_REQUEST.Enum(), + Type: scheduler.Call_REQUEST, Request: &scheduler.Call_Request{ Requests: requests, }, diff --git a/api/v1/lib/scheduler/scheduler.pb.go b/api/v1/lib/scheduler/scheduler.pb.go index 7cd33d93..630e8078 100644 --- a/api/v1/lib/scheduler/scheduler.pb.go +++ b/api/v1/lib/scheduler/scheduler.pb.go @@ -195,7 +195,7 @@ type Event struct { // Type of the event, indicates which optional field below should be // present if that type has a nested message definition. // Enum fields should be optional, see: MESOS-4997. - Type *Event_Type `protobuf:"varint,1,opt,name=type,enum=mesos.scheduler.Event_Type" json:"type,omitempty"` + Type Event_Type `protobuf:"varint,1,opt,name=type,enum=mesos.scheduler.Event_Type" json:"type"` Subscribed *Event_Subscribed `protobuf:"bytes,2,opt,name=subscribed" json:"subscribed,omitempty"` Offers *Event_Offers `protobuf:"bytes,3,opt,name=offers" json:"offers,omitempty"` InverseOffers *Event_InverseOffers `protobuf:"bytes,9,opt,name=inverse_offers" json:"inverse_offers,omitempty"` @@ -211,8 +211,8 @@ func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (m *Event) GetType() Event_Type { - if m != nil && m.Type != nil { - return *m.Type + if m != nil { + return m.Type } return Event_UNKNOWN } @@ -524,18 +524,20 @@ type Call struct { // Type of the call, indicates which optional field below should be // present if that type has a nested message definition. // See comments on `Event::Type` above on the reasoning behind this field being optional. - Type *Call_Type `protobuf:"varint,2,opt,name=type,enum=mesos.scheduler.Call_Type" json:"type,omitempty"` + Type Call_Type `protobuf:"varint,2,opt,name=type,enum=mesos.scheduler.Call_Type" json:"type"` 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"` AcceptInverseOffers *Call_AcceptInverseOffers `protobuf:"bytes,13,opt,name=accept_inverse_offers" json:"accept_inverse_offers,omitempty"` DeclineInverseOffers *Call_DeclineInverseOffers `protobuf:"bytes,14,opt,name=decline_inverse_offers" json:"decline_inverse_offers,omitempty"` + Revive *Call_Revive `protobuf:"bytes,15,opt,name=revive" json:"revive,omitempty"` Kill *Call_Kill `protobuf:"bytes,6,opt,name=kill" json:"kill,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"` Request *Call_Request `protobuf:"bytes,11,opt,name=request" json:"request,omitempty"` + Suppress *Call_Suppress `protobuf:"bytes,16,opt,name=suppress" json:"suppress,omitempty"` } func (m *Call) Reset() { *m = Call{} } @@ -549,8 +551,8 @@ func (m *Call) GetFrameworkID() *mesos.FrameworkID { } func (m *Call) GetType() Call_Type { - if m != nil && m.Type != nil { - return *m.Type + if m != nil { + return m.Type } return Call_UNKNOWN } @@ -590,6 +592,13 @@ func (m *Call) GetDeclineInverseOffers() *Call_DeclineInverseOffers { return nil } +func (m *Call) GetRevive() *Call_Revive { + if m != nil { + return m.Revive + } + return nil +} + func (m *Call) GetKill() *Call_Kill { if m != nil { return m.Kill @@ -632,6 +641,13 @@ func (m *Call) GetRequest() *Call_Request { return nil } +func (m *Call) GetSuppress() *Call_Suppress { + if m != nil { + return m.Suppress + } + return nil +} + // Subscribes the scheduler with the master to receive events. A // scheduler must send other calls only after it has received the // SUBCRIBED event. @@ -778,6 +794,23 @@ func (m *Call_DeclineInverseOffers) GetFilters() *mesos.Filters { return nil } +// Revive offers for a specified role. If role is unset, the +// `REVIVE` call will revive offers for all of the roles the +// framework is subscribed to. +type Call_Revive struct { + Role *string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"` +} + +func (m *Call_Revive) Reset() { *m = Call_Revive{} } +func (*Call_Revive) ProtoMessage() {} + +func (m *Call_Revive) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return "" +} + // 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) @@ -892,9 +925,9 @@ func (m *Call_Acknowledge) GetUUID() []byte { // 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 '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. +// will result in a TASK_LOST, TASK_UNKNOWN, or TASK_UNREACHABLE update. +// If 'tasks' is empty, then the master will send the latest status +// for each task currently known. type Call_Reconcile struct { Tasks []Call_Reconcile_Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks"` } @@ -985,6 +1018,23 @@ func (m *Call_Request) GetRequests() []mesos.Request { return nil } +// Suppress offers for a specified role. If role is unset, the +// `SUPPRESS` call will suppress offers for all of the roles the +// framework is subscribed to. +type Call_Suppress struct { + Role *string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"` +} + +func (m *Call_Suppress) Reset() { *m = Call_Suppress{} } +func (*Call_Suppress) ProtoMessage() {} + +func (m *Call_Suppress) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return "" +} + func init() { proto.RegisterEnum("mesos.scheduler.Event_Type", Event_Type_name, Event_Type_value) proto.RegisterEnum("mesos.scheduler.Call_Type", Call_Type_name, Call_Type_value) @@ -1023,13 +1073,7 @@ func (this *Event) VerboseEqual(that interface{}) error { } else if this == nil { return fmt.Errorf("that is type *Eventbut 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 { + if this.Type != that1.Type { return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } if !this.Subscribed.Equal(that1.Subscribed) { @@ -1081,13 +1125,7 @@ func (this *Event) Equal(that interface{}) bool { } 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 { + if this.Type != that1.Type { return false } if !this.Subscribed.Equal(that1.Subscribed) { @@ -1672,13 +1710,7 @@ func (this *Call) VerboseEqual(that interface{}) error { if !this.FrameworkID.Equal(that1.FrameworkID) { return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) } - 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 { + if this.Type != that1.Type { return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) } if !this.Subscribe.Equal(that1.Subscribe) { @@ -1696,6 +1728,9 @@ func (this *Call) VerboseEqual(that interface{}) error { if !this.DeclineInverseOffers.Equal(that1.DeclineInverseOffers) { return fmt.Errorf("DeclineInverseOffers this(%v) Not Equal that(%v)", this.DeclineInverseOffers, that1.DeclineInverseOffers) } + if !this.Revive.Equal(that1.Revive) { + return fmt.Errorf("Revive this(%v) Not Equal that(%v)", this.Revive, that1.Revive) + } if !this.Kill.Equal(that1.Kill) { return fmt.Errorf("Kill this(%v) Not Equal that(%v)", this.Kill, that1.Kill) } @@ -1714,6 +1749,9 @@ func (this *Call) VerboseEqual(that interface{}) error { if !this.Request.Equal(that1.Request) { return fmt.Errorf("Request this(%v) Not Equal that(%v)", this.Request, that1.Request) } + if !this.Suppress.Equal(that1.Suppress) { + return fmt.Errorf("Suppress this(%v) Not Equal that(%v)", this.Suppress, that1.Suppress) + } return nil } func (this *Call) Equal(that interface{}) bool { @@ -1739,13 +1777,7 @@ func (this *Call) Equal(that interface{}) bool { if !this.FrameworkID.Equal(that1.FrameworkID) { 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 { + if this.Type != that1.Type { return false } if !this.Subscribe.Equal(that1.Subscribe) { @@ -1763,6 +1795,9 @@ func (this *Call) Equal(that interface{}) bool { if !this.DeclineInverseOffers.Equal(that1.DeclineInverseOffers) { return false } + if !this.Revive.Equal(that1.Revive) { + return false + } if !this.Kill.Equal(that1.Kill) { return false } @@ -1781,6 +1816,9 @@ func (this *Call) Equal(that interface{}) bool { if !this.Request.Equal(that1.Request) { return false } + if !this.Suppress.Equal(that1.Suppress) { + return false + } return true } func (this *Call_Subscribe) VerboseEqual(that interface{}) error { @@ -2113,6 +2151,68 @@ func (this *Call_DeclineInverseOffers) Equal(that interface{}) bool { } return true } +func (this *Call_Revive) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_Revive) + if !ok { + return fmt.Errorf("that is not of type *Call_Revive") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_Revive but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_Revivebut is not nil && this == nil") + } + 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) + } + return nil +} +func (this *Call_Revive) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_Revive) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + 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 + } + return true +} func (this *Call_Kill) VerboseEqual(that interface{}) error { if that == nil { if this == nil { @@ -2531,15 +2631,75 @@ func (this *Call_Request) Equal(that interface{}) bool { } return true } +func (this *Call_Suppress) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_Suppress) + if !ok { + return fmt.Errorf("that is not of type *Call_Suppress") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_Suppress but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_Suppressbut is not nil && this == nil") + } + 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) + } + return nil +} +func (this *Call_Suppress) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_Suppress) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + 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 + } + return true +} func (this *Event) GoString() string { if this == nil { return "nil" } s := make([]string, 0, 14) s = append(s, "&scheduler.Event{") - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringScheduler(this.Type, "scheduler.Event_Type")+",\n") - } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") if this.Subscribed != nil { s = append(s, "Subscribed: "+fmt.Sprintf("%#v", this.Subscribed)+",\n") } @@ -2688,14 +2848,12 @@ func (this *Call) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 17) + s := make([]string, 0, 19) s = append(s, "&scheduler.Call{") if this.FrameworkID != nil { s = append(s, "FrameworkID: "+fmt.Sprintf("%#v", this.FrameworkID)+",\n") } - if this.Type != nil { - s = append(s, "Type: "+valueToGoStringScheduler(this.Type, "scheduler.Call_Type")+",\n") - } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") if this.Subscribe != nil { s = append(s, "Subscribe: "+fmt.Sprintf("%#v", this.Subscribe)+",\n") } @@ -2711,6 +2869,9 @@ func (this *Call) GoString() string { if this.DeclineInverseOffers != nil { s = append(s, "DeclineInverseOffers: "+fmt.Sprintf("%#v", this.DeclineInverseOffers)+",\n") } + if this.Revive != nil { + s = append(s, "Revive: "+fmt.Sprintf("%#v", this.Revive)+",\n") + } if this.Kill != nil { s = append(s, "Kill: "+fmt.Sprintf("%#v", this.Kill)+",\n") } @@ -2729,6 +2890,9 @@ func (this *Call) GoString() string { if this.Request != nil { s = append(s, "Request: "+fmt.Sprintf("%#v", this.Request)+",\n") } + if this.Suppress != nil { + s = append(s, "Suppress: "+fmt.Sprintf("%#v", this.Suppress)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -2807,6 +2971,18 @@ func (this *Call_DeclineInverseOffers) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *Call_Revive) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&scheduler.Call_Revive{") + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringScheduler(this.Role, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *Call_Kill) GoString() string { if this == nil { return "nil" @@ -2899,6 +3075,18 @@ func (this *Call_Request) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *Call_Suppress) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&scheduler.Call_Suppress{") + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringScheduler(this.Role, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func valueToGoStringScheduler(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -2939,11 +3127,9 @@ func (m *Event) MarshalTo(data []byte) (int, error) { _ = i var l int _ = l - if m.Type != nil { - data[i] = 0x8 - i++ - i = encodeVarintScheduler(data, i, uint64(*m.Type)) - } + data[i] = 0x8 + i++ + i = encodeVarintScheduler(data, i, uint64(m.Type)) if m.Subscribed != nil { data[i] = 0x12 i++ @@ -3352,11 +3538,9 @@ func (m *Call) MarshalTo(data []byte) (int, error) { } i += n19 } - if m.Type != nil { - data[i] = 0x10 - i++ - i = encodeVarintScheduler(data, i, uint64(*m.Type)) - } + data[i] = 0x10 + i++ + i = encodeVarintScheduler(data, i, uint64(m.Type)) if m.Subscribe != nil { data[i] = 0x1a i++ @@ -3467,6 +3651,28 @@ func (m *Call) MarshalTo(data []byte) (int, error) { } i += n30 } + if m.Revive != nil { + data[i] = 0x7a + i++ + i = encodeVarintScheduler(data, i, uint64(m.Revive.Size())) + n31, err := m.Revive.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n31 + } + if m.Suppress != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintScheduler(data, i, uint64(m.Suppress.Size())) + n32, err := m.Suppress.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n32 + } return i, nil } @@ -3491,11 +3697,11 @@ func (m *Call_Subscribe) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintScheduler(data, i, uint64(m.FrameworkInfo.Size())) - n31, err := m.FrameworkInfo.MarshalTo(data[i:]) + n33, err := m.FrameworkInfo.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n31 + i += n33 } return i, nil } @@ -3543,11 +3749,11 @@ func (m *Call_Accept) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintScheduler(data, i, uint64(m.Filters.Size())) - n32, err := m.Filters.MarshalTo(data[i:]) + n34, err := m.Filters.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n32 + i += n34 } return i, nil } @@ -3583,11 +3789,11 @@ func (m *Call_Decline) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.Filters.Size())) - n33, err := m.Filters.MarshalTo(data[i:]) + n35, err := m.Filters.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n33 + i += n35 } return i, nil } @@ -3623,11 +3829,11 @@ func (m *Call_AcceptInverseOffers) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.Filters.Size())) - n34, err := m.Filters.MarshalTo(data[i:]) + n36, err := m.Filters.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n34 + i += n36 } return i, nil } @@ -3663,11 +3869,35 @@ func (m *Call_DeclineInverseOffers) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.Filters.Size())) - n35, err := m.Filters.MarshalTo(data[i:]) + n37, err := m.Filters.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n35 + i += n37 + } + return i, nil +} + +func (m *Call_Revive) 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 *Call_Revive) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Role != nil { + data[i] = 0xa + i++ + i = encodeVarintScheduler(data, i, uint64(len(*m.Role))) + i += copy(data[i:], *m.Role) } return i, nil } @@ -3690,30 +3920,30 @@ func (m *Call_Kill) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintScheduler(data, i, uint64(m.TaskID.Size())) - n36, err := m.TaskID.MarshalTo(data[i:]) + n38, err := m.TaskID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n36 + i += n38 if m.AgentID != nil { data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.AgentID.Size())) - n37, err := m.AgentID.MarshalTo(data[i:]) + n39, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n37 + i += n39 } if m.KillPolicy != nil { data[i] = 0x1a i++ i = encodeVarintScheduler(data, i, uint64(m.KillPolicy.Size())) - n38, err := m.KillPolicy.MarshalTo(data[i:]) + n40, err := m.KillPolicy.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n38 + i += n40 } return i, nil } @@ -3736,19 +3966,19 @@ func (m *Call_Shutdown) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintScheduler(data, i, uint64(m.ExecutorID.Size())) - n39, err := m.ExecutorID.MarshalTo(data[i:]) + n41, err := m.ExecutorID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n39 + i += n41 data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.AgentID.Size())) - n40, err := m.AgentID.MarshalTo(data[i:]) + n42, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n40 + i += n42 return i, nil } @@ -3770,19 +4000,19 @@ func (m *Call_Acknowledge) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintScheduler(data, i, uint64(m.AgentID.Size())) - n41, err := m.AgentID.MarshalTo(data[i:]) + n43, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n41 + i += n43 data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.TaskID.Size())) - n42, err := m.TaskID.MarshalTo(data[i:]) + n44, err := m.TaskID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n42 + i += n44 if m.UUID == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") } else { @@ -3842,20 +4072,20 @@ func (m *Call_Reconcile_Task) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintScheduler(data, i, uint64(m.TaskID.Size())) - n43, err := m.TaskID.MarshalTo(data[i:]) + n45, err := m.TaskID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n43 + i += n45 if m.AgentID != nil { data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.AgentID.Size())) - n44, err := m.AgentID.MarshalTo(data[i:]) + n46, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n44 + i += n46 } return i, nil } @@ -3878,19 +4108,19 @@ func (m *Call_Message) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintScheduler(data, i, uint64(m.AgentID.Size())) - n45, err := m.AgentID.MarshalTo(data[i:]) + n47, err := m.AgentID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n45 + i += n47 data[i] = 0x12 i++ i = encodeVarintScheduler(data, i, uint64(m.ExecutorID.Size())) - n46, err := m.ExecutorID.MarshalTo(data[i:]) + n48, err := m.ExecutorID.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n46 + i += n48 if m.Data == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") } else { @@ -3932,6 +4162,30 @@ func (m *Call_Request) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *Call_Suppress) 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 *Call_Suppress) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Role != nil { + data[i] = 0xa + i++ + i = encodeVarintScheduler(data, i, uint64(len(*m.Role))) + i += copy(data[i:], *m.Role) + } + return i, nil +} + func encodeFixed64Scheduler(data []byte, offset int, v uint64) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) @@ -3961,10 +4215,7 @@ func encodeVarintScheduler(data []byte, offset int, v uint64) int { } func NewPopulatedEvent(r randyScheduler, easy bool) *Event { this := &Event{} - if r.Intn(10) != 0 { - v1 := Event_Type([]int32{0, 1, 2, 9, 3, 10, 4, 5, 6, 7, 8}[r.Intn(11)]) - this.Type = &v1 - } + this.Type = Event_Type([]int32{0, 1, 2, 9, 3, 10, 4, 5, 6, 7, 8}[r.Intn(11)]) if r.Intn(10) != 0 { this.Subscribed = NewPopulatedEvent_Subscribed(r, easy) } @@ -4001,11 +4252,11 @@ func NewPopulatedEvent_Subscribed(r randyScheduler, easy bool) *Event_Subscribed this := &Event_Subscribed{} this.FrameworkID = mesos.NewPopulatedFrameworkID(r, easy) if r.Intn(10) != 0 { - v2 := float64(r.Float64()) + v1 := float64(r.Float64()) if r.Intn(2) == 0 { - v2 *= -1 + v1 *= -1 } - this.HeartbeatIntervalSeconds = &v2 + this.HeartbeatIntervalSeconds = &v1 } if r.Intn(10) != 0 { this.MasterInfo = mesos.NewPopulatedMasterInfo(r, easy) @@ -4018,11 +4269,11 @@ func NewPopulatedEvent_Subscribed(r randyScheduler, easy bool) *Event_Subscribed func NewPopulatedEvent_Offers(r randyScheduler, easy bool) *Event_Offers { this := &Event_Offers{} if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Offers = make([]mesos.Offer, v3) - for i := 0; i < v3; i++ { - v4 := mesos.NewPopulatedOffer(r, easy) - this.Offers[i] = *v4 + v2 := r.Intn(10) + this.Offers = make([]mesos.Offer, v2) + for i := 0; i < v2; i++ { + v3 := mesos.NewPopulatedOffer(r, easy) + this.Offers[i] = *v3 } } if !easy && r.Intn(10) != 0 { @@ -4033,11 +4284,11 @@ func NewPopulatedEvent_Offers(r randyScheduler, easy bool) *Event_Offers { func NewPopulatedEvent_InverseOffers(r randyScheduler, easy bool) *Event_InverseOffers { this := &Event_InverseOffers{} if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.InverseOffers = make([]mesos.InverseOffer, v5) - for i := 0; i < v5; i++ { - v6 := mesos.NewPopulatedInverseOffer(r, easy) - this.InverseOffers[i] = *v6 + v4 := r.Intn(10) + this.InverseOffers = make([]mesos.InverseOffer, v4) + for i := 0; i < v4; i++ { + v5 := mesos.NewPopulatedInverseOffer(r, easy) + this.InverseOffers[i] = *v5 } } if !easy && r.Intn(10) != 0 { @@ -4047,8 +4298,8 @@ func NewPopulatedEvent_InverseOffers(r randyScheduler, easy bool) *Event_Inverse func NewPopulatedEvent_Rescind(r randyScheduler, easy bool) *Event_Rescind { this := &Event_Rescind{} - v7 := mesos.NewPopulatedOfferID(r, easy) - this.OfferID = *v7 + v6 := mesos.NewPopulatedOfferID(r, easy) + this.OfferID = *v6 if !easy && r.Intn(10) != 0 { } return this @@ -4056,8 +4307,8 @@ func NewPopulatedEvent_Rescind(r randyScheduler, easy bool) *Event_Rescind { func NewPopulatedEvent_RescindInverseOffer(r randyScheduler, easy bool) *Event_RescindInverseOffer { this := &Event_RescindInverseOffer{} - v8 := mesos.NewPopulatedOfferID(r, easy) - this.InverseOfferID = *v8 + v7 := mesos.NewPopulatedOfferID(r, easy) + this.InverseOfferID = *v7 if !easy && r.Intn(10) != 0 { } return this @@ -4065,8 +4316,8 @@ func NewPopulatedEvent_RescindInverseOffer(r randyScheduler, easy bool) *Event_R func NewPopulatedEvent_Update(r randyScheduler, easy bool) *Event_Update { this := &Event_Update{} - v9 := mesos.NewPopulatedTaskStatus(r, easy) - this.Status = *v9 + v8 := mesos.NewPopulatedTaskStatus(r, easy) + this.Status = *v8 if !easy && r.Intn(10) != 0 { } return this @@ -4074,13 +4325,13 @@ func NewPopulatedEvent_Update(r randyScheduler, easy bool) *Event_Update { func NewPopulatedEvent_Message(r randyScheduler, easy bool) *Event_Message { this := &Event_Message{} - v10 := mesos.NewPopulatedAgentID(r, easy) - this.AgentID = *v10 - v11 := mesos.NewPopulatedExecutorID(r, easy) - this.ExecutorID = *v11 - v12 := r.Intn(100) - this.Data = make([]byte, v12) - for i := 0; i < v12; i++ { + v9 := mesos.NewPopulatedAgentID(r, easy) + this.AgentID = *v9 + v10 := mesos.NewPopulatedExecutorID(r, easy) + this.ExecutorID = *v10 + v11 := r.Intn(100) + this.Data = make([]byte, v11) + for i := 0; i < v11; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -4097,11 +4348,11 @@ func NewPopulatedEvent_Failure(r randyScheduler, easy bool) *Event_Failure { this.ExecutorID = mesos.NewPopulatedExecutorID(r, easy) } if r.Intn(10) != 0 { - v13 := int32(r.Int31()) + v12 := int32(r.Int31()) if r.Intn(2) == 0 { - v13 *= -1 + v12 *= -1 } - this.Status = &v13 + this.Status = &v12 } if !easy && r.Intn(10) != 0 { } @@ -4121,10 +4372,7 @@ func NewPopulatedCall(r randyScheduler, easy bool) *Call { if r.Intn(10) != 0 { this.FrameworkID = mesos.NewPopulatedFrameworkID(r, easy) } - if r.Intn(10) != 0 { - v14 := Call_Type([]int32{0, 1, 2, 3, 4, 13, 14, 5, 6, 7, 8, 9, 10, 11, 12}[r.Intn(15)]) - this.Type = &v14 - } + this.Type = Call_Type([]int32{0, 1, 2, 3, 4, 13, 14, 5, 6, 7, 8, 9, 10, 11, 12}[r.Intn(15)]) if r.Intn(10) != 0 { this.Subscribe = NewPopulatedCall_Subscribe(r, easy) } @@ -4158,6 +4406,12 @@ func NewPopulatedCall(r randyScheduler, easy bool) *Call { if r.Intn(10) != 0 { this.DeclineInverseOffers = NewPopulatedCall_DeclineInverseOffers(r, easy) } + if r.Intn(10) != 0 { + this.Revive = NewPopulatedCall_Revive(r, easy) + } + if r.Intn(10) != 0 { + this.Suppress = NewPopulatedCall_Suppress(r, easy) + } if !easy && r.Intn(10) != 0 { } return this @@ -4173,20 +4427,38 @@ func NewPopulatedCall_Subscribe(r randyScheduler, easy bool) *Call_Subscribe { func NewPopulatedCall_Accept(r randyScheduler, easy bool) *Call_Accept { this := &Call_Accept{} + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.OfferIDs = make([]mesos.OfferID, v13) + for i := 0; i < v13; i++ { + v14 := mesos.NewPopulatedOfferID(r, easy) + this.OfferIDs[i] = *v14 + } + } if r.Intn(10) != 0 { v15 := r.Intn(10) - this.OfferIDs = make([]mesos.OfferID, v15) + this.Operations = make([]mesos.Offer_Operation, v15) for i := 0; i < v15; i++ { - v16 := mesos.NewPopulatedOfferID(r, easy) - this.OfferIDs[i] = *v16 + v16 := mesos.NewPopulatedOffer_Operation(r, easy) + this.Operations[i] = *v16 } } + if r.Intn(10) != 0 { + this.Filters = mesos.NewPopulatedFilters(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_Decline(r randyScheduler, easy bool) *Call_Decline { + this := &Call_Decline{} if r.Intn(10) != 0 { v17 := r.Intn(10) - this.Operations = make([]mesos.Offer_Operation, v17) + this.OfferIDs = make([]mesos.OfferID, v17) for i := 0; i < v17; i++ { - v18 := mesos.NewPopulatedOffer_Operation(r, easy) - this.Operations[i] = *v18 + v18 := mesos.NewPopulatedOfferID(r, easy) + this.OfferIDs[i] = *v18 } } if r.Intn(10) != 0 { @@ -4197,14 +4469,14 @@ func NewPopulatedCall_Accept(r randyScheduler, easy bool) *Call_Accept { return this } -func NewPopulatedCall_Decline(r randyScheduler, easy bool) *Call_Decline { - this := &Call_Decline{} +func NewPopulatedCall_AcceptInverseOffers(r randyScheduler, easy bool) *Call_AcceptInverseOffers { + this := &Call_AcceptInverseOffers{} if r.Intn(10) != 0 { v19 := r.Intn(10) - this.OfferIDs = make([]mesos.OfferID, v19) + this.InverseOfferIDs = make([]mesos.OfferID, v19) for i := 0; i < v19; i++ { v20 := mesos.NewPopulatedOfferID(r, easy) - this.OfferIDs[i] = *v20 + this.InverseOfferIDs[i] = *v20 } } if r.Intn(10) != 0 { @@ -4215,8 +4487,8 @@ func NewPopulatedCall_Decline(r randyScheduler, easy bool) *Call_Decline { return this } -func NewPopulatedCall_AcceptInverseOffers(r randyScheduler, easy bool) *Call_AcceptInverseOffers { - this := &Call_AcceptInverseOffers{} +func NewPopulatedCall_DeclineInverseOffers(r randyScheduler, easy bool) *Call_DeclineInverseOffers { + this := &Call_DeclineInverseOffers{} if r.Intn(10) != 0 { v21 := r.Intn(10) this.InverseOfferIDs = make([]mesos.OfferID, v21) @@ -4233,18 +4505,11 @@ func NewPopulatedCall_AcceptInverseOffers(r randyScheduler, easy bool) *Call_Acc return this } -func NewPopulatedCall_DeclineInverseOffers(r randyScheduler, easy bool) *Call_DeclineInverseOffers { - this := &Call_DeclineInverseOffers{} +func NewPopulatedCall_Revive(r randyScheduler, easy bool) *Call_Revive { + this := &Call_Revive{} if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.InverseOfferIDs = make([]mesos.OfferID, v23) - for i := 0; i < v23; i++ { - v24 := mesos.NewPopulatedOfferID(r, easy) - this.InverseOfferIDs[i] = *v24 - } - } - if r.Intn(10) != 0 { - this.Filters = mesos.NewPopulatedFilters(r, easy) + v23 := randStringScheduler(r) + this.Role = &v23 } if !easy && r.Intn(10) != 0 { } @@ -4253,8 +4518,8 @@ func NewPopulatedCall_DeclineInverseOffers(r randyScheduler, easy bool) *Call_De func NewPopulatedCall_Kill(r randyScheduler, easy bool) *Call_Kill { this := &Call_Kill{} - v25 := mesos.NewPopulatedTaskID(r, easy) - this.TaskID = *v25 + v24 := mesos.NewPopulatedTaskID(r, easy) + this.TaskID = *v24 if r.Intn(10) != 0 { this.AgentID = mesos.NewPopulatedAgentID(r, easy) } @@ -4268,10 +4533,10 @@ func NewPopulatedCall_Kill(r randyScheduler, easy bool) *Call_Kill { func NewPopulatedCall_Shutdown(r randyScheduler, easy bool) *Call_Shutdown { this := &Call_Shutdown{} - v26 := mesos.NewPopulatedExecutorID(r, easy) - this.ExecutorID = *v26 - v27 := mesos.NewPopulatedAgentID(r, easy) - this.AgentID = *v27 + v25 := mesos.NewPopulatedExecutorID(r, easy) + this.ExecutorID = *v25 + v26 := mesos.NewPopulatedAgentID(r, easy) + this.AgentID = *v26 if !easy && r.Intn(10) != 0 { } return this @@ -4279,13 +4544,13 @@ func NewPopulatedCall_Shutdown(r randyScheduler, easy bool) *Call_Shutdown { func NewPopulatedCall_Acknowledge(r randyScheduler, easy bool) *Call_Acknowledge { this := &Call_Acknowledge{} - v28 := mesos.NewPopulatedAgentID(r, easy) - this.AgentID = *v28 - v29 := mesos.NewPopulatedTaskID(r, easy) - this.TaskID = *v29 - v30 := r.Intn(100) - this.UUID = make([]byte, v30) - for i := 0; i < v30; i++ { + v27 := mesos.NewPopulatedAgentID(r, easy) + this.AgentID = *v27 + v28 := mesos.NewPopulatedTaskID(r, easy) + this.TaskID = *v28 + v29 := r.Intn(100) + this.UUID = make([]byte, v29) + for i := 0; i < v29; i++ { this.UUID[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -4296,11 +4561,11 @@ func NewPopulatedCall_Acknowledge(r randyScheduler, easy bool) *Call_Acknowledge func NewPopulatedCall_Reconcile(r randyScheduler, easy bool) *Call_Reconcile { this := &Call_Reconcile{} if r.Intn(10) != 0 { - v31 := r.Intn(10) - this.Tasks = make([]Call_Reconcile_Task, v31) - for i := 0; i < v31; i++ { - v32 := NewPopulatedCall_Reconcile_Task(r, easy) - this.Tasks[i] = *v32 + v30 := r.Intn(10) + this.Tasks = make([]Call_Reconcile_Task, v30) + for i := 0; i < v30; i++ { + v31 := NewPopulatedCall_Reconcile_Task(r, easy) + this.Tasks[i] = *v31 } } if !easy && r.Intn(10) != 0 { @@ -4310,8 +4575,8 @@ func NewPopulatedCall_Reconcile(r randyScheduler, easy bool) *Call_Reconcile { func NewPopulatedCall_Reconcile_Task(r randyScheduler, easy bool) *Call_Reconcile_Task { this := &Call_Reconcile_Task{} - v33 := mesos.NewPopulatedTaskID(r, easy) - this.TaskID = *v33 + v32 := mesos.NewPopulatedTaskID(r, easy) + this.TaskID = *v32 if r.Intn(10) != 0 { this.AgentID = mesos.NewPopulatedAgentID(r, easy) } @@ -4322,13 +4587,13 @@ func NewPopulatedCall_Reconcile_Task(r randyScheduler, easy bool) *Call_Reconcil func NewPopulatedCall_Message(r randyScheduler, easy bool) *Call_Message { this := &Call_Message{} - v34 := mesos.NewPopulatedAgentID(r, easy) - this.AgentID = *v34 - v35 := mesos.NewPopulatedExecutorID(r, easy) - this.ExecutorID = *v35 - v36 := r.Intn(100) - this.Data = make([]byte, v36) - for i := 0; i < v36; i++ { + v33 := mesos.NewPopulatedAgentID(r, easy) + this.AgentID = *v33 + v34 := mesos.NewPopulatedExecutorID(r, easy) + this.ExecutorID = *v34 + v35 := r.Intn(100) + this.Data = make([]byte, v35) + for i := 0; i < v35; i++ { this.Data[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -4339,11 +4604,11 @@ func NewPopulatedCall_Message(r randyScheduler, easy bool) *Call_Message { func NewPopulatedCall_Request(r randyScheduler, easy bool) *Call_Request { this := &Call_Request{} if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.Requests = make([]mesos.Request, v37) - for i := 0; i < v37; i++ { - v38 := mesos.NewPopulatedRequest(r, easy) - this.Requests[i] = *v38 + v36 := r.Intn(10) + this.Requests = make([]mesos.Request, v36) + for i := 0; i < v36; i++ { + v37 := mesos.NewPopulatedRequest(r, easy) + this.Requests[i] = *v37 } } if !easy && r.Intn(10) != 0 { @@ -4351,6 +4616,17 @@ func NewPopulatedCall_Request(r randyScheduler, easy bool) *Call_Request { return this } +func NewPopulatedCall_Suppress(r randyScheduler, easy bool) *Call_Suppress { + this := &Call_Suppress{} + if r.Intn(10) != 0 { + v38 := randStringScheduler(r) + this.Role = &v38 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + type randyScheduler interface { Float32() float32 Float64() float64 @@ -4426,9 +4702,7 @@ func encodeVarintPopulateScheduler(data []byte, v uint64) []byte { func (m *Event) Size() (n int) { var l int _ = l - if m.Type != nil { - n += 1 + sovScheduler(uint64(*m.Type)) - } + n += 1 + sovScheduler(uint64(m.Type)) if m.Subscribed != nil { l = m.Subscribed.Size() n += 1 + l + sovScheduler(uint64(l)) @@ -4579,9 +4853,7 @@ func (m *Call) Size() (n int) { l = m.FrameworkID.Size() n += 1 + l + sovScheduler(uint64(l)) } - if m.Type != nil { - n += 1 + sovScheduler(uint64(*m.Type)) - } + n += 1 + sovScheduler(uint64(m.Type)) if m.Subscribe != nil { l = m.Subscribe.Size() n += 1 + l + sovScheduler(uint64(l)) @@ -4626,6 +4898,14 @@ func (m *Call) Size() (n int) { l = m.DeclineInverseOffers.Size() n += 1 + l + sovScheduler(uint64(l)) } + if m.Revive != nil { + l = m.Revive.Size() + n += 1 + l + sovScheduler(uint64(l)) + } + if m.Suppress != nil { + l = m.Suppress.Size() + n += 2 + l + sovScheduler(uint64(l)) + } return n } @@ -4709,6 +4989,16 @@ func (m *Call_DeclineInverseOffers) Size() (n int) { return n } +func (m *Call_Revive) Size() (n int) { + var l int + _ = l + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovScheduler(uint64(l)) + } + return n +} + func (m *Call_Kill) Size() (n int) { var l int _ = l @@ -4799,6 +5089,16 @@ func (m *Call_Request) Size() (n int) { return n } +func (m *Call_Suppress) Size() (n int) { + var l int + _ = l + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovScheduler(uint64(l)) + } + return n +} + func sovScheduler(x uint64) (n int) { for { n++ @@ -4817,7 +5117,7 @@ func (this *Event) String() string { return "nil" } s := strings.Join([]string{`&Event{`, - `Type:` + valueToStringScheduler(this.Type) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Subscribed:` + strings.Replace(fmt.Sprintf("%v", this.Subscribed), "Event_Subscribed", "Event_Subscribed", 1) + `,`, `Offers:` + strings.Replace(fmt.Sprintf("%v", this.Offers), "Event_Offers", "Event_Offers", 1) + `,`, `Rescind:` + strings.Replace(fmt.Sprintf("%v", this.Rescind), "Event_Rescind", "Event_Rescind", 1) + `,`, @@ -4933,7 +5233,7 @@ func (this *Call) String() string { } s := strings.Join([]string{`&Call{`, `FrameworkID:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkID), "FrameworkID", "mesos.FrameworkID", 1) + `,`, - `Type:` + valueToStringScheduler(this.Type) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Subscribe:` + strings.Replace(fmt.Sprintf("%v", this.Subscribe), "Call_Subscribe", "Call_Subscribe", 1) + `,`, `Accept:` + strings.Replace(fmt.Sprintf("%v", this.Accept), "Call_Accept", "Call_Accept", 1) + `,`, `Decline:` + strings.Replace(fmt.Sprintf("%v", this.Decline), "Call_Decline", "Call_Decline", 1) + `,`, @@ -4945,6 +5245,8 @@ func (this *Call) String() string { `Request:` + strings.Replace(fmt.Sprintf("%v", this.Request), "Call_Request", "Call_Request", 1) + `,`, `AcceptInverseOffers:` + strings.Replace(fmt.Sprintf("%v", this.AcceptInverseOffers), "Call_AcceptInverseOffers", "Call_AcceptInverseOffers", 1) + `,`, `DeclineInverseOffers:` + strings.Replace(fmt.Sprintf("%v", this.DeclineInverseOffers), "Call_DeclineInverseOffers", "Call_DeclineInverseOffers", 1) + `,`, + `Revive:` + strings.Replace(fmt.Sprintf("%v", this.Revive), "Call_Revive", "Call_Revive", 1) + `,`, + `Suppress:` + strings.Replace(fmt.Sprintf("%v", this.Suppress), "Call_Suppress", "Call_Suppress", 1) + `,`, `}`, }, "") return s @@ -5004,6 +5306,16 @@ func (this *Call_DeclineInverseOffers) String() string { }, "") return s } +func (this *Call_Revive) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_Revive{`, + `Role:` + valueToStringScheduler(this.Role) + `,`, + `}`, + }, "") + return s +} func (this *Call_Kill) String() string { if this == nil { return "nil" @@ -5082,6 +5394,16 @@ func (this *Call_Request) String() string { }, "") return s } +func (this *Call_Suppress) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_Suppress{`, + `Role:` + valueToStringScheduler(this.Role) + `,`, + `}`, + }, "") + return s +} func valueToStringScheduler(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -5123,7 +5445,7 @@ func (m *Event) Unmarshal(data []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var v Event_Type + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScheduler @@ -5133,12 +5455,11 @@ func (m *Event) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (Event_Type(b) & 0x7F) << shift + m.Type |= (Event_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 Subscribed", wireType) @@ -6451,7 +6772,7 @@ func (m *Call) Unmarshal(data []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var v Call_Type + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowScheduler @@ -6461,12 +6782,11 @@ func (m *Call) Unmarshal(data []byte) error { } b := data[iNdEx] iNdEx++ - v |= (Call_Type(b) & 0x7F) << shift + m.Type |= (Call_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 Subscribe", wireType) @@ -6830,6 +7150,72 @@ func (m *Call) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Revive", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScheduler + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Revive == nil { + m.Revive = &Call_Revive{} + } + if err := m.Revive.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Suppress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthScheduler + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Suppress == nil { + m.Suppress = &Call_Suppress{} + } + if err := m.Suppress.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipScheduler(data[iNdEx:]) @@ -7426,6 +7812,86 @@ func (m *Call_DeclineInverseOffers) Unmarshal(data []byte) error { } return nil } +func (m *Call_Revive) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Revive: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Revive: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } + 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 ErrInvalidLengthScheduler + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScheduler(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScheduler + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Call_Kill) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) @@ -8278,6 +8744,86 @@ func (m *Call_Request) Unmarshal(data []byte) error { } return nil } +func (m *Call_Suppress) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } + 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) + if wireType == 4 { + return fmt.Errorf("proto: Suppress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Suppress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowScheduler + } + 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 ErrInvalidLengthScheduler + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipScheduler(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthScheduler + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipScheduler(data []byte) (n int, err error) { l := len(data) iNdEx := 0 diff --git a/api/v1/lib/scheduler/scheduler.pb_ffjson.go b/api/v1/lib/scheduler/scheduler.pb_ffjson.go index 2bf27878..2b824e87 100644 --- a/api/v1/lib/scheduler/scheduler.pb_ffjson.go +++ b/api/v1/lib/scheduler/scheduler.pb_ffjson.go @@ -51,22 +51,18 @@ func (mj *Call) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } - if mj.Type != nil { - if true { - buf.WriteString(`"type":`) - - { + buf.WriteString(`"type":`) - obj, err = mj.Type.MarshalJSON() - if err != nil { - return err - } - buf.Write(obj) + { - } - buf.WriteByte(',') + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err } + buf.Write(obj) + } + buf.WriteByte(',') if mj.Subscribe != nil { if true { buf.WriteString(`"subscribe":`) @@ -142,6 +138,21 @@ func (mj *Call) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } + if mj.Revive != nil { + if true { + buf.WriteString(`"revive":`) + + { + + err = mj.Revive.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } if mj.Kill != nil { if true { buf.WriteString(`"kill":`) @@ -232,6 +243,21 @@ func (mj *Call) MarshalJSONBuf(buf fflib.EncodingBuffer) error { buf.WriteByte(',') } } + if mj.Suppress != nil { + if true { + buf.WriteString(`"suppress":`) + + { + + err = mj.Suppress.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } buf.Rewind(1) buf.WriteByte('}') return nil @@ -255,6 +281,8 @@ const ( ffj_t_Call_DeclineInverseOffers + ffj_t_Call_Revive + ffj_t_Call_Kill ffj_t_Call_Shutdown @@ -266,6 +294,8 @@ const ( ffj_t_Call_Message ffj_t_Call_Request + + ffj_t_Call_Suppress ) var ffj_key_Call_FrameworkID = []byte("framework_id") @@ -282,6 +312,8 @@ var ffj_key_Call_AcceptInverseOffers = []byte("accept_inverse_offers") var ffj_key_Call_DeclineInverseOffers = []byte("decline_inverse_offers") +var ffj_key_Call_Revive = []byte("revive") + var ffj_key_Call_Kill = []byte("kill") var ffj_key_Call_Shutdown = []byte("shutdown") @@ -294,6 +326,8 @@ var ffj_key_Call_Message = []byte("message") var ffj_key_Call_Request = []byte("request") +var ffj_key_Call_Suppress = []byte("suppress") + func (uj *Call) UnmarshalJSON(input []byte) error { fs := fflib.NewFFLexer(input) return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) @@ -410,7 +444,12 @@ mainparse: case 'r': - if bytes.Equal(ffj_key_Call_Reconcile, kn) { + if bytes.Equal(ffj_key_Call_Revive, kn) { + currentKey = ffj_t_Call_Revive + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_Reconcile, kn) { currentKey = ffj_t_Call_Reconcile state = fflib.FFParse_want_colon goto mainparse @@ -432,6 +471,11 @@ mainparse: currentKey = ffj_t_Call_Shutdown state = fflib.FFParse_want_colon goto mainparse + + } else if bytes.Equal(ffj_key_Call_Suppress, kn) { + currentKey = ffj_t_Call_Suppress + state = fflib.FFParse_want_colon + goto mainparse } case 't': @@ -444,6 +488,12 @@ mainparse: } + if fflib.EqualFoldRight(ffj_key_Call_Suppress, kn) { + currentKey = ffj_t_Call_Suppress + state = fflib.FFParse_want_colon + goto mainparse + } + if fflib.EqualFoldRight(ffj_key_Call_Request, kn) { currentKey = ffj_t_Call_Request state = fflib.FFParse_want_colon @@ -480,6 +530,12 @@ mainparse: goto mainparse } + if fflib.SimpleLetterEqualFold(ffj_key_Call_Revive, kn) { + currentKey = ffj_t_Call_Revive + state = fflib.FFParse_want_colon + goto mainparse + } + if fflib.EqualFoldRight(ffj_key_Call_DeclineInverseOffers, kn) { currentKey = ffj_t_Call_DeclineInverseOffers state = fflib.FFParse_want_colon @@ -560,6 +616,9 @@ mainparse: case ffj_t_Call_DeclineInverseOffers: goto handle_DeclineInverseOffers + case ffj_t_Call_Revive: + goto handle_Revive + case ffj_t_Call_Kill: goto handle_Kill @@ -578,6 +637,9 @@ mainparse: case ffj_t_Call_Request: goto handle_Request + case ffj_t_Call_Suppress: + goto handle_Suppress + case ffj_t_Callno_such_key: err = fs.SkipField(tok) if err != nil { @@ -626,8 +688,6 @@ handle_Type: { if tok == fflib.FFTok_null { - uj.Type = nil - state = fflib.FFParse_after_value goto mainparse } @@ -637,10 +697,6 @@ handle_Type: return fs.WrapErr(err) } - if uj.Type == nil { - uj.Type = new(Call_Type) - } - err = uj.Type.UnmarshalJSON(tbuf) if err != nil { return fs.WrapErr(err) @@ -786,6 +842,33 @@ handle_DeclineInverseOffers: state = fflib.FFParse_after_value goto mainparse +handle_Revive: + + /* handler: uj.Revive type=scheduler.Call_Revive kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Revive = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Revive == nil { + uj.Revive = new(Call_Revive) + } + + err = uj.Revive.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + handle_Kill: /* handler: uj.Kill type=scheduler.Call_Kill kind=struct quoted=false*/ @@ -948,6 +1031,33 @@ handle_Request: state = fflib.FFParse_after_value goto mainparse +handle_Suppress: + + /* handler: uj.Suppress type=scheduler.Call_Suppress kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Suppress = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Suppress == nil { + uj.Suppress = new(Call_Suppress) + } + + err = uj.Suppress.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + wantedvalue: return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) wrongtokenerror: @@ -4030,6 +4140,205 @@ done: return nil } +func (mj *Call_Revive) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_Revive) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Role != nil { + if true { + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_Revivebase = iota + ffj_t_Call_Reviveno_such_key + + ffj_t_Call_Revive_Role +) + +var ffj_key_Call_Revive_Role = []byte("role") + +func (uj *Call_Revive) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_Revive) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_Revivebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_Reviveno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Call_Revive_Role, kn) { + currentKey = ffj_t_Call_Revive_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_Revive_Role, kn) { + currentKey = ffj_t_Call_Revive_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_Reviveno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_Revive_Role: + goto handle_Role + + case ffj_t_Call_Reviveno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + func (mj *Call_Shutdown) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { @@ -4477,7 +4786,7 @@ done: return nil } -func (mj *Event) MarshalJSON() ([]byte, error) { +func (mj *Call_Suppress) MarshalJSON() ([]byte, error) { var buf fflib.Buffer if mj == nil { buf.WriteString("null") @@ -4489,7 +4798,7 @@ func (mj *Event) MarshalJSON() ([]byte, error) { } return buf.Bytes(), nil } -func (mj *Event) MarshalJSONBuf(buf fflib.EncodingBuffer) error { +func (mj *Call_Suppress) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if mj == nil { buf.WriteString("null") return nil @@ -4499,22 +4808,216 @@ func (mj *Event) MarshalJSONBuf(buf fflib.EncodingBuffer) error { _ = obj _ = err buf.WriteString(`{ `) - if mj.Type != nil { + if mj.Role != nil { if true { - buf.WriteString(`"type":`) + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} - { +const ( + ffj_t_Call_Suppressbase = iota + ffj_t_Call_Suppressno_such_key + + ffj_t_Call_Suppress_Role +) + +var ffj_key_Call_Suppress_Role = []byte("role") + +func (uj *Call_Suppress) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_Suppress) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_Suppressbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_Suppressno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Call_Suppress_Role, kn) { + currentKey = ffj_t_Call_Suppress_Role + state = fflib.FFParse_want_colon + goto mainparse + } - obj, err = mj.Type.MarshalJSON() - if err != nil { - return err } - buf.Write(obj) + if fflib.SimpleLetterEqualFold(ffj_key_Call_Suppress_Role, kn) { + currentKey = ffj_t_Call_Suppress_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_Suppressno_such_key + state = fflib.FFParse_want_colon + goto mainparse } - buf.WriteByte(',') + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_Suppress_Role: + goto handle_Role + + case ffj_t_Call_Suppressno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + } } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + return nil +} + +func (mj *Event) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Event) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') if mj.Subscribed != nil { if true { buf.WriteString(`"subscribed":`) @@ -4966,8 +5469,6 @@ handle_Type: { if tok == fflib.FFTok_null { - uj.Type = nil - state = fflib.FFParse_after_value goto mainparse } @@ -4977,10 +5478,6 @@ handle_Type: return fs.WrapErr(err) } - if uj.Type == nil { - uj.Type = new(Event_Type) - } - err = uj.Type.UnmarshalJSON(tbuf) if err != nil { return fs.WrapErr(err) diff --git a/api/v1/lib/scheduler/scheduler.proto b/api/v1/lib/scheduler/scheduler.proto index 4d7ccc56..3334a6e6 100644 --- a/api/v1/lib/scheduler/scheduler.proto +++ b/api/v1/lib/scheduler/scheduler.proto @@ -178,7 +178,7 @@ message Event { // Type of the event, indicates which optional field below should be // present if that type has a nested message definition. // Enum fields should be optional, see: MESOS-4997. - optional Type type = 1; + optional Type type = 1 [(gogoproto.nullable) = false]; optional Subscribed subscribed = 2; optional Offers offers = 3; @@ -291,6 +291,13 @@ message Call { optional Filters filters = 2; } + // Revive offers for a specified role. If role is unset, the + // `REVIVE` call will revive offers for all of the roles the + // framework is subscribed to. + message Revive { + optional string role = 1; + } + // 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) @@ -341,11 +348,11 @@ message Call { // 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 '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. + // will result in a TASK_LOST, TASK_UNKNOWN, or TASK_UNREACHABLE update. + // If 'tasks' is empty, then the master will send the latest status + // for each task currently known. message Reconcile { - // TODO(vinod): Support arbitrary queries than just state of tasks. + // TODO(vinod): Support arbitrary queries than just state of tasks. message Task { required TaskID task_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "TaskID"]; optional AgentID agent_id = 2 [(gogoproto.customname) = "AgentID"]; @@ -373,6 +380,13 @@ message Call { repeated mesos.Request requests = 1 [(gogoproto.nullable) = false]; } + // Suppress offers for a specified role. If role is unset, the + // `SUPPRESS` call will suppress offers for all of the roles the + // framework is subscribed to. + message Suppress { + optional string role = 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 @@ -384,17 +398,19 @@ message Call { // Type of the call, indicates which optional field below should be // present if that type has a nested message definition. // See comments on `Event::Type` above on the reasoning behind this field being optional. - optional Type type = 2; + optional Type type = 2 [(gogoproto.nullable) = false]; optional Subscribe subscribe = 3; optional Accept accept = 4; optional Decline decline = 5; optional AcceptInverseOffers accept_inverse_offers = 13; optional DeclineInverseOffers decline_inverse_offers = 14; + optional Revive revive = 15; optional Kill kill = 6; optional Shutdown shutdown = 7; optional Acknowledge acknowledge = 8; optional Reconcile reconcile = 9; optional Message message = 10; optional Request request = 11; + optional Suppress suppress = 16; } diff --git a/api/v1/lib/scheduler/schedulerpb_test.go b/api/v1/lib/scheduler/schedulerpb_test.go index 8a8e02fe..a2facfe0 100644 --- a/api/v1/lib/scheduler/schedulerpb_test.go +++ b/api/v1/lib/scheduler/schedulerpb_test.go @@ -1664,6 +1664,108 @@ func BenchmarkCall_DeclineInverseOffersProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestCall_ReviveProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Revive(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Call_Revive{} + 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 TestCall_ReviveMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Revive(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 := &Call_Revive{} + 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 BenchmarkCall_ReviveProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Call_Revive, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCall_Revive(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 BenchmarkCall_ReviveProtoUnmarshal(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(NewPopulatedCall_Revive(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Call_Revive{} + 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 TestCall_KillProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -2378,6 +2480,108 @@ func BenchmarkCall_RequestProtoUnmarshal(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestCall_SuppressProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Suppress(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Call_Suppress{} + 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 TestCall_SuppressMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Suppress(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 := &Call_Suppress{} + 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 BenchmarkCall_SuppressProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Call_Suppress, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCall_Suppress(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 BenchmarkCall_SuppressProtoUnmarshal(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(NewPopulatedCall_Suppress(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Call_Suppress{} + 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 TestEventJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -2714,6 +2918,27 @@ func TestCall_DeclineInverseOffersJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestCall_ReviveJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Revive(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 := &Call_Revive{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestCall_KillJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -2861,6 +3086,27 @@ func TestCall_RequestJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestCall_SuppressJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Suppress(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 := &Call_Suppress{} + 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("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestEventProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -3405,6 +3651,40 @@ func TestCall_DeclineInverseOffersProtoCompactText(t *testing.T) { } } +func TestCall_ReviveProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Revive(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Call_Revive{} + 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("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 TestCall_ReviveProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Revive(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Call_Revive{} + 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("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 TestCall_KillProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -3643,6 +3923,40 @@ func TestCall_RequestProtoCompactText(t *testing.T) { } } +func TestCall_SuppressProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Suppress(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Call_Suppress{} + 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("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 TestCall_SuppressProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Suppress(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Call_Suppress{} + 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("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 TestEventVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent(popr, false) @@ -3883,6 +4197,21 @@ func TestCall_DeclineInverseOffersVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } +func TestCall_ReviveVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Revive(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Revive{} + 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 TestCall_KillVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Kill(popr, false) @@ -3988,6 +4317,21 @@ func TestCall_RequestVerboseEqual(t *testing.T) { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } +func TestCall_SuppressVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Suppress(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Call_Suppress{} + 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 TestEventGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent(popr, false) @@ -4196,6 +4540,19 @@ func TestCall_DeclineInverseOffersGoString(t *testing.T) { panic(err) } } +func TestCall_ReviveGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Revive(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 TestCall_KillGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Kill(popr, false) @@ -4287,6 +4644,19 @@ func TestCall_RequestGoString(t *testing.T) { panic(err) } } +func TestCall_SuppressGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Suppress(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 TestEventSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -4863,6 +5233,42 @@ func BenchmarkCall_DeclineInverseOffersSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestCall_ReviveSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Revive(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 BenchmarkCall_ReviveSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Call_Revive, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCall_Revive(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + func TestCall_KillSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -5115,6 +5521,42 @@ func BenchmarkCall_RequestSize(b *testing.B) { b.SetBytes(int64(total / b.N)) } +func TestCall_SuppressSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCall_Suppress(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 BenchmarkCall_SuppressSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Call_Suppress, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCall_Suppress(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + func TestEventStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedEvent(popr, false) @@ -5259,6 +5701,15 @@ func TestCall_DeclineInverseOffersStringer(t *testing.T) { t.Fatalf("String want %v got %v", s1, s2) } } +func TestCall_ReviveStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Revive(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} func TestCall_KillStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedCall_Kill(popr, false) @@ -5322,5 +5773,14 @@ func TestCall_RequestStringer(t *testing.T) { t.Fatalf("String want %v got %v", s1, s2) } } +func TestCall_SuppressStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCall_Suppress(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} //These tests are generated by github.com/gogo/protobuf/plugin/testgen