Skip to content

Commit

Permalink
CodeGen from PR 24477 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c9b373e139e99eb283da5a46196257a57b31e9fe into 41a6298aba15582f3ccdbcb4e8d76bfa9b6ceca8
  • Loading branch information
SDKAuto committed Jun 27, 2023
1 parent eeea5cd commit 1bf8544
Show file tree
Hide file tree
Showing 92 changed files with 626 additions and 2,746 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 2.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2023-06-27)

- Azure Resource Manager Communication client library for Java. This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-preview-2023-04. 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Communication client library for Java.

This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-communication</artifactId>
<version>2.0.0</version>
<version>2.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
159 changes: 129 additions & 30 deletions sdk/communication/azure-resourcemanager-communication/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Communication Management</name>
<description>This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-2023-03.</description>
<description>This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-preview-2023-04.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public CommunicationManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.communication")
.append("/")
.append("2.0.0");
.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 @@ -8,6 +8,7 @@
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
Expand All @@ -21,6 +22,12 @@ public final class CommunicationServiceResourceInner extends Resource {
@JsonProperty(value = "properties")
private CommunicationServiceProperties innerProperties;

/*
* Managed service identity (system assigned and/or user assigned identities)
*/
@JsonProperty(value = "identity")
private ManagedServiceIdentity identity;

/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
Expand All @@ -40,6 +47,26 @@ private CommunicationServiceProperties innerProperties() {
return this.innerProperties;
}

/**
* Get the identity property: Managed service identity (system assigned and/or user assigned identities).
*
* @return the identity value.
*/
public ManagedServiceIdentity identity() {
return this.identity;
}

/**
* Set the identity property: Managed service identity (system assigned and/or user assigned identities).
*
* @param identity the identity value to set.
* @return the CommunicationServiceResourceInner object itself.
*/
public CommunicationServiceResourceInner withIdentity(ManagedServiceIdentity identity) {
this.identity = identity;
return this;
}

/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
Expand Down Expand Up @@ -164,5 +191,8 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
if (identity() != null) {
identity().validate();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public SenderUsernamesClient getSenderUsernames() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
this.apiVersion = "2023-03-31";
this.apiVersion = "2023-04-01-preview";
this.operations = new OperationsClientImpl(this);
this.communicationServices = new CommunicationServicesClientImpl(this);
this.domains = new DomainsClientImpl(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
import com.azure.resourcemanager.communication.models.LinkedNotificationHub;
import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -53,6 +54,10 @@ public Map<String, String> tags() {
}
}

public ManagedServiceIdentity identity() {
return this.innerModel().identity();
}

public SystemData systemData() {
return this.innerModel().systemData();
}
Expand Down Expand Up @@ -255,6 +260,16 @@ public CommunicationServiceResourceImpl withTags(Map<String, String> tags) {
}
}

public CommunicationServiceResourceImpl withIdentity(ManagedServiceIdentity identity) {
if (isInCreateMode()) {
this.innerModel().withIdentity(identity);
return this;
} else {
this.updateParameters.withIdentity(identity);
return this;
}
}

public CommunicationServiceResourceImpl withDataLocation(String dataLocation) {
this.innerModel().withDataLocation(dataLocation);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ public interface CommunicationServiceResource {
*/
Map<String, String> tags();

/**
* Gets the identity property: Managed service identity (system assigned and/or user assigned identities).
*
* @return the identity value.
*/
ManagedServiceIdentity identity();

/**
* Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
Expand Down Expand Up @@ -179,7 +186,10 @@ interface WithResourceGroup {
* for the resource to be created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
extends DefinitionStages.WithTags, DefinitionStages.WithDataLocation, DefinitionStages.WithLinkedDomains {
extends DefinitionStages.WithTags,
DefinitionStages.WithIdentity,
DefinitionStages.WithDataLocation,
DefinitionStages.WithLinkedDomains {
/**
* Executes the create request.
*
Expand All @@ -205,6 +215,17 @@ interface WithTags {
*/
WithCreate withTags(Map<String, String> tags);
}
/** The stage of the CommunicationServiceResource definition allowing to specify identity. */
interface WithIdentity {
/**
* Specifies the identity property: Managed service identity (system assigned and/or user assigned
* identities).
*
* @param identity Managed service identity (system assigned and/or user assigned identities).
* @return the next definition stage.
*/
WithCreate withIdentity(ManagedServiceIdentity identity);
}
/** The stage of the CommunicationServiceResource definition allowing to specify dataLocation. */
interface WithDataLocation {
/**
Expand Down Expand Up @@ -235,7 +256,7 @@ interface WithLinkedDomains {
CommunicationServiceResource.Update update();

/** The template for CommunicationServiceResource update. */
interface Update extends UpdateStages.WithTags, UpdateStages.WithLinkedDomains {
interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithLinkedDomains {
/**
* Executes the update request.
*
Expand Down Expand Up @@ -264,6 +285,17 @@ interface WithTags {
*/
Update withTags(Map<String, String> tags);
}
/** The stage of the CommunicationServiceResource update allowing to specify identity. */
interface WithIdentity {
/**
* Specifies the identity property: Managed service identity (system assigned and/or user assigned
* identities).
*
* @param identity Managed service identity (system assigned and/or user assigned identities).
* @return the next definition stage.
*/
Update withIdentity(ManagedServiceIdentity identity);
}
/** The stage of the CommunicationServiceResource update allowing to specify linkedDomains. */
interface WithLinkedDomains {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public final class CommunicationServiceResourceUpdate extends TaggedResource {
@JsonProperty(value = "properties")
private CommunicationServiceUpdateProperties innerProperties;

/*
* Managed service identity (system assigned and/or user assigned identities)
*/
@JsonProperty(value = "identity")
private ManagedServiceIdentity identity;

/** Creates an instance of CommunicationServiceResourceUpdate class. */
public CommunicationServiceResourceUpdate() {
}
Expand All @@ -32,6 +38,26 @@ private CommunicationServiceUpdateProperties innerProperties() {
return this.innerProperties;
}

/**
* Get the identity property: Managed service identity (system assigned and/or user assigned identities).
*
* @return the identity value.
*/
public ManagedServiceIdentity identity() {
return this.identity;
}

/**
* Set the identity property: Managed service identity (system assigned and/or user assigned identities).
*
* @param identity the identity value to set.
* @return the CommunicationServiceResourceUpdate object itself.
*/
public CommunicationServiceResourceUpdate withIdentity(ManagedServiceIdentity identity) {
this.identity = identity;
return this;
}

/** {@inheritDoc} */
@Override
public CommunicationServiceResourceUpdate withTags(Map<String, String> tags) {
Expand Down Expand Up @@ -73,5 +99,8 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
if (identity() != null) {
identity().validate();
}
}
}
Loading

0 comments on commit 1bf8544

Please sign in to comment.