### YamlMime:JavaType
uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils"
name: "Utils"
nameWithType: "Utils"
summary: "Defines a few utilities."
inheritances:
- ""
inheritedClassMethods:
- classRef: ""
methodsRef:
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
syntax: "public final class **Utils**"
methods:
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPagedList(java.util.List,rx.functions.Func1)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPagedList(List list, Func1 mapper)"
name: "toPagedList(List list, Func1 mapper)"
nameWithType: "Utils.toPagedList(List list, Func1 mapper)"
summary: "Converts the given list of a type to paged list of a different type."
modifiers:
- "static"
parameters:
- description: "the list to convert to paged list"
name: "list"
type: "<>"
- description: "the mapper to map type in input list to output list"
name: "mapper"
type: "<,>"
syntax: "public static PagedList toPagedList(List list, Func1 mapper)"
desc: "Converts the given list of a type to paged list of a different type."
returns:
description: "the paged list"
type: "<>"
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.rootResource(rx.Observable)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.rootResource(Observable stream)"
name: "rootResource(Observable stream)"
nameWithType: "Utils.rootResource(Observable stream)"
summary: "Gets an observable of type `U`, where U extends , that emits only the root resource from a given observable of ."
modifiers:
- "static"
parameters:
- description: "the input observable of "
name: "stream"
type: "<>"
syntax: "public static Observable rootResource(Observable stream)"
desc: "Gets an observable of type `U`, where U extends , that emits only the root resource from a given observable of ."
returns:
description: "an observable that emits last item"
type: "<>"
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.addToListIfNotExists(java.util.List,java.lang.String)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.addToListIfNotExists(List list, String value)"
name: "addToListIfNotExists(List list, String value)"
nameWithType: "Utils.addToListIfNotExists(List list, String value)"
summary: "Adds a value to the list if does not already exists."
modifiers:
- "static"
parameters:
- description: "the list"
name: "list"
type: "<>"
- description: "value to add if not exists in the list"
name: "value"
type: ""
syntax: "public static void addToListIfNotExists(List list, String value)"
desc: "Adds a value to the list if does not already exists."
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.createOdataFilterForTags(java.lang.String,java.lang.String)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.createOdataFilterForTags(String tagName, String tagValue)"
name: "createOdataFilterForTags(String tagName, String tagValue)"
nameWithType: "Utils.createOdataFilterForTags(String tagName, String tagValue)"
summary: "Creates an Odata filter string that can be used for filtering list results by tags."
modifiers:
- "static"
parameters:
- description: "the name of the tag. If not provided, all resources will be returned."
name: "tagName"
type: ""
- description: "the value of the tag. If not provided, only tag name will be filtered."
name: "tagValue"
type: ""
syntax: "public static String createOdataFilterForTags(String tagName, String tagValue)"
desc: "Creates an Odata filter string that can be used for filtering list results by tags."
returns:
description: "the Odata filter to pass into list methods"
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.downloadFileAsync(java.lang.String,retrofit2.Retrofit)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.downloadFileAsync(String url, Retrofit retrofit)"
name: "downloadFileAsync(String url, Retrofit retrofit)"
nameWithType: "Utils.downloadFileAsync(String url, Retrofit retrofit)"
summary: "Download a file asynchronously."
modifiers:
- "static"
parameters:
- description: "the URL pointing to the file"
name: "url"
type: ""
- description: "the retrofit client"
name: "retrofit"
type: ""
syntax: "public static Observable downloadFileAsync(String url, Retrofit retrofit)"
desc: "Download a file asynchronously."
returns:
description: "an Observable pointing to the content of the file"
type: "<[]>"
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.extractAzureEnvironment(com.microsoft.rest.RestClient)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.extractAzureEnvironment(RestClient restClient)"
name: "extractAzureEnvironment(RestClient restClient)"
nameWithType: "Utils.extractAzureEnvironment(RestClient restClient)"
summary: "Try to extract the environment the client is authenticated to based on the information on the rest client."
modifiers:
- "static"
parameters:
- description: "the RestClient instance"
name: "restClient"
type: ""
syntax: "public static AzureEnvironment extractAzureEnvironment(RestClient restClient)"
desc: "Try to extract the environment the client is authenticated to based on the information on the rest client."
returns:
description: "the non-null AzureEnvironment"
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.getResponseBodyInString(okhttp3.ResponseBody)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.getResponseBodyInString(ResponseBody responseBody)"
name: "getResponseBodyInString(ResponseBody responseBody)"
nameWithType: "Utils.getResponseBodyInString(ResponseBody responseBody)"
summary: "Get the response body as string."
modifiers:
- "static"
parameters:
- description: "response body object"
name: "responseBody"
type: ""
syntax: "public static String getResponseBodyInString(ResponseBody responseBody)"
exceptions:
- description: "throw IOException"
type: ""
desc: "Get the response body as string."
returns:
description: "response body in string"
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.getStorageConnectionString(java.lang.String,java.lang.String,com.microsoft.rest.RestClient)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.getStorageConnectionString(String accountName, String accountKey, RestClient restClient)"
name: "getStorageConnectionString(String accountName, String accountKey, RestClient restClient)"
nameWithType: "Utils.getStorageConnectionString(String accountName, String accountKey, RestClient restClient)"
summary: "Get the Azure storage account connection string."
modifiers:
- "static"
parameters:
- description: "storage account name"
name: "accountName"
type: ""
- description: "storage account key"
name: "accountKey"
type: ""
- description: "rest client"
name: "restClient"
type: ""
syntax: "public static String getStorageConnectionString(String accountName, String accountKey, RestClient restClient)"
desc: "Get the Azure storage account connection string."
returns:
description: "the storage account connection string."
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.removeFromList(java.util.List,java.lang.String)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.removeFromList(List list, String value)"
name: "removeFromList(List list, String value)"
nameWithType: "Utils.removeFromList(List list, String value)"
summary: "Removes a value from the list."
modifiers:
- "static"
parameters:
- description: "the list"
name: "list"
type: "<>"
- description: "value to remove"
name: "value"
type: ""
syntax: "public static void removeFromList(List list, String value)"
desc: "Removes a value from the list."
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.resourceGroupId(java.lang.String)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.resourceGroupId(String id)"
name: "resourceGroupId(String id)"
nameWithType: "Utils.resourceGroupId(String id)"
modifiers:
- "static"
parameters:
- description: "resource id"
name: "id"
type: ""
syntax: "public static String resourceGroupId(String id)"
returns:
description: "resource group id for the resource id provided"
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveBoolean(java.lang.Boolean)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveBoolean(Boolean value)"
name: "toPrimitiveBoolean(Boolean value)"
nameWithType: "Utils.toPrimitiveBoolean(Boolean value)"
summary: "Converts an object Boolean to a primitive boolean."
modifiers:
- "static"
parameters:
- description: "the Boolean value"
name: "value"
type: ""
syntax: "public static boolean toPrimitiveBoolean(Boolean value)"
desc: "Converts an object Boolean to a primitive boolean."
returns:
description: "false if the given Boolean value is null or false else true"
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveInt(java.lang.Integer)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveInt(Integer value)"
name: "toPrimitiveInt(Integer value)"
nameWithType: "Utils.toPrimitiveInt(Integer value)"
summary: "Converts an object Integer to a primitive int."
modifiers:
- "static"
parameters:
- description: "the Integer value"
name: "value"
type: ""
syntax: "public static int toPrimitiveInt(Integer value)"
desc: "Converts an object Integer to a primitive int."
returns:
description: "0 if the given Integer value is null else integer value"
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveInt(java.lang.Long)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveInt(Long value)"
name: "toPrimitiveInt(Long value)"
nameWithType: "Utils.toPrimitiveInt(Long value)"
summary: "Converts an object Long to a primitive int."
modifiers:
- "static"
parameters:
- description: "the Long value"
name: "value"
type: ""
syntax: "public static int toPrimitiveInt(Long value)"
desc: "Converts an object Long to a primitive int."
returns:
description: "0 if the given Long value is null else integer value"
type: ""
- uid: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveLong(java.lang.Long)"
fullName: "com.microsoft.azure.management.resources.fluentcore.utils.Utils.toPrimitiveLong(Long value)"
name: "toPrimitiveLong(Long value)"
nameWithType: "Utils.toPrimitiveLong(Long value)"
summary: "Converts an object Long to a primitive long."
modifiers:
- "static"
parameters:
- description: "the Long value"
name: "value"
type: ""
syntax: "public static long toPrimitiveLong(Long value)"
desc: "Converts an object Long to a primitive long."
returns:
description: "0 if the given Long value is null else long value"
type: ""
type: "class"
desc: "Defines a few utilities."
metadata: {}
package: "com.microsoft.azure.management.resources.fluentcore.utils"
artifact: com.microsoft.azure:azure-mgmt-resources:1.41.4