Skip to content

Commit d805c3a

Browse files
author
SDKAuto
committed
CodeGen from PR 15424 in Azure/azure-rest-api-specs
Merge bdd6ea27462880a3ed90dd464fb838755300586d into 74dbcfee45a6634d0043e478aba324796d98940c
1 parent 1ef5de6 commit d805c3a

File tree

53 files changed

+1155
-2572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1155
-2572
lines changed

sdk/batch/azure-resourcemanager-batch/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 1.0.0-beta.1 (2021-07-29)
4+
5+
- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
6+
37
## 1.0.0-beta.2 (2021-07-29)
48

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

sdk/batch/azure-resourcemanager-batch/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager Batch client library for Java.
44

5-
This package contains Microsoft Azure SDK for Batch Management SDK. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77-
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/SAMPLE.md)
7877

7978

8079
## Troubleshooting

sdk/batch/azure-resourcemanager-batch/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for Batch Management</name>
16-
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-06.</description>
16+
<description>This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2021-06.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
import com.azure.core.management.profile.AzureProfile;
2121
import com.azure.core.util.Configuration;
2222
import com.azure.core.util.logging.ClientLogger;
23-
import com.azure.resourcemanager.batch.fluent.BatchManagement;
23+
import com.azure.resourcemanager.batch.fluent.BatchManagementClient;
2424
import com.azure.resourcemanager.batch.implementation.ApplicationPackagesImpl;
2525
import com.azure.resourcemanager.batch.implementation.ApplicationsImpl;
2626
import com.azure.resourcemanager.batch.implementation.BatchAccountsImpl;
27-
import com.azure.resourcemanager.batch.implementation.BatchManagementBuilder;
27+
import com.azure.resourcemanager.batch.implementation.BatchManagementClientBuilder;
2828
import com.azure.resourcemanager.batch.implementation.CertificatesImpl;
2929
import com.azure.resourcemanager.batch.implementation.LocationsImpl;
3030
import com.azure.resourcemanager.batch.implementation.OperationsImpl;
@@ -46,7 +46,7 @@
4646
import java.util.List;
4747
import java.util.Objects;
4848

49-
/** Entry point to BatchManager. */
49+
/** Entry point to BatchManager. Batch Client. */
5050
public final class BatchManager {
5151
private BatchAccounts batchAccounts;
5252

@@ -66,13 +66,13 @@ public final class BatchManager {
6666

6767
private Pools pools;
6868

69-
private final BatchManagement clientObject;
69+
private final BatchManagementClient clientObject;
7070

7171
private BatchManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
7272
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
7373
Objects.requireNonNull(profile, "'profile' cannot be null.");
7474
this.clientObject =
75-
new BatchManagementBuilder()
75+
new BatchManagementClientBuilder()
7676
.pipeline(httpPipeline)
7777
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
7878
.subscriptionId(profile.getSubscriptionId())
@@ -202,7 +202,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
202202
.append("-")
203203
.append("com.azure.resourcemanager.batch")
204204
.append("/")
205-
.append("1.0.0-beta.2");
205+
.append("1.0.0-beta.1");
206206
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
207207
userAgentBuilder
208208
.append(" (")
@@ -315,10 +315,10 @@ public Pools pools() {
315315
}
316316

317317
/**
318-
* @return Wrapped service client BatchManagement providing direct access to the underlying auto-generated API
318+
* @return Wrapped service client BatchManagementClient providing direct access to the underlying auto-generated API
319319
* implementation, based on Azure REST API.
320320
*/
321-
public BatchManagement serviceClient() {
321+
public BatchManagementClient serviceClient() {
322322
return this.clientObject;
323323
}
324324
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import com.azure.core.http.HttpPipeline;
88
import java.time.Duration;
99

10-
/** The interface for BatchManagement class. */
11-
public interface BatchManagement {
10+
/** The interface for BatchManagementClient class. */
11+
public interface BatchManagementClient {
1212
/**
1313
* Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
1414
*

sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,52 @@
55
package com.azure.resourcemanager.batch.fluent.models;
66

77
import com.azure.core.annotation.Fluent;
8+
import com.azure.core.annotation.JsonFlatten;
89
import com.azure.core.management.ProxyResource;
910
import com.azure.core.util.logging.ClientLogger;
1011
import com.fasterxml.jackson.annotation.JsonIgnore;
1112
import com.fasterxml.jackson.annotation.JsonProperty;
1213

1314
/** Contains information about an application in a Batch account. */
15+
@JsonFlatten
1416
@Fluent
15-
public final class ApplicationInner extends ProxyResource {
17+
public class ApplicationInner extends ProxyResource {
1618
@JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationInner.class);
1719

1820
/*
19-
* The properties associated with the Application.
21+
* The display name for the application.
2022
*/
21-
@JsonProperty(value = "properties")
22-
private ApplicationProperties innerProperties;
23+
@JsonProperty(value = "properties.displayName")
24+
private String displayName;
2325

2426
/*
25-
* The ETag of the resource, used for concurrency statements.
27+
* A value indicating whether packages within the application may be
28+
* overwritten using the same version string.
2629
*/
27-
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
28-
private String etag;
30+
@JsonProperty(value = "properties.allowUpdates")
31+
private Boolean allowUpdates;
2932

30-
/**
31-
* Get the innerProperties property: The properties associated with the Application.
32-
*
33-
* @return the innerProperties value.
33+
/*
34+
* The package to use if a client requests the application but does not
35+
* specify a version. This property can only be set to the name of an
36+
* existing package.
3437
*/
35-
private ApplicationProperties innerProperties() {
36-
return this.innerProperties;
37-
}
38+
@JsonProperty(value = "properties.defaultVersion")
39+
private String defaultVersion;
3840

39-
/**
40-
* Get the etag property: The ETag of the resource, used for concurrency statements.
41-
*
42-
* @return the etag value.
41+
/*
42+
* The ETag of the resource, used for concurrency statements.
4343
*/
44-
public String etag() {
45-
return this.etag;
46-
}
44+
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
45+
private String etag;
4746

4847
/**
4948
* Get the displayName property: The display name for the application.
5049
*
5150
* @return the displayName value.
5251
*/
5352
public String displayName() {
54-
return this.innerProperties() == null ? null : this.innerProperties().displayName();
53+
return this.displayName;
5554
}
5655

5756
/**
@@ -61,10 +60,7 @@ public String displayName() {
6160
* @return the ApplicationInner object itself.
6261
*/
6362
public ApplicationInner withDisplayName(String displayName) {
64-
if (this.innerProperties() == null) {
65-
this.innerProperties = new ApplicationProperties();
66-
}
67-
this.innerProperties().withDisplayName(displayName);
63+
this.displayName = displayName;
6864
return this;
6965
}
7066

@@ -75,7 +71,7 @@ public ApplicationInner withDisplayName(String displayName) {
7571
* @return the allowUpdates value.
7672
*/
7773
public Boolean allowUpdates() {
78-
return this.innerProperties() == null ? null : this.innerProperties().allowUpdates();
74+
return this.allowUpdates;
7975
}
8076

8177
/**
@@ -86,10 +82,7 @@ public Boolean allowUpdates() {
8682
* @return the ApplicationInner object itself.
8783
*/
8884
public ApplicationInner withAllowUpdates(Boolean allowUpdates) {
89-
if (this.innerProperties() == null) {
90-
this.innerProperties = new ApplicationProperties();
91-
}
92-
this.innerProperties().withAllowUpdates(allowUpdates);
85+
this.allowUpdates = allowUpdates;
9386
return this;
9487
}
9588

@@ -100,7 +93,7 @@ public ApplicationInner withAllowUpdates(Boolean allowUpdates) {
10093
* @return the defaultVersion value.
10194
*/
10295
public String defaultVersion() {
103-
return this.innerProperties() == null ? null : this.innerProperties().defaultVersion();
96+
return this.defaultVersion;
10497
}
10598

10699
/**
@@ -111,21 +104,24 @@ public String defaultVersion() {
111104
* @return the ApplicationInner object itself.
112105
*/
113106
public ApplicationInner withDefaultVersion(String defaultVersion) {
114-
if (this.innerProperties() == null) {
115-
this.innerProperties = new ApplicationProperties();
116-
}
117-
this.innerProperties().withDefaultVersion(defaultVersion);
107+
this.defaultVersion = defaultVersion;
118108
return this;
119109
}
120110

111+
/**
112+
* Get the etag property: The ETag of the resource, used for concurrency statements.
113+
*
114+
* @return the etag value.
115+
*/
116+
public String etag() {
117+
return this.etag;
118+
}
119+
121120
/**
122121
* Validates the instance.
123122
*
124123
* @throws IllegalArgumentException thrown if the instance is not valid.
125124
*/
126125
public void validate() {
127-
if (innerProperties() != null) {
128-
innerProperties().validate();
129-
}
130126
}
131127
}

sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java

Lines changed: 46 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
package com.azure.resourcemanager.batch.fluent.models;
66

7-
import com.azure.core.annotation.Fluent;
7+
import com.azure.core.annotation.Immutable;
8+
import com.azure.core.annotation.JsonFlatten;
89
import com.azure.core.management.ProxyResource;
910
import com.azure.core.util.logging.ClientLogger;
1011
import com.azure.resourcemanager.batch.models.PackageState;
@@ -13,47 +14,55 @@
1314
import java.time.OffsetDateTime;
1415

1516
/** An application package which represents a particular version of an application. */
16-
@Fluent
17-
public final class ApplicationPackageInner extends ProxyResource {
17+
@JsonFlatten
18+
@Immutable
19+
public class ApplicationPackageInner extends ProxyResource {
1820
@JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationPackageInner.class);
1921

2022
/*
21-
* The properties associated with the Application Package.
23+
* The current state of the application package.
2224
*/
23-
@JsonProperty(value = "properties")
24-
private ApplicationPackageProperties innerProperties;
25+
@JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
26+
private PackageState state;
2527

2628
/*
27-
* The ETag of the resource, used for concurrency statements.
29+
* The format of the application package, if the package is active.
2830
*/
29-
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
30-
private String etag;
31+
@JsonProperty(value = "properties.format", access = JsonProperty.Access.WRITE_ONLY)
32+
private String format;
3133

32-
/**
33-
* Get the innerProperties property: The properties associated with the Application Package.
34-
*
35-
* @return the innerProperties value.
34+
/*
35+
* The URL for the application package in Azure Storage.
3636
*/
37-
private ApplicationPackageProperties innerProperties() {
38-
return this.innerProperties;
39-
}
37+
@JsonProperty(value = "properties.storageUrl", access = JsonProperty.Access.WRITE_ONLY)
38+
private String storageUrl;
4039

41-
/**
42-
* Get the etag property: The ETag of the resource, used for concurrency statements.
43-
*
44-
* @return the etag value.
40+
/*
41+
* The UTC time at which the Azure Storage URL will expire.
4542
*/
46-
public String etag() {
47-
return this.etag;
48-
}
43+
@JsonProperty(value = "properties.storageUrlExpiry", access = JsonProperty.Access.WRITE_ONLY)
44+
private OffsetDateTime storageUrlExpiry;
45+
46+
/*
47+
* The time at which the package was last activated, if the package is
48+
* active.
49+
*/
50+
@JsonProperty(value = "properties.lastActivationTime", access = JsonProperty.Access.WRITE_ONLY)
51+
private OffsetDateTime lastActivationTime;
52+
53+
/*
54+
* The ETag of the resource, used for concurrency statements.
55+
*/
56+
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
57+
private String etag;
4958

5059
/**
5160
* Get the state property: The current state of the application package.
5261
*
5362
* @return the state value.
5463
*/
5564
public PackageState state() {
56-
return this.innerProperties() == null ? null : this.innerProperties().state();
65+
return this.state;
5766
}
5867

5968
/**
@@ -62,7 +71,7 @@ public PackageState state() {
6271
* @return the format value.
6372
*/
6473
public String format() {
65-
return this.innerProperties() == null ? null : this.innerProperties().format();
74+
return this.format;
6675
}
6776

6877
/**
@@ -71,7 +80,7 @@ public String format() {
7180
* @return the storageUrl value.
7281
*/
7382
public String storageUrl() {
74-
return this.innerProperties() == null ? null : this.innerProperties().storageUrl();
83+
return this.storageUrl;
7584
}
7685

7786
/**
@@ -80,7 +89,7 @@ public String storageUrl() {
8089
* @return the storageUrlExpiry value.
8190
*/
8291
public OffsetDateTime storageUrlExpiry() {
83-
return this.innerProperties() == null ? null : this.innerProperties().storageUrlExpiry();
92+
return this.storageUrlExpiry;
8493
}
8594

8695
/**
@@ -89,7 +98,16 @@ public OffsetDateTime storageUrlExpiry() {
8998
* @return the lastActivationTime value.
9099
*/
91100
public OffsetDateTime lastActivationTime() {
92-
return this.innerProperties() == null ? null : this.innerProperties().lastActivationTime();
101+
return this.lastActivationTime;
102+
}
103+
104+
/**
105+
* Get the etag property: The ETag of the resource, used for concurrency statements.
106+
*
107+
* @return the etag value.
108+
*/
109+
public String etag() {
110+
return this.etag;
93111
}
94112

95113
/**
@@ -98,8 +116,5 @@ public OffsetDateTime lastActivationTime() {
98116
* @throws IllegalArgumentException thrown if the instance is not valid.
99117
*/
100118
public void validate() {
101-
if (innerProperties() != null) {
102-
innerProperties().validate();
103-
}
104119
}
105120
}

0 commit comments

Comments
 (0)