Skip to content

Commit b4d70d6

Browse files
author
SDKAuto
committed
CodeGen from PR 34371 in Azure/azure-rest-api-specs
Merge 5a991e1ddde01c1ad3021a5d06676272f2ac00f5 into 37e1a52a30c527b6ad2d7ef09a9c82ad4491e8a2
1 parent 24808f3 commit b4d70d6

File tree

291 files changed

+3257
-11225
lines changed

Some content is hidden

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

291 files changed

+3257
-11225
lines changed

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

Lines changed: 1051 additions & 4 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager MediaServices client library for Java.
44

5-
This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-account-2023-01. 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 MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-metadata-2023-01. 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

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
MediaServicesManager manager = MediaServicesManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -154,5 +154,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
154154
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
155155
[coc]: https://opensource.microsoft.com/codeofconduct/
156156
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
157-
158-

sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md

Lines changed: 1921 additions & 1900 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for MediaServices Management</name>
21-
<description>This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-account-2023-01.</description>
21+
<description>This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-metadata-2023-01.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -46,7 +46,6 @@
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4848
<revapi.skip>true</revapi.skip>
49-
<spotless.skip>false</spotless.skip>
5049
</properties>
5150
<dependencies>
5251
<dependency>

sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.azure.core.http.HttpPipelinePosition;
1212
import com.azure.core.http.policy.AddDatePolicy;
1313
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
14+
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
1415
import com.azure.core.http.policy.HttpLogOptions;
1516
import com.azure.core.http.policy.HttpLoggingPolicy;
1617
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -19,9 +20,9 @@
1920
import com.azure.core.http.policy.RetryOptions;
2021
import com.azure.core.http.policy.RetryPolicy;
2122
import com.azure.core.http.policy.UserAgentPolicy;
22-
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.mediaservices.fluent.AzureMediaServices;
2728
import com.azure.resourcemanager.mediaservices.implementation.AccountFiltersImpl;
@@ -71,6 +72,7 @@
7172
import java.time.temporal.ChronoUnit;
7273
import java.util.ArrayList;
7374
import java.util.List;
75+
import java.util.Map;
7476
import java.util.Objects;
7577
import java.util.stream.Collectors;
7678

@@ -173,6 +175,9 @@ public static Configurable configure() {
173175
*/
174176
public static final class Configurable {
175177
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
178+
private static final String SDK_VERSION = "version";
179+
private static final Map<String, String> PROPERTIES
180+
= CoreUtils.getProperties("azure-resourcemanager-mediaservices.properties");
176181

177182
private HttpClient httpClient;
178183
private HttpLogOptions httpLogOptions;
@@ -280,12 +285,14 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil
280285
Objects.requireNonNull(credential, "'credential' cannot be null.");
281286
Objects.requireNonNull(profile, "'profile' cannot be null.");
282287

288+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
289+
283290
StringBuilder userAgentBuilder = new StringBuilder();
284291
userAgentBuilder.append("azsdk-java")
285292
.append("-")
286293
.append("com.azure.resourcemanager.mediaservices")
287294
.append("/")
288-
.append("2.4.0-beta.2");
295+
.append(clientVersion);
289296
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
290297
userAgentBuilder.append(" (")
291298
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -318,7 +325,7 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil
318325
HttpPolicyProviders.addBeforeRetryPolicies(policies);
319326
policies.add(retryPolicy);
320327
policies.add(new AddDatePolicy());
321-
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
328+
policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
322329
policies.addAll(this.policies.stream()
323330
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
324331
.collect(Collectors.toList()));

sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetInner.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,29 @@ public AssetStorageEncryptionFormat storageEncryptionFormat() {
227227
return this.innerProperties() == null ? null : this.innerProperties().storageEncryptionFormat();
228228
}
229229

230+
/**
231+
* Get the encryptionScope property: The Asset container encryption scope in the storage account.
232+
*
233+
* @return the encryptionScope value.
234+
*/
235+
public String encryptionScope() {
236+
return this.innerProperties() == null ? null : this.innerProperties().encryptionScope();
237+
}
238+
239+
/**
240+
* Set the encryptionScope property: The Asset container encryption scope in the storage account.
241+
*
242+
* @param encryptionScope the encryptionScope value to set.
243+
* @return the AssetInner object itself.
244+
*/
245+
public AssetInner withEncryptionScope(String encryptionScope) {
246+
if (this.innerProperties() == null) {
247+
this.innerProperties = new AssetProperties();
248+
}
249+
this.innerProperties().withEncryptionScope(encryptionScope);
250+
return this;
251+
}
252+
230253
/**
231254
* Validates the instance.
232255
*

sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/AssetProperties.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public final class AssetProperties implements JsonSerializable<AssetProperties>
6060
*/
6161
private AssetStorageEncryptionFormat storageEncryptionFormat;
6262

63+
/*
64+
* The Asset container encryption scope in the storage account.
65+
*/
66+
private String encryptionScope;
67+
6368
/**
6469
* Creates an instance of AssetProperties class.
6570
*/
@@ -182,6 +187,26 @@ public AssetStorageEncryptionFormat storageEncryptionFormat() {
182187
return this.storageEncryptionFormat;
183188
}
184189

190+
/**
191+
* Get the encryptionScope property: The Asset container encryption scope in the storage account.
192+
*
193+
* @return the encryptionScope value.
194+
*/
195+
public String encryptionScope() {
196+
return this.encryptionScope;
197+
}
198+
199+
/**
200+
* Set the encryptionScope property: The Asset container encryption scope in the storage account.
201+
*
202+
* @param encryptionScope the encryptionScope value to set.
203+
* @return the AssetProperties object itself.
204+
*/
205+
public AssetProperties withEncryptionScope(String encryptionScope) {
206+
this.encryptionScope = encryptionScope;
207+
return this;
208+
}
209+
185210
/**
186211
* Validates the instance.
187212
*
@@ -200,6 +225,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
200225
jsonWriter.writeStringField("description", this.description);
201226
jsonWriter.writeStringField("container", this.container);
202227
jsonWriter.writeStringField("storageAccountName", this.storageAccountName);
228+
jsonWriter.writeStringField("encryptionScope", this.encryptionScope);
203229
return jsonWriter.writeEndObject();
204230
}
205231

@@ -238,6 +264,8 @@ public static AssetProperties fromJson(JsonReader jsonReader) throws IOException
238264
} else if ("storageEncryptionFormat".equals(fieldName)) {
239265
deserializedAssetProperties.storageEncryptionFormat
240266
= AssetStorageEncryptionFormat.fromString(reader.getString());
267+
} else if ("encryptionScope".equals(fieldName)) {
268+
deserializedAssetProperties.encryptionScope = reader.getString();
241269
} else {
242270
reader.skipChildren();
243271
}

sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private Mono<PagedResponse<AccountFilterInner>> listSinglePageAsync(String resou
155155
if (accountName == null) {
156156
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
157157
}
158-
final String apiVersion = "2022-08-01";
158+
final String apiVersion = "2023-01-01";
159159
final String accept = "application/json";
160160
return FluxUtil
161161
.withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -197,7 +197,7 @@ private Mono<PagedResponse<AccountFilterInner>> listSinglePageAsync(String resou
197197
if (accountName == null) {
198198
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
199199
}
200-
final String apiVersion = "2022-08-01";
200+
final String apiVersion = "2023-01-01";
201201
final String accept = "application/json";
202202
context = this.client.mergeContext(context);
203203
return service
@@ -314,7 +314,7 @@ private Mono<Response<AccountFilterInner>> getWithResponseAsync(String resourceG
314314
if (filterName == null) {
315315
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
316316
}
317-
final String apiVersion = "2022-08-01";
317+
final String apiVersion = "2023-01-01";
318318
final String accept = "application/json";
319319
return FluxUtil
320320
.withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -358,7 +358,7 @@ private Mono<Response<AccountFilterInner>> getWithResponseAsync(String resourceG
358358
if (filterName == null) {
359359
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
360360
}
361-
final String apiVersion = "2022-08-01";
361+
final String apiVersion = "2023-01-01";
362362
final String accept = "application/json";
363363
context = this.client.mergeContext(context);
364364
return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName,
@@ -462,7 +462,7 @@ private Mono<Response<AccountFilterInner>> createOrUpdateWithResponseAsync(Strin
462462
} else {
463463
parameters.validate();
464464
}
465-
final String apiVersion = "2022-08-01";
465+
final String apiVersion = "2023-01-01";
466466
final String accept = "application/json";
467467
return FluxUtil
468468
.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -511,7 +511,7 @@ private Mono<Response<AccountFilterInner>> createOrUpdateWithResponseAsync(Strin
511511
} else {
512512
parameters.validate();
513513
}
514-
final String apiVersion = "2022-08-01";
514+
final String apiVersion = "2023-01-01";
515515
final String accept = "application/json";
516516
context = this.client.mergeContext(context);
517517
return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
@@ -615,7 +615,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S
615615
if (filterName == null) {
616616
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
617617
}
618-
final String apiVersion = "2022-08-01";
618+
final String apiVersion = "2023-01-01";
619619
final String accept = "application/json";
620620
return FluxUtil
621621
.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -658,7 +658,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S
658658
if (filterName == null) {
659659
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
660660
}
661-
final String apiVersion = "2022-08-01";
661+
final String apiVersion = "2023-01-01";
662662
final String accept = "application/json";
663663
context = this.client.mergeContext(context);
664664
return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
@@ -760,7 +760,7 @@ private Mono<Response<AccountFilterInner>> updateWithResponseAsync(String resour
760760
} else {
761761
parameters.validate();
762762
}
763-
final String apiVersion = "2022-08-01";
763+
final String apiVersion = "2023-01-01";
764764
final String accept = "application/json";
765765
return FluxUtil
766766
.withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -809,7 +809,7 @@ private Mono<Response<AccountFilterInner>> updateWithResponseAsync(String resour
809809
} else {
810810
parameters.validate();
811811
}
812-
final String apiVersion = "2022-08-01";
812+
final String apiVersion = "2023-01-01";
813813
final String accept = "application/json";
814814
context = this.client.mergeContext(context);
815815
return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,

sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private Mono<PagedResponse<AssetFilterInner>> listSinglePageAsync(String resourc
161161
if (assetName == null) {
162162
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
163163
}
164-
final String apiVersion = "2022-08-01";
164+
final String apiVersion = "2023-01-01";
165165
final String accept = "application/json";
166166
return FluxUtil
167167
.withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -207,7 +207,7 @@ private Mono<PagedResponse<AssetFilterInner>> listSinglePageAsync(String resourc
207207
if (assetName == null) {
208208
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
209209
}
210-
final String apiVersion = "2022-08-01";
210+
final String apiVersion = "2023-01-01";
211211
final String accept = "application/json";
212212
context = this.client.mergeContext(context);
213213
return service
@@ -334,7 +334,7 @@ private Mono<Response<AssetFilterInner>> getWithResponseAsync(String resourceGro
334334
if (filterName == null) {
335335
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
336336
}
337-
final String apiVersion = "2022-08-01";
337+
final String apiVersion = "2023-01-01";
338338
final String accept = "application/json";
339339
return FluxUtil
340340
.withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -382,7 +382,7 @@ private Mono<Response<AssetFilterInner>> getWithResponseAsync(String resourceGro
382382
if (filterName == null) {
383383
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
384384
}
385-
final String apiVersion = "2022-08-01";
385+
final String apiVersion = "2023-01-01";
386386
final String accept = "application/json";
387387
context = this.client.mergeContext(context);
388388
return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName,
@@ -495,7 +495,7 @@ private Mono<Response<AssetFilterInner>> createOrUpdateWithResponseAsync(String
495495
} else {
496496
parameters.validate();
497497
}
498-
final String apiVersion = "2022-08-01";
498+
final String apiVersion = "2023-01-01";
499499
final String accept = "application/json";
500500
return FluxUtil
501501
.withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -548,7 +548,7 @@ private Mono<Response<AssetFilterInner>> createOrUpdateWithResponseAsync(String
548548
} else {
549549
parameters.validate();
550550
}
551-
final String apiVersion = "2022-08-01";
551+
final String apiVersion = "2023-01-01";
552552
final String accept = "application/json";
553553
context = this.client.mergeContext(context);
554554
return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
@@ -660,7 +660,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S
660660
if (filterName == null) {
661661
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
662662
}
663-
final String apiVersion = "2022-08-01";
663+
final String apiVersion = "2023-01-01";
664664
final String accept = "application/json";
665665
return FluxUtil
666666
.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -707,7 +707,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S
707707
if (filterName == null) {
708708
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
709709
}
710-
final String apiVersion = "2022-08-01";
710+
final String apiVersion = "2023-01-01";
711711
final String accept = "application/json";
712712
context = this.client.mergeContext(context);
713713
return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
@@ -817,7 +817,7 @@ private Mono<Response<AssetFilterInner>> updateWithResponseAsync(String resource
817817
} else {
818818
parameters.validate();
819819
}
820-
final String apiVersion = "2022-08-01";
820+
final String apiVersion = "2023-01-01";
821821
final String accept = "application/json";
822822
return FluxUtil
823823
.withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
@@ -870,7 +870,7 @@ private Mono<Response<AssetFilterInner>> updateWithResponseAsync(String resource
870870
} else {
871871
parameters.validate();
872872
}
873-
final String apiVersion = "2022-08-01";
873+
final String apiVersion = "2023-01-01";
874874
final String accept = "application/json";
875875
context = this.client.mergeContext(context);
876876
return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,

0 commit comments

Comments
 (0)