From d46f020b99e878c180b7157c5c67f5e2efd0b5c8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 22 Oct 2021 18:01:48 +0000 Subject: [PATCH] CodeGen from PR 16513 in Azure/azure-rest-api-specs Merge 009c3d6255c3ce6a2c5c79ddc55e78df69541b6b into 2c6bb907c749885e933bdb4e1a40f71bd9a60c3a --- .../CHANGELOG.md | 4 ++- .../README.md | 2 +- .../SAMPLE.md | 12 +++++-- .../videoanalyzer/VideoAnalyzerManager.java | 2 +- .../fluent/models/VideoEntityInner.java | 14 +++++++++ .../fluent/models/VideoProperties.java | 13 +++++++- .../implementation/VideoEntityImpl.java | 5 +++ .../videoanalyzer/models/VideoEntity.java | 31 +++++++++++++++++-- .../videoanalyzer/models/VideoMediaInfo.java | 21 +++++++++++-- ...geModulesListProvisioningTokenSamples.java | 2 +- .../PipelineJobsCreateOrUpdateSamples.java | 3 +- ...pelineTopologiesCreateOrUpdateSamples.java | 7 ++++- 12 files changed, 101 insertions(+), 15 deletions(-) diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md index 5ffdaa25bf98..d9ca76aa25ea 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2021-10-22) + +- Azure Resource Manager Video Analyzer client library for Java. This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md index 416a561e22cd..974b80347ddb 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-videoanalyzer - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/SAMPLE.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/SAMPLE.md index 375734d6ba7b..22df3777aa9c 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/SAMPLE.md +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/SAMPLE.md @@ -392,7 +392,7 @@ public final class EdgeModulesListProvisioningTokenSamples { "testaccount2", "edgeModule1", new ListProvisioningTokenInput() - .withExpirationDate(OffsetDateTime.parse("3021-01-23T11:04:49.0526841-08:00")), + .withExpirationDate(OffsetDateTime.parse("2023-01-23T11:04:49.0526841-08:00")), Context.NONE); } } @@ -768,7 +768,8 @@ public final class PipelineJobsCreateOrUpdateSamples { .asList( new ParameterDefinition() .withName("timesequences") - .withValue("[[2020-10-05T03:30:00Z, 2020-10-05T04:30:00Z]]"))) + .withValue("[[\"2020-10-05T03:30:00Z\", \"2020-10-05T04:30:00Z\"]]"), + new ParameterDefinition().withName("videoSourceName").withValue("camera001"))) .create(); } } @@ -875,6 +876,7 @@ import com.azure.resourcemanager.videoanalyzer.models.SkuName; import com.azure.resourcemanager.videoanalyzer.models.UnsecuredEndpoint; import com.azure.resourcemanager.videoanalyzer.models.UsernamePasswordCredentials; import com.azure.resourcemanager.videoanalyzer.models.VideoCreationProperties; +import com.azure.resourcemanager.videoanalyzer.models.VideoPublishingOptions; import com.azure.resourcemanager.videoanalyzer.models.VideoSink; import java.util.Arrays; @@ -934,7 +936,11 @@ public final class PipelineTopologiesCreateOrUpdateSamples { new VideoCreationProperties() .withTitle("Parking Lot (Camera 1)") .withDescription("Parking lot south entrance") - .withSegmentLength("PT30S")))) + .withSegmentLength("PT30S")) + .withVideoPublishingOptions( + new VideoPublishingOptions() + .withDisableArchive("false") + .withDisableRtspPublishing("true")))) .create(); } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java index 5e95c7a452fd..52d9a6fd1b83 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java @@ -237,7 +237,7 @@ public VideoAnalyzerManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.videoanalyzer") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java index bc34dfd1a272..947e042683ea 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java @@ -143,6 +143,20 @@ public VideoMediaInfo mediaInfo() { return this.innerProperties() == null ? null : this.innerProperties().mediaInfo(); } + /** + * Set the mediaInfo property: Contains information about the video and audio content. + * + * @param mediaInfo the mediaInfo value to set. + * @return the VideoEntityInner object itself. + */ + public VideoEntityInner withMediaInfo(VideoMediaInfo mediaInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new VideoProperties(); + } + this.innerProperties().withMediaInfo(mediaInfo); + return this; + } + /** * Get the archival property: Video archival properties. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoProperties.java index 036ef0608473..916790338e95 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoProperties.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoProperties.java @@ -56,7 +56,7 @@ public final class VideoProperties { /* * Contains information about the video and audio content. */ - @JsonProperty(value = "mediaInfo", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "mediaInfo") private VideoMediaInfo mediaInfo; /* @@ -145,6 +145,17 @@ public VideoMediaInfo mediaInfo() { return this.mediaInfo; } + /** + * Set the mediaInfo property: Contains information about the video and audio content. + * + * @param mediaInfo the mediaInfo value to set. + * @return the VideoProperties object itself. + */ + public VideoProperties withMediaInfo(VideoMediaInfo mediaInfo) { + this.mediaInfo = mediaInfo; + return this; + } + /** * Get the archival property: Video archival properties. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java index caf127e69c68..f2f5cfaacdfa 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java @@ -182,6 +182,11 @@ public VideoEntityImpl withDescription(String description) { return this; } + public VideoEntityImpl withMediaInfo(VideoMediaInfo mediaInfo) { + this.innerModel().withMediaInfo(mediaInfo); + return this; + } + public VideoEntityImpl withArchival(VideoArchival archival) { this.innerModel().withArchival(archival); return this; diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java index 6941826cf3db..5814fe28d3eb 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java @@ -123,7 +123,10 @@ interface WithParentResource { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTitle, DefinitionStages.WithDescription, DefinitionStages.WithArchival { + extends DefinitionStages.WithTitle, + DefinitionStages.WithDescription, + DefinitionStages.WithMediaInfo, + DefinitionStages.WithArchival { /** * Executes the create request. * @@ -162,6 +165,16 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the VideoEntity definition allowing to specify mediaInfo. */ + interface WithMediaInfo { + /** + * Specifies the mediaInfo property: Contains information about the video and audio content.. + * + * @param mediaInfo Contains information about the video and audio content. + * @return the next definition stage. + */ + WithCreate withMediaInfo(VideoMediaInfo mediaInfo); + } /** The stage of the VideoEntity definition allowing to specify archival. */ interface WithArchival { /** @@ -181,7 +194,11 @@ interface WithArchival { VideoEntity.Update update(); /** The template for VideoEntity update. */ - interface Update extends UpdateStages.WithTitle, UpdateStages.WithDescription, UpdateStages.WithArchival { + interface Update + extends UpdateStages.WithTitle, + UpdateStages.WithDescription, + UpdateStages.WithMediaInfo, + UpdateStages.WithArchival { /** * Executes the update request. * @@ -222,6 +239,16 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the VideoEntity update allowing to specify mediaInfo. */ + interface WithMediaInfo { + /** + * Specifies the mediaInfo property: Contains information about the video and audio content.. + * + * @param mediaInfo Contains information about the video and audio content. + * @return the next definition stage. + */ + Update withMediaInfo(VideoMediaInfo mediaInfo); + } /** The stage of the VideoEntity update allowing to specify archival. */ interface WithArchival { /** diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoMediaInfo.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoMediaInfo.java index d9d2926c2ddf..01b72b1e6fdc 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoMediaInfo.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoMediaInfo.java @@ -4,13 +4,13 @@ package com.azure.resourcemanager.videoanalyzer.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Contains information about the video and audio content. */ -@Immutable +@Fluent public final class VideoMediaInfo { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoMediaInfo.class); @@ -23,7 +23,7 @@ public final class VideoMediaInfo { * in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary * between 30 seconds to 5 minutes, in 30 seconds increments. */ - @JsonProperty(value = "segmentLength", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "segmentLength") private String segmentLength; /** @@ -39,6 +39,21 @@ public String segmentLength() { return this.segmentLength; } + /** + * Set the segmentLength property: Video segment length indicates the length of individual video files (segments) + * which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger + * volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the + * archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and + * can vary between 30 seconds to 5 minutes, in 30 seconds increments. + * + * @param segmentLength the segmentLength value to set. + * @return the VideoMediaInfo object itself. + */ + public VideoMediaInfo withSegmentLength(String segmentLength) { + this.segmentLength = segmentLength; + return this; + } + /** * Validates the instance. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListProvisioningTokenSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListProvisioningTokenSamples.java index d2110759b4dd..8eb9ffe8e102 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListProvisioningTokenSamples.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListProvisioningTokenSamples.java @@ -27,7 +27,7 @@ public static void generateTheProvisioningTokenForAnEdgeModuleRegistration( "testaccount2", "edgeModule1", new ListProvisioningTokenInput() - .withExpirationDate(OffsetDateTime.parse("3021-01-23T11:04:49.0526841-08:00")), + .withExpirationDate(OffsetDateTime.parse("2023-01-23T11:04:49.0526841-08:00")), Context.NONE); } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCreateOrUpdateSamples.java index 670521f65850..eaa5cdd790da 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCreateOrUpdateSamples.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCreateOrUpdateSamples.java @@ -30,7 +30,8 @@ public static void createOrUpdateAPipelineJob( .asList( new ParameterDefinition() .withName("timesequences") - .withValue("[[2020-10-05T03:30:00Z, 2020-10-05T04:30:00Z]]"))) + .withValue("[[\"2020-10-05T03:30:00Z\", \"2020-10-05T04:30:00Z\"]]"), + new ParameterDefinition().withName("videoSourceName").withValue("camera001"))) .create(); } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesCreateOrUpdateSamples.java index 8ce6028033f2..b0562c868600 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesCreateOrUpdateSamples.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesCreateOrUpdateSamples.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.videoanalyzer.models.UnsecuredEndpoint; import com.azure.resourcemanager.videoanalyzer.models.UsernamePasswordCredentials; import com.azure.resourcemanager.videoanalyzer.models.VideoCreationProperties; +import com.azure.resourcemanager.videoanalyzer.models.VideoPublishingOptions; import com.azure.resourcemanager.videoanalyzer.models.VideoSink; import java.util.Arrays; @@ -74,7 +75,11 @@ public static void createOrUpdateAPipelineTopologyWithAnRtspSourceAndVideoSink( new VideoCreationProperties() .withTitle("Parking Lot (Camera 1)") .withDescription("Parking lot south entrance") - .withSegmentLength("PT30S")))) + .withSegmentLength("PT30S")) + .withVideoPublishingOptions( + new VideoPublishingOptions() + .withDisableArchive("false") + .withDisableRtspPublishing("true")))) .create(); } }