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 #22 from uber/active_zone_cherami
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 5ee4a84 + e76f53d commit be4d5fc
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .generated/go/cherami/cherami.go
Original file line number Diff line number Diff line change
Expand Up @@ -5351,6 +5351,7 @@ func (p *ReadConsumerGroupRequest) String() string {
// - MaxDeliveryCount
// - SkipOlderMessagesInSeconds
// - 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 @@ -5359,6 +5360,8 @@ type UpdateConsumerGroupRequest struct {
MaxDeliveryCount *int32 `thrift:"maxDeliveryCount,5" db:"maxDeliveryCount" json:"maxDeliveryCount,omitempty"`
SkipOlderMessagesInSeconds *int32 `thrift:"skipOlderMessagesInSeconds,6" db:"skipOlderMessagesInSeconds" json:"skipOlderMessagesInSeconds,omitempty"`
OwnerEmail *string `thrift:"ownerEmail,7" db:"ownerEmail" json:"ownerEmail,omitempty"`
// unused field # 8
ActiveZone *string `thrift:"activeZone,9" db:"activeZone" json:"activeZone,omitempty"`
}

func NewUpdateConsumerGroupRequest() *UpdateConsumerGroupRequest {
Expand Down Expand Up @@ -5414,6 +5417,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 @@ -5442,6 +5452,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 @@ -5483,6 +5497,10 @@ func (p *UpdateConsumerGroupRequest) Read(iprot thrift.TProtocol) error {
if err := p.ReadField7(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 @@ -5562,6 +5580,15 @@ func (p *UpdateConsumerGroupRequest) ReadField7(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 @@ -5573,6 +5600,7 @@ func (p *UpdateConsumerGroupRequest) Write(oprot thrift.TProtocol) error {
if err := p.writeField5(oprot); err != nil { return err }
if err := p.writeField6(oprot); err != nil { return err }
if err := p.writeField7(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 @@ -5665,6 +5693,18 @@ func (p *UpdateConsumerGroupRequest) writeField7(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/cherami.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ struct UpdateConsumerGroupRequest {
5: optional i32 maxDeliveryCount
6: optional i32 skipOlderMessagesInSeconds
7: optional string ownerEmail
9: optional string activeZone
}

struct DeleteConsumerGroupRequest {
Expand Down

0 comments on commit be4d5fc

Please sign in to comment.