Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* 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.eventgrid;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonSubTypes;

/**
* Information about the dead letter destination for an event subscription. To
* configure a deadletter destination, do not directly instantiate an object of
* this class. Instead, instantiate an object of a derived class. Currently,
* StorageBlobDeadLetterDestination is the only class that derives from this
* class.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeName("DeadLetterDestination")
@JsonSubTypes({
@JsonSubTypes.Type(name = "StorageBlob", value = StorageBlobDeadLetterDestination.class)
})
public class DeadLetterDestination {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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.eventgrid;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for EventDeliverySchema.
*/
public final class EventDeliverySchema extends ExpandableStringEnum<EventDeliverySchema> {
/** Static value EventGridSchema for EventDeliverySchema. */
public static final EventDeliverySchema EVENT_GRID_SCHEMA = fromString("EventGridSchema");

/** Static value InputEventSchema for EventDeliverySchema. */
public static final EventDeliverySchema INPUT_EVENT_SCHEMA = fromString("InputEventSchema");

/** Static value CloudEventV01Schema for EventDeliverySchema. */
public static final EventDeliverySchema CLOUD_EVENT_V01SCHEMA = fromString("CloudEventV01Schema");

/**
* Creates or finds a EventDeliverySchema from its string representation.
* @param name a name to look for
* @return the corresponding EventDeliverySchema
*/
@JsonCreator
public static EventDeliverySchema fromString(String name) {
return fromString(name, EventDeliverySchema.class);
}

/**
* @return known EventDeliverySchema values
*/
public static Collection<EventDeliverySchema> values() {
return values(EventDeliverySchema.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
@JsonTypeName("EventSubscriptionDestination")
@JsonSubTypes({
@JsonSubTypes.Type(name = "WebHook", value = WebHookEventSubscriptionDestination.class),
@JsonSubTypes.Type(name = "EventHub", value = EventHubEventSubscriptionDestination.class)
@JsonSubTypes.Type(name = "EventHub", value = EventHubEventSubscriptionDestination.class),
@JsonSubTypes.Type(name = "StorageQueue", value = StorageQueueEventSubscriptionDestination.class),
@JsonSubTypes.Type(name = "HybridConnection", value = HybridConnectionEventSubscriptionDestination.class)
})
public class EventSubscriptionDestination {
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public final class EventSubscriptionProvisioningState extends ExpandableStringEn
/** Static value Failed for EventSubscriptionProvisioningState. */
public static final EventSubscriptionProvisioningState FAILED = fromString("Failed");

/** Static value AwaitingManualAction for EventSubscriptionProvisioningState. */
public static final EventSubscriptionProvisioningState AWAITING_MANUAL_ACTION = fromString("AwaitingManualAction");

/**
* Creates or finds a EventSubscriptionProvisioningState from its string representation.
* @param name a name to look for
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* 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.eventgrid;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* Information about the HybridConnection destination for an event
* subscription.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
@JsonTypeName("HybridConnection")
@JsonFlatten
public class HybridConnectionEventSubscriptionDestination extends EventSubscriptionDestination {
/**
* The Azure Resource ID of an hybrid connection that is the destination of
* an event subscription.
*/
@JsonProperty(value = "properties.resourceId")
private String resourceId;

/**
* 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 HybridConnectionEventSubscriptionDestination object itself.
*/
public HybridConnectionEventSubscriptionDestination withResourceId(String resourceId) {
this.resourceId = resourceId;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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.eventgrid;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for InputSchema.
*/
public final class InputSchema extends ExpandableStringEnum<InputSchema> {
/** Static value EventGridSchema for InputSchema. */
public static final InputSchema EVENT_GRID_SCHEMA = fromString("EventGridSchema");

/** Static value CustomEventSchema for InputSchema. */
public static final InputSchema CUSTOM_EVENT_SCHEMA = fromString("CustomEventSchema");

/** Static value CloudEventV01Schema for InputSchema. */
public static final InputSchema CLOUD_EVENT_V01SCHEMA = fromString("CloudEventV01Schema");

/**
* Creates or finds a InputSchema from its string representation.
* @param name a name to look for
* @return the corresponding InputSchema
*/
@JsonCreator
public static InputSchema fromString(String name) {
return fromString(name, InputSchema.class);
}

/**
* @return known InputSchema values
*/
public static Collection<InputSchema> values() {
return values(InputSchema.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* 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.eventgrid;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonSubTypes;

/**
* By default, Event Grid expects events to be in the Event Grid event schema.
* Specifying an input schema mapping enables publishing to Event Grid using a
* custom input schema. Currently, the only supported type of
* InputSchemaMapping is 'JsonInputSchemaMapping'.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputSchemaMappingType")
@JsonTypeName("InputSchemaMapping")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Json", value = JsonInputSchemaMapping.class)
})
public class InputSchemaMapping {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* 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.eventgrid;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* This is used to express the source of an input schema mapping for a single
* target field in the Event Grid Event schema. This is currently used in the
* mappings for the 'id','topic' and 'eventtime' properties. This represents a
* field in the input event schema.
*/
public class JsonField {
/**
* Name of a field in the input event schema that's to be used as the
* source of a mapping.
*/
@JsonProperty(value = "sourceField")
private String sourceField;

/**
* Get the sourceField value.
*
* @return the sourceField value
*/
public String sourceField() {
return this.sourceField;
}

/**
* Set the sourceField value.
*
* @param sourceField the sourceField value to set
* @return the JsonField object itself.
*/
public JsonField withSourceField(String sourceField) {
this.sourceField = sourceField;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/**
* 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.eventgrid;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* This is used to express the source of an input schema mapping for a single
* target field in the Event Grid Event schema. This is currently used in the
* mappings for the 'subject','eventtype' and 'dataversion' properties. This
* represents a field in the input event schema along with a default value to
* be used, and at least one of these two properties should be provided.
*/
public class JsonFieldWithDefault {
/**
* Name of a field in the input event schema that's to be used as the
* source of a mapping.
*/
@JsonProperty(value = "sourceField")
private String sourceField;

/**
* The default value to be used for mapping when a SourceField is not
* provided or if there's no property with the specified name in the
* published JSON event payload.
*/
@JsonProperty(value = "defaultValue")
private String defaultValue;

/**
* Get the sourceField value.
*
* @return the sourceField value
*/
public String sourceField() {
return this.sourceField;
}

/**
* Set the sourceField value.
*
* @param sourceField the sourceField value to set
* @return the JsonFieldWithDefault object itself.
*/
public JsonFieldWithDefault withSourceField(String sourceField) {
this.sourceField = sourceField;
return this;
}

/**
* Get the defaultValue value.
*
* @return the defaultValue value
*/
public String defaultValue() {
return this.defaultValue;
}

/**
* Set the defaultValue value.
*
* @param defaultValue the defaultValue value to set
* @return the JsonFieldWithDefault object itself.
*/
public JsonFieldWithDefault withDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
return this;
}

}
Loading