Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgmt, migrate some premium libs to sss #41402

Merged
merged 19 commits into from
Aug 2, 2024
  •  
  •  
  •  
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].34"
AUTOREST_JAVA = "@autorest/[email protected].35"
DEFAULT_VERSION = "1.0.0-beta.1"
GROUP_ID = "com.azure.resourcemanager"
API_SPECS_FILE = "api-specs.yaml"
Expand Down
28 changes: 14 additions & 14 deletions sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dir": "azure-resourcemanager-appplatform",
"source": "specification/appplatform/resource-manager/readme.md",
"package": "com.azure.resourcemanager.appplatform",
"args": "--tag=package-2023-12 --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition,CustomDomainValidateResult,NameAvailability --stream-style-serialization=false"
"args": "--tag=package-2023-12 --remove-inner=TestKeys,ResourceSku,ResourceUploadDefinition,CustomDomainValidateResult,NameAvailability"
},
"appservice": {
"dir": "azure-resourcemanager-appservice",
Expand All @@ -22,7 +22,7 @@
"dir": "azure-resourcemanager-authorization",
"source": "specification/authorization/resource-manager/readme.md",
"package": "com.azure.resourcemanager.authorization",
"args": "--tag=package-2022-04-01 --stream-style-serialization=false"
"args": "--tag=package-2022-04-01"
},
"authorization-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-authorization",
Expand Down Expand Up @@ -52,13 +52,13 @@
"dir": "azure-resourcemanager-containerinstance",
"source": "specification/containerinstance/resource-manager/readme.md",
"package": "com.azure.resourcemanager.containerinstance",
"args": "--tag=package-2023-05 --remove-inner=Container,Operation,CachedImages,Capabilities --rename-model=ContainerGroupPropertiesProperties:ContainerGroupProperties,UserAssignedIdentities:ContainerGroupIdentityUserAssignedIdentities --stream-style-serialization=false"
"args": "--tag=package-2023-05 --remove-inner=Container,Operation,CachedImages,Capabilities --rename-model=ContainerGroupPropertiesProperties:ContainerGroupProperties,UserAssignedIdentities:ContainerGroupIdentityUserAssignedIdentities"
},
"containerregistry": {
"dir": "azure-resourcemanager-containerregistry",
"source": "specification/containerregistry/resource-manager/readme.md",
"package": "com.azure.resourcemanager.containerregistry",
"args": "--tag=package-2023-07 --modelerfour.lenient-model-deduplication=true --stream-style-serialization=false"
"args": "--tag=package-2023-07 --modelerfour.lenient-model-deduplication=true"
},
"containerregistry-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-containerregistry",
Expand All @@ -70,7 +70,7 @@
"dir": "azure-resourcemanager-containerservice",
"source": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md",
"package": "com.azure.resourcemanager.containerservice",
"args": "--tag=package-2024-05 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku --stream-style-serialization=false"
"args": "--tag=package-2024-05 --modelerfour.lenient-model-deduplication --preserve-model=ContainerServiceVMSizeTypes --rename-model=Ossku:OSSku"
},
"containerservice-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-containerservice",
Expand All @@ -94,7 +94,7 @@
"dir": "azure-resourcemanager-dns",
"source": "specification/dns/resource-manager/readme.md",
"package": "com.azure.resourcemanager.dns",
"args": "--tag=package-2018-05 --stream-style-serialization=false"
"args": "--tag=package-2018-05"
},
"dns-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-dns",
Expand All @@ -106,7 +106,7 @@
"dir": "azure-resourcemanager-eventhubs",
"source": "specification/eventhub/resource-manager/readme.md",
"package": "com.azure.resourcemanager.eventhubs",
"args": "--tag=package-2024-01 --stream-style-serialization=false"
"args": "--tag=package-2024-01"
},
"eventhubs-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-eventhubs",
Expand All @@ -131,7 +131,7 @@
"dir": "azure-resourcemanager-authorization",
"source": "azure-resourcemanager-authorization/swagger/swagger.md",
"package": "com.azure.resourcemanager.authorization",
"args": "--tag=v1.0 --graalvm-config-suffix=msgraph --title=MicrosoftGraphClient --models-subpackage=fluent.models --stream-style-serialization=false"
"args": "--tag=v1.0 --graalvm-config-suffix=msgraph --title=MicrosoftGraphClient --models-subpackage=fluent.models"
},
"msgraph-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-authorization",
Expand All @@ -143,7 +143,7 @@
"dir": "azure-resourcemanager-keyvault",
"source": "specification/keyvault/resource-manager/readme.md",
"package": "com.azure.resourcemanager.keyvault",
"args": "--tag=package-2023-07 --stream-style-serialization=false",
"args": "--tag=package-2023-07",
"note": "use local azure-rest-api-specs and remove keys.json, secrets.json and keysManagedHsm.json in README.md tag"
},
"keyvault-hybrid": {
Expand Down Expand Up @@ -207,7 +207,7 @@
"dir": "azure-resourcemanager-privatedns",
"source": "specification/privatedns/resource-manager/readme.md",
"package": "com.azure.resourcemanager.privatedns",
"args": "--tag=package-2020-06 --stream-style-serialization=false"
"args": "--tag=package-2020-06"
},
"redis": {
"dir": "azure-resourcemanager-redis",
Expand Down Expand Up @@ -238,7 +238,7 @@
"dir": "azure-resourcemanager-search",
"source": "specification/search/resource-manager/readme.md",
"package": "com.azure.resourcemanager.search",
"args": "--tag=package-2023-11 --remove-inner=CheckNameAvailabilityOutput --stream-style-serialization=false"
"args": "--tag=package-2023-11 --remove-inner=CheckNameAvailabilityOutput"
},
"servicebus": {
"dir": "azure-resourcemanager-servicebus",
Expand All @@ -258,7 +258,7 @@
"dir": "azure-resourcemanager-storage",
"source": "specification/storage/resource-manager/readme.md",
"package": "com.azure.resourcemanager.storage",
"args": "--tag=package-2023-05 --modelerfour.lenient-model-deduplication --rename-model=AllowedMethods:CorsRuleAllowedMethodsItem,AccountType:ActiveDirectoryPropertiesAccountType --property-include-always=EncryptionIdentity.encryptionUserAssignedIdentity --stream-style-serialization=false"
"args": "--tag=package-2023-05 --modelerfour.lenient-model-deduplication --rename-model=AllowedMethods:CorsRuleAllowedMethodsItem,AccountType:ActiveDirectoryPropertiesAccountType --property-include-always=EncryptionIdentity.encryptionUserAssignedIdentity"
},
"storage-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-storage",
Expand All @@ -282,13 +282,13 @@
"dir": "azure-resourcemanager-trafficmanager",
"source": "specification/trafficmanager/resource-manager/readme.md",
"package": "com.azure.resourcemanager.trafficmanager",
"args": "--tag=package-2022-04 --rename-model=EndpointType:EndpointTypes --stream-style-serialization=false"
"args": "--tag=package-2022-04 --rename-model=EndpointType:EndpointTypes"
},
"msi": {
"dir": "azure-resourcemanager-msi",
"source": "specification/msi/resource-manager/readme.md",
"package": "com.azure.resourcemanager.msi",
"args": "--tag=package-2023-01-31 --add-client-flatten=Identity --stream-style-serialization=false"
"args": "--tag=package-2023-01-31 --add-client-flatten=Identity"
},
"changes": {
"dir": "azure-resourcemanager-resources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

### Other Changes

- Replaced `Jackson` with `azure-json` for serialization/deserialization.

## 2.41.0 (2024-07-25)

### Other Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.appplatform.models.ApiPortalCustomDomainProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.IOException;

/**
* Custom domain of the API portal.
Expand All @@ -18,15 +21,28 @@ public final class ApiPortalCustomDomainResourceInner extends ProxyResource {
/*
* The properties of custom domain for API portal
*/
@JsonProperty(value = "properties")
private ApiPortalCustomDomainProperties properties;

/*
* Metadata pertaining to creation and last modification of the resource.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;

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

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

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

/**
* Creates an instance of ApiPortalCustomDomainResourceInner class.
*/
Expand Down Expand Up @@ -62,6 +78,36 @@ public SystemData systemData() {
return this.systemData;
}

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

/**
* Get the name property: The name of the resource.
*
* @return the name value.
*/
@Override
public String name() {
return this.name;
}

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

/**
* Validates the instance.
*
Expand All @@ -72,4 +118,51 @@ public void validate() {
properties().validate();
}
}

/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("properties", this.properties);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of ApiPortalCustomDomainResourceInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ApiPortalCustomDomainResourceInner if the JsonReader was pointing to an instance of it, or
* null if it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ApiPortalCustomDomainResourceInner.
*/
public static ApiPortalCustomDomainResourceInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ApiPortalCustomDomainResourceInner deserializedApiPortalCustomDomainResourceInner
= new ApiPortalCustomDomainResourceInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("id".equals(fieldName)) {
deserializedApiPortalCustomDomainResourceInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedApiPortalCustomDomainResourceInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedApiPortalCustomDomainResourceInner.type = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedApiPortalCustomDomainResourceInner.properties
= ApiPortalCustomDomainProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedApiPortalCustomDomainResourceInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
}

return deserializedApiPortalCustomDomainResourceInner;
});
}
}
Loading