Evo Voice

<back to all web services

DeleteAISessionAction

Delete the specified session action

Requires Authentication
Requires the role:SystemAdministrator
The following routes are available for this service:
DELETE/ai/sessions/{sessionId}/actions/{actionId}
import 'package:servicestack/servicestack.dart';

/**
* Delete the specified session action
*/
// @Api(Description="Delete the specified session action")
class DeleteAISessionAction implements IDelete, IConvertible
{
    /**
    * The ID of the session
    */
    // @ApiMember(Description="The ID of the session")
    String? sessionId;

    /**
    * The ID of the action to delete
    */
    // @ApiMember(Description="The ID of the action to delete")
    String? actionId;

    DeleteAISessionAction({this.sessionId,this.actionId});
    DeleteAISessionAction.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        sessionId = json['sessionId'];
        actionId = json['actionId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'sessionId': sessionId,
        'actionId': actionId
    };

    getTypeName() => "DeleteAISessionAction";
    TypeContext? context = _ctx;
}

abstract class EntityInfo
{
    /**
    * The ID of the object
    */
    // @ApiMember(Description="The ID of the object")
    String? id;

    /**
    * The date the object was created
    */
    // @ApiMember(Description="The date the object was created")
    String? dateCreated;

    /**
    * The date the object was last modified
    */
    // @ApiMember(Description="The date the object was last modified")
    String? dateLastModified;

    /**
    * The user that created this object
    */
    // @ApiMember(Description="The user that created this object")
    String? createdBy;

    /**
    * The user that last modified this object
    */
    // @ApiMember(Description="The user that last modified this object")
    String? lastModifiedBy;

    EntityInfo({this.id,this.dateCreated,this.dateLastModified,this.createdBy,this.lastModifiedBy});
    EntityInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        dateCreated = json['dateCreated'];
        dateLastModified = json['dateLastModified'];
        createdBy = json['createdBy'];
        lastModifiedBy = json['lastModifiedBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'dateCreated': dateCreated,
        'dateLastModified': dateLastModified,
        'createdBy': createdBy,
        'lastModifiedBy': lastModifiedBy
    };

    getTypeName() => "EntityInfo";
    TypeContext? context = _ctx;
}

class AISessionActionInfo implements IConvertible
{
    String? date;
    String? id;
    String? functionName;
    String? arguments;
    String? description;
    bool? canBeApplied;

    AISessionActionInfo({this.date,this.id,this.functionName,this.arguments,this.description,this.canBeApplied});
    AISessionActionInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        date = json['date'];
        id = json['id'];
        functionName = json['functionName'];
        arguments = json['arguments'];
        description = json['description'];
        canBeApplied = json['canBeApplied'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'date': date,
        'id': id,
        'functionName': functionName,
        'arguments': arguments,
        'description': description,
        'canBeApplied': canBeApplied
    };

    getTypeName() => "AISessionActionInfo";
    TypeContext? context = _ctx;
}

class AISessionInfo extends EntityInfo implements IConvertible
{
    /**
    * The ID of the account associated with this session
    */
    // @ApiMember(Description="The ID of the account associated with this session")
    String? accountId;

    /**
    * The name of the account associated with this customer
    */
    // @ApiMember(Description="The name of the account associated with this customer")
    String? accountName;

    /**
    * The purpose for this AI session
    */
    // @ApiMember(Description="The purpose for this AI session")
    String? purpose;

    /**
    * The actions performed in this session
    */
    // @ApiMember(Description="The actions performed in this session")
    List<AISessionActionInfo>? actions;

    AISessionInfo({this.accountId,this.accountName,this.purpose,this.actions});
    AISessionInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        accountId = json['accountId'];
        accountName = json['accountName'];
        purpose = json['purpose'];
        actions = JsonConverters.fromJson(json['actions'],'List<AISessionActionInfo>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'accountId': accountId,
        'accountName': accountName,
        'purpose': purpose,
        'actions': JsonConverters.toJson(actions,'List<AISessionActionInfo>',context!)
    });

    getTypeName() => "AISessionInfo";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'DeleteAISessionAction': TypeInfo(TypeOf.Class, create:() => DeleteAISessionAction()),
    'EntityInfo': TypeInfo(TypeOf.AbstractClass),
    'AISessionActionInfo': TypeInfo(TypeOf.Class, create:() => AISessionActionInfo()),
    'AISessionInfo': TypeInfo(TypeOf.Class, create:() => AISessionInfo()),
    'List<AISessionActionInfo>': TypeInfo(TypeOf.Class, create:() => <AISessionActionInfo>[]),
});

Dart DeleteAISessionAction DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

DELETE /ai/sessions/{sessionId}/actions/{actionId} HTTP/1.1 
Host: evovoice.io 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AISessionInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.AI">
  <CreatedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</CreatedBy>
  <DateCreated xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateCreated>
  <DateLastModified xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</DateLastModified>
  <Id xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</Id>
  <LastModifiedBy xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">String</LastModifiedBy>
  <AccountId>String</AccountId>
  <AccountName>String</AccountName>
  <Actions>
    <AISessionActionInfo>
      <Arguments>String</Arguments>
      <CanBeApplied>false</CanBeApplied>
      <Date>String</Date>
      <Description>String</Description>
      <FunctionName>String</FunctionName>
      <Id>String</Id>
    </AISessionActionInfo>
  </Actions>
  <Purpose>String</Purpose>
</AISessionInfo>