#if !DISABLE_PLAYFABENTITY_API using System; using System.Collections.Generic; using PlayFab.SharedModels; namespace PlayFab.EventsModels { [Serializable] public class CreateTelemetryKeyRequest : PlayFabRequestCommon { /// /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). /// public Dictionary CustomTags; /// /// The optional entity to perform this action on. Defaults to the currently logged in entity. /// public EntityKey Entity; /// /// The name of the new key. Telemetry key names must be unique within the scope of the title. /// public string KeyName; } [Serializable] public class CreateTelemetryKeyResponse : PlayFabResultCommon { /// /// Details about the newly created telemetry key. /// public TelemetryKeyDetails NewKeyDetails; } [Serializable] public class DeleteTelemetryKeyRequest : PlayFabRequestCommon { /// /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). /// public Dictionary CustomTags; /// /// The optional entity to perform this action on. Defaults to the currently logged in entity. /// public EntityKey Entity; /// /// The name of the key to delete. /// public string KeyName; } [Serializable] public class DeleteTelemetryKeyResponse : PlayFabResultCommon { /// /// Indicates whether or not the key was deleted. If false, no key with that name existed. /// public bool WasKeyDeleted; } /// /// Combined entity type and ID structure which uniquely identifies a single entity. /// [Serializable] public class EntityKey : PlayFabBaseModel { /// /// Unique ID of the entity. /// public string Id; /// /// Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types /// public string Type; } [Serializable] public class EventContents : PlayFabBaseModel { /// /// The optional custom tags associated with the event (e.g. build number, external trace identifiers, etc.). Before an /// event is written, this collection and the base request custom tags will be merged, but not overriden. This enables the /// caller to specify static tags and per event tags. /// public Dictionary CustomTags; /// /// Entity associated with the event. If null, the event will apply to the calling entity. /// public EntityKey Entity; /// /// The namespace in which the event is defined. Allowed namespaces can vary by API. /// public string EventNamespace; /// /// The name of this event. /// public string Name; /// /// The original unique identifier associated with this event before it was posted to PlayFab. The value might differ from /// the EventId value, which is assigned when the event is received by the server. /// public string OriginalId; /// /// The time (in UTC) associated with this event when it occurred. If specified, this value is stored in the /// OriginalTimestamp property of the PlayStream event. /// public DateTime? OriginalTimestamp; /// /// Arbitrary data associated with the event. Only one of Payload or PayloadJSON is allowed. /// public object Payload; /// /// Arbitrary data associated with the event, represented as a JSON serialized string. Only one of Payload or PayloadJSON is /// allowed. /// public string PayloadJSON; } [Serializable] public class GetTelemetryKeyRequest : PlayFabRequestCommon { /// /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). /// public Dictionary CustomTags; /// /// The optional entity to perform this action on. Defaults to the currently logged in entity. /// public EntityKey Entity; /// /// The name of the key to retrieve. /// public string KeyName; } [Serializable] public class GetTelemetryKeyResponse : PlayFabResultCommon { /// /// Details about the requested telemetry key. /// public TelemetryKeyDetails KeyDetails; } [Serializable] public class ListTelemetryKeysRequest : PlayFabRequestCommon { /// /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). /// public Dictionary CustomTags; /// /// The optional entity to perform this action on. Defaults to the currently logged in entity. /// public EntityKey Entity; } [Serializable] public class ListTelemetryKeysResponse : PlayFabResultCommon { /// /// The telemetry keys configured for the title. /// public List KeyDetails; } [Serializable] public class SetTelemetryKeyActiveRequest : PlayFabRequestCommon { /// /// Whether to set the key to active (true) or deactivated (false). /// public bool Active; /// /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). /// public Dictionary CustomTags; /// /// The optional entity to perform this action on. Defaults to the currently logged in entity. /// public EntityKey Entity; /// /// The name of the key to update. /// public string KeyName; } [Serializable] public class SetTelemetryKeyActiveResponse : PlayFabResultCommon { /// /// The most current details about the telemetry key that was to be updated. /// public TelemetryKeyDetails KeyDetails; /// /// Indicates whether or not the key was updated. If false, the key was already in the desired state. /// public bool WasKeyUpdated; } [Serializable] public class TelemetryKeyDetails : PlayFabBaseModel { /// /// When the key was created. /// public DateTime CreateTime; /// /// Whether or not the key is currently active. Deactivated keys cannot be used for telemetry ingestion. /// public bool IsActive; /// /// The key that can be distributed to clients for use during telemetry ingestion. /// public string KeyValue; /// /// When the key was last updated. /// public DateTime LastUpdateTime; /// /// The name of the key. Telemetry key names are unique within the scope of the title. /// public string Name; } [Serializable] public class WriteEventsRequest : PlayFabRequestCommon { /// /// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). /// public Dictionary CustomTags; /// /// The collection of events to write. Up to 200 events can be written per request. /// public List Events; } [Serializable] public class WriteEventsResponse : PlayFabResultCommon { /// /// The unique identifiers assigned by the server to the events, in the same order as the events in the request. Only /// returned if FlushToPlayStream option is true. /// public List AssignedEventIds; } } #endif