| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
package allocator |
| 14 |
|
| 15 |
import proto "github.com/gogo/protobuf/proto" |
| 16 |
import fmt "fmt" |
| 17 |
import math "math" |
| 18 |
import mesos "github.com/mesos/mesos-go/api/v1/lib" |
| 19 |
import _ "github.com/gogo/protobuf/gogoproto" |
| 20 |
|
| 21 |
import strconv "strconv" |
| 22 |
|
| 23 |
import strings "strings" |
| 24 |
import reflect "reflect" |
| 25 |
|
| 26 |
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" |
| 27 |
|
| 28 |
import io "io" |
| 29 |
|
| 30 |
|
| 31 |
var _ = proto.Marshal |
| 32 |
var _ = fmt.Errorf |
| 33 |
var _ = math.Inf |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
const _ = proto.GoGoProtoPackageIsVersion2 |
| 40 |
|
| 41 |
type InverseOfferStatus_Status int32 |
| 42 |
|
| 43 |
const ( |
| 44 |
|
| 45 |
|
| 46 |
InverseOfferStatus_UNKNOWN InverseOfferStatus_Status = 1 |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
InverseOfferStatus_ACCEPT InverseOfferStatus_Status = 2 |
| 53 |
|
| 54 |
|
| 55 |
InverseOfferStatus_DECLINE InverseOfferStatus_Status = 3 |
| 56 |
) |
| 57 |
|
| 58 |
var InverseOfferStatus_Status_name = map[int32]string{ |
| 59 |
1: "UNKNOWN", |
| 60 |
2: "ACCEPT", |
| 61 |
3: "DECLINE", |
| 62 |
} |
| 63 |
var InverseOfferStatus_Status_value = map[string]int32{ |
| 64 |
"UNKNOWN": 1, |
| 65 |
"ACCEPT": 2, |
| 66 |
"DECLINE": 3, |
| 67 |
} |
| 68 |
|
| 69 |
func (x InverseOfferStatus_Status) Enum() *InverseOfferStatus_Status { |
| 70 |
p := new(InverseOfferStatus_Status) |
| 71 |
*p = x |
| 72 |
return p |
| 73 |
} |
| 74 |
func (x InverseOfferStatus_Status) MarshalJSON() ([]byte, error) { |
| 75 |
return proto.MarshalJSONEnum(InverseOfferStatus_Status_name, int32(x)) |
| 76 |
} |
| 77 |
func (x *InverseOfferStatus_Status) UnmarshalJSON(data []byte) error { |
| 78 |
value, err := proto.UnmarshalJSONEnum(InverseOfferStatus_Status_value, data, "InverseOfferStatus_Status") |
| 79 |
if err != nil { |
| 80 |
return err |
| 81 |
} |
| 82 |
*x = InverseOfferStatus_Status(value) |
| 83 |
return nil |
| 84 |
} |
| 85 |
func (InverseOfferStatus_Status) EnumDescriptor() ([]byte, []int) { |
| 86 |
return fileDescriptorAllocator, []int{0, 0} |
| 87 |
} |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
type InverseOfferStatus struct { |
| 95 |
Status *InverseOfferStatus_Status `protobuf:"varint,1,req,name=status,enum=mesos.allocator.InverseOfferStatus_Status" json:"status,omitempty"` |
| 96 |
FrameworkID mesos.FrameworkID `protobuf:"bytes,2,req,name=framework_id,json=frameworkId" json:"framework_id"` |
| 97 |
|
| 98 |
Timestamp mesos.TimeInfo `protobuf:"bytes,3,req,name=timestamp" json:"timestamp"` |
| 99 |
} |
| 100 |
|
| 101 |
func (m *InverseOfferStatus) Reset() { *m = InverseOfferStatus{} } |
| 102 |
func (*InverseOfferStatus) ProtoMessage() {} |
| 103 |
func (*InverseOfferStatus) Descriptor() ([]byte, []int) { return fileDescriptorAllocator, []int{0} } |
| 104 |
|
| 105 |
func (m *InverseOfferStatus) GetStatus() InverseOfferStatus_Status { |
| 106 |
if m != nil && m.Status != nil { |
| 107 |
return *m.Status |
| 108 |
} |
| 109 |
return InverseOfferStatus_UNKNOWN |
| 110 |
} |
| 111 |
|
| 112 |
func (m *InverseOfferStatus) GetFrameworkID() mesos.FrameworkID { |
| 113 |
if m != nil { |
| 114 |
return m.FrameworkID |
| 115 |
} |
| 116 |
return mesos.FrameworkID{} |
| 117 |
} |
| 118 |
|
| 119 |
func (m *InverseOfferStatus) GetTimestamp() mesos.TimeInfo { |
| 120 |
if m != nil { |
| 121 |
return m.Timestamp |
| 122 |
} |
| 123 |
return mesos.TimeInfo{} |
| 124 |
} |
| 125 |
|
| 126 |
func init() { |
| 127 |
proto.RegisterType((*InverseOfferStatus)(nil), "mesos.allocator.InverseOfferStatus") |
| 128 |
proto.RegisterEnum("mesos.allocator.InverseOfferStatus_Status", InverseOfferStatus_Status_name, InverseOfferStatus_Status_value) |
| 129 |
} |
| 130 |
func (x InverseOfferStatus_Status) String() string { |
| 131 |
s, ok := InverseOfferStatus_Status_name[int32(x)] |
| 132 |
if ok { |
| 133 |
return s |
| 134 |
} |
| 135 |
return strconv.Itoa(int(x)) |
| 136 |
} |
| 137 |
func (this *InverseOfferStatus) VerboseEqual(that interface{}) error { |
| 138 |
if that == nil { |
| 139 |
if this == nil { |
| 140 |
return nil |
| 141 |
} |
| 142 |
return fmt.Errorf("that == nil && this != nil") |
| 143 |
} |
| 144 |
|
| 145 |
that1, ok := that.(*InverseOfferStatus) |
| 146 |
if !ok { |
| 147 |
that2, ok := that.(InverseOfferStatus) |
| 148 |
if ok { |
| 149 |
that1 = &that2 |
| 150 |
} else { |
| 151 |
return fmt.Errorf("that is not of type *InverseOfferStatus") |
| 152 |
} |
| 153 |
} |
| 154 |
if that1 == nil { |
| 155 |
if this == nil { |
| 156 |
return nil |
| 157 |
} |
| 158 |
return fmt.Errorf("that is type *InverseOfferStatus but is nil && this != nil") |
| 159 |
} else if this == nil { |
| 160 |
return fmt.Errorf("that is type *InverseOfferStatus but is not nil && this == nil") |
| 161 |
} |
| 162 |
if this.Status != nil && that1.Status != nil { |
| 163 |
if *this.Status != *that1.Status { |
| 164 |
return fmt.Errorf("Status this(%v) Not Equal that(%v)", *this.Status, *that1.Status) |
| 165 |
} |
| 166 |
} else if this.Status != nil { |
| 167 |
return fmt.Errorf("this.Status == nil && that.Status != nil") |
| 168 |
} else if that1.Status != nil { |
| 169 |
return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) |
| 170 |
} |
| 171 |
if !this.FrameworkID.Equal(&that1.FrameworkID) { |
| 172 |
return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) |
| 173 |
} |
| 174 |
if !this.Timestamp.Equal(&that1.Timestamp) { |
| 175 |
return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) |
| 176 |
} |
| 177 |
return nil |
| 178 |
} |
| 179 |
func (this *InverseOfferStatus) Equal(that interface{}) bool { |
| 180 |
if that == nil { |
| 181 |
if this == nil { |
| 182 |
return true |
| 183 |
} |
| 184 |
return false |
| 185 |
} |
| 186 |
|
| 187 |
that1, ok := that.(*InverseOfferStatus) |
| 188 |
if !ok { |
| 189 |
that2, ok := that.(InverseOfferStatus) |
| 190 |
if ok { |
| 191 |
that1 = &that2 |
| 192 |
} else { |
| 193 |
return false |
| 194 |
} |
| 195 |
} |
| 196 |
if that1 == nil { |
| 197 |
if this == nil { |
| 198 |
return true |
| 199 |
} |
| 200 |
return false |
| 201 |
} else if this == nil { |
| 202 |
return false |
| 203 |
} |
| 204 |
if this.Status != nil && that1.Status != nil { |
| 205 |
if *this.Status != *that1.Status { |
| 206 |
return false |
| 207 |
} |
| 208 |
} else if this.Status != nil { |
| 209 |
return false |
| 210 |
} else if that1.Status != nil { |
| 211 |
return false |
| 212 |
} |
| 213 |
if !this.FrameworkID.Equal(&that1.FrameworkID) { |
| 214 |
return false |
| 215 |
} |
| 216 |
if !this.Timestamp.Equal(&that1.Timestamp) { |
| 217 |
return false |
| 218 |
} |
| 219 |
return true |
| 220 |
} |
| 221 |
func (this *InverseOfferStatus) GoString() string { |
| 222 |
if this == nil { |
| 223 |
return "nil" |
| 224 |
} |
| 225 |
s := make([]string, 0, 7) |
| 226 |
s = append(s, "&allocator.InverseOfferStatus{") |
| 227 |
if this.Status != nil { |
| 228 |
s = append(s, "Status: "+valueToGoStringAllocator(this.Status, "InverseOfferStatus_Status")+",\n") |
| 229 |
} |
| 230 |
s = append(s, "FrameworkID: "+strings.Replace(this.FrameworkID.GoString(), `&`, ``, 1)+",\n") |
| 231 |
s = append(s, "Timestamp: "+strings.Replace(this.Timestamp.GoString(), `&`, ``, 1)+",\n") |
| 232 |
s = append(s, "}") |
| 233 |
return strings.Join(s, "") |
| 234 |
} |
| 235 |
func valueToGoStringAllocator(v interface{}, typ string) string { |
| 236 |
rv := reflect.ValueOf(v) |
| 237 |
if rv.IsNil() { |
| 238 |
return "nil" |
| 239 |
} |
| 240 |
pv := reflect.Indirect(rv).Interface() |
| 241 |
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) |
| 242 |
} |
| 243 |
func (m *InverseOfferStatus) Marshal() (dAtA []byte, err error) { |
| 244 |
size := m.ProtoSize() |
| 245 |
dAtA = make([]byte, size) |
| 246 |
n, err := m.MarshalTo(dAtA) |
| 247 |
if err != nil { |
| 248 |
return nil, err |
| 249 |
} |
| 250 |
return dAtA[:n], nil |
| 251 |
} |
| 252 |
|
| 253 |
func (m *InverseOfferStatus) MarshalTo(dAtA []byte) (int, error) { |
| 254 |
var i int |
| 255 |
_ = i |
| 256 |
var l int |
| 257 |
_ = l |
| 258 |
if m.Status == nil { |
| 259 |
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") |
| 260 |
} else { |
| 261 |
dAtA[i] = 0x8 |
| 262 |
i++ |
| 263 |
i = encodeVarintAllocator(dAtA, i, uint64(*m.Status)) |
| 264 |
} |
| 265 |
dAtA[i] = 0x12 |
| 266 |
i++ |
| 267 |
i = encodeVarintAllocator(dAtA, i, uint64(m.FrameworkID.ProtoSize())) |
| 268 |
n1, err := m.FrameworkID.MarshalTo(dAtA[i:]) |
| 269 |
if err != nil { |
| 270 |
return 0, err |
| 271 |
} |
| 272 |
i += n1 |
| 273 |
dAtA[i] = 0x1a |
| 274 |
i++ |
| 275 |
i = encodeVarintAllocator(dAtA, i, uint64(m.Timestamp.ProtoSize())) |
| 276 |
n2, err := m.Timestamp.MarshalTo(dAtA[i:]) |
| 277 |
if err != nil { |
| 278 |
return 0, err |
| 279 |
} |
| 280 |
i += n2 |
| 281 |
return i, nil |
| 282 |
} |
| 283 |
|
| 284 |
func encodeFixed64Allocator(dAtA []byte, offset int, v uint64) int { |
| 285 |
dAtA[offset] = uint8(v) |
| 286 |
dAtA[offset+1] = uint8(v >> 8) |
| 287 |
dAtA[offset+2] = uint8(v >> 16) |
| 288 |
dAtA[offset+3] = uint8(v >> 24) |
| 289 |
dAtA[offset+4] = uint8(v >> 32) |
| 290 |
dAtA[offset+5] = uint8(v >> 40) |
| 291 |
dAtA[offset+6] = uint8(v >> 48) |
| 292 |
dAtA[offset+7] = uint8(v >> 56) |
| 293 |
return offset + 8 |
| 294 |
} |
| 295 |
func encodeFixed32Allocator(dAtA []byte, offset int, v uint32) int { |
| 296 |
dAtA[offset] = uint8(v) |
| 297 |
dAtA[offset+1] = uint8(v >> 8) |
| 298 |
dAtA[offset+2] = uint8(v >> 16) |
| 299 |
dAtA[offset+3] = uint8(v >> 24) |
| 300 |
return offset + 4 |
| 301 |
} |
| 302 |
func encodeVarintAllocator(dAtA []byte, offset int, v uint64) int { |
| 303 |
for v >= 1<<7 { |
| 304 |
dAtA[offset] = uint8(v&0x7f | 0x80) |
| 305 |
v >>= 7 |
| 306 |
offset++ |
| 307 |
} |
| 308 |
dAtA[offset] = uint8(v) |
| 309 |
return offset + 1 |
| 310 |
} |
| 311 |
func NewPopulatedInverseOfferStatus(r randyAllocator, easy bool) *InverseOfferStatus { |
| 312 |
this := &InverseOfferStatus{} |
| 313 |
v1 := InverseOfferStatus_Status([]int32{1, 2, 3}[r.Intn(3)]) |
| 314 |
this.Status = &v1 |
| 315 |
v2 := mesos.NewPopulatedFrameworkID(r, easy) |
| 316 |
this.FrameworkID = *v2 |
| 317 |
v3 := mesos.NewPopulatedTimeInfo(r, easy) |
| 318 |
this.Timestamp = *v3 |
| 319 |
if !easy && r.Intn(10) != 0 { |
| 320 |
} |
| 321 |
return this |
| 322 |
} |
| 323 |
|
| 324 |
type randyAllocator interface { |
| 325 |
Float32() float32 |
| 326 |
Float64() float64 |
| 327 |
Int63() int64 |
| 328 |
Int31() int32 |
| 329 |
Uint32() uint32 |
| 330 |
Intn(n int) int |
| 331 |
} |
| 332 |
|
| 333 |
func randUTF8RuneAllocator(r randyAllocator) rune { |
| 334 |
ru := r.Intn(62) |
| 335 |
if ru < 10 { |
| 336 |
return rune(ru + 48) |
| 337 |
} else if ru < 36 { |
| 338 |
return rune(ru + 55) |
| 339 |
} |
| 340 |
return rune(ru + 61) |
| 341 |
} |
| 342 |
func randStringAllocator(r randyAllocator) string { |
| 343 |
v4 := r.Intn(100) |
| 344 |
tmps := make([]rune, v4) |
| 345 |
for i := 0; i < v4; i++ { |
| 346 |
tmps[i] = randUTF8RuneAllocator(r) |
| 347 |
} |
| 348 |
return string(tmps) |
| 349 |
} |
| 350 |
func randUnrecognizedAllocator(r randyAllocator, maxFieldNumber int) (dAtA []byte) { |
| 351 |
l := r.Intn(5) |
| 352 |
for i := 0; i < l; i++ { |
| 353 |
wire := r.Intn(4) |
| 354 |
if wire == 3 { |
| 355 |
wire = 5 |
| 356 |
} |
| 357 |
fieldNumber := maxFieldNumber + r.Intn(100) |
| 358 |
dAtA = randFieldAllocator(dAtA, r, fieldNumber, wire) |
| 359 |
} |
| 360 |
return dAtA |
| 361 |
} |
| 362 |
func randFieldAllocator(dAtA []byte, r randyAllocator, fieldNumber int, wire int) []byte { |
| 363 |
key := uint32(fieldNumber)<<3 | uint32(wire) |
| 364 |
switch wire { |
| 365 |
case 0: |
| 366 |
dAtA = encodeVarintPopulateAllocator(dAtA, uint64(key)) |
| 367 |
v5 := r.Int63() |
| 368 |
if r.Intn(2) == 0 { |
| 369 |
v5 *= -1 |
| 370 |
} |
| 371 |
dAtA = encodeVarintPopulateAllocator(dAtA, uint64(v5)) |
| 372 |
case 1: |
| 373 |
dAtA = encodeVarintPopulateAllocator(dAtA, uint64(key)) |
| 374 |
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))) |
| 375 |
case 2: |
| 376 |
dAtA = encodeVarintPopulateAllocator(dAtA, uint64(key)) |
| 377 |
ll := r.Intn(100) |
| 378 |
dAtA = encodeVarintPopulateAllocator(dAtA, uint64(ll)) |
| 379 |
for j := 0; j < ll; j++ { |
| 380 |
dAtA = append(dAtA, byte(r.Intn(256))) |
| 381 |
} |
| 382 |
default: |
| 383 |
dAtA = encodeVarintPopulateAllocator(dAtA, uint64(key)) |
| 384 |
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) |
| 385 |
} |
| 386 |
return dAtA |
| 387 |
} |
| 388 |
func encodeVarintPopulateAllocator(dAtA []byte, v uint64) []byte { |
| 389 |
for v >= 1<<7 { |
| 390 |
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) |
| 391 |
v >>= 7 |
| 392 |
} |
| 393 |
dAtA = append(dAtA, uint8(v)) |
| 394 |
return dAtA |
| 395 |
} |
| 396 |
func (m *InverseOfferStatus) ProtoSize() (n int) { |
| 397 |
var l int |
| 398 |
_ = l |
| 399 |
if m.Status != nil { |
| 400 |
n += 1 + sovAllocator(uint64(*m.Status)) |
| 401 |
} |
| 402 |
l = m.FrameworkID.ProtoSize() |
| 403 |
n += 1 + l + sovAllocator(uint64(l)) |
| 404 |
l = m.Timestamp.ProtoSize() |
| 405 |
n += 1 + l + sovAllocator(uint64(l)) |
| 406 |
return n |
| 407 |
} |
| 408 |
|
| 409 |
func sovAllocator(x uint64) (n int) { |
| 410 |
for { |
| 411 |
n++ |
| 412 |
x >>= 7 |
| 413 |
if x == 0 { |
| 414 |
break |
| 415 |
} |
| 416 |
} |
| 417 |
return n |
| 418 |
} |
| 419 |
func sozAllocator(x uint64) (n int) { |
| 420 |
return sovAllocator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| 421 |
} |
| 422 |
func (this *InverseOfferStatus) String() string { |
| 423 |
if this == nil { |
| 424 |
return "nil" |
| 425 |
} |
| 426 |
s := strings.Join([]string{`&InverseOfferStatus{`, |
| 427 |
`Status:` + valueToStringAllocator(this.Status) + `,`, |
| 428 |
`FrameworkID:` + strings.Replace(strings.Replace(this.FrameworkID.String(), "FrameworkID", "mesos.FrameworkID", 1), `&`, ``, 1) + `,`, |
| 429 |
`Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "TimeInfo", "mesos.TimeInfo", 1), `&`, ``, 1) + `,`, |
| 430 |
`}`, |
| 431 |
}, "") |
| 432 |
return s |
| 433 |
} |
| 434 |
func valueToStringAllocator(v interface{}) string { |
| 435 |
rv := reflect.ValueOf(v) |
| 436 |
if rv.IsNil() { |
| 437 |
return "nil" |
| 438 |
} |
| 439 |
pv := reflect.Indirect(rv).Interface() |
| 440 |
return fmt.Sprintf("*%v", pv) |
| 441 |
} |
| 442 |
func (m *InverseOfferStatus) Unmarshal(dAtA []byte) error { |
| 443 |
var hasFields [1]uint64 |
| 444 |
l := len(dAtA) |
| 445 |
iNdEx := 0 |
| 446 |
for iNdEx < l { |
| 447 |
preIndex := iNdEx |
| 448 |
var wire uint64 |
| 449 |
for shift := uint(0); ; shift += 7 { |
| 450 |
if shift >= 64 { |
| 451 |
return ErrIntOverflowAllocator |
| 452 |
} |
| 453 |
if iNdEx >= l { |
| 454 |
return io.ErrUnexpectedEOF |
| 455 |
} |
| 456 |
b := dAtA[iNdEx] |
| 457 |
iNdEx++ |
| 458 |
wire |= (uint64(b) & 0x7F) << shift |
| 459 |
if b < 0x80 { |
| 460 |
break |
| 461 |
} |
| 462 |
} |
| 463 |
fieldNum := int32(wire >> 3) |
| 464 |
wireType := int(wire & 0x7) |
| 465 |
if wireType == 4 { |
| 466 |
return fmt.Errorf("proto: InverseOfferStatus: wiretype end group for non-group") |
| 467 |
} |
| 468 |
if fieldNum <= 0 { |
| 469 |
return fmt.Errorf("proto: InverseOfferStatus: illegal tag %d (wire type %d)", fieldNum, wire) |
| 470 |
} |
| 471 |
switch fieldNum { |
| 472 |
case 1: |
| 473 |
if wireType != 0 { |
| 474 |
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) |
| 475 |
} |
| 476 |
var v InverseOfferStatus_Status |
| 477 |
for shift := uint(0); ; shift += 7 { |
| 478 |
if shift >= 64 { |
| 479 |
return ErrIntOverflowAllocator |
| 480 |
} |
| 481 |
if iNdEx >= l { |
| 482 |
return io.ErrUnexpectedEOF |
| 483 |
} |
| 484 |
b := dAtA[iNdEx] |
| 485 |
iNdEx++ |
| 486 |
v |= (InverseOfferStatus_Status(b) & 0x7F) << shift |
| 487 |
if b < 0x80 { |
| 488 |
break |
| 489 |
} |
| 490 |
} |
| 491 |
m.Status = &v |
| 492 |
hasFields[0] |= uint64(0x00000001) |
| 493 |
case 2: |
| 494 |
if wireType != 2 { |
| 495 |
return fmt.Errorf("proto: wrong wireType = %d for field FrameworkID", wireType) |
| 496 |
} |
| 497 |
var msglen int |
| 498 |
for shift := uint(0); ; shift += 7 { |
| 499 |
if shift >= 64 { |
| 500 |
return ErrIntOverflowAllocator |
| 501 |
} |
| 502 |
if iNdEx >= l { |
| 503 |
return io.ErrUnexpectedEOF |
| 504 |
} |
| 505 |
b := dAtA[iNdEx] |
| 506 |
iNdEx++ |
| 507 |
msglen |= (int(b) & 0x7F) << shift |
| 508 |
if b < 0x80 { |
| 509 |
break |
| 510 |
} |
| 511 |
} |
| 512 |
if msglen < 0 { |
| 513 |
return ErrInvalidLengthAllocator |
| 514 |
} |
| 515 |
postIndex := iNdEx + msglen |
| 516 |
if postIndex > l { |
| 517 |
return io.ErrUnexpectedEOF |
| 518 |
} |
| 519 |
if err := m.FrameworkID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 520 |
return err |
| 521 |
} |
| 522 |
iNdEx = postIndex |
| 523 |
hasFields[0] |= uint64(0x00000002) |
| 524 |
case 3: |
| 525 |
if wireType != 2 { |
| 526 |
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) |
| 527 |
} |
| 528 |
var msglen int |
| 529 |
for shift := uint(0); ; shift += 7 { |
| 530 |
if shift >= 64 { |
| 531 |
return ErrIntOverflowAllocator |
| 532 |
} |
| 533 |
if iNdEx >= l { |
| 534 |
return io.ErrUnexpectedEOF |
| 535 |
} |
| 536 |
b := dAtA[iNdEx] |
| 537 |
iNdEx++ |
| 538 |
msglen |= (int(b) & 0x7F) << shift |
| 539 |
if b < 0x80 { |
| 540 |
break |
| 541 |
} |
| 542 |
} |
| 543 |
if msglen < 0 { |
| 544 |
return ErrInvalidLengthAllocator |
| 545 |
} |
| 546 |
postIndex := iNdEx + msglen |
| 547 |
if postIndex > l { |
| 548 |
return io.ErrUnexpectedEOF |
| 549 |
} |
| 550 |
if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 551 |
return err |
| 552 |
} |
| 553 |
iNdEx = postIndex |
| 554 |
hasFields[0] |= uint64(0x00000004) |
| 555 |
default: |
| 556 |
iNdEx = preIndex |
| 557 |
skippy, err := skipAllocator(dAtA[iNdEx:]) |
| 558 |
if err != nil { |
| 559 |
return err |
| 560 |
} |
| 561 |
if skippy < 0 { |
| 562 |
return ErrInvalidLengthAllocator |
| 563 |
} |
| 564 |
if (iNdEx + skippy) > l { |
| 565 |
return io.ErrUnexpectedEOF |
| 566 |
} |
| 567 |
iNdEx += skippy |
| 568 |
} |
| 569 |
} |
| 570 |
if hasFields[0]&uint64(0x00000001) == 0 { |
| 571 |
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") |
| 572 |
} |
| 573 |
if hasFields[0]&uint64(0x00000002) == 0 { |
| 574 |
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") |
| 575 |
} |
| 576 |
if hasFields[0]&uint64(0x00000004) == 0 { |
| 577 |
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") |
| 578 |
} |
| 579 |
|
| 580 |
if iNdEx > l { |
| 581 |
return io.ErrUnexpectedEOF |
| 582 |
} |
| 583 |
return nil |
| 584 |
} |
| 585 |
func skipAllocator(dAtA []byte) (n int, err error) { |
| 586 |
l := len(dAtA) |
| 587 |
iNdEx := 0 |
| 588 |
for iNdEx < l { |
| 589 |
var wire uint64 |
| 590 |
for shift := uint(0); ; shift += 7 { |
| 591 |
if shift >= 64 { |
| 592 |
return 0, ErrIntOverflowAllocator |
| 593 |
} |
| 594 |
if iNdEx >= l { |
| 595 |
return 0, io.ErrUnexpectedEOF |
| 596 |
} |
| 597 |
b := dAtA[iNdEx] |
| 598 |
iNdEx++ |
| 599 |
wire |= (uint64(b) & 0x7F) << shift |
| 600 |
if b < 0x80 { |
| 601 |
break |
| 602 |
} |
| 603 |
} |
| 604 |
wireType := int(wire & 0x7) |
| 605 |
switch wireType { |
| 606 |
case 0: |
| 607 |
for shift := uint(0); ; shift += 7 { |
| 608 |
if shift >= 64 { |
| 609 |
return 0, ErrIntOverflowAllocator |
| 610 |
} |
| 611 |
if iNdEx >= l { |
| 612 |
return 0, io.ErrUnexpectedEOF |
| 613 |
} |
| 614 |
iNdEx++ |
| 615 |
if dAtA[iNdEx-1] < 0x80 { |
| 616 |
break |
| 617 |
} |
| 618 |
} |
| 619 |
return iNdEx, nil |
| 620 |
case 1: |
| 621 |
iNdEx += 8 |
| 622 |
return iNdEx, nil |
| 623 |
case 2: |
| 624 |
var length int |
| 625 |
for shift := uint(0); ; shift += 7 { |
| 626 |
if shift >= 64 { |
| 627 |
return 0, ErrIntOverflowAllocator |
| 628 |
} |
| 629 |
if iNdEx >= l { |
| 630 |
return 0, io.ErrUnexpectedEOF |
| 631 |
} |
| 632 |
b := dAtA[iNdEx] |
| 633 |
iNdEx++ |
| 634 |
length |= (int(b) & 0x7F) << shift |
| 635 |
if b < 0x80 { |
| 636 |
break |
| 637 |
} |
| 638 |
} |
| 639 |
iNdEx += length |
| 640 |
if length < 0 { |
| 641 |
return 0, ErrInvalidLengthAllocator |
| 642 |
} |
| 643 |
return iNdEx, nil |
| 644 |
case 3: |
| 645 |
for { |
| 646 |
var innerWire uint64 |
| 647 |
var start int = iNdEx |
| 648 |
for shift := uint(0); ; shift += 7 { |
| 649 |
if shift >= 64 { |
| 650 |
return 0, ErrIntOverflowAllocator |
| 651 |
} |
| 652 |
if iNdEx >= l { |
| 653 |
return 0, io.ErrUnexpectedEOF |
| 654 |
} |
| 655 |
b := dAtA[iNdEx] |
| 656 |
iNdEx++ |
| 657 |
innerWire |= (uint64(b) & 0x7F) << shift |
| 658 |
if b < 0x80 { |
| 659 |
break |
| 660 |
} |
| 661 |
} |
| 662 |
innerWireType := int(innerWire & 0x7) |
| 663 |
if innerWireType == 4 { |
| 664 |
break |
| 665 |
} |
| 666 |
next, err := skipAllocator(dAtA[start:]) |
| 667 |
if err != nil { |
| 668 |
return 0, err |
| 669 |
} |
| 670 |
iNdEx = start + next |
| 671 |
} |
| 672 |
return iNdEx, nil |
| 673 |
case 4: |
| 674 |
return iNdEx, nil |
| 675 |
case 5: |
| 676 |
iNdEx += 4 |
| 677 |
return iNdEx, nil |
| 678 |
default: |
| 679 |
return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| 680 |
} |
| 681 |
} |
| 682 |
panic("unreachable") |
| 683 |
} |
| 684 |
|
| 685 |
var ( |
| 686 |
ErrInvalidLengthAllocator = fmt.Errorf("proto: negative length found during unmarshaling") |
| 687 |
ErrIntOverflowAllocator = fmt.Errorf("proto: integer overflow") |
| 688 |
) |
| 689 |
|
| 690 |
func init() { proto.RegisterFile("allocator/allocator.proto", fileDescriptorAllocator) } |
| 691 |
|
| 692 |
var fileDescriptorAllocator = []byte{ |
| 693 |
|
| 694 |
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcc, 0xc9, 0xc9, |
| 695 |
0x4f, 0x4e, 0x2c, 0xc9, 0x2f, 0xd2, 0x87, 0xb3, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xf8, |
| 696 |
0x73, 0x53, 0x8b, 0xf3, 0x8b, 0xf5, 0xe0, 0xc2, 0x52, 0x06, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, |
| 697 |
0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x60, 0x39, 0x08, 0xa9, 0x9b, 0x9e, 0xaf, 0x9f, 0x58, 0x90, 0xa9, |
| 698 |
0x5f, 0x66, 0xa8, 0x9f, 0x93, 0x99, 0x04, 0x11, 0x83, 0x18, 0x21, 0xa5, 0x8b, 0xa4, 0x23, 0x3d, |
| 699 |
0x3f, 0x3d, 0x5f, 0x1f, 0x2c, 0x9c, 0x54, 0x9a, 0x06, 0xe6, 0x81, 0x39, 0x60, 0x16, 0x44, 0xb9, |
| 700 |
0x52, 0x3f, 0x13, 0x97, 0x90, 0x67, 0x5e, 0x59, 0x6a, 0x51, 0x71, 0xaa, 0x7f, 0x5a, 0x5a, 0x6a, |
| 701 |
0x51, 0x70, 0x49, 0x62, 0x49, 0x69, 0xb1, 0x90, 0x13, 0x17, 0x5b, 0x31, 0x98, 0x25, 0xc1, 0xa8, |
| 702 |
0xc0, 0xa4, 0xc1, 0x67, 0xa4, 0xa5, 0x87, 0xe6, 0x32, 0x3d, 0x4c, 0x4d, 0x7a, 0x10, 0x2a, 0x08, |
| 703 |
0xaa, 0x53, 0xc8, 0x8b, 0x8b, 0x27, 0xad, 0x28, 0x31, 0x37, 0xb5, 0x3c, 0xbf, 0x28, 0x3b, 0x3e, |
| 704 |
0x33, 0x45, 0x82, 0x49, 0x81, 0x49, 0x83, 0xdb, 0x48, 0x08, 0x6a, 0x92, 0x1b, 0x4c, 0xca, 0xd3, |
| 705 |
0xc5, 0x49, 0xf8, 0xc4, 0x3d, 0x79, 0x86, 0x47, 0xf7, 0xe4, 0xb9, 0x91, 0x04, 0x83, 0xb8, 0xe1, |
| 706 |
0x9a, 0x3d, 0x53, 0x84, 0x8c, 0xb9, 0x38, 0x4b, 0x32, 0x73, 0x53, 0x8b, 0x4b, 0x12, 0x73, 0x0b, |
| 707 |
0x24, 0x98, 0xc1, 0x06, 0xf1, 0x43, 0x0d, 0x0a, 0xc9, 0xcc, 0x4d, 0xf5, 0xcc, 0x4b, 0xcb, 0x77, |
| 708 |
0x62, 0x01, 0x99, 0x12, 0x84, 0x50, 0xa7, 0x64, 0xc2, 0xc5, 0x06, 0xf5, 0x0e, 0x37, 0x17, 0x7b, |
| 709 |
0xa8, 0x9f, 0xb7, 0x9f, 0x7f, 0xb8, 0x9f, 0x00, 0xa3, 0x10, 0x17, 0x17, 0x9b, 0xa3, 0xb3, 0xb3, |
| 710 |
0x6b, 0x40, 0x88, 0x00, 0x13, 0x48, 0xc2, 0xc5, 0xd5, 0xd9, 0xc7, 0xd3, 0xcf, 0x55, 0x80, 0x59, |
| 711 |
0x8a, 0xa5, 0x63, 0xb1, 0x1c, 0xa3, 0x93, 0xfb, 0x85, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, |
| 712 |
0x3c, 0x78, 0x28, 0xc7, 0xf8, 0xe1, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, 0x72, 0x8c, 0x0d, 0x8f, 0xe4, |
| 713 |
0x18, 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0xf1, 0xc0, 0x23, 0x39, 0xc6, 0x13, 0x8f, |
| 714 |
0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39, 0xc6, 0x09, |
| 715 |
0x8f, 0xe5, 0x18, 0x16, 0x3c, 0x96, 0x63, 0x8c, 0xe2, 0x84, 0x87, 0x10, 0x20, 0x00, 0x00, 0xff, |
| 716 |
0xff, 0x9b, 0x93, 0x27, 0x49, 0xe8, 0x01, 0x00, 0x00, |
| 717 |
} |