Skip to content

Commit

Permalink
CodeGen from PR 24031 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 19b08347e46ac52735822b314be1d65588deee24 into 173bb3b6fd5b1809fdbf347f67fccfa0440ac126
  • Loading branch information
SDKAuto committed May 17, 2023
1 parent 4ee868f commit 27cd86e
Show file tree
Hide file tree
Showing 70 changed files with 469 additions and 2,733 deletions.
4 changes: 3 additions & 1 deletion sdk/elastic/azure-resourcemanager-elastic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2023-05-17)

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

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/elastic/azure-resourcemanager-elastic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-elastic</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
2 changes: 1 addition & 1 deletion sdk/elastic/azure-resourcemanager-elastic/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public final class ElasticVersionsListSamples {
* @param manager Entry point to ElasticManager.
*/
public static void elasticVersionsList(com.azure.resourcemanager.elastic.ElasticManager manager) {
manager.elasticVersions().listWithResponse("myregion", com.azure.core.util.Context.NONE);
manager.elasticVersions().list("myregion", com.azure.core.util.Context.NONE);
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public ElasticManager authenticate(TokenCredential credential, AzureProfile prof
.append("-")
.append("com.azure.resourcemanager.elastic")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.resourcemanager.elastic.fluent.models.ElasticVersionsListResponseInner;
import com.azure.resourcemanager.elastic.fluent.models.ElasticVersionListFormatInner;

/** An instance of this class provides access to all the operations defined in ElasticVersionsClient. */
public interface ElasticVersionsClient {
/**
* Get a list of available versions for a region.
*
* @param region Region where elastic deployment will take place.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of available versions for a region along with {@link Response}.
* @return a list of available versions for a region as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ElasticVersionsListResponseInner> listWithResponse(String region, Context context);
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ElasticVersionListFormatInner> list(String region);

/**
* Get a list of available versions for a region.
*
* @param region Region where elastic deployment will take place.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of available versions for a region.
* @return a list of available versions for a region as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ElasticVersionsListResponseInner list(String region);
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ElasticVersionListFormatInner> list(String region, Context context);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.elastic.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.elastic.models.ElasticVersionListProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Elastic Version List Format. */
@Fluent
public final class ElasticVersionListFormatInner {
/*
* Elastic Version Properties
*/
@JsonProperty(value = "properties")
private ElasticVersionListProperties properties;

/** Creates an instance of ElasticVersionListFormatInner class. */
public ElasticVersionListFormatInner() {
}

/**
* Get the properties property: Elastic Version Properties.
*
* @return the properties value.
*/
public ElasticVersionListProperties properties() {
return this.properties;
}

/**
* Set the properties property: Elastic Version Properties.
*
* @param properties the properties value to set.
* @return the ElasticVersionListFormatInner object itself.
*/
public ElasticVersionListFormatInner withProperties(ElasticVersionListProperties properties) {
this.properties = properties;
return this;
}

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,39 @@
package com.azure.resourcemanager.elastic.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.elastic.models.UserApiKeyResponseProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The User Api Key created for the Organization associated with the User Email Id that was passed in the request. */
@Fluent
public final class UserApiKeyResponseInner {
/*
* The User Api Key Generated based on ReturnApiKey flag. This is applicable for non-Portal clients only.
* The properties property.
*/
@JsonProperty(value = "apiKey")
private String apiKey;
@JsonProperty(value = "properties")
private UserApiKeyResponseProperties properties;

/** Creates an instance of UserApiKeyResponseInner class. */
public UserApiKeyResponseInner() {
}

/**
* Get the apiKey property: The User Api Key Generated based on ReturnApiKey flag. This is applicable for non-Portal
* clients only.
* Get the properties property: The properties property.
*
* @return the apiKey value.
* @return the properties value.
*/
public String apiKey() {
return this.apiKey;
public UserApiKeyResponseProperties properties() {
return this.properties;
}

/**
* Set the apiKey property: The User Api Key Generated based on ReturnApiKey flag. This is applicable for non-Portal
* clients only.
* Set the properties property: The properties property.
*
* @param apiKey the apiKey value to set.
* @param properties the properties value to set.
* @return the UserApiKeyResponseInner object itself.
*/
public UserApiKeyResponseInner withApiKey(String apiKey) {
this.apiKey = apiKey;
public UserApiKeyResponseInner withProperties(UserApiKeyResponseProperties properties) {
this.properties = properties;
return this;
}

Expand All @@ -48,5 +47,8 @@ public UserApiKeyResponseInner withApiKey(String apiKey) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (properties() != null) {
properties().validate();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.elastic.implementation;

import com.azure.resourcemanager.elastic.fluent.models.ElasticVersionListFormatInner;
import com.azure.resourcemanager.elastic.models.ElasticVersionListFormat;
import com.azure.resourcemanager.elastic.models.ElasticVersionListProperties;

public final class ElasticVersionListFormatImpl implements ElasticVersionListFormat {
private ElasticVersionListFormatInner innerObject;

private final com.azure.resourcemanager.elastic.ElasticManager serviceManager;

ElasticVersionListFormatImpl(
ElasticVersionListFormatInner innerObject, com.azure.resourcemanager.elastic.ElasticManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}

public ElasticVersionListProperties properties() {
return this.innerModel().properties();
}

public ElasticVersionListFormatInner innerModel() {
return this.innerObject;
}

private com.azure.resourcemanager.elastic.ElasticManager manager() {
return this.serviceManager;
}
}
Loading

0 comments on commit 27cd86e

Please sign in to comment.