本文整理了Java中com.microsoft.azure.management.resources.fluentcore.utils.Utils
类的一些代码示例,展示了Utils
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils
类的具体详情如下:
包路径:com.microsoft.azure.management.resources.fluentcore.utils.Utils
类名称:Utils
[英]Defines a few utilities.
[中]定义了一些实用程序。
代码示例来源:origin: com.microsoft.azure/azure-mgmt-eventhub
/**
* @return sku capacity
*/
public int capacity() {
return Utils.toPrimitiveInt(this.sku.capacity());
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public boolean remoteDebuggingEnabled() {
if (siteConfig == null) {
return false;
}
return Utils.toPrimitiveBoolean(siteConfig.remoteDebuggingEnabled());
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-network
@Override
public long secondaryBytesOut() {
return Utils.toPrimitiveLong(inner().secondarybytesOut());
}
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@SuppressWarnings("unchecked")
private Observable<CreatedResources<T>> createAsyncNonStream(Creatable<T>... creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Test
public void canDownloadFile() throws Exception {
Retrofit retrofit = new Retrofit.Builder().baseUrl("http://microsoft.com").addCallAdapterFactory(RxJavaCallAdapterFactory.create()).build();
byte[] content = Utils.downloadFileAsync("http://google.com/humans.txt", retrofit).toBlocking().single();
String contentString = new String(content);
Assert.assertNotNull(contentString);
}
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
private Observable<CreatedResources<T>> createAsyncNonStream(List<Creatable<T>> creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-servicebus
/**
* @return sku capacity
*/
public int capacity() {
return Utils.toPrimitiveInt(this.sku.capacity());
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public boolean http20Enabled() {
if (siteConfig == null) {
return false;
}
return Utils.toPrimitiveBoolean(siteConfig.http20Enabled());
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-servicebus
@Override
public long activeMessageCount() {
if (this.inner().countDetails() == null
|| this.inner().countDetails().activeMessageCount() == null) {
return 0;
}
return Utils.toPrimitiveLong(this.inner().countDetails().activeMessageCount());
}
代码示例来源:origin: Azure/azure-libraries-for-java
@SuppressWarnings("unchecked")
private Observable<CreatedResources<T>> createAsyncNonStream(Creatable<T>... creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-compute
@Override
public int maxDataDiskCount() {
return Utils.toPrimitiveInt(innerModel.maxDataDiskCount());
}
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-network
@Override
public NetworkPeeringGatewayUse gatewayUse() {
if (Utils.toPrimitiveBoolean(this.inner().allowGatewayTransit())) {
return NetworkPeeringGatewayUse.BY_REMOTE_NETWORK;
} else if (Utils.toPrimitiveBoolean(this.inner().useRemoteGateways())) {
return NetworkPeeringGatewayUse.ON_REMOTE_NETWORK;
} else {
return NetworkPeeringGatewayUse.NONE;
}
}
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-servicebus
@Override
public long deadLetterMessageCount() {
if (this.inner().countDetails() == null
|| this.inner().countDetails().deadLetterMessageCount() == null) {
return 0;
}
return Utils.toPrimitiveLong(this.inner().countDetails().deadLetterMessageCount());
}
代码示例来源:origin: Azure/azure-libraries-for-java
private Observable<CreatedResources<T>> createAsyncNonStream(List<Creatable<T>> creatables) {
return Utils.<CreatableUpdatableResourcesRoot<T>>rootResource(this.createAsync(creatables))
.map(new Func1<CreatableUpdatableResourcesRoot<T>, CreatedResources<T>>() {
@Override
public CreatedResources<T> call(CreatableUpdatableResourcesRoot<T> tCreatableUpdatableResourcesRoot) {
return new CreatedResourcesImpl<>(tCreatableUpdatableResourcesRoot);
}
});
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-storage
@Override
public int limit() {
return Utils.toPrimitiveInt(inner().limit());
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public boolean isAcceleratedNetworkingEnabled() {
return Utils.toPrimitiveBoolean(this.inner().enableAcceleratedNetworking());
}
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-servicebus
@Override
public long activeMessageCount() {
if (this.inner().countDetails() == null
|| this.inner().countDetails().activeMessageCount() == null) {
return 0;
}
return Utils.toPrimitiveLong(this.inner().countDetails().activeMessageCount());
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Override
public FluentModelT create() {
return Utils.<FluentModelT>rootResource(createAsync()).toBlocking().single();
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-network
@Override
public int port() {
return Utils.toPrimitiveInt(this.inner().port());
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public NetworkPeeringGatewayUse gatewayUse() {
if (Utils.toPrimitiveBoolean(this.inner().allowGatewayTransit())) {
return NetworkPeeringGatewayUse.BY_REMOTE_NETWORK;
} else if (Utils.toPrimitiveBoolean(this.inner().useRemoteGateways())) {
return NetworkPeeringGatewayUse.ON_REMOTE_NETWORK;
} else {
return NetworkPeeringGatewayUse.NONE;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!