Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #21 from uber/active_zone
Browse files Browse the repository at this point in the history
add activeZone to UpdateConsumerGroupRequest
  • Loading branch information
datoug authored May 2, 2017
2 parents 491bc3a + 9683119 commit 5ee4a84
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .generated/go/shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -5868,6 +5868,7 @@ func (p *CreateConsumerGroupUUIDRequest) String() string {
// - SkipOlderMessagesSeconds
// - DeadLetterQueueDestinationUUID
// - OwnerEmail
// - ActiveZone
type UpdateConsumerGroupRequest struct {
DestinationPath *string `thrift:"destinationPath,1" db:"destinationPath" json:"destinationPath,omitempty"`
ConsumerGroupName *string `thrift:"consumerGroupName,2" db:"consumerGroupName" json:"consumerGroupName,omitempty"`
Expand All @@ -5877,6 +5878,7 @@ type UpdateConsumerGroupRequest struct {
SkipOlderMessagesSeconds *int32 `thrift:"skipOlderMessagesSeconds,6" db:"skipOlderMessagesSeconds" json:"skipOlderMessagesSeconds,omitempty"`
DeadLetterQueueDestinationUUID *string `thrift:"deadLetterQueueDestinationUUID,7" db:"deadLetterQueueDestinationUUID" json:"deadLetterQueueDestinationUUID,omitempty"`
OwnerEmail *string `thrift:"ownerEmail,8" db:"ownerEmail" json:"ownerEmail,omitempty"`
ActiveZone *string `thrift:"activeZone,9" db:"activeZone" json:"activeZone,omitempty"`
}

func NewUpdateConsumerGroupRequest() *UpdateConsumerGroupRequest {
Expand Down Expand Up @@ -5939,6 +5941,13 @@ func (p *UpdateConsumerGroupRequest) GetOwnerEmail() string {
}
return *p.OwnerEmail
}
var UpdateConsumerGroupRequest_ActiveZone_DEFAULT string
func (p *UpdateConsumerGroupRequest) GetActiveZone() string {
if !p.IsSetActiveZone() {
return UpdateConsumerGroupRequest_ActiveZone_DEFAULT
}
return *p.ActiveZone
}
func (p *UpdateConsumerGroupRequest) IsSetDestinationPath() bool {
return p.DestinationPath != nil
}
Expand Down Expand Up @@ -5971,6 +5980,10 @@ func (p *UpdateConsumerGroupRequest) IsSetOwnerEmail() bool {
return p.OwnerEmail != nil
}

func (p *UpdateConsumerGroupRequest) IsSetActiveZone() bool {
return p.ActiveZone != nil
}

func (p *UpdateConsumerGroupRequest) Read(iprot thrift.TProtocol) error {
if _, err := iprot.ReadStructBegin(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
Expand Down Expand Up @@ -6016,6 +6029,10 @@ func (p *UpdateConsumerGroupRequest) Read(iprot thrift.TProtocol) error {
if err := p.ReadField8(iprot); err != nil {
return err
}
case 9:
if err := p.ReadField9(iprot); err != nil {
return err
}
default:
if err := iprot.Skip(fieldTypeId); err != nil {
return err
Expand Down Expand Up @@ -6104,6 +6121,15 @@ func (p *UpdateConsumerGroupRequest) ReadField8(iprot thrift.TProtocol) error {
return nil
}

func (p *UpdateConsumerGroupRequest) ReadField9(iprot thrift.TProtocol) error {
if v, err := iprot.ReadString(); err != nil {
return thrift.PrependError("error reading field 9: ", err)
} else {
p.ActiveZone = &v
}
return nil
}

func (p *UpdateConsumerGroupRequest) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("UpdateConsumerGroupRequest"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
Expand All @@ -6116,6 +6142,7 @@ func (p *UpdateConsumerGroupRequest) Write(oprot thrift.TProtocol) error {
if err := p.writeField6(oprot); err != nil { return err }
if err := p.writeField7(oprot); err != nil { return err }
if err := p.writeField8(oprot); err != nil { return err }
if err := p.writeField9(oprot); err != nil { return err }
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err) }
Expand Down Expand Up @@ -6220,6 +6247,18 @@ func (p *UpdateConsumerGroupRequest) writeField8(oprot thrift.TProtocol) (err er
return err
}

func (p *UpdateConsumerGroupRequest) writeField9(oprot thrift.TProtocol) (err error) {
if p.IsSetActiveZone() {
if err := oprot.WriteFieldBegin("activeZone", thrift.STRING, 9); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:activeZone: ", p), err) }
if err := oprot.WriteString(string(*p.ActiveZone)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.activeZone (9) field write error: ", p), err) }
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 9:activeZone: ", p), err) }
}
return err
}

func (p *UpdateConsumerGroupRequest) String() string {
if p == nil {
return "<nil>"
Expand Down
1 change: 1 addition & 0 deletions idl/cherami_server/shared.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ struct UpdateConsumerGroupRequest {
6: optional i32 skipOlderMessagesSeconds
7: optional string deadLetterQueueDestinationUUID
8: optional string ownerEmail
9: optional string activeZone
}

struct DeleteConsumerGroupRequest {
Expand Down

0 comments on commit 5ee4a84

Please sign in to comment.