diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AzureFunctionReceiver.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AzureFunctionReceiver.java new file mode 100644 index 00000000000..620bef52631 --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/AzureFunctionReceiver.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.monitor; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An azure function receiver. + */ +public class AzureFunctionReceiver { + /** + * The name of the azure function receiver. Names must be unique across all + * receivers within an action group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The azure resource id of the function app. + */ + @JsonProperty(value = "functionAppResourceId", required = true) + private String functionAppResourceId; + + /** + * The function name in the function app. + */ + @JsonProperty(value = "functionName", required = true) + private String functionName; + + /** + * The http trigger url where http request sent to. + */ + @JsonProperty(value = "httpTriggerUrl", required = true) + private String httpTriggerUrl; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the AzureFunctionReceiver object itself. + */ + public AzureFunctionReceiver withName(String name) { + this.name = name; + return this; + } + + /** + * Get the functionAppResourceId value. + * + * @return the functionAppResourceId value + */ + public String functionAppResourceId() { + return this.functionAppResourceId; + } + + /** + * Set the functionAppResourceId value. + * + * @param functionAppResourceId the functionAppResourceId value to set + * @return the AzureFunctionReceiver object itself. + */ + public AzureFunctionReceiver withFunctionAppResourceId(String functionAppResourceId) { + this.functionAppResourceId = functionAppResourceId; + return this; + } + + /** + * Get the functionName value. + * + * @return the functionName value + */ + public String functionName() { + return this.functionName; + } + + /** + * Set the functionName value. + * + * @param functionName the functionName value to set + * @return the AzureFunctionReceiver object itself. + */ + public AzureFunctionReceiver withFunctionName(String functionName) { + this.functionName = functionName; + return this; + } + + /** + * Get the httpTriggerUrl value. + * + * @return the httpTriggerUrl value + */ + public String httpTriggerUrl() { + return this.httpTriggerUrl; + } + + /** + * Set the httpTriggerUrl value. + * + * @param httpTriggerUrl the httpTriggerUrl value to set + * @return the AzureFunctionReceiver object itself. + */ + public AzureFunctionReceiver withHttpTriggerUrl(String httpTriggerUrl) { + this.httpTriggerUrl = httpTriggerUrl; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/LogicAppReceiver.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/LogicAppReceiver.java new file mode 100644 index 00000000000..042a3191577 --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/LogicAppReceiver.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.monitor; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A logic app receiver. + */ +public class LogicAppReceiver { + /** + * The name of the logic app receiver. Names must be unique across all + * receivers within an action group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The azure resource id of the logic app receiver. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /** + * The callback url where http request sent to. + */ + @JsonProperty(value = "callbackUrl", required = true) + private String callbackUrl; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the LogicAppReceiver object itself. + */ + public LogicAppReceiver withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resourceId value. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId value. + * + * @param resourceId the resourceId value to set + * @return the LogicAppReceiver object itself. + */ + public LogicAppReceiver withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the callbackUrl value. + * + * @return the callbackUrl value + */ + public String callbackUrl() { + return this.callbackUrl; + } + + /** + * Set the callbackUrl value. + * + * @param callbackUrl the callbackUrl value to set + * @return the LogicAppReceiver object itself. + */ + public LogicAppReceiver withCallbackUrl(String callbackUrl) { + this.callbackUrl = callbackUrl; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/VoiceReceiver.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/VoiceReceiver.java new file mode 100644 index 00000000000..36aab350337 --- /dev/null +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/VoiceReceiver.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.monitor; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A voice receiver. + */ +public class VoiceReceiver { + /** + * The name of the voice receiver. Names must be unique across all + * receivers within an action group. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The country code of the voice receiver. + */ + @JsonProperty(value = "countryCode", required = true) + private String countryCode; + + /** + * The phone number of the voice receiver. + */ + @JsonProperty(value = "phoneNumber", required = true) + private String phoneNumber; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the VoiceReceiver object itself. + */ + public VoiceReceiver withName(String name) { + this.name = name; + return this; + } + + /** + * Get the countryCode value. + * + * @return the countryCode value + */ + public String countryCode() { + return this.countryCode; + } + + /** + * Set the countryCode value. + * + * @param countryCode the countryCode value to set + * @return the VoiceReceiver object itself. + */ + public VoiceReceiver withCountryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get the phoneNumber value. + * + * @return the phoneNumber value + */ + public String phoneNumber() { + return this.phoneNumber; + } + + /** + * Set the phoneNumber value. + * + * @param phoneNumber the phoneNumber value to set + * @return the VoiceReceiver object itself. + */ + public VoiceReceiver withPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + +} diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupResourceInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupResourceInner.java index 21b481e12da..8fb8513bd57 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupResourceInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupResourceInner.java @@ -15,6 +15,9 @@ import com.microsoft.azure.management.monitor.ItsmReceiver; import com.microsoft.azure.management.monitor.AzureAppPushReceiver; import com.microsoft.azure.management.monitor.AutomationRunbookReceiver; +import com.microsoft.azure.management.monitor.VoiceReceiver; +import com.microsoft.azure.management.monitor.LogicAppReceiver; +import com.microsoft.azure.management.monitor.AzureFunctionReceiver; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -74,6 +77,24 @@ public class ActionGroupResourceInner extends Resource { @JsonProperty(value = "properties.automationRunbookReceivers") private List automationRunbookReceivers; + /** + * The list of voice receivers that are part of this action group. + */ + @JsonProperty(value = "properties.voiceReceivers") + private List voiceReceivers; + + /** + * The list of logic app receivers that are part of this action group. + */ + @JsonProperty(value = "properties.logicAppReceivers") + private List logicAppReceivers; + + /** + * The list of azure function receivers that are part of this action group. + */ + @JsonProperty(value = "properties.azureFunctionReceivers") + private List azureFunctionReceivers; + /** * Get the groupShortName value. * @@ -234,4 +255,64 @@ public ActionGroupResourceInner withAutomationRunbookReceivers(List voiceReceivers() { + return this.voiceReceivers; + } + + /** + * Set the voiceReceivers value. + * + * @param voiceReceivers the voiceReceivers value to set + * @return the ActionGroupResourceInner object itself. + */ + public ActionGroupResourceInner withVoiceReceivers(List voiceReceivers) { + this.voiceReceivers = voiceReceivers; + return this; + } + + /** + * Get the logicAppReceivers value. + * + * @return the logicAppReceivers value + */ + public List logicAppReceivers() { + return this.logicAppReceivers; + } + + /** + * Set the logicAppReceivers value. + * + * @param logicAppReceivers the logicAppReceivers value to set + * @return the ActionGroupResourceInner object itself. + */ + public ActionGroupResourceInner withLogicAppReceivers(List logicAppReceivers) { + this.logicAppReceivers = logicAppReceivers; + return this; + } + + /** + * Get the azureFunctionReceivers value. + * + * @return the azureFunctionReceivers value + */ + public List azureFunctionReceivers() { + return this.azureFunctionReceivers; + } + + /** + * Set the azureFunctionReceivers value. + * + * @param azureFunctionReceivers the azureFunctionReceivers value to set + * @return the ActionGroupResourceInner object itself. + */ + public ActionGroupResourceInner withAzureFunctionReceivers(List azureFunctionReceivers) { + this.azureFunctionReceivers = azureFunctionReceivers; + return this; + } + } diff --git a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java index ec4987538a3..56a9f06700f 100644 --- a/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java +++ b/azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/ActionGroupsInner.java @@ -164,7 +164,7 @@ public Observable> createOrUpdateWithS throw new IllegalArgumentException("Parameter actionGroup is required and cannot be null."); } Validator.validate(actionGroup); - final String apiVersion = "2017-04-01"; + final String apiVersion = "2018-03-01"; return service.createOrUpdate(resourceGroupName, actionGroupName, this.client.subscriptionId(), actionGroup, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,7 +249,7 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-04-01"; + final String apiVersion = "2018-03-01"; return service.getByResourceGroup(resourceGroupName, actionGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -332,7 +332,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-04-01"; + final String apiVersion = "2018-03-01"; return service.delete(resourceGroupName, actionGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -425,7 +425,7 @@ public Observable> updateWithServiceRe throw new IllegalArgumentException("Parameter actionGroupPatch is required and cannot be null."); } Validator.validate(actionGroupPatch); - final String apiVersion = "2017-04-01"; + final String apiVersion = "2018-03-01"; return service.update(this.client.subscriptionId(), resourceGroupName, actionGroupName, apiVersion, actionGroupPatch, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -499,7 +499,7 @@ public Observable>> listWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-04-01"; + final String apiVersion = "2018-03-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -581,7 +581,7 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-04-01"; + final String apiVersion = "2018-03-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -672,7 +672,7 @@ public Observable> enableReceiverWithServiceResponseAsync( if (receiverName == null) { throw new IllegalArgumentException("Parameter receiverName is required and cannot be null."); } - final String apiVersion = "2017-04-01"; + final String apiVersion = "2018-03-01"; EnableRequest enableRequest = new EnableRequest(); enableRequest.withReceiverName(receiverName); return service.enableReceiver(resourceGroupName, actionGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), enableRequest, this.client.userAgent())