public async Task WhenAsync(MergePatchUserPermissionMvoDto c)
        {
            var idObj         = UserPermissionMvoProxyUtils.ToIdString((c as IMergePatchUserPermissionMvo).UserPermissionId);
            var uriParameters = new UserPermissionMvoUriParameters();

            uriParameters.Id = idObj;

            var req  = new UserPermissionMvoPatchRequest(uriParameters, (MergePatchUserPermissionMvoDto)c);
            var resp = await _ramlClient.UserPermissionMvo.Patch(req);

            UserPermissionMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
        public async Task <IUserPermissionMvoStateEvent> GetStateEventAsync(UserPermissionId userPermissionId, long version)
        {
            var idObj         = UserPermissionMvoProxyUtils.ToIdString(userPermissionId);
            var uriParameters = new UserPermissionMvoStateEventUriParameters();

            uriParameters.Id      = idObj;
            uriParameters.Version = version.ToString();

            var req  = new UserPermissionMvoStateEventGetRequest(uriParameters);
            var resp = await _ramlClient.UserPermissionMvoStateEvent.Get(req);

            UserPermissionMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(resp.Content);
        }
        public async Task <IUserPermissionMvoState> GetAsync(UserPermissionId userPermissionId)
        {
            IUserPermissionMvoState state = null;
            var idObj         = UserPermissionMvoProxyUtils.ToIdString(userPermissionId);
            var uriParameters = new UserPermissionMvoUriParameters();

            uriParameters.Id = idObj;

            var req = new UserPermissionMvoGetRequest(uriParameters);

            var resp = await _ramlClient.UserPermissionMvo.Get(req);

            UserPermissionMvoProxyUtils.ThrowOnHttpResponseError(resp);
            state = resp.Content;
            return(state);
        }
        public async Task WhenAsync(DeleteUserPermissionMvoDto c)
        {
            var idObj         = UserPermissionMvoProxyUtils.ToIdString((c as IDeleteUserPermissionMvo).UserPermissionId);
            var uriParameters = new UserPermissionMvoUriParameters();

            uriParameters.Id = idObj;

            var q = new UserPermissionMvoDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new UserPermissionMvoDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.UserPermissionMvo.Delete(req);

            UserPermissionMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }