github.com/optim-corp/cios-golang-sdk@v0.5.1/model/model_stream_request_wrapper.go (about)

     1  package sdkmodel
     2  
     3  import (
     4  	"github.com/optim-corp/cios-golang-sdk/util"
     5  
     6  	"github.com/optim-corp/cios-golang-sdk/cios"
     7  )
     8  
     9  type ApiGetStreamRequest struct {
    10  	ApiService                  *cios.PublishSubscribeApiService
    11  	ChannelId                   string
    12  	PackerFormatParam           *string
    13  	AscendingParam              *bool
    14  	ChannelProtocolVersionParam *int32
    15  	LocationParam               *string
    16  	LocationRangeParam          *string
    17  	TimestampParam              *string
    18  	TimestampRangeParam         *string
    19  	LabelParam                  *string
    20  	OffsetParam                 *int64
    21  	LimitParam                  *int64
    22  	TimeoutParam                *int
    23  	SessionIdParam              *string
    24  	ChannelProtocolIdParam      *string
    25  }
    26  
    27  func (r ApiGetStreamRequest) PackerFormat(packerPacker string) ApiGetStreamRequest {
    28  	r.PackerFormatParam = util.ToNilStr(packerPacker)
    29  	return r
    30  }
    31  func (r ApiGetStreamRequest) ChannelProtocolVersion(channelProtocolVersion int32) ApiGetStreamRequest {
    32  	r.ChannelProtocolVersionParam = &channelProtocolVersion
    33  	return r
    34  }
    35  func (r ApiGetStreamRequest) Timeout(timeout int) ApiGetStreamRequest {
    36  	r.TimeoutParam = &timeout
    37  	return r
    38  }
    39  func (r ApiGetStreamRequest) SessionID(sessionID string) ApiGetStreamRequest {
    40  	r.SessionIdParam = util.ToNilStr(sessionID)
    41  	return r
    42  }
    43  func (r ApiGetStreamRequest) ChannelProtocolId(channelProtocolId string) ApiGetStreamRequest {
    44  	r.ChannelProtocolIdParam = util.ToNilStr(channelProtocolId)
    45  	return r
    46  }
    47  func (r ApiGetStreamRequest) Label(label string) ApiGetStreamRequest {
    48  	r.LabelParam = util.ToNilStr(label)
    49  	return r
    50  }
    51  func (r ApiGetStreamRequest) Location(location string) ApiGetStreamRequest {
    52  	r.LocationParam = util.ToNilStr(location)
    53  	return r
    54  }
    55  func (r ApiGetStreamRequest) LocationRange(locationRange string) ApiGetStreamRequest {
    56  	r.LocationRangeParam = util.ToNilStr(locationRange)
    57  	return r
    58  }
    59  func (r ApiGetStreamRequest) Timestamp(timestamp string) ApiGetStreamRequest {
    60  	r.TimestampParam = util.ToNilStr(timestamp)
    61  	return r
    62  }
    63  func (r ApiGetStreamRequest) TimestampRange(timestampRange string) ApiGetStreamRequest {
    64  	r.TimestampRangeParam = util.ToNilStr(timestampRange)
    65  	return r
    66  }
    67  func (r ApiGetStreamRequest) Ascending(ascending bool) ApiGetStreamRequest {
    68  	r.AscendingParam = &ascending
    69  	return r
    70  }
    71  func (r ApiGetStreamRequest) Offset(offset int64) ApiGetStreamRequest {
    72  	r.OffsetParam = &offset
    73  	return r
    74  }
    75  func (r ApiGetStreamRequest) Limit(limit int64) ApiGetStreamRequest {
    76  	r.LimitParam = &limit
    77  	return r
    78  }