com.microsoft.azure.management.resources.fluentcore.utils.Utils类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中com.microsoft.azure.management.resources.fluentcore.utils.Utils类的一些代码示例,展示了Utils类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils类的具体详情如下:
包路径:com.microsoft.azure.management.resources.fluentcore.utils.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;
    }
  }
}

相关文章