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

[AutoPR azure-resourcemanager-eventgrid] Adding missing identity properties and ExtensionTopics operation #11221

Closed
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
4 changes: 3 additions & 1 deletion sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2021-10-20)

- Azure Resource Manager EventGrid client library for Java. This package contains Microsoft Azure SDK for EventGrid Management SDK. Azure EventGrid Management Client. Package tag package-2021-12. 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/eventgrid/azure-resourcemanager-eventgrid/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-eventgrid</artifactId>
<version>1.1.0-beta.3</version>
<version>1.1.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
29 changes: 29 additions & 0 deletions sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
- [ListRegionalBySubscriptionForTopicType](#eventsubscriptions_listregionalbysubscriptionfortopictype)
- [Update](#eventsubscriptions_update)

## ExtensionTopics

- [Get](#extensiontopics_get)

## Operations

- [List](#operations_list)
Expand Down Expand Up @@ -1233,6 +1237,31 @@ public final class EventSubscriptionsUpdateSamples {
}
```

### ExtensionTopics_Get

```java
import com.azure.core.util.Context;

/** Samples for ExtensionTopics Get. */
public final class ExtensionTopicsGetSamples {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2021-12-01/examples/ExtensionTopics_Get.json
*/
/**
* Sample code: ExtensionTopics_Get.
*
* @param manager Entry point to EventGridManager.
*/
public static void extensionTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.extensionTopics()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default",
Context.NONE);
}
}
```

### Operations_List

```java
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@
<artifactId>revapi-maven-plugin</artifactId>
<version>0.11.2</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>

<analysisConfiguration>
<revapi.ignore>
<item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.azure.resourcemanager.eventgrid.implementation.DomainsImpl;
import com.azure.resourcemanager.eventgrid.implementation.EventGridManagementClientBuilder;
import com.azure.resourcemanager.eventgrid.implementation.EventSubscriptionsImpl;
import com.azure.resourcemanager.eventgrid.implementation.ExtensionTopicsImpl;
import com.azure.resourcemanager.eventgrid.implementation.OperationsImpl;
import com.azure.resourcemanager.eventgrid.implementation.PrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.eventgrid.implementation.PrivateLinkResourcesImpl;
Expand All @@ -35,6 +36,7 @@
import com.azure.resourcemanager.eventgrid.models.DomainTopics;
import com.azure.resourcemanager.eventgrid.models.Domains;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptions;
import com.azure.resourcemanager.eventgrid.models.ExtensionTopics;
import com.azure.resourcemanager.eventgrid.models.Operations;
import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnections;
import com.azure.resourcemanager.eventgrid.models.PrivateLinkResources;
Expand Down Expand Up @@ -68,6 +70,8 @@ public final class EventGridManager {

private SystemTopics systemTopics;

private ExtensionTopics extensionTopics;

private TopicTypes topicTypes;

private final EventGridManagementClient clientObject;
Expand Down Expand Up @@ -206,7 +210,7 @@ public EventGridManager authenticate(TokenCredential credential, AzureProfile pr
.append("-")
.append("com.azure.resourcemanager.eventgrid")
.append("/")
.append("1.1.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -319,6 +323,14 @@ public SystemTopics systemTopics() {
return systemTopics;
}

/** @return Resource collection API of ExtensionTopics. */
public ExtensionTopics extensionTopics() {
if (this.extensionTopics == null) {
this.extensionTopics = new ExtensionTopicsImpl(clientObject.getExtensionTopics(), this);
}
return extensionTopics;
}

/** @return Resource collection API of TopicTypes. */
public TopicTypes topicTypes() {
if (this.topicTypes == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ public interface EventGridManagementClient {
*/
SystemTopicsClient getSystemTopics();

/**
* Gets the ExtensionTopicsClient object to access its operations.
*
* @return the ExtensionTopicsClient object.
*/
ExtensionTopicsClient getExtensionTopics();

/**
* Gets the TopicTypesClient object to access its operations.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.eventgrid.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.eventgrid.fluent.models.ExtensionTopicInner;

/** An instance of this class provides access to all the operations defined in ExtensionTopicsClient. */
public interface ExtensionTopicsClient {
/**
* Get the properties of an extension topic.
*
* @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription,
* or a resource group, or a top level resource belonging to a resource provider namespace. For example, use
* '/subscriptions/{subscriptionId}/' for a subscription,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
* for Azure resource.
* @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 the properties of an extension topic.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ExtensionTopicInner get(String scope);

/**
* Get the properties of an extension topic.
*
* @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription,
* or a resource group, or a top level resource belonging to a resource provider namespace. For example, use
* '/subscriptions/{subscriptionId}/' for a subscription,
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'
* for Azure resource.
* @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 the properties of an extension topic.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ExtensionTopicInner> getWithResponse(String scope, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination;
import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity;
import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity;
import com.azure.resourcemanager.eventgrid.models.EventDeliverySchema;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter;
Expand Down Expand Up @@ -97,6 +99,34 @@ public EventSubscriptionInner withDestination(EventSubscriptionDestination desti
return this;
}

/**
* Get the deliveryWithResourceIdentity property: Information about the destination where events have to be
* delivered for the event subscription. Uses the managed identity setup on the parent resource (namely, topic or
* domain) to acquire the authentication tokens being used during delivery / dead-lettering.
*
* @return the deliveryWithResourceIdentity value.
*/
public DeliveryWithResourceIdentity deliveryWithResourceIdentity() {
return this.innerProperties() == null ? null : this.innerProperties().deliveryWithResourceIdentity();
}

/**
* Set the deliveryWithResourceIdentity property: Information about the destination where events have to be
* delivered for the event subscription. Uses the managed identity setup on the parent resource (namely, topic or
* domain) to acquire the authentication tokens being used during delivery / dead-lettering.
*
* @param deliveryWithResourceIdentity the deliveryWithResourceIdentity value to set.
* @return the EventSubscriptionInner object itself.
*/
public EventSubscriptionInner withDeliveryWithResourceIdentity(
DeliveryWithResourceIdentity deliveryWithResourceIdentity) {
if (this.innerProperties() == null) {
this.innerProperties = new EventSubscriptionProperties();
}
this.innerProperties().withDeliveryWithResourceIdentity(deliveryWithResourceIdentity);
return this;
}

/**
* Get the filter property: Information about the filter for the event subscription.
*
Expand Down Expand Up @@ -237,6 +267,36 @@ public EventSubscriptionInner withDeadLetterDestination(DeadLetterDestination de
return this;
}

/**
* Get the deadLetterWithResourceIdentity property: The dead letter destination of the event subscription. Any event
* that cannot be delivered to its' destination is sent to the dead letter destination. Uses the managed identity
* setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during
* delivery / dead-lettering.
*
* @return the deadLetterWithResourceIdentity value.
*/
public DeadLetterWithResourceIdentity deadLetterWithResourceIdentity() {
return this.innerProperties() == null ? null : this.innerProperties().deadLetterWithResourceIdentity();
}

/**
* Set the deadLetterWithResourceIdentity property: The dead letter destination of the event subscription. Any event
* that cannot be delivered to its' destination is sent to the dead letter destination. Uses the managed identity
* setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during
* delivery / dead-lettering.
*
* @param deadLetterWithResourceIdentity the deadLetterWithResourceIdentity value to set.
* @return the EventSubscriptionInner object itself.
*/
public EventSubscriptionInner withDeadLetterWithResourceIdentity(
DeadLetterWithResourceIdentity deadLetterWithResourceIdentity) {
if (this.innerProperties() == null) {
this.innerProperties = new EventSubscriptionProperties();
}
this.innerProperties().withDeadLetterWithResourceIdentity(deadLetterWithResourceIdentity);
return this;
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.eventgrid.models.DeadLetterDestination;
import com.azure.resourcemanager.eventgrid.models.DeadLetterWithResourceIdentity;
import com.azure.resourcemanager.eventgrid.models.DeliveryWithResourceIdentity;
import com.azure.resourcemanager.eventgrid.models.EventDeliverySchema;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptionDestination;
import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter;
Expand Down Expand Up @@ -41,6 +43,16 @@ public final class EventSubscriptionProperties {
@JsonProperty(value = "destination")
private EventSubscriptionDestination destination;

/*
* Information about the destination where events have to be delivered for
* the event subscription.
* Uses the managed identity setup on the parent resource (namely, topic or
* domain) to acquire the authentication tokens being used during delivery
* / dead-lettering.
*/
@JsonProperty(value = "deliveryWithResourceIdentity")
private DeliveryWithResourceIdentity deliveryWithResourceIdentity;

/*
* Information about the filter for the event subscription.
*/
Expand Down Expand Up @@ -78,6 +90,17 @@ public final class EventSubscriptionProperties {
@JsonProperty(value = "deadLetterDestination")
private DeadLetterDestination deadLetterDestination;

/*
* The dead letter destination of the event subscription. Any event that
* cannot be delivered to its' destination is sent to the dead letter
* destination.
* Uses the managed identity setup on the parent resource (namely, topic or
* domain) to acquire the authentication tokens being used during delivery
* / dead-lettering.
*/
@JsonProperty(value = "deadLetterWithResourceIdentity")
private DeadLetterWithResourceIdentity deadLetterWithResourceIdentity;

/**
* Get the topic property: Name of the topic of the event subscription.
*
Expand Down Expand Up @@ -118,6 +141,31 @@ public EventSubscriptionProperties withDestination(EventSubscriptionDestination
return this;
}

/**
* Get the deliveryWithResourceIdentity property: Information about the destination where events have to be
* delivered for the event subscription. Uses the managed identity setup on the parent resource (namely, topic or
* domain) to acquire the authentication tokens being used during delivery / dead-lettering.
*
* @return the deliveryWithResourceIdentity value.
*/
public DeliveryWithResourceIdentity deliveryWithResourceIdentity() {
return this.deliveryWithResourceIdentity;
}

/**
* Set the deliveryWithResourceIdentity property: Information about the destination where events have to be
* delivered for the event subscription. Uses the managed identity setup on the parent resource (namely, topic or
* domain) to acquire the authentication tokens being used during delivery / dead-lettering.
*
* @param deliveryWithResourceIdentity the deliveryWithResourceIdentity value to set.
* @return the EventSubscriptionProperties object itself.
*/
public EventSubscriptionProperties withDeliveryWithResourceIdentity(
DeliveryWithResourceIdentity deliveryWithResourceIdentity) {
this.deliveryWithResourceIdentity = deliveryWithResourceIdentity;
return this;
}

/**
* Get the filter property: Information about the filter for the event subscription.
*
Expand Down Expand Up @@ -240,6 +288,33 @@ public EventSubscriptionProperties withDeadLetterDestination(DeadLetterDestinati
return this;
}

/**
* Get the deadLetterWithResourceIdentity property: The dead letter destination of the event subscription. Any event
* that cannot be delivered to its' destination is sent to the dead letter destination. Uses the managed identity
* setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during
* delivery / dead-lettering.
*
* @return the deadLetterWithResourceIdentity value.
*/
public DeadLetterWithResourceIdentity deadLetterWithResourceIdentity() {
return this.deadLetterWithResourceIdentity;
}

/**
* Set the deadLetterWithResourceIdentity property: The dead letter destination of the event subscription. Any event
* that cannot be delivered to its' destination is sent to the dead letter destination. Uses the managed identity
* setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during
* delivery / dead-lettering.
*
* @param deadLetterWithResourceIdentity the deadLetterWithResourceIdentity value to set.
* @return the EventSubscriptionProperties object itself.
*/
public EventSubscriptionProperties withDeadLetterWithResourceIdentity(
DeadLetterWithResourceIdentity deadLetterWithResourceIdentity) {
this.deadLetterWithResourceIdentity = deadLetterWithResourceIdentity;
return this;
}

/**
* Validates the instance.
*
Expand All @@ -249,6 +324,9 @@ public void validate() {
if (destination() != null) {
destination().validate();
}
if (deliveryWithResourceIdentity() != null) {
deliveryWithResourceIdentity().validate();
}
if (filter() != null) {
filter().validate();
}
Expand All @@ -258,5 +336,8 @@ public void validate() {
if (deadLetterDestination() != null) {
deadLetterDestination().validate();
}
if (deadLetterWithResourceIdentity() != null) {
deadLetterWithResourceIdentity().validate();
}
}
}
Loading