personalizeevents

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Overview

Package personalizeevents provides the client and types for making API requests to Amazon Personalize Events.

See https://docs.aws.amazon.com/goto/WebAPI/personalize-events-2018-03-22 for more information on this service.

See personalizeevents package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/personalizeevents/

Using the Client

To use Amazon Personalize Events with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Amazon Personalize Events client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/personalizeevents/#New

Index

Constants

View Source
const (
	ServiceName = "Amazon Personalize Events" // Service's name
	ServiceID   = "PersonalizeEvents"         // Service's identifier
	EndpointsID = "personalize-events"        // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeInvalidInputException for service response error code
	// "InvalidInputException".
	//
	// Provide a valid value for the field or parameter.
	ErrCodeInvalidInputException = "InvalidInputException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to Amazon Personalize Events. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := personalizeevents.New(myConfig)

func (*Client) PutEventsRequest

func (c *Client) PutEventsRequest(input *PutEventsInput) PutEventsRequest

PutEventsRequest returns a request value for making API operation for Amazon Personalize Events.

Records user interaction event data.

// Example sending a request using PutEventsRequest.
req := client.PutEventsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/personalize-events-2018-03-22/PutEvents

type Event

type Event struct {

	// An ID associated with the event. If an event ID is not provided, Amazon Personalize
	// generates a unique ID for the event. An event ID is not used as an input
	// to the model. Amazon Personalize uses the event ID to distinquish unique
	// events. Any subsequent events after the first with the same event ID are
	// not used in model training.
	EventId *string `locationName:"eventId" min:"1" type:"string"`

	// The type of event. This property corresponds to the EVENT_TYPE field of the
	// Interactions schema.
	//
	// EventType is a required field
	EventType *string `locationName:"eventType" min:"1" type:"string" required:"true"`

	// A string map of event-specific data that you might choose to record. For
	// example, if a user rates a movie on your site, you might send the movie ID
	// and rating, and the number of movie ratings made by the user.
	//
	// Each item in the map consists of a key-value pair. For example,
	//
	// {"itemId": "movie1"}
	//
	// {"itemId": "movie2", "eventValue": "4.5"}
	//
	// {"itemId": "movie3", "eventValue": "3", "numberOfRatings": "12"}
	//
	// The keys use camel case names that match the fields in the Interactions schema.
	// The itemId and eventValue keys correspond to the ITEM_ID and EVENT_VALUE
	// fields. In the above example, the eventType might be 'MovieRating' with eventValue
	// being the rating. The numberOfRatings would match the 'NUMBER_OF_RATINGS'
	// field defined in the Interactions schema.
	//
	// Properties is a required field
	Properties aws.JSONValue `locationName:"properties" type:"jsonvalue" required:"true"`

	// The timestamp on the client side when the event occurred.
	//
	// SentAt is a required field
	SentAt *time.Time `locationName:"sentAt" type:"timestamp" required:"true"`
	// contains filtered or unexported fields
}

Represents user interaction event information sent using the PutEvents API.

func (Event) MarshalFields

func (s Event) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Event) String

func (s Event) String() string

String returns the string representation

func (*Event) Validate

func (s *Event) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutEventsInput

type PutEventsInput struct {

	// A list of event data from the session.
	//
	// EventList is a required field
	EventList []Event `locationName:"eventList" min:"1" type:"list" required:"true"`

	// The session ID associated with the user's visit.
	//
	// SessionId is a required field
	SessionId *string `locationName:"sessionId" min:"1" type:"string" required:"true"`

	// The tracking ID for the event. The ID is generated by a call to the CreateEventTracker
	// (https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html)
	// API.
	//
	// TrackingId is a required field
	TrackingId *string `locationName:"trackingId" min:"1" type:"string" required:"true"`

	// The user associated with the event.
	UserId *string `locationName:"userId" min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (PutEventsInput) MarshalFields

func (s PutEventsInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutEventsInput) String

func (s PutEventsInput) String() string

String returns the string representation

func (*PutEventsInput) Validate

func (s *PutEventsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutEventsOutput

type PutEventsOutput struct {
	// contains filtered or unexported fields
}

func (PutEventsOutput) MarshalFields

func (s PutEventsOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutEventsOutput) String

func (s PutEventsOutput) String() string

String returns the string representation

type PutEventsRequest

type PutEventsRequest struct {
	*aws.Request
	Input *PutEventsInput
	Copy  func(*PutEventsInput) PutEventsRequest
}

PutEventsRequest is the request type for the PutEvents API operation.

func (PutEventsRequest) Send

Send marshals and sends the PutEvents API request.

type PutEventsResponse

type PutEventsResponse struct {
	*PutEventsOutput
	// contains filtered or unexported fields
}

PutEventsResponse is the response type for the PutEvents API operation.

func (*PutEventsResponse) SDKResponseMetdata

func (r *PutEventsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the PutEvents request.

Directories

Path Synopsis
Package personalizeeventsiface provides an interface to enable mocking the Amazon Personalize Events service client for testing your code.
Package personalizeeventsiface provides an interface to enable mocking the Amazon Personalize Events service client for testing your code.

Jump to

Keyboard shortcuts

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