diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AmazonRedshiftTableDataset.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AmazonRedshiftTableDataset.java new file mode 100644 index 000000000000..37e0e2fbfb71 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AmazonRedshiftTableDataset.java @@ -0,0 +1,105 @@ +/** + * 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.datafactory.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.datafactory.v2018_06_01.implementation.DatasetInner; + +/** + * The Amazon Redshift table dataset. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("AmazonRedshiftTable") +@JsonFlatten +public class AmazonRedshiftTableDataset extends DatasetInner { + /** + * This property will be retired. Please consider using schema + table + * properties instead. + */ + @JsonProperty(value = "typeProperties.tableName") + private Object tableName; + + /** + * The Amazon Redshift table name. Type: string (or Expression with + * resultType string). + */ + @JsonProperty(value = "typeProperties.table") + private Object table; + + /** + * The Amazon Redshift schema name. Type: string (or Expression with + * resultType string). + */ + @JsonProperty(value = "typeProperties.schema") + private Object amazonRedshiftTableDatasetSchema; + + /** + * Get this property will be retired. Please consider using schema + table properties instead. + * + * @return the tableName value + */ + public Object tableName() { + return this.tableName; + } + + /** + * Set this property will be retired. Please consider using schema + table properties instead. + * + * @param tableName the tableName value to set + * @return the AmazonRedshiftTableDataset object itself. + */ + public AmazonRedshiftTableDataset withTableName(Object tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the Amazon Redshift table name. Type: string (or Expression with resultType string). + * + * @return the table value + */ + public Object table() { + return this.table; + } + + /** + * Set the Amazon Redshift table name. Type: string (or Expression with resultType string). + * + * @param table the table value to set + * @return the AmazonRedshiftTableDataset object itself. + */ + public AmazonRedshiftTableDataset withTable(Object table) { + this.table = table; + return this; + } + + /** + * Get the Amazon Redshift schema name. Type: string (or Expression with resultType string). + * + * @return the amazonRedshiftTableDatasetSchema value + */ + public Object amazonRedshiftTableDatasetSchema() { + return this.amazonRedshiftTableDatasetSchema; + } + + /** + * Set the Amazon Redshift schema name. Type: string (or Expression with resultType string). + * + * @param amazonRedshiftTableDatasetSchema the amazonRedshiftTableDatasetSchema value to set + * @return the AmazonRedshiftTableDataset object itself. + */ + public AmazonRedshiftTableDataset withAmazonRedshiftTableDatasetSchema(Object amazonRedshiftTableDatasetSchema) { + this.amazonRedshiftTableDatasetSchema = amazonRedshiftTableDatasetSchema; + return this; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroCompressionCodec.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroCompressionCodec.java new file mode 100644 index 000000000000..bc2e43f668aa --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroCompressionCodec.java @@ -0,0 +1,50 @@ +/** + * 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.datafactory.v2018_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AvroCompressionCodec. + */ +public final class AvroCompressionCodec extends ExpandableStringEnum { + /** Static value none for AvroCompressionCodec. */ + public static final AvroCompressionCodec NONE = fromString("none"); + + /** Static value deflate for AvroCompressionCodec. */ + public static final AvroCompressionCodec DEFLATE = fromString("deflate"); + + /** Static value snappy for AvroCompressionCodec. */ + public static final AvroCompressionCodec SNAPPY = fromString("snappy"); + + /** Static value xz for AvroCompressionCodec. */ + public static final AvroCompressionCodec XZ = fromString("xz"); + + /** Static value bzip2 for AvroCompressionCodec. */ + public static final AvroCompressionCodec BZIP2 = fromString("bzip2"); + + /** + * Creates or finds a AvroCompressionCodec from its string representation. + * @param name a name to look for + * @return the corresponding AvroCompressionCodec + */ + @JsonCreator + public static AvroCompressionCodec fromString(String name) { + return fromString(name, AvroCompressionCodec.class); + } + + /** + * @return known AvroCompressionCodec values + */ + public static Collection values() { + return values(AvroCompressionCodec.class); + } +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroDataset.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroDataset.java new file mode 100644 index 000000000000..0fdcc0c97588 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroDataset.java @@ -0,0 +1,102 @@ +/** + * 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.datafactory.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.datafactory.v2018_06_01.implementation.DatasetInner; + +/** + * Avro dataset. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Avro") +@JsonFlatten +public class AvroDataset extends DatasetInner { + /** + * The location of the avro storage. + */ + @JsonProperty(value = "typeProperties.location", required = true) + private DatasetLocation location; + + /** + * Possible values include: 'none', 'deflate', 'snappy', 'xz', 'bzip2'. + */ + @JsonProperty(value = "typeProperties.avroCompressionCodec") + private AvroCompressionCodec avroCompressionCodec; + + /** + * The avroCompressionLevel property. + */ + @JsonProperty(value = "typeProperties.avroCompressionLevel") + private Integer avroCompressionLevel; + + /** + * Get the location of the avro storage. + * + * @return the location value + */ + public DatasetLocation location() { + return this.location; + } + + /** + * Set the location of the avro storage. + * + * @param location the location value to set + * @return the AvroDataset object itself. + */ + public AvroDataset withLocation(DatasetLocation location) { + this.location = location; + return this; + } + + /** + * Get possible values include: 'none', 'deflate', 'snappy', 'xz', 'bzip2'. + * + * @return the avroCompressionCodec value + */ + public AvroCompressionCodec avroCompressionCodec() { + return this.avroCompressionCodec; + } + + /** + * Set possible values include: 'none', 'deflate', 'snappy', 'xz', 'bzip2'. + * + * @param avroCompressionCodec the avroCompressionCodec value to set + * @return the AvroDataset object itself. + */ + public AvroDataset withAvroCompressionCodec(AvroCompressionCodec avroCompressionCodec) { + this.avroCompressionCodec = avroCompressionCodec; + return this; + } + + /** + * Get the avroCompressionLevel value. + * + * @return the avroCompressionLevel value + */ + public Integer avroCompressionLevel() { + return this.avroCompressionLevel; + } + + /** + * Set the avroCompressionLevel value. + * + * @param avroCompressionLevel the avroCompressionLevel value to set + * @return the AvroDataset object itself. + */ + public AvroDataset withAvroCompressionLevel(Integer avroCompressionLevel) { + this.avroCompressionLevel = avroCompressionLevel; + return this; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroSink.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroSink.java new file mode 100644 index 000000000000..b38046dd1ae1 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroSink.java @@ -0,0 +1,73 @@ +/** + * 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.datafactory.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A copy activity Avro sink. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("AvroSink") +public class AvroSink extends CopySink { + /** + * Avro store settings. + */ + @JsonProperty(value = "storeSettings") + private StoreWriteSettings storeSettings; + + /** + * Avro format settings. + */ + @JsonProperty(value = "formatSettings") + private AvroWriteSettings formatSettings; + + /** + * Get avro store settings. + * + * @return the storeSettings value + */ + public StoreWriteSettings storeSettings() { + return this.storeSettings; + } + + /** + * Set avro store settings. + * + * @param storeSettings the storeSettings value to set + * @return the AvroSink object itself. + */ + public AvroSink withStoreSettings(StoreWriteSettings storeSettings) { + this.storeSettings = storeSettings; + return this; + } + + /** + * Get avro format settings. + * + * @return the formatSettings value + */ + public AvroWriteSettings formatSettings() { + return this.formatSettings; + } + + /** + * Set avro format settings. + * + * @param formatSettings the formatSettings value to set + * @return the AvroSink object itself. + */ + public AvroSink withFormatSettings(AvroWriteSettings formatSettings) { + this.formatSettings = formatSettings; + return this; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroSource.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroSource.java new file mode 100644 index 000000000000..b4056b7a9021 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroSource.java @@ -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.datafactory.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A copy activity Avro source. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("AvroSource") +public class AvroSource extends CopySource { + /** + * Avro store settings. + */ + @JsonProperty(value = "storeSettings") + private StoreReadSettings storeSettings; + + /** + * Get avro store settings. + * + * @return the storeSettings value + */ + public StoreReadSettings storeSettings() { + return this.storeSettings; + } + + /** + * Set avro store settings. + * + * @param storeSettings the storeSettings value to set + * @return the AvroSource object itself. + */ + public AvroSource withStoreSettings(StoreReadSettings storeSettings) { + this.storeSettings = storeSettings; + return this; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroWriteSettings.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroWriteSettings.java new file mode 100644 index 000000000000..ba08956f64c2 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AvroWriteSettings.java @@ -0,0 +1,69 @@ +/** + * 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.datafactory.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Avro write settings. + */ +public class AvroWriteSettings extends FormatWriteSettings { + /** + * Top level record name in write result, which is required in AVRO spec. + */ + @JsonProperty(value = "recordName") + private String recordName; + + /** + * Record namespace in the write result. + */ + @JsonProperty(value = "recordNamespace") + private String recordNamespace; + + /** + * Get top level record name in write result, which is required in AVRO spec. + * + * @return the recordName value + */ + public String recordName() { + return this.recordName; + } + + /** + * Set top level record name in write result, which is required in AVRO spec. + * + * @param recordName the recordName value to set + * @return the AvroWriteSettings object itself. + */ + public AvroWriteSettings withRecordName(String recordName) { + this.recordName = recordName; + return this; + } + + /** + * Get record namespace in the write result. + * + * @return the recordNamespace value + */ + public String recordNamespace() { + return this.recordNamespace; + } + + /** + * Set record namespace in the write result. + * + * @param recordNamespace the recordNamespace value to set + * @return the AvroWriteSettings object itself. + */ + public AvroWriteSettings withRecordNamespace(String recordNamespace) { + this.recordNamespace = recordNamespace; + return this; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AzureMySqlSink.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AzureMySqlSink.java new file mode 100644 index 000000000000..462fdccbf2c0 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/AzureMySqlSink.java @@ -0,0 +1,48 @@ +/** + * 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.datafactory.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A copy activity Azure MySql sink. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("AzureMySqlSink") +public class AzureMySqlSink extends CopySink { + /** + * A query to execute before starting the copy. Type: string (or Expression + * with resultType string). + */ + @JsonProperty(value = "preCopyScript") + private Object preCopyScript; + + /** + * Get a query to execute before starting the copy. Type: string (or Expression with resultType string). + * + * @return the preCopyScript value + */ + public Object preCopyScript() { + return this.preCopyScript; + } + + /** + * Set a query to execute before starting the copy. Type: string (or Expression with resultType string). + * + * @param preCopyScript the preCopyScript value to set + * @return the AzureMySqlSink object itself. + */ + public AzureMySqlSink withPreCopyScript(Object preCopyScript) { + this.preCopyScript = preCopyScript; + return this; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySink.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySink.java index c15987f812a8..edfcb16126d4 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySink.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySink.java @@ -44,9 +44,11 @@ @JsonSubTypes.Type(name = "BlobSink", value = BlobSink.class), @JsonSubTypes.Type(name = "BinarySink", value = BinarySink.class), @JsonSubTypes.Type(name = "ParquetSink", value = ParquetSink.class), + @JsonSubTypes.Type(name = "AvroSink", value = AvroSink.class), @JsonSubTypes.Type(name = "AzureTableSink", value = AzureTableSink.class), @JsonSubTypes.Type(name = "AzureQueueSink", value = AzureQueueSink.class), @JsonSubTypes.Type(name = "SapCloudForCustomerSink", value = SapCloudForCustomerSink.class), + @JsonSubTypes.Type(name = "AzureMySqlSink", value = AzureMySqlSink.class), @JsonSubTypes.Type(name = "AzurePostgreSqlSink", value = AzurePostgreSqlSink.class), @JsonSubTypes.Type(name = "DelimitedTextSink", value = DelimitedTextSink.class) }) diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySource.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySource.java index 6cd0cad90e2b..f46451e5ab22 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySource.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/CopySource.java @@ -101,7 +101,8 @@ @JsonSubTypes.Type(name = "AzureTableSource", value = AzureTableSource.class), @JsonSubTypes.Type(name = "BinarySource", value = BinarySource.class), @JsonSubTypes.Type(name = "DelimitedTextSource", value = DelimitedTextSource.class), - @JsonSubTypes.Type(name = "ParquetSource", value = ParquetSource.class) + @JsonSubTypes.Type(name = "ParquetSource", value = ParquetSource.class), + @JsonSubTypes.Type(name = "AvroSource", value = AvroSource.class) }) public class CopySource { /** diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Db2TableDataset.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Db2TableDataset.java new file mode 100644 index 000000000000..66461135f2d1 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Db2TableDataset.java @@ -0,0 +1,104 @@ +/** + * 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.datafactory.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.datafactory.v2018_06_01.implementation.DatasetInner; + +/** + * The Db2 table dataset. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Db2Table") +@JsonFlatten +public class Db2TableDataset extends DatasetInner { + /** + * This property will be retired. Please consider using schema + table + * properties instead. + */ + @JsonProperty(value = "typeProperties.tableName") + private Object tableName; + + /** + * The Db2 schema name. Type: string (or Expression with resultType + * string). + */ + @JsonProperty(value = "typeProperties.schema") + private Object db2TableDatasetSchema; + + /** + * The Db2 table name. Type: string (or Expression with resultType string). + */ + @JsonProperty(value = "typeProperties.table") + private Object table; + + /** + * Get this property will be retired. Please consider using schema + table properties instead. + * + * @return the tableName value + */ + public Object tableName() { + return this.tableName; + } + + /** + * Set this property will be retired. Please consider using schema + table properties instead. + * + * @param tableName the tableName value to set + * @return the Db2TableDataset object itself. + */ + public Db2TableDataset withTableName(Object tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the Db2 schema name. Type: string (or Expression with resultType string). + * + * @return the db2TableDatasetSchema value + */ + public Object db2TableDatasetSchema() { + return this.db2TableDatasetSchema; + } + + /** + * Set the Db2 schema name. Type: string (or Expression with resultType string). + * + * @param db2TableDatasetSchema the db2TableDatasetSchema value to set + * @return the Db2TableDataset object itself. + */ + public Db2TableDataset withDb2TableDatasetSchema(Object db2TableDatasetSchema) { + this.db2TableDatasetSchema = db2TableDatasetSchema; + return this; + } + + /** + * Get the Db2 table name. Type: string (or Expression with resultType string). + * + * @return the table value + */ + public Object table() { + return this.table; + } + + /** + * Set the Db2 table name. Type: string (or Expression with resultType string). + * + * @param table the table value to set + * @return the Db2TableDataset object itself. + */ + public Db2TableDataset withTable(Object table) { + this.table = table; + return this; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/EventSubscriptionStatus.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/EventSubscriptionStatus.java new file mode 100644 index 000000000000..e973411005e9 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/EventSubscriptionStatus.java @@ -0,0 +1,50 @@ +/** + * 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.datafactory.v2018_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EventSubscriptionStatus. + */ +public final class EventSubscriptionStatus extends ExpandableStringEnum { + /** Static value Enabled for EventSubscriptionStatus. */ + public static final EventSubscriptionStatus ENABLED = fromString("Enabled"); + + /** Static value Provisioning for EventSubscriptionStatus. */ + public static final EventSubscriptionStatus PROVISIONING = fromString("Provisioning"); + + /** Static value Deprovisioning for EventSubscriptionStatus. */ + public static final EventSubscriptionStatus DEPROVISIONING = fromString("Deprovisioning"); + + /** Static value Disabled for EventSubscriptionStatus. */ + public static final EventSubscriptionStatus DISABLED = fromString("Disabled"); + + /** Static value Unknown for EventSubscriptionStatus. */ + public static final EventSubscriptionStatus UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a EventSubscriptionStatus from its string representation. + * @param name a name to look for + * @return the corresponding EventSubscriptionStatus + */ + @JsonCreator + public static EventSubscriptionStatus fromString(String name) { + return fromString(name, EventSubscriptionStatus.class); + } + + /** + * @return known EventSubscriptionStatus values + */ + public static Collection values() { + return values(EventSubscriptionStatus.class); + } +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/EventSubscriptionStatusTypes.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/EventSubscriptionStatusTypes.java new file mode 100644 index 000000000000..e28f4f933086 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/EventSubscriptionStatusTypes.java @@ -0,0 +1,50 @@ +/** + * 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.datafactory.v2018_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for EventSubscriptionStatusTypes. + */ +public final class EventSubscriptionStatusTypes extends ExpandableStringEnum { + /** Static value Enabled for EventSubscriptionStatusTypes. */ + public static final EventSubscriptionStatusTypes ENABLED = fromString("Enabled"); + + /** Static value Provisioning for EventSubscriptionStatusTypes. */ + public static final EventSubscriptionStatusTypes PROVISIONING = fromString("Provisioning"); + + /** Static value Deprovisioning for EventSubscriptionStatusTypes. */ + public static final EventSubscriptionStatusTypes DEPROVISIONING = fromString("Deprovisioning"); + + /** Static value Disabled for EventSubscriptionStatusTypes. */ + public static final EventSubscriptionStatusTypes DISABLED = fromString("Disabled"); + + /** Static value Unknown for EventSubscriptionStatusTypes. */ + public static final EventSubscriptionStatusTypes UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a EventSubscriptionStatusTypes from its string representation. + * @param name a name to look for + * @return the corresponding EventSubscriptionStatusTypes + */ + @JsonCreator + public static EventSubscriptionStatusTypes fromString(String name) { + return fromString(name, EventSubscriptionStatusTypes.class); + } + + /** + * @return known EventSubscriptionStatusTypes values + */ + public static Collection values() { + return values(EventSubscriptionStatusTypes.class); + } +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/NetezzaTableDataset.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/NetezzaTableDataset.java index 40cda912acf8..ee66b234256b 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/NetezzaTableDataset.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/NetezzaTableDataset.java @@ -22,13 +22,28 @@ @JsonFlatten public class NetezzaTableDataset extends DatasetInner { /** - * The table name. Type: string (or Expression with resultType string). + * This property will be retired. Please consider using schema + table + * properties instead. */ @JsonProperty(value = "typeProperties.tableName") private Object tableName; /** - * Get the table name. Type: string (or Expression with resultType string). + * The table name of the Netezza. Type: string (or Expression with + * resultType string). + */ + @JsonProperty(value = "typeProperties.table") + private Object table; + + /** + * The schema name of the Netezza. Type: string (or Expression with + * resultType string). + */ + @JsonProperty(value = "typeProperties.schema") + private Object netezzaTableDatasetSchema; + + /** + * Get this property will be retired. Please consider using schema + table properties instead. * * @return the tableName value */ @@ -37,7 +52,7 @@ public Object tableName() { } /** - * Set the table name. Type: string (or Expression with resultType string). + * Set this property will be retired. Please consider using schema + table properties instead. * * @param tableName the tableName value to set * @return the NetezzaTableDataset object itself. @@ -47,4 +62,44 @@ public NetezzaTableDataset withTableName(Object tableName) { return this; } + /** + * Get the table name of the Netezza. Type: string (or Expression with resultType string). + * + * @return the table value + */ + public Object table() { + return this.table; + } + + /** + * Set the table name of the Netezza. Type: string (or Expression with resultType string). + * + * @param table the table value to set + * @return the NetezzaTableDataset object itself. + */ + public NetezzaTableDataset withTable(Object table) { + this.table = table; + return this; + } + + /** + * Get the schema name of the Netezza. Type: string (or Expression with resultType string). + * + * @return the netezzaTableDatasetSchema value + */ + public Object netezzaTableDatasetSchema() { + return this.netezzaTableDatasetSchema; + } + + /** + * Set the schema name of the Netezza. Type: string (or Expression with resultType string). + * + * @param netezzaTableDatasetSchema the netezzaTableDatasetSchema value to set + * @return the NetezzaTableDataset object itself. + */ + public NetezzaTableDataset withNetezzaTableDatasetSchema(Object netezzaTableDatasetSchema) { + this.netezzaTableDatasetSchema = netezzaTableDatasetSchema; + return this; + } + } diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Office365Source.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Office365Source.java index 3f15d7fb5424..9150d87be57a 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Office365Source.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Office365Source.java @@ -47,7 +47,7 @@ public class Office365Source extends CopySource { private Object startTime; /** - * End time of the requested range for thsi dataset. Type: string (or + * End time of the requested range for this dataset. Type: string (or * Expression with resultType string). */ @JsonProperty(value = "endTime") @@ -134,7 +134,7 @@ public Office365Source withStartTime(Object startTime) { } /** - * Get end time of the requested range for thsi dataset. Type: string (or Expression with resultType string). + * Get end time of the requested range for this dataset. Type: string (or Expression with resultType string). * * @return the endTime value */ @@ -143,7 +143,7 @@ public Object endTime() { } /** - * Set end time of the requested range for thsi dataset. Type: string (or Expression with resultType string). + * Set end time of the requested range for this dataset. Type: string (or Expression with resultType string). * * @param endTime the endTime value to set * @return the Office365Source object itself. diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/PostgreSqlTableDataset.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/PostgreSqlTableDataset.java index 9dbf85baf476..751eefa90c8b 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/PostgreSqlTableDataset.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/PostgreSqlTableDataset.java @@ -22,14 +22,28 @@ @JsonFlatten public class PostgreSqlTableDataset extends DatasetInner { /** - * The PostgreSQL table name. Type: string (or Expression with resultType - * string). + * This property will be retired. Please consider using schema + table + * properties instead. */ @JsonProperty(value = "typeProperties.tableName") private Object tableName; /** - * Get the PostgreSQL table name. Type: string (or Expression with resultType string). + * The PostgreSQL table name. Type: string (or Expression with resultType + * string). + */ + @JsonProperty(value = "typeProperties.table") + private Object table; + + /** + * The PostgreSQL schema name. Type: string (or Expression with resultType + * string). + */ + @JsonProperty(value = "typeProperties.schema") + private Object postgreSqlTableDatasetSchema; + + /** + * Get this property will be retired. Please consider using schema + table properties instead. * * @return the tableName value */ @@ -38,7 +52,7 @@ public Object tableName() { } /** - * Set the PostgreSQL table name. Type: string (or Expression with resultType string). + * Set this property will be retired. Please consider using schema + table properties instead. * * @param tableName the tableName value to set * @return the PostgreSqlTableDataset object itself. @@ -48,4 +62,44 @@ public PostgreSqlTableDataset withTableName(Object tableName) { return this; } + /** + * Get the PostgreSQL table name. Type: string (or Expression with resultType string). + * + * @return the table value + */ + public Object table() { + return this.table; + } + + /** + * Set the PostgreSQL table name. Type: string (or Expression with resultType string). + * + * @param table the table value to set + * @return the PostgreSqlTableDataset object itself. + */ + public PostgreSqlTableDataset withTable(Object table) { + this.table = table; + return this; + } + + /** + * Get the PostgreSQL schema name. Type: string (or Expression with resultType string). + * + * @return the postgreSqlTableDatasetSchema value + */ + public Object postgreSqlTableDatasetSchema() { + return this.postgreSqlTableDatasetSchema; + } + + /** + * Set the PostgreSQL schema name. Type: string (or Expression with resultType string). + * + * @param postgreSqlTableDatasetSchema the postgreSqlTableDatasetSchema value to set + * @return the PostgreSqlTableDataset object itself. + */ + public PostgreSqlTableDataset withPostgreSqlTableDatasetSchema(Object postgreSqlTableDatasetSchema) { + this.postgreSqlTableDatasetSchema = postgreSqlTableDatasetSchema; + return this; + } + } diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/TriggerSubscriptionOperationStatus.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/TriggerSubscriptionOperationStatus.java new file mode 100644 index 000000000000..e1cbdecd0d62 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/TriggerSubscriptionOperationStatus.java @@ -0,0 +1,30 @@ +/** + * 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.datafactory.v2018_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.datafactory.v2018_06_01.implementation.DataFactoryManager; +import com.microsoft.azure.management.datafactory.v2018_06_01.implementation.TriggerSubscriptionOperationStatusInner; + +/** + * Type representing TriggerSubscriptionOperationStatus. + */ +public interface TriggerSubscriptionOperationStatus extends HasInner, HasManager { + /** + * @return the status value. + */ + EventSubscriptionStatus status(); + + /** + * @return the triggerName value. + */ + String triggerName(); + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Triggers.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Triggers.java index 00c0ed05ffbb..fc9071132cce 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Triggers.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/Triggers.java @@ -18,6 +18,39 @@ * Type representing Triggers. */ public interface Triggers extends SupportsCreating, HasInner { + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable subscribeToEventsAsync(String resourceGroupName, String factoryName, String triggerName); + + /** + * Get a trigger's event subscription status. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getEventSubscriptionStatusAsync(String resourceGroupName, String factoryName, String triggerName); + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable unsubscribeFromEventsAsync(String resourceGroupName, String factoryName, String triggerName); + /** * Starts a trigger. * diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/DatasetInner.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/DatasetInner.java index 33b6aa3da227..3b4c46f3a30a 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/DatasetInner.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/DatasetInner.java @@ -80,6 +80,8 @@ @JsonSubTypes.Type(name = "OdbcTable", value = OdbcTableDataset.class), @JsonSubTypes.Type(name = "InformixTable", value = InformixTableDataset.class), @JsonSubTypes.Type(name = "RelationalTable", value = RelationalTableDataset.class), + @JsonSubTypes.Type(name = "Db2Table", value = Db2TableDataset.class), + @JsonSubTypes.Type(name = "AmazonRedshiftTable", value = AmazonRedshiftTableDataset.class), @JsonSubTypes.Type(name = "AzureMySqlTable", value = AzureMySqlTableDataset.class), @JsonSubTypes.Type(name = "TeradataTable", value = TeradataTableDataset.class), @JsonSubTypes.Type(name = "OracleTable", value = OracleTableDataset.class), @@ -105,6 +107,7 @@ @JsonSubTypes.Type(name = "Binary", value = BinaryDataset.class), @JsonSubTypes.Type(name = "DelimitedText", value = DelimitedTextDataset.class), @JsonSubTypes.Type(name = "Parquet", value = ParquetDataset.class), + @JsonSubTypes.Type(name = "Avro", value = AvroDataset.class), @JsonSubTypes.Type(name = "AmazonS3Object", value = AmazonS3Dataset.class) }) public class DatasetInner { diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggerSubscriptionOperationStatusImpl.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggerSubscriptionOperationStatusImpl.java new file mode 100644 index 000000000000..099ec48d8a94 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggerSubscriptionOperationStatusImpl.java @@ -0,0 +1,37 @@ +/** + * 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.datafactory.v2018_06_01.implementation; + +import com.microsoft.azure.management.datafactory.v2018_06_01.TriggerSubscriptionOperationStatus; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.datafactory.v2018_06_01.EventSubscriptionStatus; + +class TriggerSubscriptionOperationStatusImpl extends WrapperImpl implements TriggerSubscriptionOperationStatus { + private final DataFactoryManager manager; + TriggerSubscriptionOperationStatusImpl(TriggerSubscriptionOperationStatusInner inner, DataFactoryManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataFactoryManager manager() { + return this.manager; + } + + @Override + public EventSubscriptionStatus status() { + return this.inner().status(); + } + + @Override + public String triggerName() { + return this.inner().triggerName(); + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggerSubscriptionOperationStatusInner.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggerSubscriptionOperationStatusInner.java new file mode 100644 index 000000000000..43736685b9f3 --- /dev/null +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggerSubscriptionOperationStatusInner.java @@ -0,0 +1,49 @@ +/** + * 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.datafactory.v2018_06_01.implementation; + +import com.microsoft.azure.management.datafactory.v2018_06_01.EventSubscriptionStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the response of a trigger subscription operation. + */ +public class TriggerSubscriptionOperationStatusInner { + /** + * Trigger name. + */ + @JsonProperty(value = "triggerName", access = JsonProperty.Access.WRITE_ONLY) + private String triggerName; + + /** + * Event Subscription Status. Possible values include: 'Enabled', + * 'Provisioning', 'Deprovisioning', 'Disabled', 'Unknown'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private EventSubscriptionStatus status; + + /** + * Get trigger name. + * + * @return the triggerName value + */ + public String triggerName() { + return this.triggerName; + } + + /** + * Get event Subscription Status. Possible values include: 'Enabled', 'Provisioning', 'Deprovisioning', 'Disabled', 'Unknown'. + * + * @return the status value + */ + public EventSubscriptionStatus status() { + return this.status; + } + +} diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersImpl.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersImpl.java index 65f83b0487f5..8800f4012102 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersImpl.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersImpl.java @@ -15,6 +15,7 @@ import rx.Observable; import rx.functions.Func1; import com.microsoft.azure.Page; +import com.microsoft.azure.management.datafactory.v2018_06_01.TriggerSubscriptionOperationStatus; import com.microsoft.azure.management.datafactory.v2018_06_01.FactoryTriggerResource; class TriggersImpl extends WrapperImpl implements Triggers { @@ -42,6 +43,42 @@ private FactoryTriggerResourceImpl wrapModel(String name) { return new FactoryTriggerResourceImpl(name, this.manager()); } + @Override + public Observable subscribeToEventsAsync(String resourceGroupName, String factoryName, String triggerName) { + TriggersInner client = this.inner(); + return client.subscribeToEventsAsync(resourceGroupName, factoryName, triggerName) + .map(new Func1() { + @Override + public TriggerSubscriptionOperationStatus call(TriggerSubscriptionOperationStatusInner inner) { + return new TriggerSubscriptionOperationStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable getEventSubscriptionStatusAsync(String resourceGroupName, String factoryName, String triggerName) { + TriggersInner client = this.inner(); + return client.getEventSubscriptionStatusAsync(resourceGroupName, factoryName, triggerName) + .map(new Func1() { + @Override + public TriggerSubscriptionOperationStatus call(TriggerSubscriptionOperationStatusInner inner) { + return new TriggerSubscriptionOperationStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable unsubscribeFromEventsAsync(String resourceGroupName, String factoryName, String triggerName) { + TriggersInner client = this.inner(); + return client.unsubscribeFromEventsAsync(resourceGroupName, factoryName, triggerName) + .map(new Func1() { + @Override + public TriggerSubscriptionOperationStatus call(TriggerSubscriptionOperationStatusInner inner) { + return new TriggerSubscriptionOperationStatusImpl(inner, manager()); + } + }); + } + @Override public Completable startAsync(String resourceGroupName, String factoryName, String triggerName) { TriggersInner client = this.inner(); diff --git a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersInner.java b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersInner.java index d285a8b32111..e58492a45379 100644 --- a/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersInner.java +++ b/datafactory/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/TriggersInner.java @@ -78,6 +78,26 @@ interface TriggersService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactory.v2018_06_01.Triggers subscribeToEvents" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents") + Observable> subscribeToEvents(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactory.v2018_06_01.Triggers beginSubscribeToEvents" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents") + Observable> beginSubscribeToEvents(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactory.v2018_06_01.Triggers getEventSubscriptionStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/getEventSubscriptionStatus") + Observable> getEventSubscriptionStatus(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactory.v2018_06_01.Triggers unsubscribeFromEvents" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents") + Observable> unsubscribeFromEvents(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactory.v2018_06_01.Triggers beginUnsubscribeFromEvents" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents") + Observable> beginUnsubscribeFromEvents(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.datafactory.v2018_06_01.Triggers start" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start") Observable> start(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("factoryName") String factoryName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -705,6 +725,439 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggerSubscriptionOperationStatusInner object if successful. + */ + public TriggerSubscriptionOperationStatusInner subscribeToEvents(String resourceGroupName, String factoryName, String triggerName) { + return subscribeToEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).toBlocking().last().body(); + } + + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture subscribeToEventsAsync(String resourceGroupName, String factoryName, String triggerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(subscribeToEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName), serviceCallback); + } + + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable subscribeToEventsAsync(String resourceGroupName, String factoryName, String triggerName) { + return subscribeToEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).map(new Func1, TriggerSubscriptionOperationStatusInner>() { + @Override + public TriggerSubscriptionOperationStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> subscribeToEventsWithServiceResponseAsync(String resourceGroupName, String factoryName, String triggerName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); + } + if (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.subscribeToEvents(this.client.subscriptionId(), resourceGroupName, factoryName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggerSubscriptionOperationStatusInner object if successful. + */ + public TriggerSubscriptionOperationStatusInner beginSubscribeToEvents(String resourceGroupName, String factoryName, String triggerName) { + return beginSubscribeToEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).toBlocking().single().body(); + } + + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginSubscribeToEventsAsync(String resourceGroupName, String factoryName, String triggerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSubscribeToEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName), serviceCallback); + } + + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggerSubscriptionOperationStatusInner object + */ + public Observable beginSubscribeToEventsAsync(String resourceGroupName, String factoryName, String triggerName) { + return beginSubscribeToEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).map(new Func1, TriggerSubscriptionOperationStatusInner>() { + @Override + public TriggerSubscriptionOperationStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Subscribe event trigger to events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggerSubscriptionOperationStatusInner object + */ + public Observable> beginSubscribeToEventsWithServiceResponseAsync(String resourceGroupName, String factoryName, String triggerName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); + } + if (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginSubscribeToEvents(this.client.subscriptionId(), resourceGroupName, factoryName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSubscribeToEventsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSubscribeToEventsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a trigger's event subscription status. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggerSubscriptionOperationStatusInner object if successful. + */ + public TriggerSubscriptionOperationStatusInner getEventSubscriptionStatus(String resourceGroupName, String factoryName, String triggerName) { + return getEventSubscriptionStatusWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).toBlocking().single().body(); + } + + /** + * Get a trigger's event subscription status. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getEventSubscriptionStatusAsync(String resourceGroupName, String factoryName, String triggerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getEventSubscriptionStatusWithServiceResponseAsync(resourceGroupName, factoryName, triggerName), serviceCallback); + } + + /** + * Get a trigger's event subscription status. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggerSubscriptionOperationStatusInner object + */ + public Observable getEventSubscriptionStatusAsync(String resourceGroupName, String factoryName, String triggerName) { + return getEventSubscriptionStatusWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).map(new Func1, TriggerSubscriptionOperationStatusInner>() { + @Override + public TriggerSubscriptionOperationStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a trigger's event subscription status. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggerSubscriptionOperationStatusInner object + */ + public Observable> getEventSubscriptionStatusWithServiceResponseAsync(String resourceGroupName, String factoryName, String triggerName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); + } + if (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getEventSubscriptionStatus(this.client.subscriptionId(), resourceGroupName, factoryName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getEventSubscriptionStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getEventSubscriptionStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggerSubscriptionOperationStatusInner object if successful. + */ + public TriggerSubscriptionOperationStatusInner unsubscribeFromEvents(String resourceGroupName, String factoryName, String triggerName) { + return unsubscribeFromEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).toBlocking().last().body(); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture unsubscribeFromEventsAsync(String resourceGroupName, String factoryName, String triggerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unsubscribeFromEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName), serviceCallback); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unsubscribeFromEventsAsync(String resourceGroupName, String factoryName, String triggerName) { + return unsubscribeFromEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).map(new Func1, TriggerSubscriptionOperationStatusInner>() { + @Override + public TriggerSubscriptionOperationStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unsubscribeFromEventsWithServiceResponseAsync(String resourceGroupName, String factoryName, String triggerName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); + } + if (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.unsubscribeFromEvents(this.client.subscriptionId(), resourceGroupName, factoryName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TriggerSubscriptionOperationStatusInner object if successful. + */ + public TriggerSubscriptionOperationStatusInner beginUnsubscribeFromEvents(String resourceGroupName, String factoryName, String triggerName) { + return beginUnsubscribeFromEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).toBlocking().single().body(); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUnsubscribeFromEventsAsync(String resourceGroupName, String factoryName, String triggerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnsubscribeFromEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName), serviceCallback); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggerSubscriptionOperationStatusInner object + */ + public Observable beginUnsubscribeFromEventsAsync(String resourceGroupName, String factoryName, String triggerName) { + return beginUnsubscribeFromEventsWithServiceResponseAsync(resourceGroupName, factoryName, triggerName).map(new Func1, TriggerSubscriptionOperationStatusInner>() { + @Override + public TriggerSubscriptionOperationStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Unsubscribe event trigger from events. + * + * @param resourceGroupName The resource group name. + * @param factoryName The factory name. + * @param triggerName The trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TriggerSubscriptionOperationStatusInner object + */ + public Observable> beginUnsubscribeFromEventsWithServiceResponseAsync(String resourceGroupName, String factoryName, String triggerName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (factoryName == null) { + throw new IllegalArgumentException("Parameter factoryName is required and cannot be null."); + } + if (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginUnsubscribeFromEvents(this.client.subscriptionId(), resourceGroupName, factoryName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnsubscribeFromEventsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUnsubscribeFromEventsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Starts a trigger. *