Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from Swagger imagebuilder#package-2…
Browse files Browse the repository at this point in the history
…024-02 (#43480)
  • Loading branch information
azure-sdk authored Dec 19, 2024
1 parent 5fe56c4 commit 7bb7a18
Show file tree
Hide file tree
Showing 29 changed files with 87 additions and 114 deletions.
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ com.azure.resourcemanager:azure-resourcemanager-labservices;1.0.0-beta.4;1.0.0-b
com.azure.resourcemanager:azure-resourcemanager-vmwarecloudsimple;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-managedapplications;1.0.0-beta.4;1.0.0-beta.5
com.azure.resourcemanager:azure-resourcemanager-videoanalyzer;1.0.0-beta.5;1.0.0-beta.6
com.azure.resourcemanager:azure-resourcemanager-imagebuilder;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-imagebuilder;1.1.0;1.2.0
com.azure.resourcemanager:azure-resourcemanager-maps;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-botservice;1.0.0-beta.6;1.0.0-beta.7
com.azure.resourcemanager:azure-resourcemanager-recoveryservicesbackup;1.4.0;1.5.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Release History

## 1.2.0-beta.1 (Unreleased)
## 1.2.0 (2024-12-19)

### Features Added
- Azure Resource Manager ImageBuilder client library for Java. This package contains Microsoft Azure SDK for ImageBuilder Management SDK. Azure Virtual Machine Image Builder Client. Package tag package-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Breaking Changes

### Bugs Fixed
#### `models.SourceImageTriggerProperties` was modified

### Other Changes
* `status()` was removed
* `provisioningState()` was removed

## 1.1.0 (2024-06-21)

Expand Down
13 changes: 5 additions & 8 deletions sdk/imagebuilder/azure-resourcemanager-imagebuilder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-imagebuilder</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

With above configuration, `azure` client can be authenticated using the following code:
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
Expand Down
13 changes: 7 additions & 6 deletions sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-imagebuilder</artifactId>
<version>1.2.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-imagebuilder;current} -->
<version>1.2.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-imagebuilder;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for ImageBuilder Management</name>
Expand Down Expand Up @@ -45,13 +45,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -74,6 +70,11 @@
<version>1.14.2</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resources</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
Expand Down Expand Up @@ -213,7 +213,7 @@ public ImageBuilderManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.imagebuilder")
.append("/")
.append("1.1.0");
.append("1.2.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
Expand Down Expand Up @@ -246,7 +246,7 @@ public ImageBuilderManager authenticate(TokenCredential credential, AzureProfile
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ public final class ImageTemplateInner extends Resource {
private SystemData systemData;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of ImageTemplateInner class.
Expand Down Expand Up @@ -107,13 +107,13 @@ public SystemData systemData() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -127,13 +127,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ public final class RunOutputInner extends ProxyResource {
private SystemData systemData;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of RunOutputInner class.
Expand All @@ -68,13 +68,13 @@ public SystemData systemData() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -88,13 +88,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ public final class TriggerInner extends ProxyResource {
private SystemData systemData;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of TriggerInner class.
Expand Down Expand Up @@ -79,13 +79,13 @@ public SystemData systemData() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -99,13 +99,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.exception.ManagementError;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public DistributeVersionerLatest withMajor(Integer major) {
*/
@Override
public void validate() {
super.validate();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public String scheme() {
*/
@Override
public void validate() {
super.validate();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public ImageTemplateFileCustomizer withName(String name) {
*/
@Override
public void validate() {
super.validate();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public ImageTemplateFileValidator withName(String name) {
*/
@Override
public void validate() {
super.validate();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ public ImageTemplateManagedImageDistributor withArtifactTags(Map<String, String>
*/
@Override
public void validate() {
super.validate();
if (imageId() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
Expand All @@ -124,6 +123,11 @@ public void validate() {
.log(new IllegalArgumentException(
"Missing required property location in model ImageTemplateManagedImageDistributor"));
}
if (runOutputName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property runOutputName in model ImageTemplateManagedImageDistributor"));
}
}

private static final ClientLogger LOGGER = new ClientLogger(ImageTemplateManagedImageDistributor.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public ImageTemplateManagedImageSource withImageId(String imageId) {
*/
@Override
public void validate() {
super.validate();
if (imageId() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ public ImageTemplatePlatformImageSource withPlanInfo(PlatformImagePurchasePlan p
*/
@Override
public void validate() {
super.validate();
if (planInfo() != null) {
planInfo().validate();
}
Expand Down
Loading

0 comments on commit 7bb7a18

Please sign in to comment.