Skip to content
Merged
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
2 changes: 1 addition & 1 deletion eng/automation/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

SDK_ROOT = "../../" # related to file dir
AUTOREST_CORE_VERSION = "3.9.7"
AUTOREST_JAVA = "@autorest/[email protected].56"
AUTOREST_JAVA = "@autorest/[email protected].57"
DEFAULT_VERSION = "1.0.0-beta.1"
GROUP_ID = "com.azure.resourcemanager"
API_SPECS_FILE = "api-specs.yaml"
Expand Down
44 changes: 22 additions & 22 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-java": "0.31.10"
"@azure-tools/typespec-java": "0.31.11"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "0.58.0",
"@azure-tools/typespec-autorest": "0.58.1",
"@azure-tools/typespec-azure-core": "0.58.0",
"@azure-tools/typespec-azure-resource-manager": "0.58.0",
"@azure-tools/typespec-azure-resource-manager": "0.58.1",
"@azure-tools/typespec-azure-rulesets": "0.58.0",
"@azure-tools/typespec-client-generator-core": "0.58.0",
"@azure-tools/typespec-liftr-base": "0.8.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.containerservicesafeguards.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicesafeguards.fluent.models.DeploymentSafeguardInner;
import com.azure.resourcemanager.containerservicesafeguards.models.DeploymentSafeguardsLevel;
import com.azure.resourcemanager.containerservicesafeguards.models.DeploymentSafeguardsProperties;
import com.azure.resourcemanager.containerservicesafeguards.models.PodSecurityStandardsLevel;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class DeploymentSafeguardInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
DeploymentSafeguardInner model = BinaryData.fromString(
"{\"properties\":{\"provisioningState\":\"Canceled\",\"level\":\"Warn\",\"excludedNamespaces\":[\"vg\",\"wzsymglzufcy\"],\"systemExcludedNamespaces\":[\"ohdbihanufh\",\"cbjy\"],\"podSecurityStandardsLevel\":\"Privileged\"},\"eTag\":\"th\",\"id\":\"hab\",\"name\":\"fpikxwczb\",\"type\":\"scnpqxuhivy\"}")
.toObject(DeploymentSafeguardInner.class);
Assertions.assertEquals(DeploymentSafeguardsLevel.WARN, model.properties().level());
Assertions.assertEquals("vg", model.properties().excludedNamespaces().get(0));
Assertions.assertEquals(PodSecurityStandardsLevel.POD_SECURITY_STANDARDS_PRIVILEGED,
model.properties().podSecurityStandardsLevel());
}

@org.junit.jupiter.api.Test
public void testSerialize() throws Exception {
DeploymentSafeguardInner model = new DeploymentSafeguardInner()
.withProperties(new DeploymentSafeguardsProperties().withLevel(DeploymentSafeguardsLevel.WARN)
.withExcludedNamespaces(Arrays.asList("vg", "wzsymglzufcy"))
.withPodSecurityStandardsLevel(PodSecurityStandardsLevel.POD_SECURITY_STANDARDS_PRIVILEGED));
model = BinaryData.fromObject(model).toObject(DeploymentSafeguardInner.class);
Assertions.assertEquals(DeploymentSafeguardsLevel.WARN, model.properties().level());
Assertions.assertEquals("vg", model.properties().excludedNamespaces().get(0));
Assertions.assertEquals(PodSecurityStandardsLevel.POD_SECURITY_STANDARDS_PRIVILEGED,
model.properties().podSecurityStandardsLevel());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.containerservicesafeguards.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicesafeguards.implementation.models.DeploymentSafeguardListResult;
import com.azure.resourcemanager.containerservicesafeguards.models.DeploymentSafeguardsLevel;
import com.azure.resourcemanager.containerservicesafeguards.models.PodSecurityStandardsLevel;
import org.junit.jupiter.api.Assertions;

public final class DeploymentSafeguardListResultTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
DeploymentSafeguardListResult model = BinaryData.fromString(
"{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"level\":\"Warn\",\"excludedNamespaces\":[\"k\",\"gaudcc\"],\"systemExcludedNamespaces\":[\"h\",\"jcny\",\"j\"],\"podSecurityStandardsLevel\":\"Baseline\"},\"eTag\":\"htnapczwlokjyem\",\"id\":\"vnipjox\",\"name\":\"jnchgej\",\"type\":\"podmailzydehojwy\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"level\":\"Warn\",\"excludedNamespaces\":[\"mqnjaqw\",\"xj\"],\"systemExcludedNamespaces\":[\"r\",\"zvcputegjvwmfda\",\"scmdvpjhulsuu\",\"mkjozkrwf\"],\"podSecurityStandardsLevel\":\"Baseline\"},\"eTag\":\"djpslw\",\"id\":\"dpvwryoqpsoaccta\",\"name\":\"akl\",\"type\":\"lahbcryff\"}],\"nextLink\":\"dosyg\"}")
.toObject(DeploymentSafeguardListResult.class);
Assertions.assertEquals(DeploymentSafeguardsLevel.WARN, model.value().get(0).properties().level());
Assertions.assertEquals("k", model.value().get(0).properties().excludedNamespaces().get(0));
Assertions.assertEquals(PodSecurityStandardsLevel.POD_SECURITY_STANDARDS_BASELINE,
model.value().get(0).properties().podSecurityStandardsLevel());
Assertions.assertEquals("dosyg", model.nextLink());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.containerservicesafeguards.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicesafeguards.models.DeploymentSafeguardsLevel;
import com.azure.resourcemanager.containerservicesafeguards.models.DeploymentSafeguardsProperties;
import com.azure.resourcemanager.containerservicesafeguards.models.PodSecurityStandardsLevel;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class DeploymentSafeguardsPropertiesTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
DeploymentSafeguardsProperties model = BinaryData.fromString(
"{\"provisioningState\":\"Deleting\",\"level\":\"Warn\",\"excludedNamespaces\":[\"br\"],\"systemExcludedNamespaces\":[\"vd\"],\"podSecurityStandardsLevel\":\"Privileged\"}")
.toObject(DeploymentSafeguardsProperties.class);
Assertions.assertEquals(DeploymentSafeguardsLevel.WARN, model.level());
Assertions.assertEquals("br", model.excludedNamespaces().get(0));
Assertions.assertEquals(PodSecurityStandardsLevel.POD_SECURITY_STANDARDS_PRIVILEGED,
model.podSecurityStandardsLevel());
}

@org.junit.jupiter.api.Test
public void testSerialize() throws Exception {
DeploymentSafeguardsProperties model
= new DeploymentSafeguardsProperties().withLevel(DeploymentSafeguardsLevel.WARN)
.withExcludedNamespaces(Arrays.asList("br"))
.withPodSecurityStandardsLevel(PodSecurityStandardsLevel.POD_SECURITY_STANDARDS_PRIVILEGED);
model = BinaryData.fromObject(model).toObject(DeploymentSafeguardsProperties.class);
Assertions.assertEquals(DeploymentSafeguardsLevel.WARN, model.level());
Assertions.assertEquals("br", model.excludedNamespaces().get(0));
Assertions.assertEquals(PodSecurityStandardsLevel.POD_SECURITY_STANDARDS_PRIVILEGED,
model.podSecurityStandardsLevel());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.containerservicesafeguards.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicesafeguards.models.OperationDisplay;

public final class OperationDisplayTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
OperationDisplay model = BinaryData.fromString(
"{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}")
.toObject(OperationDisplay.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.containerservicesafeguards.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicesafeguards.fluent.models.OperationInner;

public final class OperationInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
OperationInner model = BinaryData.fromString(
"{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
.toObject(OperationInner.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.containerservicesafeguards.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicesafeguards.implementation.models.OperationListResult;
import org.junit.jupiter.api.Assertions;

public final class OperationListResultTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
OperationListResult model = BinaryData.fromString(
"{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}")
.toObject(OperationListResult.class);
Assertions.assertEquals("kfo", model.nextLink());
}
}