com.azure.resourcemanager.automation.models.WebhookCreateOrUpdateParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-automation Show documentation
Show all versions of azure-resourcemanager-automation Show documentation
This package contains Microsoft Azure SDK for Automation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Automation Client. Package tag package-2019-06.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.automation.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;
/** The parameters supplied to the create or update webhook operation. */
@JsonFlatten
@Fluent
public class WebhookCreateOrUpdateParameters {
@JsonIgnore private final ClientLogger logger = new ClientLogger(WebhookCreateOrUpdateParameters.class);
/*
* Gets or sets the name of the webhook.
*/
@JsonProperty(value = "name", required = true)
private String name;
/*
* Gets or sets the value of the enabled flag of webhook.
*/
@JsonProperty(value = "properties.isEnabled")
private Boolean isEnabled;
/*
* Gets or sets the uri.
*/
@JsonProperty(value = "properties.uri")
private String uri;
/*
* Gets or sets the expiry time.
*/
@JsonProperty(value = "properties.expiryTime")
private OffsetDateTime expiryTime;
/*
* Gets or sets the parameters of the job.
*/
@JsonProperty(value = "properties.parameters")
private Map parameters;
/*
* Gets or sets the runbook.
*/
@JsonProperty(value = "properties.runbook")
private RunbookAssociationProperty runbook;
/*
* Gets or sets the name of the hybrid worker group the webhook job will
* run on.
*/
@JsonProperty(value = "properties.runOn")
private String runOn;
/**
* Get the name property: Gets or sets the name of the webhook.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: Gets or sets the name of the webhook.
*
* @param name the name value to set.
* @return the WebhookCreateOrUpdateParameters object itself.
*/
public WebhookCreateOrUpdateParameters withName(String name) {
this.name = name;
return this;
}
/**
* Get the isEnabled property: Gets or sets the value of the enabled flag of webhook.
*
* @return the isEnabled value.
*/
public Boolean isEnabled() {
return this.isEnabled;
}
/**
* Set the isEnabled property: Gets or sets the value of the enabled flag of webhook.
*
* @param isEnabled the isEnabled value to set.
* @return the WebhookCreateOrUpdateParameters object itself.
*/
public WebhookCreateOrUpdateParameters withIsEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
return this;
}
/**
* Get the uri property: Gets or sets the uri.
*
* @return the uri value.
*/
public String uri() {
return this.uri;
}
/**
* Set the uri property: Gets or sets the uri.
*
* @param uri the uri value to set.
* @return the WebhookCreateOrUpdateParameters object itself.
*/
public WebhookCreateOrUpdateParameters withUri(String uri) {
this.uri = uri;
return this;
}
/**
* Get the expiryTime property: Gets or sets the expiry time.
*
* @return the expiryTime value.
*/
public OffsetDateTime expiryTime() {
return this.expiryTime;
}
/**
* Set the expiryTime property: Gets or sets the expiry time.
*
* @param expiryTime the expiryTime value to set.
* @return the WebhookCreateOrUpdateParameters object itself.
*/
public WebhookCreateOrUpdateParameters withExpiryTime(OffsetDateTime expiryTime) {
this.expiryTime = expiryTime;
return this;
}
/**
* Get the parameters property: Gets or sets the parameters of the job.
*
* @return the parameters value.
*/
public Map parameters() {
return this.parameters;
}
/**
* Set the parameters property: Gets or sets the parameters of the job.
*
* @param parameters the parameters value to set.
* @return the WebhookCreateOrUpdateParameters object itself.
*/
public WebhookCreateOrUpdateParameters withParameters(Map parameters) {
this.parameters = parameters;
return this;
}
/**
* Get the runbook property: Gets or sets the runbook.
*
* @return the runbook value.
*/
public RunbookAssociationProperty runbook() {
return this.runbook;
}
/**
* Set the runbook property: Gets or sets the runbook.
*
* @param runbook the runbook value to set.
* @return the WebhookCreateOrUpdateParameters object itself.
*/
public WebhookCreateOrUpdateParameters withRunbook(RunbookAssociationProperty runbook) {
this.runbook = runbook;
return this;
}
/**
* Get the runOn property: Gets or sets the name of the hybrid worker group the webhook job will run on.
*
* @return the runOn value.
*/
public String runOn() {
return this.runOn;
}
/**
* Set the runOn property: Gets or sets the name of the hybrid worker group the webhook job will run on.
*
* @param runOn the runOn value to set.
* @return the WebhookCreateOrUpdateParameters object itself.
*/
public WebhookCreateOrUpdateParameters withRunOn(String runOn) {
this.runOn = runOn;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (name() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property name in model WebhookCreateOrUpdateParameters"));
}
if (runbook() != null) {
runbook().validate();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy