Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2023-10-12)

- 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-preview-2023-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
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-2021-03. 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-preview-2023-09. 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 Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resourcegraph</artifactId>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -117,3 +117,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fresourcegraph%2Fazure-resourcemanager-resourcegraph%2FREADME.png)
312 changes: 282 additions & 30 deletions sdk/resourcegraph/azure-resourcemanager-resourcegraph/SAMPLE.md

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions sdk/resourcegraph/azure-resourcemanager-resourcegraph/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand All @@ -13,7 +18,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-2021-03.</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-preview-2023-09.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -38,7 +43,9 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.resourcegraph.fluent.ResourceGraphClient;
import com.azure.resourcemanager.resourcegraph.implementation.OperationsImpl;
import com.azure.resourcemanager.resourcegraph.implementation.QueriesImpl;
import com.azure.resourcemanager.resourcegraph.implementation.ResourceGraphClientBuilder;
import com.azure.resourcemanager.resourcegraph.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.resourcegraph.models.Operations;
import com.azure.resourcemanager.resourcegraph.models.Queries;
import com.azure.resourcemanager.resourcegraph.models.ResourceProviders;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
Expand All @@ -38,6 +40,8 @@

/** Entry point to ResourceGraphManager. Azure Resource Graph API Reference. */
public final class ResourceGraphManager {
private Queries queries;

private ResourceProviders resourceProviders;

private Operations operations;
Expand Down Expand Up @@ -206,7 +210,7 @@ public ResourceGraphManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.resourcegraph")
.append("/")
.append("1.0.0");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -263,6 +267,18 @@ public ResourceGraphManager authenticate(TokenCredential credential, AzureProfil
}
}

/**
* Gets the resource collection API of Queries.
*
* @return Resource collection API of Queries.
*/
public Queries queries() {
if (this.queries == null) {
this.queries = new QueriesImpl(clientObject.getQueries(), this);
}
return queries;
}

/**
* Gets the resource collection API of ResourceProviders.
*
Expand All @@ -288,8 +304,10 @@ public Operations operations() {
}

/**
* @return Wrapped service client ResourceGraphClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
* Gets wrapped service client ResourceGraphClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
* @return Wrapped service client ResourceGraphClient.
*/
public ResourceGraphClient serviceClient() {
return this.clientObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resourcegraph.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.resourcegraph.fluent.models.QueryGenerationResponseInner;
import com.azure.resourcemanager.resourcegraph.models.QueryGenerationRequest;

/** An instance of this class provides access to all the operations defined in QueriesClient. */
public interface QueriesClient {
/**
* Generates ARG query for a given user prompt.
*
* @param body Query Generation Request.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return query Generation Response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<QueryGenerationResponseInner> generateQueryWithResponse(QueryGenerationRequest body, Context context);

/**
* Generates ARG query for a given user prompt.
*
* @param body Query Generation Request.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return query Generation Response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
QueryGenerationResponseInner generateQuery(QueryGenerationRequest body);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ public interface ResourceGraphClient {
String getEndpoint();

/**
* Gets Api Version.
* Gets server parameter.
*
* @return the apiVersion value.
* @return the endpoint value.
*/
String getApiVersion();
String getEndpoint();

/**
* Gets The HTTP pipeline to send requests through.
Expand All @@ -37,6 +37,13 @@ public interface ResourceGraphClient {
*/
Duration getDefaultPollInterval();

/**
* Gets the QueriesClient object to access its operations.
*
* @return the QueriesClient object.
*/
QueriesClient getQueries();

/**
* Gets the ResourceProvidersClient object to access its operations.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.resourcegraph.fluent.models.QueryResponseInner;
import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeDataInner;
import com.azure.resourcemanager.resourcegraph.fluent.models.ResourceChangeListInner;
import com.azure.resourcemanager.resourcegraph.models.QueryRequest;
import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDetailsRequestParameters;
import com.azure.resourcemanager.resourcegraph.models.ResourceChangesRequestParameters;
import com.azure.resourcemanager.resourcegraph.models.ResourcesHistoryRequest;
import java.util.List;
import java.util.Map;

/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
public interface ResourceProvidersClient {
Expand Down Expand Up @@ -37,4 +44,81 @@ public interface ResourceProvidersClient {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
QueryResponseInner resources(QueryRequest query);

/**
* List all snapshots of a resource for a given time interval.
*
* @param request Request specifying the query and its options.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return dictionary of &lt;any&gt; along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Map<String, Object>> resourcesHistoryWithResponse(ResourcesHistoryRequest request, Context context);

/**
* List all snapshots of a resource for a given time interval.
*
* @param request Request specifying the query and its options.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return dictionary of &lt;any&gt;.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Map<String, Object> resourcesHistory(ResourcesHistoryRequest request);

/**
* List changes to a resource for a given time interval.
*
* @param parameters the parameters for this request for changes.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of changes associated with a resource over a specific time interval along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ResourceChangeListInner> resourceChangesWithResponse(
ResourceChangesRequestParameters parameters, Context context);

/**
* List changes to a resource for a given time interval.
*
* @param parameters the parameters for this request for changes.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of changes associated with a resource over a specific time interval.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ResourceChangeListInner resourceChanges(ResourceChangesRequestParameters parameters);

/**
* Get resource change details.
*
* @param parameters The parameters for this request for resource change details.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return resource change details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<List<ResourceChangeDataInner>> resourceChangeDetailsWithResponse(
ResourceChangeDetailsRequestParameters parameters, Context context);

/**
* Get resource change details.
*
* @param parameters The parameters for this request for resource change details.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return resource change details.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
List<ResourceChangeDataInner> resourceChangeDetails(ResourceChangeDetailsRequestParameters parameters);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resourcegraph.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.resourcegraph.models.StatusResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Query Generation Response. */
@Fluent
public final class QueryGenerationResponseInner {
/*
* Query generated for a given user prompt text
*/
@JsonProperty(value = "query", required = true)
private String query;

/*
* Status for the query generation result
*/
@JsonProperty(value = "status", required = true)
private StatusResponse status;

/** Creates an instance of QueryGenerationResponseInner class. */
public QueryGenerationResponseInner() {
}

/**
* Get the query property: Query generated for a given user prompt text.
*
* @return the query value.
*/
public String query() {
return this.query;
}

/**
* Set the query property: Query generated for a given user prompt text.
*
* @param query the query value to set.
* @return the QueryGenerationResponseInner object itself.
*/
public QueryGenerationResponseInner withQuery(String query) {
this.query = query;
return this;
}

/**
* Get the status property: Status for the query generation result.
*
* @return the status value.
*/
public StatusResponse status() {
return this.status;
}

/**
* Set the status property: Status for the query generation result.
*
* @param status the status value to set.
* @return the QueryGenerationResponseInner object itself.
*/
public QueryGenerationResponseInner withStatus(StatusResponse status) {
this.status = status;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (query() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property query in model QueryGenerationResponseInner"));
}
if (status() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property status in model QueryGenerationResponseInner"));
} else {
status().validate();
}
}

private static final ClientLogger LOGGER = new ClientLogger(QueryGenerationResponseInner.class);
}
Loading