protocol

package
v0.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_byteplus_media_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AckServerImpressionsRequest added in v0.1.11

type AckServerImpressionsRequest struct {

	// Required.
	// This should be same as `PredictRequest.request_id`.
	PredictRequestId string `protobuf:"bytes,1,opt,name=predict_request_id,json=predictRequestId,proto3" json:"predict_request_id,omitempty"`
	// Required.
	// This should be same as `PredictRequest.user_id`.
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Required.
	// This should be the traffic source.
	// Please refer to
	// [this](../docs/ways-to-improve-recommendation-performance#use-usereventrec_info-and-usereventtraffic_source) for more details.
	TrafficSource string `protobuf:"bytes,3,opt,name=traffic_source,json=trafficSource,proto3" json:"traffic_source,omitempty"`
	// Required.
	// The scene info.
	// Please make sure this is as close to PredictRequest.scene as possible.
	Scene *PredictRequest_Scene `protobuf:"bytes,4,opt,name=scene,proto3" json:"scene,omitempty"`
	// Required.
	// The list of altered contents.
	AlteredContents []*AckServerImpressionsRequest_AlteredContent `protobuf:"bytes,5,rep,name=altered_contents,json=alteredContents,proto3" json:"altered_contents,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

The request proto for AckServerImpressions call.

func (*AckServerImpressionsRequest) Descriptor deprecated added in v0.1.11

func (*AckServerImpressionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use AckServerImpressionsRequest.ProtoReflect.Descriptor instead.

func (*AckServerImpressionsRequest) GetAlteredContents added in v0.1.11

func (*AckServerImpressionsRequest) GetExtra added in v0.1.11

func (x *AckServerImpressionsRequest) GetExtra() map[string]string

func (*AckServerImpressionsRequest) GetPredictRequestId added in v0.1.11

func (x *AckServerImpressionsRequest) GetPredictRequestId() string

func (*AckServerImpressionsRequest) GetScene added in v0.1.11

func (*AckServerImpressionsRequest) GetTrafficSource added in v0.1.11

func (x *AckServerImpressionsRequest) GetTrafficSource() string

func (*AckServerImpressionsRequest) GetUserId added in v0.1.11

func (x *AckServerImpressionsRequest) GetUserId() string

func (*AckServerImpressionsRequest) ProtoMessage added in v0.1.11

func (*AckServerImpressionsRequest) ProtoMessage()

func (*AckServerImpressionsRequest) ProtoReflect added in v0.1.11

func (*AckServerImpressionsRequest) Reset added in v0.1.11

func (x *AckServerImpressionsRequest) Reset()

func (*AckServerImpressionsRequest) String added in v0.1.11

func (x *AckServerImpressionsRequest) String() string

type AckServerImpressionsRequest_AlteredContent added in v0.1.11

type AckServerImpressionsRequest_AlteredContent struct {

	// Required.
	// This is same as `Content.content_id`.
	ContentId string `protobuf:"bytes,1,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
	// Required.
	// The final state of the content.
	// The acceptable values are "kept", "filtered", "inserted".
	// kept     : The content was kept as is.
	// filtered : The content is filtered by the caller's own logic.
	// inserted : The content is inserted by the caller's own logic.
	// filled   : The content is filled by the caller's own logic.
	AlteredReason string `protobuf:"bytes,2,opt,name=altered_reason,json=alteredReason,proto3" json:"altered_reason,omitempty"`
	// Required.
	// The final rank.
	// If this is unset (or 0), we assume it is filtered in actual impression.
	Rank int32 `protobuf:"varint,3,opt,name=rank,proto3" json:"rank,omitempty"`
	// Internal.
	// If `content_id` is a number, `content_id_hash` equals to `content_id`
	// If `content_id` is not a number, `content_id_hash` equals to `fnv(content_id)`
	ContentIdHash int64 `protobuf:"varint,100,opt,name=content_id_hash,json=contentIdHash,proto3" json:"content_id_hash,omitempty"`
	// contains filtered or unexported fields
}

The content that was altered.

func (*AckServerImpressionsRequest_AlteredContent) Descriptor deprecated added in v0.1.11

Deprecated: Use AckServerImpressionsRequest_AlteredContent.ProtoReflect.Descriptor instead.

func (*AckServerImpressionsRequest_AlteredContent) GetAlteredReason added in v0.1.11

func (x *AckServerImpressionsRequest_AlteredContent) GetAlteredReason() string

func (*AckServerImpressionsRequest_AlteredContent) GetContentId added in v0.1.11

func (*AckServerImpressionsRequest_AlteredContent) GetContentIdHash added in v0.1.11

func (x *AckServerImpressionsRequest_AlteredContent) GetContentIdHash() int64

func (*AckServerImpressionsRequest_AlteredContent) GetRank added in v0.1.11

func (*AckServerImpressionsRequest_AlteredContent) ProtoMessage added in v0.1.11

func (*AckServerImpressionsRequest_AlteredContent) ProtoReflect added in v0.1.11

func (*AckServerImpressionsRequest_AlteredContent) Reset added in v0.1.11

func (*AckServerImpressionsRequest_AlteredContent) String added in v0.1.11

type AckServerImpressionsResponse added in v0.1.11

type AckServerImpressionsResponse struct {

	// Output only.
	// The status of this response.
	Status *protocol.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

The response message for AckServerImpressions.

func (*AckServerImpressionsResponse) Descriptor deprecated added in v0.1.11

func (*AckServerImpressionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use AckServerImpressionsResponse.ProtoReflect.Descriptor instead.

func (*AckServerImpressionsResponse) GetStatus added in v0.1.11

func (*AckServerImpressionsResponse) ProtoMessage added in v0.1.11

func (*AckServerImpressionsResponse) ProtoMessage()

func (*AckServerImpressionsResponse) ProtoReflect added in v0.1.11

func (*AckServerImpressionsResponse) Reset added in v0.1.11

func (x *AckServerImpressionsResponse) Reset()

func (*AckServerImpressionsResponse) String added in v0.1.11

type Content

type Content struct {

	// Required.
	// The unique identifier for the content.
	// It can be series_id/entity_id/video_id/other unique identifier
	ContentId string `protobuf:"bytes,1,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
	// Required.
	// 1 if the content is recommendable (result in `Predict` call).
	// 0 if the content isn't recommendable.
	// Note: Any change of this takes up to 1 hour to take effect.
	// Note: Even if a content isn't recommendable, please still send this to us.
	// This is because that users might interact with such contents historically,
	// therefore it provides reasonably strong signals.
	IsRecommendable int32 `protobuf:"varint,2,opt,name=is_recommendable,json=isRecommendable,proto3" json:"is_recommendable,omitempty"`
	// Required.
	// The categories this content belongs to.
	// The categories is a json serialized string.
	// For example in origin json object, if a content has "Movie -> Comedy"
	// This should be:
	// [
	//   {"category_depth":1,
	//    "category_nodes": [{"id_or_name":"Movie"}] },
	//   {"category_depth":2,
	//    "category_nodes": [{"id_or_name":"Comedy"}] }
	// ]
	// If a content belongs to 2 different categories,
	// "Movie -> Comedy" and "Movie -> Action"
	// then
	//
	// [
	//   {"category_depth":1,
	//    "category_nodes": [{"id_or_name":"Movie"}] },
	//   {"category_depth":2,
	//    "category_nodes": [{"id_or_name":"Comedy"},
	//                       {"id_or_name":"Action"}] }
	// ]
	// then you should serialize the json object to string, for example in python:
	// categories = json.dumps( [
	//     {"category_depth":1,
	//      "category_nodes": [{"id_or_name":"Movie"}] },
	//     {"category_depth":2,
	//      "category_nodes": [{"id_or_name":"Comedy"}] }
	//   ])
	Categories string `protobuf:"bytes,3,opt,name=categories,proto3" json:"categories,omitempty"`
	// Required.
	// The content title.
	ContentTitle string `protobuf:"bytes,4,opt,name=content_title,json=contentTitle,proto3" json:"content_title,omitempty"`
	// Required.
	// Type of the content.
	// The acceptable values are "picture", "gif", "video", "text", "other".
	// Note: if the content_type is video, video_duration must be non-zero.
	ContentType string `protobuf:"bytes,5,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// Optional.
	// The content description.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// Optional.
	// The account who created the content (i.e. the user_id) or the publisher of the video (e.g. HBO)
	ContentOwner string `protobuf:"bytes,7,opt,name=content_owner,json=contentOwner,proto3" json:"content_owner,omitempty"`
	// Optional.
	// The language associated with this content.
	Language string `protobuf:"bytes,8,opt,name=language,proto3" json:"language,omitempty"`
	// Optional.
	// Internal label of this content.
	// Some sample values are ["New", "Trending"], etc.
	Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"`
	// Optional.
	// The actual tags (e.g. hashtag) displayed to user on listing page (e.g. homepage, category landing page)
	// Sample values are: ["popular", "recommend"], etc.
	ListingPageDisplayTags []string `` /* 132-byte string literal not displayed */
	// Optional.
	// The actual tags (e.g. hashtag) displayed to user on content detail page.
	// Sample values are: ["popular", "recommend"], etc.
	DetailPageDisplayTags []string `` /* 129-byte string literal not displayed */
	// Optional.
	// If there's an image/video/other multi-media displayed on listing page for a content.
	// The only acceptable values are ["image", "video", "other"].
	ListingPageDisplayType string `` /* 132-byte string literal not displayed */
	// Optional.
	// When `listing_page_display_type` is one of the multi-media types, put the url to the media file here.
	CoverMultimediaUrl string `protobuf:"bytes,13,opt,name=cover_multimedia_url,json=coverMultimediaUrl,proto3" json:"cover_multimedia_url,omitempty"`
	// Optional.
	// The rating given by the users. The value is normalized to [0.0, 5.0].
	UserRating float64 `protobuf:"fixed64,14,opt,name=user_rating,json=userRating,proto3" json:"user_rating,omitempty"`
	// Optional.
	// The number of views for this content.
	ViewsCount int32 `protobuf:"varint,15,opt,name=views_count,json=viewsCount,proto3" json:"views_count,omitempty"`
	// Optional.
	// The number of comments for this content.
	CommentsCount int32 `protobuf:"varint,16,opt,name=comments_count,json=commentsCount,proto3" json:"comments_count,omitempty"`
	// Optional.
	// The number of likes for this content.
	LikesCount int32 `protobuf:"varint,17,opt,name=likes_count,json=likesCount,proto3" json:"likes_count,omitempty"`
	// Optional.
	// The number of shares for this content.
	SharesCount int32 `protobuf:"varint,18,opt,name=shares_count,json=sharesCount,proto3" json:"shares_count,omitempty"`
	// Optional.
	// Whether users need to pay (e.g. subscribe to the platform) to view this content.
	// Note: 1 if this content need to pay
	//       0 no need to pay for this content.
	IsPaidContent int32 `protobuf:"varint,19,opt,name=is_paid_content,json=isPaidContent,proto3" json:"is_paid_content,omitempty"`
	// Optional.
	// If this is paid_content, send the original price in cents.
	// e.g. $100.12 should be 10012 here.
	OriginPrice int64 `protobuf:"varint,20,opt,name=origin_price,json=originPrice,proto3" json:"origin_price,omitempty"`
	// Optional.
	// If this is paid_content, send the current price (after discount) in cents.
	// e.g. $100.12 should be 10012 here.
	CurrentPrice int64 `protobuf:"varint,21,opt,name=current_price,json=currentPrice,proto3" json:"current_price,omitempty"`
	// Optional.
	// The region where this content is published.
	PublishRegion string `protobuf:"bytes,22,opt,name=publish_region,json=publishRegion,proto3" json:"publish_region,omitempty"`
	// Optional.
	// The regions where this content can be viewed.
	// Sample values are: ["Singapore", "India"], etc.
	AvailableRegion []string `protobuf:"bytes,23,rep,name=available_region,json=availableRegion,proto3" json:"available_region,omitempty"`
	// Optional.
	// (For OTT platform) If this is a TV show with multiple seasons, id of the TV show.
	// Note: if this content record is about a entity, no need to send its series and video information
	EntityId string `protobuf:"bytes,24,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	// Optional.
	// (For OTT platform) If this is a TV show with multiple seasons, name of the TV show.
	EntityName string `protobuf:"bytes,25,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"`
	// Optional.
	// (For OTT platform) If this is a TV show with multiple seasons, id of the season.
	// Note: if this content record is about a series,
	// send the series data and corresponding entity data ( entity_id and entity_name),
	// no need to send video related info.
	SeriesId string `protobuf:"bytes,26,opt,name=series_id,json=seriesId,proto3" json:"series_id,omitempty"`
	// Optional.
	// (For OTT platform) If this is a TV show with multiple seasons, which season is this.
	SeriesIndex int32 `protobuf:"varint,27,opt,name=series_index,json=seriesIndex,proto3" json:"series_index,omitempty"`
	// Optional.
	// (For OTT platform) If this is a TV show with multiple seasons, name of this season.
	SeriesName string `protobuf:"bytes,28,opt,name=series_name,json=seriesName,proto3" json:"series_name,omitempty"`
	// Optional.
	// (For OTT platform) Total number of seasons for this TV show.
	SeriesCount int32 `protobuf:"varint,29,opt,name=series_count,json=seriesCount,proto3" json:"series_count,omitempty"`
	// Optional.
	// (For OTT platform) Id of the video in a series.
	VideoId string `protobuf:"bytes,30,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"`
	// Optional.
	// (For OTT platform) Which episode is this video in this season.
	VideoIndex int32 `protobuf:"varint,31,opt,name=video_index,json=videoIndex,proto3" json:"video_index,omitempty"`
	// Optional.
	// (For OTT platform) Name of this episode.
	VideoName string `protobuf:"bytes,32,opt,name=video_name,json=videoName,proto3" json:"video_name,omitempty"`
	// Optional.
	// (For OTT platform) Total number of episodes in this season.
	VideoCount int32 `protobuf:"varint,33,opt,name=video_count,json=videoCount,proto3" json:"video_count,omitempty"`
	// Optional.
	// (For OTT platform) The type of video e.g. movie, series, reality show etc.
	VideoType string `protobuf:"bytes,34,opt,name=video_type,json=videoType,proto3" json:"video_type,omitempty"`
	// Base.
	// if content_type is video, this field is required, provide the length this video, in milliseconds.
	VideoDuration int64 `protobuf:"varint,35,opt,name=video_duration,json=videoDuration,proto3" json:"video_duration,omitempty"`
	// Optional.
	// The timestamp that the content is published.
	PublishTimestamp int64 `protobuf:"varint,36,opt,name=publish_timestamp,json=publishTimestamp,proto3" json:"publish_timestamp,omitempty"`
	// Optional.
	// (For OTT platform) The timestamp when this content can be shown to users.
	CopyrightStartTimestamp int64 `` /* 134-byte string literal not displayed */
	// Optional.
	// (For OTT platform) The timestamp when this content stop being available to users.
	CopyrightEndTimestamp int64 `` /* 128-byte string literal not displayed */
	// Optional.
	// (For OTT platform) The actors starring a movie/TV show.
	// Sample values are: ["Rachel Green", "Ross Geller"], etc.
	Actors []string `protobuf:"bytes,39,rep,name=actors,proto3" json:"actors,omitempty"`
	// Optional.
	// (For OTT platform) The source of the content.
	// The accepted values are ["self", "thirdparty", "other"].
	Source string `protobuf:"bytes,40,opt,name=source,proto3" json:"source,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

The content proto.

func (*Content) Descriptor deprecated

func (*Content) Descriptor() ([]byte, []int)

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetActors

func (x *Content) GetActors() []string

func (*Content) GetAvailableRegion

func (x *Content) GetAvailableRegion() []string

func (*Content) GetCategories

func (x *Content) GetCategories() string

func (*Content) GetCommentsCount

func (x *Content) GetCommentsCount() int32

func (*Content) GetContentId

func (x *Content) GetContentId() string

func (*Content) GetContentOwner

func (x *Content) GetContentOwner() string

func (*Content) GetContentTitle

func (x *Content) GetContentTitle() string

func (*Content) GetContentType

func (x *Content) GetContentType() string

func (*Content) GetCopyrightEndTimestamp

func (x *Content) GetCopyrightEndTimestamp() int64

func (*Content) GetCopyrightStartTimestamp

func (x *Content) GetCopyrightStartTimestamp() int64

func (*Content) GetCoverMultimediaUrl

func (x *Content) GetCoverMultimediaUrl() string

func (*Content) GetCurrentPrice

func (x *Content) GetCurrentPrice() int64

func (*Content) GetDescription

func (x *Content) GetDescription() string

func (*Content) GetDetailPageDisplayTags

func (x *Content) GetDetailPageDisplayTags() []string

func (*Content) GetEntityId

func (x *Content) GetEntityId() string

func (*Content) GetEntityName

func (x *Content) GetEntityName() string

func (*Content) GetExtra

func (x *Content) GetExtra() map[string]string

func (*Content) GetIsPaidContent

func (x *Content) GetIsPaidContent() int32

func (*Content) GetIsRecommendable

func (x *Content) GetIsRecommendable() int32

func (*Content) GetLanguage

func (x *Content) GetLanguage() string

func (*Content) GetLikesCount

func (x *Content) GetLikesCount() int32

func (*Content) GetListingPageDisplayTags

func (x *Content) GetListingPageDisplayTags() []string

func (*Content) GetListingPageDisplayType

func (x *Content) GetListingPageDisplayType() string

func (*Content) GetOriginPrice

func (x *Content) GetOriginPrice() int64

func (*Content) GetPublishRegion

func (x *Content) GetPublishRegion() string

func (*Content) GetPublishTimestamp

func (x *Content) GetPublishTimestamp() int64

func (*Content) GetSeriesCount

func (x *Content) GetSeriesCount() int32

func (*Content) GetSeriesId

func (x *Content) GetSeriesId() string

func (*Content) GetSeriesIndex

func (x *Content) GetSeriesIndex() int32

func (*Content) GetSeriesName

func (x *Content) GetSeriesName() string

func (*Content) GetSharesCount

func (x *Content) GetSharesCount() int32

func (*Content) GetSource

func (x *Content) GetSource() string

func (*Content) GetTags

func (x *Content) GetTags() []string

func (*Content) GetUserRating

func (x *Content) GetUserRating() float64

func (*Content) GetVideoCount

func (x *Content) GetVideoCount() int32

func (*Content) GetVideoDuration

func (x *Content) GetVideoDuration() int64

func (*Content) GetVideoId

func (x *Content) GetVideoId() string

func (*Content) GetVideoIndex

func (x *Content) GetVideoIndex() int32

func (*Content) GetVideoName

func (x *Content) GetVideoName() string

func (*Content) GetVideoType

func (x *Content) GetVideoType() string

func (*Content) GetViewsCount

func (x *Content) GetViewsCount() int32

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

func (x *Content) ProtoReflect() protoreflect.Message

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

type ContentError

type ContentError struct {

	// Output only.
	// The detailed error message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Output only.
	// The content that failed.
	Content *Content `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

The content error.

func (*ContentError) Descriptor deprecated

func (*ContentError) Descriptor() ([]byte, []int)

Deprecated: Use ContentError.ProtoReflect.Descriptor instead.

func (*ContentError) GetContent

func (x *ContentError) GetContent() *Content

func (*ContentError) GetMessage

func (x *ContentError) GetMessage() string

func (*ContentError) ProtoMessage

func (*ContentError) ProtoMessage()

func (*ContentError) ProtoReflect

func (x *ContentError) ProtoReflect() protoreflect.Message

func (*ContentError) Reset

func (x *ContentError) Reset()

func (*ContentError) String

func (x *ContentError) String() string

type PredictRequest added in v0.1.11

type PredictRequest struct {

	// Required.
	// This is same as `User.user_id`.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Required.
	// The maximum number of contents returned.
	// The actual # of contents returned is the min of:
	// `size`
	// length(`context.candidates_content_ids`)
	// total # of contents with `is_recommendable=True`
	Size  int32                 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Scene *PredictRequest_Scene `protobuf:"bytes,3,opt,name=scene,proto3" json:"scene,omitempty"`
	// Optional.
	// The context of this request.
	Context *PredictRequest_Context `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

The request proto for `Predict` call.

func (*PredictRequest) Descriptor deprecated added in v0.1.11

func (*PredictRequest) Descriptor() ([]byte, []int)

Deprecated: Use PredictRequest.ProtoReflect.Descriptor instead.

func (*PredictRequest) GetContext added in v0.1.11

func (x *PredictRequest) GetContext() *PredictRequest_Context

func (*PredictRequest) GetExtra added in v0.1.11

func (x *PredictRequest) GetExtra() map[string]string

func (*PredictRequest) GetScene added in v0.1.11

func (x *PredictRequest) GetScene() *PredictRequest_Scene

func (*PredictRequest) GetSize added in v0.1.11

func (x *PredictRequest) GetSize() int32

func (*PredictRequest) GetUserId added in v0.1.11

func (x *PredictRequest) GetUserId() string

func (*PredictRequest) ProtoMessage added in v0.1.11

func (*PredictRequest) ProtoMessage()

func (*PredictRequest) ProtoReflect added in v0.1.11

func (x *PredictRequest) ProtoReflect() protoreflect.Message

func (*PredictRequest) Reset added in v0.1.11

func (x *PredictRequest) Reset()

func (*PredictRequest) String added in v0.1.11

func (x *PredictRequest) String() string

type PredictRequest_Context added in v0.1.11

type PredictRequest_Context struct {

	// Optional.
	// This is only required for content details page.
	RootContent *Content `protobuf:"bytes,1,opt,name=root_content,json=rootContent,proto3" json:"root_content,omitempty"`
	// Optional.
	// The list of candidates for the recommendation.
	// If this is empty, all contents are the candidates.
	CandidateContentIds []string `protobuf:"bytes,3,rep,name=candidate_content_ids,json=candidateContentIds,proto3" json:"candidate_content_ids,omitempty"`
	// Required.
	// The platform used by the user.
	// The acceptable values are "app", "desktop-web", "mobile-web", "other".
	//  app: user use APP.
	//  desktop-web: user use desktop web.
	//  mobile-web: user use mobile web.
	Device string `protobuf:"bytes,22,opt,name=device,proto3" json:"device,omitempty"`
	// Optional.
	// The platform used by the user.
	// The acceptable values are "android", "ios", "windows", "other".
	OsType string `protobuf:"bytes,23,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"`
	// Optional.
	// Your application version.
	// e.g. V9.0.8.
	AppVersion string `protobuf:"bytes,24,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
	// Optional.
	// The device model.
	// e.g. "iPhone10", "Pixel 4".
	DeviceModel string `protobuf:"bytes,25,opt,name=device_model,json=deviceModel,proto3" json:"device_model,omitempty"`
	// Optional.
	// The brand of the device.
	// e.g. "Samsung".
	DeviceBrand string `protobuf:"bytes,26,opt,name=device_brand,json=deviceBrand,proto3" json:"device_brand,omitempty"`
	// Optional.
	// The operating system version.
	// e.g. "14.4.2".
	OsVersion string `protobuf:"bytes,27,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`
	// Optional.
	// The type of the browser.
	// e.g. "chrome", "firefox", etc.
	BrowserType string `protobuf:"bytes,28,opt,name=browser_type,json=browserType,proto3" json:"browser_type,omitempty"`
	// Optional.
	// The UserAgent for the browser.
	UserAgent string `protobuf:"bytes,29,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// Optional.
	// The network used.
	// The acceptable values are "2g", "3g", "4g", "5g", "wifi", "other".
	Network string `protobuf:"bytes,30,opt,name=network,proto3" json:"network,omitempty"`
	// contains filtered or unexported fields
}

The context of this request.

func (*PredictRequest_Context) Descriptor deprecated added in v0.1.11

func (*PredictRequest_Context) Descriptor() ([]byte, []int)

Deprecated: Use PredictRequest_Context.ProtoReflect.Descriptor instead.

func (*PredictRequest_Context) GetAppVersion added in v0.1.11

func (x *PredictRequest_Context) GetAppVersion() string

func (*PredictRequest_Context) GetBrowserType added in v0.1.11

func (x *PredictRequest_Context) GetBrowserType() string

func (*PredictRequest_Context) GetCandidateContentIds added in v0.1.11

func (x *PredictRequest_Context) GetCandidateContentIds() []string

func (*PredictRequest_Context) GetDevice added in v0.1.11

func (x *PredictRequest_Context) GetDevice() string

func (*PredictRequest_Context) GetDeviceBrand added in v0.1.11

func (x *PredictRequest_Context) GetDeviceBrand() string

func (*PredictRequest_Context) GetDeviceModel added in v0.1.11

func (x *PredictRequest_Context) GetDeviceModel() string

func (*PredictRequest_Context) GetNetwork added in v0.1.11

func (x *PredictRequest_Context) GetNetwork() string

func (*PredictRequest_Context) GetOsType added in v0.1.11

func (x *PredictRequest_Context) GetOsType() string

func (*PredictRequest_Context) GetOsVersion added in v0.1.11

func (x *PredictRequest_Context) GetOsVersion() string

func (*PredictRequest_Context) GetRootContent added in v0.1.11

func (x *PredictRequest_Context) GetRootContent() *Content

func (*PredictRequest_Context) GetUserAgent added in v0.1.11

func (x *PredictRequest_Context) GetUserAgent() string

func (*PredictRequest_Context) ProtoMessage added in v0.1.11

func (*PredictRequest_Context) ProtoMessage()

func (*PredictRequest_Context) ProtoReflect added in v0.1.11

func (x *PredictRequest_Context) ProtoReflect() protoreflect.Message

func (*PredictRequest_Context) Reset added in v0.1.11

func (x *PredictRequest_Context) Reset()

func (*PredictRequest_Context) String added in v0.1.11

func (x *PredictRequest_Context) String() string

type PredictRequest_Scene added in v0.1.11

type PredictRequest_Scene struct {

	// Required.
	// This is same as `UserEvent.scene_name`.
	SceneName string `protobuf:"bytes,1,opt,name=scene_name,json=sceneName,proto3" json:"scene_name,omitempty"`
	// Optional.
	// The page number.
	// It can be:
	// 1. Users swipe the screen for X times then see the content.
	// 2. Users go to page X and see the content.
	// In this case, X is the page number.
	//
	// This should default to be 0. That means everything fits into 1 page.
	PageNumber int32 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	// Optional.
	// The offset starting from 1 within the page above.
	Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

Required. The scene for the recommendation.

func (*PredictRequest_Scene) Descriptor deprecated added in v0.1.11

func (*PredictRequest_Scene) Descriptor() ([]byte, []int)

Deprecated: Use PredictRequest_Scene.ProtoReflect.Descriptor instead.

func (*PredictRequest_Scene) GetOffset added in v0.1.11

func (x *PredictRequest_Scene) GetOffset() int32

func (*PredictRequest_Scene) GetPageNumber added in v0.1.11

func (x *PredictRequest_Scene) GetPageNumber() int32

func (*PredictRequest_Scene) GetSceneName added in v0.1.11

func (x *PredictRequest_Scene) GetSceneName() string

func (*PredictRequest_Scene) ProtoMessage added in v0.1.11

func (*PredictRequest_Scene) ProtoMessage()

func (*PredictRequest_Scene) ProtoReflect added in v0.1.11

func (x *PredictRequest_Scene) ProtoReflect() protoreflect.Message

func (*PredictRequest_Scene) Reset added in v0.1.11

func (x *PredictRequest_Scene) Reset()

func (*PredictRequest_Scene) String added in v0.1.11

func (x *PredictRequest_Scene) String() string

type PredictResponse added in v0.1.11

type PredictResponse struct {

	// Output only.
	// The status of the call.
	Status *protocol.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Output only.
	// This is same as `PredictRequest.request_id`.
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Output only.
	// This is only populated when `PredictResponse.status.code` is not 0.
	Value *PredictResult `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

The response proto the predict call.

func (*PredictResponse) Descriptor deprecated added in v0.1.11

func (*PredictResponse) Descriptor() ([]byte, []int)

Deprecated: Use PredictResponse.ProtoReflect.Descriptor instead.

func (*PredictResponse) GetRequestId added in v0.1.11

func (x *PredictResponse) GetRequestId() string

func (*PredictResponse) GetStatus added in v0.1.11

func (x *PredictResponse) GetStatus() *protocol.Status

func (*PredictResponse) GetValue added in v0.1.11

func (x *PredictResponse) GetValue() *PredictResult

func (*PredictResponse) ProtoMessage added in v0.1.11

func (*PredictResponse) ProtoMessage()

func (*PredictResponse) ProtoReflect added in v0.1.11

func (x *PredictResponse) ProtoReflect() protoreflect.Message

func (*PredictResponse) Reset added in v0.1.11

func (x *PredictResponse) Reset()

func (*PredictResponse) String added in v0.1.11

func (x *PredictResponse) String() string

type PredictResult added in v0.1.11

type PredictResult struct {

	// Output only.
	// The list of predicted contents.
	ResponseContents []*PredictResult_ResponseContent `protobuf:"bytes,1,rep,name=response_contents,json=responseContents,proto3" json:"response_contents,omitempty"`
	// Output only.
	// Extra debug info.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

A single predict call result.

func (*PredictResult) Descriptor deprecated added in v0.1.11

func (*PredictResult) Descriptor() ([]byte, []int)

Deprecated: Use PredictResult.ProtoReflect.Descriptor instead.

func (*PredictResult) GetExtra added in v0.1.11

func (x *PredictResult) GetExtra() map[string]string

func (*PredictResult) GetResponseContents added in v0.1.11

func (x *PredictResult) GetResponseContents() []*PredictResult_ResponseContent

func (*PredictResult) ProtoMessage added in v0.1.11

func (*PredictResult) ProtoMessage()

func (*PredictResult) ProtoReflect added in v0.1.11

func (x *PredictResult) ProtoReflect() protoreflect.Message

func (*PredictResult) Reset added in v0.1.11

func (x *PredictResult) Reset()

func (*PredictResult) String added in v0.1.11

func (x *PredictResult) String() string

type PredictResult_ResponseContent added in v0.1.11

type PredictResult_ResponseContent struct {

	// Output only.
	// The content id.
	// This is consistent with `Content.content_id`.
	ContentId string `protobuf:"bytes,1,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
	// Output only.
	// This is the 1-based ranking of the content.
	Rank int32 `protobuf:"varint,2,opt,name=rank,proto3" json:"rank,omitempty"`
	// Output only.
	// The is the predicted CTR.
	Pctr float64 `protobuf:"fixed64,3,opt,name=pctr,proto3" json:"pctr,omitempty"`
	// Output only.
	// This is the predicted CVR.
	Pcvr float64 `protobuf:"fixed64,4,opt,name=pcvr,proto3" json:"pcvr,omitempty"`
	// Output only.
	// The strategy used for this particular recommendation result.
	// Please refer to [this](../docs/ways-to-improve-recommendation-performance#use-usereventrec_info-and-usereventtraffic_source) for more details.
	/// 只用作返回值。base64编码的字符串,记录了该次推荐的一些模型和策略信息,建议将此字段携带到行为数据中,用来辅助提升推荐效果。如base64编码不能满足要求,可联系对接同学调整编码方式。
	RecInfo string `protobuf:"bytes,5,opt,name=rec_info,json=recInfo,proto3" json:"rec_info,omitempty"`
	// Output only.
	// All the extra debug info here.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

The response of a content.

func (*PredictResult_ResponseContent) Descriptor deprecated added in v0.1.11

func (*PredictResult_ResponseContent) Descriptor() ([]byte, []int)

Deprecated: Use PredictResult_ResponseContent.ProtoReflect.Descriptor instead.

func (*PredictResult_ResponseContent) GetContentId added in v0.1.11

func (x *PredictResult_ResponseContent) GetContentId() string

func (*PredictResult_ResponseContent) GetExtra added in v0.1.11

func (x *PredictResult_ResponseContent) GetExtra() map[string]string

func (*PredictResult_ResponseContent) GetPctr added in v0.1.11

func (*PredictResult_ResponseContent) GetPcvr added in v0.1.11

func (*PredictResult_ResponseContent) GetRank added in v0.1.11

func (x *PredictResult_ResponseContent) GetRank() int32

func (*PredictResult_ResponseContent) GetRecInfo added in v0.1.11

func (x *PredictResult_ResponseContent) GetRecInfo() string

func (*PredictResult_ResponseContent) ProtoMessage added in v0.1.11

func (*PredictResult_ResponseContent) ProtoMessage()

func (*PredictResult_ResponseContent) ProtoReflect added in v0.1.11

func (*PredictResult_ResponseContent) Reset added in v0.1.11

func (x *PredictResult_ResponseContent) Reset()

func (*PredictResult_ResponseContent) String added in v0.1.11

type User

type User struct {

	// Required.
	// The unique user identifier.
	// The consistency is required (for the same user) among different
	// UserEvents, PredictRequest, or any other places.
	// Device ID or member ID is often used as user_id here.
	//
	// Note: If you want to encrypt the id and used the hashed value here,
	// please do the consistent encryption for all its appearances,
	// including UserEvents and Predict Requests.
	//
	// Note: If your users often switch between login/logout status
	// (In web or mobile application), you might get inconsistent IDs
	// (member v.s. visitor) for the same user.
	// To avoid this, we suggested that you can use consistent ID like device ID.
	// Sample values are "1234567", "359938082141597",
	// "665DEA957EBFB34D41B1F1D80E4B5F89"
	// Please refer to
	// [this](../docs/effective-and-efficient-data-synchronization#stable-user-identifier) for more details.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Optional.
	// The gender of the given user.
	// The accepted values are: "male", "female", and "other".
	Gender string `protobuf:"bytes,2,opt,name=gender,proto3" json:"gender,omitempty"`
	// Optional.
	// The age of the given user.
	// It can be the an (estimate) single value, or a range.
	// e.g. "23", "18-25", "0-15", "50-100", etc.
	Age string `protobuf:"bytes,3,opt,name=age,proto3" json:"age,omitempty"`
	// Optional.
	// The tags for the given user.
	// Please send as many tags as possible here, even it might be a bit
	// inaccurate or has low coverage.
	// Some sample values are ["new users", "high buying power"], etc.
	// Please refer to
	// [this](../docs/effective-and-efficient-data-synchronization#requirements-for-free-format-string-fields) for more details.
	Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	// Optional.
	// The id of this user's most used device.
	// Some sample values are "abc123", "1", etc.
	DeviceId string `protobuf:"bytes,5,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	// Optional.
	// Type of this user's most used device.
	// Acceptable values are "app", "desktop-web", "mobile-web", "other".
	DeviceType string `protobuf:"bytes,6,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
	// Optional.
	// Which subscription plan is this user on.
	// Accepted values are "free", "paid", "other"
	SubscriberType string `protobuf:"bytes,7,opt,name=subscriber_type,json=subscriberType,proto3" json:"subscriber_type,omitempty"`
	// Optional.
	// The primary language used by this user.
	Language string `protobuf:"bytes,8,opt,name=language,proto3" json:"language,omitempty"`
	// Optional.
	// List of content_ids consumed by this user.
	// Some sample values are ["123","124"], etc.
	ViewHistory []string `protobuf:"bytes,9,rep,name=view_history,json=viewHistory,proto3" json:"view_history,omitempty"`
	// Optional.
	// The channel where the given user is acquired.
	// Some sample values are "AppStore", "GoogleAds", "FacebookAds", etc.
	// Please refer to
	// [this](../docs/effective-and-efficient-data-synchronization#requirements-for-free-format-string-fields) for more details.
	ActivationChannel string `protobuf:"bytes,10,opt,name=activation_channel,json=activationChannel,proto3" json:"activation_channel,omitempty"`
	// Optional.
	// The level of the membership.
	// Some sample values are "silver", "elite", "4", "5", etc.
	// Please refer to
	// [this](../docs/effective-and-efficient-data-synchronization#requirements-for-free-format-string-fields) for more details.
	MembershipLevel string `protobuf:"bytes,11,opt,name=membership_level,json=membershipLevel,proto3" json:"membership_level,omitempty"`
	// Optional.
	// The timestamp when the given user activated or registered.
	RegistrationTimestamp int64 `` /* 126-byte string literal not displayed */
	// Optional.
	// Country name.
	// Some sample values are "USA", "UK", etc.
	// Please refer to
	// [this](../docs/effective-and-efficient-data-synchronization#requirements-for-free-format-string-fields) for more details.
	Country string `protobuf:"bytes,13,opt,name=country,proto3" json:"country,omitempty"`
	// Optional.
	// City name.
	// Some sample values are "San Jose", "Chicago", "NYC", etc.
	// Please refer to
	// [this](../docs/effective-and-efficient-data-synchronization#requirements-for-free-format-string-fields) for more details.
	City string `protobuf:"bytes,14,opt,name=city,proto3" json:"city,omitempty"`
	// Optional.
	// The more fine grained district or area.
	// Some sample values are "king county", "santa monica county", etc.
	// Please refer to
	// [this](../docs/effective-and-efficient-data-synchronization#requirements-for-free-format-string-fields) for more details.
	DistrictOrArea string `protobuf:"bytes,15,opt,name=district_or_area,json=districtOrArea,proto3" json:"district_or_area,omitempty"`
	// Optional.
	// Postal code of the address. Not all countries use or require postal codes
	// to be present.
	Postcode string `protobuf:"bytes,16,opt,name=postcode,proto3" json:"postcode,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

The user proto.

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetActivationChannel

func (x *User) GetActivationChannel() string

func (*User) GetAge

func (x *User) GetAge() string

func (*User) GetCity

func (x *User) GetCity() string

func (*User) GetCountry

func (x *User) GetCountry() string

func (*User) GetDeviceId

func (x *User) GetDeviceId() string

func (*User) GetDeviceType

func (x *User) GetDeviceType() string

func (*User) GetDistrictOrArea

func (x *User) GetDistrictOrArea() string

func (*User) GetExtra

func (x *User) GetExtra() map[string]string

func (*User) GetGender

func (x *User) GetGender() string

func (*User) GetLanguage

func (x *User) GetLanguage() string

func (*User) GetMembershipLevel

func (x *User) GetMembershipLevel() string

func (*User) GetPostcode

func (x *User) GetPostcode() string

func (*User) GetRegistrationTimestamp

func (x *User) GetRegistrationTimestamp() int64

func (*User) GetSubscriberType

func (x *User) GetSubscriberType() string

func (*User) GetTags

func (x *User) GetTags() []string

func (*User) GetUserId

func (x *User) GetUserId() string

func (*User) GetViewHistory added in v0.1.11

func (x *User) GetViewHistory() []string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserError

type UserError struct {

	// Output only.
	// The detailed error message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Output only.
	// This is the exact same user proto that was passed in the request.
	User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

The error proto for a single user.

func (*UserError) Descriptor deprecated

func (*UserError) Descriptor() ([]byte, []int)

Deprecated: Use UserError.ProtoReflect.Descriptor instead.

func (*UserError) GetMessage

func (x *UserError) GetMessage() string

func (*UserError) GetUser

func (x *UserError) GetUser() *User

func (*UserError) ProtoMessage

func (*UserError) ProtoMessage()

func (*UserError) ProtoReflect

func (x *UserError) ProtoReflect() protoreflect.Message

func (*UserError) Reset

func (x *UserError) Reset()

func (*UserError) String

func (x *UserError) String() string

type UserEvent

type UserEvent struct {

	// Required.
	// The unique user identifier.
	// Please refer to `User.user_id` for the details.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// Required.
	// The user event type.
	// The acceptable values are:
	// "impression", "click", "play", "playover", "like", "comment",
	// "purchase", "add-to-cart", "remove-from-cart", "add-to-favorites",
	// "remove-from-favorites", "search", "stay-detail-page".
	//
	// Some of these event_types are required.
	// Here are the definitions:
	//
	// impression: Required. When a content is seen by a user.
	//             It can be client side (preferred) or server side.
	//             Note:
	//                * content_id must be non-empty.
	//                * scene_name must be non-empty.
	//                * if multiple contents are seen by a user together, send them in separate user events.
	//
	// click:      Required. When a content is clicked by a user.
	//             Note:
	//                * content_id must be non-empty.
	//                * scene_name must be non-empty.
	//
	// play:       Optional. If content_type is video, when a user plays a video.
	//             Note:
	//                * content_id must be non-empty.
	//
	// playover:   Optional. If content_type is video, when a user completes playing this video.
	//             Note:
	//                * content_id must be non-empty.
	//
	// like:       Optional. When a content is liked by a user.
	//             Note:
	//                * content_id must be non-empty.
	//
	// comment:    Optional. When a user leaves a comment on a content.
	//             Note:
	//                * content_id must be non-empty.
	//
	// purchase:   Required. When a user completed a purchase.
	//             Note:
	//                * content_id must be non-empty.
	//                * If one order contains multiple contents, send them in separate user events.
	//
	// add-to-cart:  Optional. When user adds a content to the shopping cart.
	//             Note:
	//                * content_id must be non-empty.
	//
	// remove-from-cart: Optional. When user removes a content to the shopping cart.
	//             Note:
	//                * content_id must be non-empty.
	//
	// add-to-favorites: Optional. When user adds a content to favorite list.
	//             Note:
	//                * content_id must be non-empty.
	//                *  if "favorite list" is not a feature for your platform you can report the "like" event directly,
	//                   no need to report the "add-to-favorites" event.
	//
	// remove-from-favorites: Optional. When user removes a content from favorite list.
	//             Note:
	//                * content_id must be non-empty.
	//
	// search:     Optional. The user search event.
	//             Note:
	//                * content_id must be non-empty.
	//                * query must be non-empty.
	//
	// stay-detail-page: Optional. When a user stays on a content detail page, report the user stay
	//             time on content details page.
	//             Note:
	//                * content_id must be non-empty.
	//                * detail_stay_time must be not-zero.
	//
	// Note: This field is only for the event type, the actual scene is kept
	// separately.
	EventType string `protobuf:"bytes,2,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"`
	// Required.
	// The timestamp when the event happened.
	EventTimestamp int64 `protobuf:"varint,3,opt,name=event_timestamp,json=eventTimestamp,proto3" json:"event_timestamp,omitempty"`
	// Depends on event_type.
	// When event_type is search, this field should be empty. Otherwise it is required.
	ContentId string `protobuf:"bytes,4,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
	// Optional.
	// The source strategy for this user event.
	// Acceptable values are "self", "byteplus", "other".
	// self   :  came from caller's own engine.
	// byteplus:  came from byteplus's engine.
	// other  :  came from the third-party engine.
	TrafficSource string `protobuf:"bytes,5,opt,name=traffic_source,json=trafficSource,proto3" json:"traffic_source,omitempty"`
	// Optional.
	// This will be provided by BytePlus,
	// to match this user event with the request_id when calling BytePlus' Predict API.
	RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Optional.
	// This will be provided by BytePlus, it contains the detailed algo information from BytePlus.
	RecInfo string `protobuf:"bytes,7,opt,name=rec_info,json=recInfo,proto3" json:"rec_info,omitempty"`
	// Optional.
	// The identifier used to hook all the relevant events in a user session.
	AttributionToken string `protobuf:"bytes,8,opt,name=attribution_token,json=attributionToken,proto3" json:"attribution_token,omitempty"`
	// Depends on event_type.
	// The unique identifier for the scene.
	// It can be Home page, Search page, Details page, etc.
	// It is strongly recommended that you split the scene if possible.
	// Note:
	//  * If `event_type` is impression or click, this is required.
	//  * If `event type` is cart/favorite/purchase/search, this is optional.
	SceneName string `protobuf:"bytes,9,opt,name=scene_name,json=sceneName,proto3" json:"scene_name,omitempty"`
	// Optional.
	// The page number.
	// It can be:
	// 1. Users swipe the screen for X times then see the content.
	// 2. Users go to page X and see the content.
	// In this case, X is the page number.
	//
	// This should default to be 0. That means everything fits into 1 page.
	PageNumber int32 `protobuf:"varint,10,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	// Optional.
	// The offset starting from 1 within the page above.
	Offset int32 `protobuf:"varint,11,opt,name=offset,proto3" json:"offset,omitempty"`
	// Optional.
	// Accepted values are "0", "1", "2"
	//  "0": play from start.
	//  "1": continue play.
	//  "2": trial play.
	PlayType string `protobuf:"bytes,12,opt,name=play_type,json=playType,proto3" json:"play_type,omitempty"`
	// Optional.
	// For video content, the length of user watch time, in second.
	PlayDuration int64 `protobuf:"varint,13,opt,name=play_duration,json=playDuration,proto3" json:"play_duration,omitempty"`
	// Optional.
	// For video content, the starting point of user's watch,
	// e.g. if user starts watching from beginning,
	// this should be 0; if user starts watching from 2 min 30 seconds, this should be 150.
	StartTime int32 `protobuf:"varint,14,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// Optional.
	// For video content, the end point of user's watch,
	// e.g. if user starts stops watching 5 min into the video this should be 300.
	EndTime int32 `protobuf:"varint,15,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// Optional.
	// (For OTT platform) If this is a TV show with multiple seasons, id of the TV show
	// Note: if this content record is about a entity, no need to send its series and video information.
	EntityId string `protobuf:"bytes,16,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	// Optional.
	// (For OTT platform) If this is a TV show with multiple seasons, id of the season.
	// Note: if this content record is about a series,
	// send the series data and corresponding entity data ( entity_id and entity_name),
	// no need to send video related info.
	SeriesId string `protobuf:"bytes,17,opt,name=series_id,json=seriesId,proto3" json:"series_id,omitempty"`
	// Optional.
	// (For OTT platform) Id of the video in a series.
	VideoId string `protobuf:"bytes,18,opt,name=video_id,json=videoId,proto3" json:"video_id,omitempty"`
	// Optional.
	// On a content detail page,
	// if user impress/click on a recommended content, send the id of the main content.
	ParentContentId string `protobuf:"bytes,19,opt,name=parent_content_id,json=parentContentId,proto3" json:"parent_content_id,omitempty"`
	// Depends on event_type.
	// The stay time(in seconds) on detail page.
	// When event_type is stay-detail-page, this field must be non-zero.
	DetailStayTime int32 `protobuf:"varint,20,opt,name=detail_stay_time,json=detailStayTime,proto3" json:"detail_stay_time,omitempty"`
	// Depends on event_type.
	// This is required for the search event.
	// Please also provide this when the purchase/impression event follows the search event.
	Query string `protobuf:"bytes,21,opt,name=query,proto3" json:"query,omitempty"`
	// Required.
	// The platform used by the user.
	// The acceptable values are "app", "desktop-web", "mobile-web", "other".
	//  app: user use APP.
	//  desktop-web: user use desktop web.
	//  mobile-web: user use mobile web.
	Device string `protobuf:"bytes,22,opt,name=device,proto3" json:"device,omitempty"`
	// Optional.
	// The platform used by the user.
	// The acceptable values are "android", "ios", "windows", "other".
	OsType string `protobuf:"bytes,23,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"`
	// Optional.
	// Your application version.
	// e.g. V9.0.8.
	AppVersion string `protobuf:"bytes,24,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
	// Optional.
	// The device model.
	// e.g. "iPhone10", "Pixel 4".
	DeviceModel string `protobuf:"bytes,25,opt,name=device_model,json=deviceModel,proto3" json:"device_model,omitempty"`
	// Optional.
	// The brand of the device.
	// e.g. "Samsung".
	DeviceBrand string `protobuf:"bytes,26,opt,name=device_brand,json=deviceBrand,proto3" json:"device_brand,omitempty"`
	// Optional.
	// The operating system version.
	// e.g. "14.4.2".
	OsVersion string `protobuf:"bytes,27,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`
	// Optional.
	// The type of the browser.
	// e.g. "chrome", "firefox", etc.
	BrowserType string `protobuf:"bytes,28,opt,name=browser_type,json=browserType,proto3" json:"browser_type,omitempty"`
	// Optional.
	// The UserAgent for the browser.
	UserAgent string `protobuf:"bytes,29,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// Optional.
	// The network used.
	// The acceptable values are "2g", "3g", "4g", "5g", "wifi", "other".
	Network string `protobuf:"bytes,30,opt,name=network,proto3" json:"network,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

The proto that represents an user event.

func (*UserEvent) Descriptor deprecated

func (*UserEvent) Descriptor() ([]byte, []int)

Deprecated: Use UserEvent.ProtoReflect.Descriptor instead.

func (*UserEvent) GetAppVersion

func (x *UserEvent) GetAppVersion() string

func (*UserEvent) GetAttributionToken

func (x *UserEvent) GetAttributionToken() string

func (*UserEvent) GetBrowserType

func (x *UserEvent) GetBrowserType() string

func (*UserEvent) GetContentId

func (x *UserEvent) GetContentId() string

func (*UserEvent) GetDetailStayTime

func (x *UserEvent) GetDetailStayTime() int32

func (*UserEvent) GetDevice

func (x *UserEvent) GetDevice() string

func (*UserEvent) GetDeviceBrand

func (x *UserEvent) GetDeviceBrand() string

func (*UserEvent) GetDeviceModel

func (x *UserEvent) GetDeviceModel() string

func (*UserEvent) GetEndTime

func (x *UserEvent) GetEndTime() int32

func (*UserEvent) GetEntityId

func (x *UserEvent) GetEntityId() string

func (*UserEvent) GetEventTimestamp

func (x *UserEvent) GetEventTimestamp() int64

func (*UserEvent) GetEventType

func (x *UserEvent) GetEventType() string

func (*UserEvent) GetExtra

func (x *UserEvent) GetExtra() map[string]string

func (*UserEvent) GetNetwork

func (x *UserEvent) GetNetwork() string

func (*UserEvent) GetOffset

func (x *UserEvent) GetOffset() int32

func (*UserEvent) GetOsType

func (x *UserEvent) GetOsType() string

func (*UserEvent) GetOsVersion

func (x *UserEvent) GetOsVersion() string

func (*UserEvent) GetPageNumber

func (x *UserEvent) GetPageNumber() int32

func (*UserEvent) GetParentContentId

func (x *UserEvent) GetParentContentId() string

func (*UserEvent) GetPlayDuration

func (x *UserEvent) GetPlayDuration() int64

func (*UserEvent) GetPlayType

func (x *UserEvent) GetPlayType() string

func (*UserEvent) GetQuery

func (x *UserEvent) GetQuery() string

func (*UserEvent) GetRecInfo

func (x *UserEvent) GetRecInfo() string

func (*UserEvent) GetRequestId

func (x *UserEvent) GetRequestId() string

func (*UserEvent) GetSceneName

func (x *UserEvent) GetSceneName() string

func (*UserEvent) GetSeriesId

func (x *UserEvent) GetSeriesId() string

func (*UserEvent) GetStartTime

func (x *UserEvent) GetStartTime() int32

func (*UserEvent) GetTrafficSource

func (x *UserEvent) GetTrafficSource() string

func (*UserEvent) GetUserAgent

func (x *UserEvent) GetUserAgent() string

func (*UserEvent) GetUserId

func (x *UserEvent) GetUserId() string

func (*UserEvent) GetVideoId

func (x *UserEvent) GetVideoId() string

func (*UserEvent) ProtoMessage

func (*UserEvent) ProtoMessage()

func (*UserEvent) ProtoReflect

func (x *UserEvent) ProtoReflect() protoreflect.Message

func (*UserEvent) Reset

func (x *UserEvent) Reset()

func (*UserEvent) String

func (x *UserEvent) String() string

type UserEventError

type UserEventError struct {

	// Output only.
	// The detailed error message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Output only.
	// This is the exact same user proto that was passed in the request.
	UserEvent *UserEvent `protobuf:"bytes,2,opt,name=user_event,json=userEvent,proto3" json:"user_event,omitempty"`
	// contains filtered or unexported fields
}

The error detail for a single user event.

func (*UserEventError) Descriptor deprecated

func (*UserEventError) Descriptor() ([]byte, []int)

Deprecated: Use UserEventError.ProtoReflect.Descriptor instead.

func (*UserEventError) GetMessage

func (x *UserEventError) GetMessage() string

func (*UserEventError) GetUserEvent

func (x *UserEventError) GetUserEvent() *UserEvent

func (*UserEventError) ProtoMessage

func (*UserEventError) ProtoMessage()

func (*UserEventError) ProtoReflect

func (x *UserEventError) ProtoReflect() protoreflect.Message

func (*UserEventError) Reset

func (x *UserEventError) Reset()

func (*UserEventError) String

func (x *UserEventError) String() string

type WriteContentsRequest

type WriteContentsRequest struct {

	// Required.
	// A list of content to write. The max is 2000 items.
	Contents []*Content `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request proto for WriteContents method.

func (*WriteContentsRequest) Descriptor deprecated

func (*WriteContentsRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteContentsRequest.ProtoReflect.Descriptor instead.

func (*WriteContentsRequest) GetContents

func (x *WriteContentsRequest) GetContents() []*Content

func (*WriteContentsRequest) GetExtra

func (x *WriteContentsRequest) GetExtra() map[string]string

func (*WriteContentsRequest) ProtoMessage

func (*WriteContentsRequest) ProtoMessage()

func (*WriteContentsRequest) ProtoReflect

func (x *WriteContentsRequest) ProtoReflect() protoreflect.Message

func (*WriteContentsRequest) Reset

func (x *WriteContentsRequest) Reset()

func (*WriteContentsRequest) String

func (x *WriteContentsRequest) String() string

type WriteContentsResponse

type WriteContentsResponse struct {

	// Output only.
	// When `status.code` is 0, all payload are successfully written.
	// If `status.code` is 1001, `errors` is populated.
	// Other non-zero values indicate all payload failed.
	Status *protocol.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Output only.
	// This field is populated when `status.code` is 1001.
	// When populated, this field contains the errors.
	Errors []*ContentError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response for the WriteContents call.

func (*WriteContentsResponse) Descriptor deprecated

func (*WriteContentsResponse) Descriptor() ([]byte, []int)

Deprecated: Use WriteContentsResponse.ProtoReflect.Descriptor instead.

func (*WriteContentsResponse) GetErrors

func (x *WriteContentsResponse) GetErrors() []*ContentError

func (*WriteContentsResponse) GetStatus

func (x *WriteContentsResponse) GetStatus() *protocol.Status

func (*WriteContentsResponse) ProtoMessage

func (*WriteContentsResponse) ProtoMessage()

func (*WriteContentsResponse) ProtoReflect

func (x *WriteContentsResponse) ProtoReflect() protoreflect.Message

func (*WriteContentsResponse) Reset

func (x *WriteContentsResponse) Reset()

func (*WriteContentsResponse) String

func (x *WriteContentsResponse) String() string

type WriteUserEventsRequest

type WriteUserEventsRequest struct {

	// Required. A list of user events to write.
	// The max # of events allowed is 2000.
	UserEvents []*UserEvent `protobuf:"bytes,1,rep,name=user_events,json=userEvents,proto3" json:"user_events,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request proto for WriteUserEvents method.

func (*WriteUserEventsRequest) Descriptor deprecated

func (*WriteUserEventsRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteUserEventsRequest.ProtoReflect.Descriptor instead.

func (*WriteUserEventsRequest) GetExtra

func (x *WriteUserEventsRequest) GetExtra() map[string]string

func (*WriteUserEventsRequest) GetUserEvents

func (x *WriteUserEventsRequest) GetUserEvents() []*UserEvent

func (*WriteUserEventsRequest) ProtoMessage

func (*WriteUserEventsRequest) ProtoMessage()

func (*WriteUserEventsRequest) ProtoReflect

func (x *WriteUserEventsRequest) ProtoReflect() protoreflect.Message

func (*WriteUserEventsRequest) Reset

func (x *WriteUserEventsRequest) Reset()

func (*WriteUserEventsRequest) String

func (x *WriteUserEventsRequest) String() string

type WriteUserEventsResponse

type WriteUserEventsResponse struct {

	// Output only.
	// When `status.code` is 0, all payload are successfully written.
	// If `status.code` is 1001, `errors` is populated.
	// Other non-zero values indicate all payload failed.
	Status *protocol.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Output only.
	// This field is populated when `status.code` is 1001.
	// When populated, this field contains the errors.
	Errors []*UserEventError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response proto for WriteUserEvents call.

func (*WriteUserEventsResponse) Descriptor deprecated

func (*WriteUserEventsResponse) Descriptor() ([]byte, []int)

Deprecated: Use WriteUserEventsResponse.ProtoReflect.Descriptor instead.

func (*WriteUserEventsResponse) GetErrors

func (x *WriteUserEventsResponse) GetErrors() []*UserEventError

func (*WriteUserEventsResponse) GetStatus

func (x *WriteUserEventsResponse) GetStatus() *protocol.Status

func (*WriteUserEventsResponse) ProtoMessage

func (*WriteUserEventsResponse) ProtoMessage()

func (*WriteUserEventsResponse) ProtoReflect

func (x *WriteUserEventsResponse) ProtoReflect() protoreflect.Message

func (*WriteUserEventsResponse) Reset

func (x *WriteUserEventsResponse) Reset()

func (*WriteUserEventsResponse) String

func (x *WriteUserEventsResponse) String() string

type WriteUsersRequest

type WriteUsersRequest struct {

	// Required.
	// A list of users to write.
	// The max # of users allowed is 2000, otherwise a standard 400 error is
	// returned.
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// Optional.
	// This is a catch-all field to pass all the additional information.
	// Please provide as much information as possible.
	Extra map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request proto for WriteUsers method.

func (*WriteUsersRequest) Descriptor deprecated

func (*WriteUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteUsersRequest.ProtoReflect.Descriptor instead.

func (*WriteUsersRequest) GetExtra

func (x *WriteUsersRequest) GetExtra() map[string]string

func (*WriteUsersRequest) GetUsers

func (x *WriteUsersRequest) GetUsers() []*User

func (*WriteUsersRequest) ProtoMessage

func (*WriteUsersRequest) ProtoMessage()

func (*WriteUsersRequest) ProtoReflect

func (x *WriteUsersRequest) ProtoReflect() protoreflect.Message

func (*WriteUsersRequest) Reset

func (x *WriteUsersRequest) Reset()

func (*WriteUsersRequest) String

func (x *WriteUsersRequest) String() string

type WriteUsersResponse

type WriteUsersResponse struct {

	// Output only.
	// When `status.code` is 0, all payload are successfully written.
	// If `status.code` is 1001, `errors` is populated.
	// Other non-zero values indicate all payload failed.
	Status *protocol.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Output only.
	// This field is populated when `status.code` is 1001.
	// When populated, this field contains the errors.
	Errors []*UserError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

The response proto for WriteUsers call.

func (*WriteUsersResponse) Descriptor deprecated

func (*WriteUsersResponse) Descriptor() ([]byte, []int)

Deprecated: Use WriteUsersResponse.ProtoReflect.Descriptor instead.

func (*WriteUsersResponse) GetErrors

func (x *WriteUsersResponse) GetErrors() []*UserError

func (*WriteUsersResponse) GetStatus

func (x *WriteUsersResponse) GetStatus() *protocol.Status

func (*WriteUsersResponse) ProtoMessage

func (*WriteUsersResponse) ProtoMessage()

func (*WriteUsersResponse) ProtoReflect

func (x *WriteUsersResponse) ProtoReflect() protoreflect.Message

func (*WriteUsersResponse) Reset

func (x *WriteUsersResponse) Reset()

func (*WriteUsersResponse) String

func (x *WriteUsersResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL