Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from specification/workloads/resour…
Browse files Browse the repository at this point in the history
…ce-manager/Microsoft.Workloads/SAPDiscoverySites/readme.md#package-preview-2023-10 (#39613)
  • Loading branch information
azure-sdk authored Apr 10, 2024
1 parent 2797ba8 commit 26e594c
Show file tree
Hide file tree
Showing 39 changed files with 957 additions and 597 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Release History

## 1.0.0-beta.1 (2024-03-07)
## 1.0.0-beta.1 (2024-04-09)

- Azure Resource Manager MigrationDiscoverySap client library for Java. This package contains Microsoft Azure SDK for MigrationDiscoverySap Management SDK. Migration Discovery SAP Client. Package tag package-preview-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public final class OperationsListSamples {
### SapDiscoverySites_Create

```java
import com.azure.resourcemanager.migrationdiscoverysap.models.SapDiscoverySiteProperties;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -77,8 +78,10 @@ public final class SapDiscoverySitesCreateSamples {
public static void createResourceForImportBasedInput(
com.azure.resourcemanager.migrationdiscoverysap.MigrationDiscoverySapManager manager) {
manager.sapDiscoverySites().define("SampleSite").withRegion("eastus").withExistingResourceGroup("test-rg")
.withTags(mapOf("property1", "value1", "property2", "value2")).withMasterSiteId("MasterSiteIdResourceId")
.withMigrateProjectId("MigrateProjectId").create();
.withTags(mapOf("property1", "value1", "property2", "value2"))
.withProperties(new SapDiscoverySiteProperties().withMasterSiteId("MasterSiteIdResourceId")
.withMigrateProjectId("MigrateProjectId"))
.create();
}

// Use "Map.of" if available
Expand Down Expand Up @@ -261,6 +264,7 @@ public final class SapDiscoverySitesUpdateSamples {
### SapInstances_Create

```java
import com.azure.resourcemanager.migrationdiscoverysap.models.SapInstanceProperties;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -282,7 +286,8 @@ public final class SapInstancesCreateSamples {
com.azure.resourcemanager.migrationdiscoverysap.MigrationDiscoverySapManager manager) {
manager.sapInstances().define("MPP_MPP").withRegion("eastus")
.withExistingSapDiscoverySite("test-rg", "SampleSite")
.withTags(mapOf("property1", "value1", "property2", "value2")).create();
.withTags(mapOf("property1", "value1", "property2", "value2")).withProperties(new SapInstanceProperties())
.create();
}

// Use "Map.of" if available
Expand Down Expand Up @@ -516,8 +521,8 @@ public final class ServerInstancesListBySapInstanceSamples {
### ServerInstances_Update

```java
import com.azure.resourcemanager.migrationdiscoverysap.fluent.models.ServerInstanceProperties;
import com.azure.resourcemanager.migrationdiscoverysap.models.ServerInstance;
import com.azure.resourcemanager.migrationdiscoverysap.models.ServerInstanceProperties;

/**
* Samples for ServerInstances Update.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,53 @@
<artifactId>azure-core-management</artifactId>
<version>1.13.0</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.24.1</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.12.0</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.12</version> <!-- {x-version-update;testdep_net.bytebuddy:byte-buddy;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>1.14.12</version> <!-- {x-version-update;testdep_net.bytebuddy:byte-buddy-agent;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.migrationdiscoverysap.models.ExtendedLocation;
import com.azure.resourcemanager.migrationdiscoverysap.models.ProvisioningState;
import com.azure.resourcemanager.migrationdiscoverysap.models.SapMigrateError;
import com.azure.resourcemanager.migrationdiscoverysap.models.SapDiscoverySiteProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

Expand All @@ -22,7 +21,7 @@ public final class SapDiscoverySiteInner extends Resource {
* The resource-specific properties for this resource.
*/
@JsonProperty(value = "properties")
private SapDiscoverySiteProperties innerProperties;
private SapDiscoverySiteProperties properties;

/*
* The extended location definition.
Expand All @@ -43,12 +42,23 @@ public SapDiscoverySiteInner() {
}

/**
* Get the innerProperties property: The resource-specific properties for this resource.
* Get the properties property: The resource-specific properties for this resource.
*
* @return the innerProperties value.
* @return the properties value.
*/
private SapDiscoverySiteProperties innerProperties() {
return this.innerProperties;
public SapDiscoverySiteProperties properties() {
return this.properties;
}

/**
* Set the properties property: The resource-specific properties for this resource.
*
* @param properties the properties value to set.
* @return the SapDiscoverySiteInner object itself.
*/
public SapDiscoverySiteInner withProperties(SapDiscoverySiteProperties properties) {
this.properties = properties;
return this;
}

/**
Expand Down Expand Up @@ -98,78 +108,14 @@ public SapDiscoverySiteInner withTags(Map<String, String> tags) {
return this;
}

/**
* Get the masterSiteId property: The master site ID from Azure Migrate.
*
* @return the masterSiteId value.
*/
public String masterSiteId() {
return this.innerProperties() == null ? null : this.innerProperties().masterSiteId();
}

/**
* Set the masterSiteId property: The master site ID from Azure Migrate.
*
* @param masterSiteId the masterSiteId value to set.
* @return the SapDiscoverySiteInner object itself.
*/
public SapDiscoverySiteInner withMasterSiteId(String masterSiteId) {
if (this.innerProperties() == null) {
this.innerProperties = new SapDiscoverySiteProperties();
}
this.innerProperties().withMasterSiteId(masterSiteId);
return this;
}

/**
* Get the migrateProjectId property: The migrate project ID from Azure Migrate.
*
* @return the migrateProjectId value.
*/
public String migrateProjectId() {
return this.innerProperties() == null ? null : this.innerProperties().migrateProjectId();
}

/**
* Set the migrateProjectId property: The migrate project ID from Azure Migrate.
*
* @param migrateProjectId the migrateProjectId value to set.
* @return the SapDiscoverySiteInner object itself.
*/
public SapDiscoverySiteInner withMigrateProjectId(String migrateProjectId) {
if (this.innerProperties() == null) {
this.innerProperties = new SapDiscoverySiteProperties();
}
this.innerProperties().withMigrateProjectId(migrateProjectId);
return this;
}

/**
* Get the provisioningState property: Defines the provisioning states.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}

/**
* Get the errors property: Indicates any errors on the SAP Migration discovery site resource.
*
* @return the errors value.
*/
public SapMigrateError errors() {
return this.innerProperties() == null ? null : this.innerProperties().errors();
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
if (properties() != null) {
properties().validate();
}
if (extendedLocation() != null) {
extendedLocation().validate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.migrationdiscoverysap.models.ProvisioningState;
import com.azure.resourcemanager.migrationdiscoverysap.models.SapInstanceEnvironment;
import com.azure.resourcemanager.migrationdiscoverysap.models.SapMigrateError;
import com.azure.resourcemanager.migrationdiscoverysap.models.SapInstanceProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

Expand All @@ -22,7 +20,7 @@ public final class SapInstanceInner extends Resource {
* The resource-specific properties for this resource.
*/
@JsonProperty(value = "properties")
private SapInstanceProperties innerProperties;
private SapInstanceProperties properties;

/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
Expand All @@ -37,12 +35,23 @@ public SapInstanceInner() {
}

/**
* Get the innerProperties property: The resource-specific properties for this resource.
* Get the properties property: The resource-specific properties for this resource.
*
* @return the innerProperties value.
* @return the properties value.
*/
private SapInstanceProperties innerProperties() {
return this.innerProperties;
public SapInstanceProperties properties() {
return this.properties;
}

/**
* Set the properties property: The resource-specific properties for this resource.
*
* @param properties the properties value to set.
* @return the SapInstanceInner object itself.
*/
public SapInstanceInner withProperties(SapInstanceProperties properties) {
this.properties = properties;
return this;
}

/**
Expand Down Expand Up @@ -72,72 +81,14 @@ public SapInstanceInner withTags(Map<String, String> tags) {
return this;
}

/**
* Get the systemSid property: This is the SID of SAP System. Keeping this not equal to ID as different landscapes
* can have repeated System SID IDs.
*
* @return the systemSid value.
*/
public String systemSid() {
return this.innerProperties() == null ? null : this.innerProperties().systemSid();
}

/**
* Get the environment property: The Environment; PRD, QA, DEV, etc to which SAP system belongs to. Select from the
* list of available dropdown values.
*
* @return the environment value.
*/
public SapInstanceEnvironment environment() {
return this.innerProperties() == null ? null : this.innerProperties().environment();
}

/**
* Get the landscapeSid property: This is the SID of the production system in a landscape. An SAP system could
* itself be a production SID or a part of a landscape with a different Production SID. This field can be used to
* relate non-prod SIDs, other components, SID (WEBDISP) to the prod SID. Enter the value of Production SID.
*
* @return the landscapeSid value.
*/
public String landscapeSid() {
return this.innerProperties() == null ? null : this.innerProperties().landscapeSid();
}

/**
* Get the application property: Enter a business function/department identifier to group multiple SIDs.
*
* @return the application value.
*/
public String application() {
return this.innerProperties() == null ? null : this.innerProperties().application();
}

/**
* Get the provisioningState property: Defines the provisioning states.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}

/**
* Get the errors property: Defines the errors related to SAP Instance resource.
*
* @return the errors value.
*/
public SapMigrateError errors() {
return this.innerProperties() == null ? null : this.innerProperties().errors();
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
if (properties() != null) {
properties().validate();
}
}
}
Loading

0 comments on commit 26e594c

Please sign in to comment.