public static GetLibraryResponse Unmarshall(UnmarshallerContext context)
        {
            GetLibraryResponse getLibraryResponse = new GetLibraryResponse();

            getLibraryResponse.HttpResponse = context.HttpResponse;
            getLibraryResponse.Code         = context.StringValue("GetLibrary.Code");
            getLibraryResponse.Message      = context.StringValue("GetLibrary.Message");
            getLibraryResponse.RequestId    = context.StringValue("GetLibrary.RequestId");
            getLibraryResponse.Action       = context.StringValue("GetLibrary.Action");

            GetLibraryResponse.GetLibrary_Library library = new GetLibraryResponse.GetLibrary_Library();

            GetLibraryResponse.GetLibrary_Library.GetLibrary_Quota quota = new GetLibraryResponse.GetLibrary_Library.GetLibrary_Quota();
            quota.TotalQuota  = context.LongValue("GetLibrary.Library.Quota.TotalQuota");
            quota.FacesCount  = context.IntegerValue("GetLibrary.Library.Quota.FacesCount");
            quota.PhotosCount = context.IntegerValue("GetLibrary.Library.Quota.PhotosCount");
            quota.UsedQuota   = context.LongValue("GetLibrary.Library.Quota.UsedQuota");
            quota.VideosCount = context.IntegerValue("GetLibrary.Library.Quota.VideosCount");
            library.Quota     = quota;

            GetLibraryResponse.GetLibrary_Library.GetLibrary_AutoCleanConfig autoCleanConfig = new GetLibraryResponse.GetLibrary_Library.GetLibrary_AutoCleanConfig();
            autoCleanConfig.AutoCleanEnabled = context.BooleanValue("GetLibrary.Library.AutoCleanConfig.AutoCleanEnabled");
            autoCleanConfig.AutoCleanDays    = context.IntegerValue("GetLibrary.Library.AutoCleanConfig.AutoCleanDays");
            library.AutoCleanConfig          = autoCleanConfig;
            getLibraryResponse.Library       = library;

            return(getLibraryResponse);
        }
Example #2
0
        public override Task <GetLibraryResponse> GetLibrary(GetLibraryRequest request, ServerCallContext context)
        {
            GetLibraryResponse response = new GetLibraryResponse();

            response.UserId     = request.UserId;
            response.SearchTerm = request.SearchTerm;
            response.Carriers.AddRange(request.Carriers);

            return(Task.FromResult(response));
        }