• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ServiceResponse类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.microsoft.rest.ServiceResponse的典型用法代码示例。如果您正苦于以下问题:Java ServiceResponse类的具体用法?Java ServiceResponse怎么用?Java ServiceResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ServiceResponse类属于com.microsoft.rest包,在下文中一共展示了ServiceResponse类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: listNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Lists all jobs under the specified job collection.
 *
ServiceResponse<PageImpl<JobDefinitionInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;JobDefinitionInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<JobDefinitionInner>>> listNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<JobDefinitionInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<JobDefinitionInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<JobDefinitionInner>> result = listNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<JobDefinitionInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:26,代码来源:JobsInner.java


示例2: testWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param jobName The name of the streaming job.
 * @param inputName The name of the input.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<ResourceTestStatusInner>> testWithServiceResponseAsync(String resourceGroupName, String jobName, String inputName) {
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (jobName == null) {
        throw new IllegalArgumentException("Parameter jobName is required and cannot be null.");
    }
    if (inputName == null) {
        throw new IllegalArgumentException("Parameter inputName is required and cannot be null.");
    }
    final String apiVersion = "2016-03-01";
    final InputInner input = null;
    Observable<Response<ResponseBody>> observable = service.test(this.client.subscriptionId(), resourceGroupName, jobName, inputName, input, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<ResourceTestStatusInner>() { }.getType());
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:28,代码来源:InputsInner.java


示例3: listNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Get all domains in a subscription.
 * Get all domains in a subscription.
 *
ServiceResponse<PageImpl<DomainInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;DomainInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<DomainInner>>> listNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<DomainInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<DomainInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<DomainInner>> result = listNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<DomainInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:27,代码来源:DomainsInner.java


示例4: beginGetLearnedRoutesWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
 *
 * @param resourceGroupName The name of the resource group.
 * @param virtualNetworkGatewayName The name of the virtual network gateway.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable to the GatewayRouteListResultInner object
 */
public Observable<ServiceResponse<GatewayRouteListResultInner>> beginGetLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (virtualNetworkGatewayName == null) {
        throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2017-08-01";
    return service.beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GatewayRouteListResultInner>>>() {
            @Override
            public Observable<ServiceResponse<GatewayRouteListResultInner>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<GatewayRouteListResultInner> clientResponse = beginGetLearnedRoutesDelegate(response);
                    return Observable.just(clientResponse);
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:33,代码来源:VirtualNetworkGatewaysInner.java


示例5: getByResourceGroupWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Gets the specified virtual network gateway connection by resource group.
 *
 * @param resourceGroupName The name of the resource group.
 * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable to the VirtualNetworkGatewayConnectionInner object
 */
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (virtualNetworkGatewayConnectionName == null) {
        throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2017-08-01";
    return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>>>() {
            @Override
            public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<VirtualNetworkGatewayConnectionInner> clientResponse = getByResourceGroupDelegate(response);
                    return Observable.just(clientResponse);
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:33,代码来源:VirtualNetworkGatewayConnectionsInner.java


示例6: listByResourceGroupNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Get all App Service plans in a resource group.
 * Get all App Service plans in a resource group.
 *
ServiceResponse<PageImpl<AppServicePlanInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;AppServicePlanInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<AppServicePlanInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<AppServicePlanInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<AppServicePlanInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<AppServicePlanInner>> result = listByResourceGroupNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<AppServicePlanInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:27,代码来源:AppServicePlansInner.java


示例7: listSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Get all deleted apps for a subscription.
 * Get all deleted apps for a subscription.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;DeletedSiteInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<DeletedSiteInner>>> listSinglePageAsync() {
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2016-03-01";
    return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<DeletedSiteInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<DeletedSiteInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<DeletedSiteInner>> result = listDelegate(response);
                    return Observable.just(new ServiceResponse<Page<DeletedSiteInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:26,代码来源:DeletedWebAppsInner.java


示例8: dateValidWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Get '2012-01-01' as date.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceResponse} object if successful.
 */
public Observable<ServiceResponse<Void>> dateValidWithServiceResponseAsync() {
    final LocalDate datePath = LocalDate.parse("2012-01-01");
    return service.dateValid(datePath)
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
            @Override
            public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<Void> clientResponse = dateValidDelegate(response);
                    return Observable.just(clientResponse);
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:autorest.java,代码行数:22,代码来源:PathsImpl.java


示例9: listAllNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
 *
ServiceResponse<PageImpl<ConsumerGroupResourceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;ConsumerGroupResourceInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<ConsumerGroupResourceInner>>> listAllNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ConsumerGroupResourceInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<ConsumerGroupResourceInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<ConsumerGroupResourceInner>> result = listAllNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<ConsumerGroupResourceInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:26,代码来源:ConsumerGroupsInner.java


示例10: listSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Gets a list of managed clusters in the specified subscription.
 * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;ManagedClusterInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<ManagedClusterInner>>> listSinglePageAsync() {
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2017-08-31";
    return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ManagedClusterInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<ManagedClusterInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<ManagedClusterInner>> result = listDelegate(response);
                    return Observable.just(new ServiceResponse<Page<ManagedClusterInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:26,代码来源:ManagedClustersInner.java


示例11: getByResourceGroupWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Gets the specified network security group.
 *
 * @param resourceGroupName The name of the resource group.
 * @param networkSecurityGroupName The name of the network security group.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable to the NetworkSecurityGroupInner object
 */
public Observable<ServiceResponse<NetworkSecurityGroupInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (networkSecurityGroupName == null) {
        throw new IllegalArgumentException("Parameter networkSecurityGroupName is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2017-08-01";
    final String expand = null;
    return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkSecurityGroupInner>>>() {
            @Override
            public Observable<ServiceResponse<NetworkSecurityGroupInner>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<NetworkSecurityGroupInner> clientResponse = getByResourceGroupDelegate(response);
                    return Observable.just(clientResponse);
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:34,代码来源:NetworkSecurityGroupsInner.java


示例12: listSiteDiagnosticCategoriesNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Get Diagnostics Categories.
 * Get Diagnostics Categories.
 *
ServiceResponse<PageImpl<DiagnosticCategoryInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;DiagnosticCategoryInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listSiteDiagnosticCategoriesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<DiagnosticCategoryInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<DiagnosticCategoryInner>> result = listSiteDiagnosticCategoriesNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<DiagnosticCategoryInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:27,代码来源:DiagnosticsInner.java


示例13: deleteGoalWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Delete a goal instance.
 *
 * @param goalId The identifier of the goal to delete.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable to the Object object
 */
public Observable<ServiceResponse<Object>> deleteGoalWithServiceResponseAsync(String goalId) {
    if (goalId == null) {
        throw new IllegalArgumentException("Parameter goalId is required and cannot be null.");
    }
    return service.deleteGoal(goalId)
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Object>>>() {
            @Override
            public Observable<ServiceResponse<Object>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<Object> clientResponse = deleteGoalDelegate(response);
                    return Observable.just(clientResponse);
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Microsoft,项目名称:healthvault-java-sdk,代码行数:25,代码来源:MicrosoftHealthVaultRestApiImpl.java


示例14: listNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription.
 *
ServiceResponse<PageImpl1<UsageInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;UsageInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<UsageInner>>> listNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<UsageInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<UsageInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl1<UsageInner>> result = listNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<UsageInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:26,代码来源:UsagesInner.java


示例15: listTableStatisticsByDatabaseNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Retrieves the list of all statistics in a database from the Data Lake Analytics catalog.
 *
ServiceResponse<PageImpl<USqlTableStatistics>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;USqlTableStatistics&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<USqlTableStatistics>>> listTableStatisticsByDatabaseNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listTableStatisticsByDatabaseNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<USqlTableStatistics>>>>() {
            @Override
            public Observable<ServiceResponse<Page<USqlTableStatistics>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<USqlTableStatistics>> result = listTableStatisticsByDatabaseNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<USqlTableStatistics>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:26,代码来源:CatalogsImpl.java


示例16: updateSourceControlWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Updates source control token.
 * Updates source control token.
 *
 * @param sourceControlType Type of source control
 * @param requestMessage Source control token information
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable to the SourceControlInner object
 */
public Observable<ServiceResponse<SourceControlInner>> updateSourceControlWithServiceResponseAsync(String sourceControlType, SourceControlInner requestMessage) {
    if (sourceControlType == null) {
        throw new IllegalArgumentException("Parameter sourceControlType is required and cannot be null.");
    }
    if (requestMessage == null) {
        throw new IllegalArgumentException("Parameter requestMessage is required and cannot be null.");
    }
    Validator.validate(requestMessage);
    final String apiVersion = "2016-03-01";
    return service.updateSourceControl(sourceControlType, requestMessage, apiVersion, this.acceptLanguage(), this.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<SourceControlInner>>>() {
            @Override
            public Observable<ServiceResponse<SourceControlInner>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<SourceControlInner> clientResponse = updateSourceControlDelegate(response);
                    return Observable.just(clientResponse);
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:32,代码来源:WebSiteManagementClientImpl.java


示例17: listUsagesNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Gets server farm usage information.
 * Gets server farm usage information.
 *
ServiceResponse<PageImpl<CsmUsageQuotaInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;CsmUsageQuotaInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<CsmUsageQuotaInner>>> listUsagesNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listUsagesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<CsmUsageQuotaInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<CsmUsageQuotaInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<CsmUsageQuotaInner>> result = listUsagesNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<CsmUsageQuotaInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:27,代码来源:AppServicePlansInner.java


示例18: resumeNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Resume an App Service Environment.
 * Resume an App Service Environment.
 *
ServiceResponse<PageImpl<SiteInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;SiteInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<SiteInner>>> resumeNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.resumeNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<SiteInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<SiteInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<SiteInner>> result = resumeNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<SiteInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:27,代码来源:AppServiceEnvironmentsInner.java


示例19: listByResourceGroupNextSinglePageAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Gets a formatted list of file servers and their properties associated within the specified resource group.
 *
ServiceResponse<PageImpl<FileServerInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the PagedList&lt;FileServerInner&gt; object wrapped in {@link ServiceResponse} if successful.
 */
public Observable<ServiceResponse<Page<FileServerInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
    if (nextPageLink == null) {
        throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
    }
    String nextUrl = String.format("%s", nextPageLink);
    return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
        .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<FileServerInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<FileServerInner>>> call(Response<ResponseBody> response) {
                try {
                    ServiceResponse<PageImpl<FileServerInner>> result = listByResourceGroupNextDelegate(response);
                    return Observable.just(new ServiceResponse<Page<FileServerInner>>(result.body(), result.response()));
                } catch (Throwable t) {
                    return Observable.error(t);
                }
            }
        });
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:26,代码来源:FileServersInner.java


示例20: createOrUpdateWithServiceResponseAsync

import com.microsoft.rest.ServiceResponse; //导入依赖的package包/类
/**
 * Creates or updates an express route circuit.
 *
 * @param resourceGroupName The name of the resource group.
 * @param circuitName The name of the circuit.
 * @param parameters Parameters supplied to the create or update express route circuit operation.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the observable for the request
 */
public Observable<ServiceResponse<ExpressRouteCircuitInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (circuitName == null) {
        throw new IllegalArgumentException("Parameter circuitName is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    if (parameters == null) {
        throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
    }
    Validator.validate(parameters);
    final String apiVersion = "2017-08-01";
    Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
    return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ExpressRouteCircuitInner>() { }.getType());
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:28,代码来源:ExpressRouteCircuitsInner.java



注:本文中的com.microsoft.rest.ServiceResponse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ExecutionImpl类代码示例发布时间:2022-05-22
下一篇:
Java Joda类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap