Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from resourcegraph# (Azure#20077)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Mar 24, 2021
1 parent 11997c4 commit 631145f
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Release History

## 1.0.0-beta.1 (2021-03-18)
## 1.0.0-beta.1 (2021-03-24)

- Azure Resource Manager ResourceGraph client library for Java. This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
- Azure Resource Manager ResourceGraph client library for Java. This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2019-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager ResourceGraph client library for Java.

This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2019-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for ResourceGraph Management</name>
<description>This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-2019-04.</description>
<description>This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-2021-03.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
public interface ResourceProvidersClient {
/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -26,7 +26,7 @@ public interface ResourceProvidersClient {
QueryResponseInner resources(QueryRequest query);

/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @param context The context to associate with this operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ public final class QueryResponseInner {

/*
* When present, the value can be passed to a subsequent query call
* (together with the same query and subscriptions used in the current
* request) to retrieve the next page of data.
* (together with the same query and scopes used in the current request) to
* retrieve the next page of data.
*/
@JsonProperty(value = "$skipToken")
private String skipToken;

/*
* Query output in tabular format.
* Query output in JObject array or Table format.
*/
@JsonProperty(value = "data", required = true)
private Object data;
Expand Down Expand Up @@ -120,7 +120,7 @@ public QueryResponseInner withResultTruncated(ResultTruncated resultTruncated) {

/**
* Get the skipToken property: When present, the value can be passed to a subsequent query call (together with the
* same query and subscriptions used in the current request) to retrieve the next page of data.
* same query and scopes used in the current request) to retrieve the next page of data.
*
* @return the skipToken value.
*/
Expand All @@ -130,7 +130,7 @@ public String skipToken() {

/**
* Set the skipToken property: When present, the value can be passed to a subsequent query call (together with the
* same query and subscriptions used in the current request) to retrieve the next page of data.
* same query and scopes used in the current request) to retrieve the next page of data.
*
* @param skipToken the skipToken value to set.
* @return the QueryResponseInner object itself.
Expand All @@ -141,7 +141,7 @@ public QueryResponseInner withSkipToken(String skipToken) {
}

/**
* Get the data property: Query output in tabular format.
* Get the data property: Query output in JObject array or Table format.
*
* @return the data value.
*/
Expand All @@ -150,7 +150,7 @@ public Object data() {
}

/**
* Set the data property: Query output in tabular format.
* Set the data property: Query output in JObject array or Table format.
*
* @param data the data value to set.
* @return the QueryResponseInner object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private Mono<PagedResponse<OperationInner>> listSinglePageAsync() {
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public OperationsClient getOperations() {
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
this.apiVersion = "2019-04-01";
this.apiVersion = "2021-03-01";
this.resourceProviders = new ResourceProvidersClientImpl(this);
this.operations = new OperationsClientImpl(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Mono<Response<QueryResponseInner>> resources(
}

/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -94,11 +94,11 @@ private Mono<Response<QueryResponseInner>> resourcesWithResponseAsync(QueryReque
.withContext(
context ->
service.resources(this.client.getEndpoint(), this.client.getApiVersion(), query, accept, context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}

/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @param context The context to associate with this operation.
Expand Down Expand Up @@ -126,7 +126,7 @@ private Mono<Response<QueryResponseInner>> resourcesWithResponseAsync(QueryReque
}

/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -148,7 +148,7 @@ private Mono<QueryResponseInner> resourcesAsync(QueryRequest query) {
}

/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -162,7 +162,7 @@ public QueryResponseInner resources(QueryRequest query) {
}

/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @param context The context to associate with this operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public final class FacetResult extends Facet {
private int count;

/*
* A table containing the desired facets. Only present if the facet is
* valid.
* A JObject array or Table containing the desired facets. Only present if
* the facet is valid.
*/
@JsonProperty(value = "data", required = true)
private Object data;
Expand Down Expand Up @@ -78,7 +78,8 @@ public FacetResult withCount(int count) {
}

/**
* Get the data property: A table containing the desired facets. Only present if the facet is valid.
* Get the data property: A JObject array or Table containing the desired facets. Only present if the facet is
* valid.
*
* @return the data value.
*/
Expand All @@ -87,7 +88,8 @@ public Object data() {
}

/**
* Set the data property: A table containing the desired facets. Only present if the facet is valid.
* Set the data property: A JObject array or Table containing the desired facets. Only present if the facet is
* valid.
*
* @param data the data value to set.
* @return the FacetResult object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ public final class QueryRequest {
/*
* Azure subscriptions against which to execute the query.
*/
@JsonProperty(value = "subscriptions", required = true)
@JsonProperty(value = "subscriptions")
private List<String> subscriptions;

/*
* Azure management groups against which to execute the query. Example: [
* 'mg1', 'mg2' ]
*/
@JsonProperty(value = "managementGroups")
private List<String> managementGroups;

/*
* The resources query.
*/
Expand Down Expand Up @@ -59,6 +66,28 @@ public QueryRequest withSubscriptions(List<String> subscriptions) {
return this;
}

/**
* Get the managementGroups property: Azure management groups against which to execute the query. Example: [ 'mg1',
* 'mg2' ].
*
* @return the managementGroups value.
*/
public List<String> managementGroups() {
return this.managementGroups;
}

/**
* Set the managementGroups property: Azure management groups against which to execute the query. Example: [ 'mg1',
* 'mg2' ].
*
* @param managementGroups the managementGroups value to set.
* @return the QueryRequest object itself.
*/
public QueryRequest withManagementGroups(List<String> managementGroups) {
this.managementGroups = managementGroups;
return this;
}

/**
* Get the query property: The resources query.
*
Expand Down Expand Up @@ -125,11 +154,6 @@ public QueryRequest withFacets(List<FacetRequest> facets) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (subscriptions() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException("Missing required property subscriptions in model QueryRequest"));
}
if (query() == null) {
throw logger
.logExceptionAsError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ public final class QueryRequestOptions {
@JsonProperty(value = "resultFormat")
private ResultFormat resultFormat;

/*
* Only applicable for tenant and management group level queries to decide
* whether to allow partial scopes for result in case the number of
* subscriptions exceed allowed limits.
*/
@JsonProperty(value = "allowPartialScopes")
private Boolean allowPartialScopes;

/**
* Get the skipToken property: Continuation token for pagination, capturing the next page size and offset, as well
* as the context of the query.
Expand Down Expand Up @@ -127,6 +135,28 @@ public QueryRequestOptions withResultFormat(ResultFormat resultFormat) {
return this;
}

/**
* Get the allowPartialScopes property: Only applicable for tenant and management group level queries to decide
* whether to allow partial scopes for result in case the number of subscriptions exceed allowed limits.
*
* @return the allowPartialScopes value.
*/
public Boolean allowPartialScopes() {
return this.allowPartialScopes;
}

/**
* Set the allowPartialScopes property: Only applicable for tenant and management group level queries to decide
* whether to allow partial scopes for result in case the number of subscriptions exceed allowed limits.
*
* @param allowPartialScopes the allowPartialScopes value to set.
* @return the QueryRequestOptions object itself.
*/
public QueryRequestOptions withAllowPartialScopes(Boolean allowPartialScopes) {
this.allowPartialScopes = allowPartialScopes;
return this;
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ public interface QueryResponse {

/**
* Gets the skipToken property: When present, the value can be passed to a subsequent query call (together with the
* same query and subscriptions used in the current request) to retrieve the next page of data.
* same query and scopes used in the current request) to retrieve the next page of data.
*
* @return the skipToken value.
*/
String skipToken();

/**
* Gets the data property: Query output in tabular format.
* Gets the data property: Query output in JObject array or Table format.
*
* @return the data value.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Resource collection API of ResourceProviders. */
public interface ResourceProviders {
/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -21,7 +21,7 @@ public interface ResourceProviders {
QueryResponse resources(QueryRequest query);

/**
* Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
*
* @param query Request specifying query and its options.
* @param context The context to associate with this operation.
Expand Down

0 comments on commit 631145f

Please sign in to comment.