diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_managedidentitytypeproperties.go b/resource-manager/datafactory/2018-06-01/credentials/model_managedidentitytypeproperties.go new file mode 100644 index 00000000000..d2a070612f4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/credentials/model_managedidentitytypeproperties.go @@ -0,0 +1,8 @@ +package credentials + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedIdentityTypeProperties struct { + ResourceId *string `json:"resourceId,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_systemassignedmanagedidentitycredential.go b/resource-manager/datafactory/2018-06-01/credentials/model_systemassignedmanagedidentitycredential.go new file mode 100644 index 00000000000..42c79e69195 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/credentials/model_systemassignedmanagedidentitycredential.go @@ -0,0 +1,11 @@ +package credentials + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SystemAssignedManagedIdentityCredential struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Type string `json:"type"` + TypeProperties *ManagedIdentityTypeProperties `json:"typeProperties,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/credentials/model_userassignedmanagedidentitycredential.go b/resource-manager/datafactory/2018-06-01/credentials/model_userassignedmanagedidentitycredential.go new file mode 100644 index 00000000000..c47db874f29 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/credentials/model_userassignedmanagedidentitycredential.go @@ -0,0 +1,11 @@ +package credentials + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UserAssignedManagedIdentityCredential struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Type string `json:"type"` + TypeProperties ManagedIdentityTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/constants.go b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/constants.go index 927e0185e4c..d72cfcb616a 100644 --- a/resource-manager/datafactory/2018-06-01/dataflowdebugsession/constants.go +++ b/resource-manager/datafactory/2018-06-01/dataflowdebugsession/constants.go @@ -53,6 +53,44 @@ func parseDataFlowDebugCommandType(input string) (*DataFlowDebugCommandType, err return &out, nil } +type IntegrationRuntimeReferenceType string + +const ( + IntegrationRuntimeReferenceTypeIntegrationRuntimeReference IntegrationRuntimeReferenceType = "IntegrationRuntimeReference" +) + +func PossibleValuesForIntegrationRuntimeReferenceType() []string { + return []string{ + string(IntegrationRuntimeReferenceTypeIntegrationRuntimeReference), + } +} + +func (s *IntegrationRuntimeReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeReferenceType(input string) (*IntegrationRuntimeReferenceType, error) { + vals := map[string]IntegrationRuntimeReferenceType{ + "integrationruntimereference": IntegrationRuntimeReferenceTypeIntegrationRuntimeReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeReferenceType(input) + return &out, nil +} + type IntegrationRuntimeType string const ( diff --git a/resource-manager/datafactory/2018-06-01/dataflows/constants.go b/resource-manager/datafactory/2018-06-01/dataflows/constants.go new file mode 100644 index 00000000000..ada7ec054ae --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/constants.go @@ -0,0 +1,124 @@ +package dataflows + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataFlowReferenceType string + +const ( + DataFlowReferenceTypeDataFlowReference DataFlowReferenceType = "DataFlowReference" +) + +func PossibleValuesForDataFlowReferenceType() []string { + return []string{ + string(DataFlowReferenceTypeDataFlowReference), + } +} + +func (s *DataFlowReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDataFlowReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDataFlowReferenceType(input string) (*DataFlowReferenceType, error) { + vals := map[string]DataFlowReferenceType{ + "dataflowreference": DataFlowReferenceTypeDataFlowReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DataFlowReferenceType(input) + return &out, nil +} + +type DatasetReferenceType string + +const ( + DatasetReferenceTypeDatasetReference DatasetReferenceType = "DatasetReference" +) + +func PossibleValuesForDatasetReferenceType() []string { + return []string{ + string(DatasetReferenceTypeDatasetReference), + } +} + +func (s *DatasetReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDatasetReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDatasetReferenceType(input string) (*DatasetReferenceType, error) { + vals := map[string]DatasetReferenceType{ + "datasetreference": DatasetReferenceTypeDatasetReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DatasetReferenceType(input) + return &out, nil +} + +type Type string + +const ( + TypeLinkedServiceReference Type = "LinkedServiceReference" +) + +func PossibleValuesForType() []string { + return []string{ + string(TypeLinkedServiceReference), + } +} + +func (s *Type) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseType(input string) (*Type, error) { + vals := map[string]Type{ + "linkedservicereference": TypeLinkedServiceReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Type(input) + return &out, nil +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go index 8dfa8033a88..f2e4da7ca0c 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflow.go @@ -1,11 +1,69 @@ package dataflows +import ( + "encoding/json" + "fmt" + "strings" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DataFlow struct { - Annotations *[]interface{} `json:"annotations,omitempty"` - Description *string `json:"description,omitempty"` - Folder *DataFlowFolder `json:"folder,omitempty"` - Type string `json:"type"` +type DataFlow interface { +} + +// RawDataFlowImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDataFlowImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalDataFlowImplementation(input []byte) (DataFlow, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DataFlow into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Flowlet") { + var out Flowlet + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Flowlet: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MappingDataFlow") { + var out MappingDataFlow + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MappingDataFlow: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WranglingDataFlow") { + var out WranglingDataFlow + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WranglingDataFlow: %+v", err) + } + return out, nil + } + + out := RawDataFlowImpl{ + Type: value, + Values: temp, + } + return out, nil + } diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowreference.go b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowreference.go new file mode 100644 index 00000000000..0b5bdca5995 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowreference.go @@ -0,0 +1,11 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataFlowReference struct { + DatasetParameters *interface{} `json:"datasetParameters,omitempty"` + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type DataFlowReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go index 4d13e22dfbb..d34e6587922 100644 --- a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowresource.go @@ -1,5 +1,10 @@ package dataflows +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -10,3 +15,32 @@ type DataFlowResource struct { Properties DataFlow `json:"properties"` Type *string `json:"type,omitempty"` } + +var _ json.Unmarshaler = &DataFlowResource{} + +func (s *DataFlowResource) UnmarshalJSON(bytes []byte) error { + type alias DataFlowResource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DataFlowResource: %+v", err) + } + + s.Etag = decoded.Etag + s.Id = decoded.Id + s.Name = decoded.Name + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DataFlowResource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalDataFlowImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'DataFlowResource': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowsink.go b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowsink.go new file mode 100644 index 00000000000..480ed848136 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowsink.go @@ -0,0 +1,14 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataFlowSink struct { + Dataset *DatasetReference `json:"dataset,omitempty"` + Description *string `json:"description,omitempty"` + Flowlet *DataFlowReference `json:"flowlet,omitempty"` + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` + Name string `json:"name"` + RejectedDataLinkedService *LinkedServiceReference `json:"rejectedDataLinkedService,omitempty"` + SchemaLinkedService *LinkedServiceReference `json:"schemaLinkedService,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowsource.go b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowsource.go new file mode 100644 index 00000000000..04401e8c63f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_dataflowsource.go @@ -0,0 +1,13 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataFlowSource struct { + Dataset *DatasetReference `json:"dataset,omitempty"` + Description *string `json:"description,omitempty"` + Flowlet *DataFlowReference `json:"flowlet,omitempty"` + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` + Name string `json:"name"` + SchemaLinkedService *LinkedServiceReference `json:"schemaLinkedService,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_datasetreference.go b/resource-manager/datafactory/2018-06-01/dataflows/model_datasetreference.go new file mode 100644 index 00000000000..e55f190163e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_datasetreference.go @@ -0,0 +1,10 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type DatasetReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_flowlet.go b/resource-manager/datafactory/2018-06-01/dataflows/model_flowlet.go new file mode 100644 index 00000000000..41cba7be12d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_flowlet.go @@ -0,0 +1,44 @@ +package dataflows + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DataFlow = Flowlet{} + +type Flowlet struct { + TypeProperties *FlowletTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from DataFlow + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DataFlowFolder `json:"folder,omitempty"` +} + +var _ json.Marshaler = Flowlet{} + +func (s Flowlet) MarshalJSON() ([]byte, error) { + type wrapper Flowlet + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Flowlet: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Flowlet: %+v", err) + } + decoded["type"] = "Flowlet" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Flowlet: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_flowlettypeproperties.go b/resource-manager/datafactory/2018-06-01/dataflows/model_flowlettypeproperties.go new file mode 100644 index 00000000000..f07aa171257 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_flowlettypeproperties.go @@ -0,0 +1,12 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FlowletTypeProperties struct { + Script *string `json:"script,omitempty"` + ScriptLines *[]string `json:"scriptLines,omitempty"` + Sinks *[]DataFlowSink `json:"sinks,omitempty"` + Sources *[]DataFlowSource `json:"sources,omitempty"` + Transformations *[]Transformation `json:"transformations,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_linkedservicereference.go b/resource-manager/datafactory/2018-06-01/dataflows/model_linkedservicereference.go new file mode 100644 index 00000000000..05366e82e52 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_linkedservicereference.go @@ -0,0 +1,10 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedServiceReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type Type `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflow.go b/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflow.go new file mode 100644 index 00000000000..e2b7f4092f1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflow.go @@ -0,0 +1,44 @@ +package dataflows + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DataFlow = MappingDataFlow{} + +type MappingDataFlow struct { + TypeProperties *MappingDataFlowTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from DataFlow + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DataFlowFolder `json:"folder,omitempty"` +} + +var _ json.Marshaler = MappingDataFlow{} + +func (s MappingDataFlow) MarshalJSON() ([]byte, error) { + type wrapper MappingDataFlow + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MappingDataFlow: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MappingDataFlow: %+v", err) + } + decoded["type"] = "MappingDataFlow" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MappingDataFlow: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflowtypeproperties.go b/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflowtypeproperties.go new file mode 100644 index 00000000000..0df0ebbc342 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_mappingdataflowtypeproperties.go @@ -0,0 +1,12 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MappingDataFlowTypeProperties struct { + Script *string `json:"script,omitempty"` + ScriptLines *[]string `json:"scriptLines,omitempty"` + Sinks *[]DataFlowSink `json:"sinks,omitempty"` + Sources *[]DataFlowSource `json:"sources,omitempty"` + Transformations *[]Transformation `json:"transformations,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_powerquerysource.go b/resource-manager/datafactory/2018-06-01/dataflows/model_powerquerysource.go new file mode 100644 index 00000000000..f8a7be59199 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_powerquerysource.go @@ -0,0 +1,14 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PowerQuerySource struct { + Dataset *DatasetReference `json:"dataset,omitempty"` + Description *string `json:"description,omitempty"` + Flowlet *DataFlowReference `json:"flowlet,omitempty"` + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` + Name string `json:"name"` + SchemaLinkedService *LinkedServiceReference `json:"schemaLinkedService,omitempty"` + Script *string `json:"script,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_powerquerytypeproperties.go b/resource-manager/datafactory/2018-06-01/dataflows/model_powerquerytypeproperties.go new file mode 100644 index 00000000000..84cba366d0d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_powerquerytypeproperties.go @@ -0,0 +1,10 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PowerQueryTypeProperties struct { + DocumentLocale *string `json:"documentLocale,omitempty"` + Script *string `json:"script,omitempty"` + Sources *[]PowerQuerySource `json:"sources,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_transformation.go b/resource-manager/datafactory/2018-06-01/dataflows/model_transformation.go new file mode 100644 index 00000000000..77bbfe631a1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_transformation.go @@ -0,0 +1,12 @@ +package dataflows + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Transformation struct { + Dataset *DatasetReference `json:"dataset,omitempty"` + Description *string `json:"description,omitempty"` + Flowlet *DataFlowReference `json:"flowlet,omitempty"` + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` + Name string `json:"name"` +} diff --git a/resource-manager/datafactory/2018-06-01/dataflows/model_wranglingdataflow.go b/resource-manager/datafactory/2018-06-01/dataflows/model_wranglingdataflow.go new file mode 100644 index 00000000000..08af2e52045 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/dataflows/model_wranglingdataflow.go @@ -0,0 +1,44 @@ +package dataflows + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ DataFlow = WranglingDataFlow{} + +type WranglingDataFlow struct { + TypeProperties *PowerQueryTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from DataFlow + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DataFlowFolder `json:"folder,omitempty"` +} + +var _ json.Marshaler = WranglingDataFlow{} + +func (s WranglingDataFlow) MarshalJSON() ([]byte, error) { + type wrapper WranglingDataFlow + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WranglingDataFlow: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WranglingDataFlow: %+v", err) + } + decoded["type"] = "WranglingDataFlow" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WranglingDataFlow: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go new file mode 100644 index 00000000000..137ddd64439 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonmwsobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AmazonMWSObjectDataset{} + +type AmazonMWSObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AmazonMWSObjectDataset{} + +func (s AmazonMWSObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonMWSObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonMWSObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonMWSObjectDataset: %+v", err) + } + decoded["type"] = "AmazonMWSObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonMWSObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go new file mode 100644 index 00000000000..b11b8e9f05b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AmazonRdsForOracleTableDataset{} + +type AmazonRdsForOracleTableDataset struct { + TypeProperties *AmazonRdsForOracleTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AmazonRdsForOracleTableDataset{} + +func (s AmazonRdsForOracleTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonRdsForOracleTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRdsForOracleTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRdsForOracleTableDataset: %+v", err) + } + decoded["type"] = "AmazonRdsForOracleTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRdsForOracleTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledatasettypeproperties.go new file mode 100644 index 00000000000..e118e093b78 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsfororacletabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForOracleTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go new file mode 100644 index 00000000000..dd41dade77c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AmazonRdsForSqlServerTableDataset{} + +type AmazonRdsForSqlServerTableDataset struct { + TypeProperties *AmazonRdsForSqlServerTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AmazonRdsForSqlServerTableDataset{} + +func (s AmazonRdsForSqlServerTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonRdsForSqlServerTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRdsForSqlServerTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRdsForSqlServerTableDataset: %+v", err) + } + decoded["type"] = "AmazonRdsForSqlServerTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRdsForSqlServerTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledatasettypeproperties.go new file mode 100644 index 00000000000..6d377c34fba --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonrdsforsqlservertabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForSqlServerTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go new file mode 100644 index 00000000000..b53e5486e7e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AmazonRedshiftTableDataset{} + +type AmazonRedshiftTableDataset struct { + TypeProperties *AmazonRedshiftTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AmazonRedshiftTableDataset{} + +func (s AmazonRedshiftTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonRedshiftTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRedshiftTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRedshiftTableDataset: %+v", err) + } + decoded["type"] = "AmazonRedshiftTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRedshiftTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledatasettypeproperties.go new file mode 100644 index 00000000000..aed1e62df1d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazonredshifttabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRedshiftTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go new file mode 100644 index 00000000000..101ee66ab06 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3compatiblelocation.go @@ -0,0 +1,12 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonS3CompatibleLocation struct { + BucketName *interface{} `json:"bucketName,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` + Version *interface{} `json:"version,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go new file mode 100644 index 00000000000..2352970a78d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3dataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AmazonS3Dataset{} + +type AmazonS3Dataset struct { + TypeProperties AmazonS3DatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AmazonS3Dataset{} + +func (s AmazonS3Dataset) MarshalJSON() ([]byte, error) { + type wrapper AmazonS3Dataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonS3Dataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonS3Dataset: %+v", err) + } + decoded["type"] = "AmazonS3Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonS3Dataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go new file mode 100644 index 00000000000..02b1c173c5a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3datasettypeproperties.go @@ -0,0 +1,52 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonS3DatasetTypeProperties struct { + BucketName interface{} `json:"bucketName"` + Compression *DatasetCompression `json:"compression,omitempty"` + Format DatasetStorageFormat `json:"format"` + Key *interface{} `json:"key,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + Prefix *interface{} `json:"prefix,omitempty"` + Version *interface{} `json:"version,omitempty"` +} + +var _ json.Unmarshaler = &AmazonS3DatasetTypeProperties{} + +func (s *AmazonS3DatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AmazonS3DatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AmazonS3DatasetTypeProperties: %+v", err) + } + + s.BucketName = decoded.BucketName + s.Compression = decoded.Compression + s.Key = decoded.Key + s.ModifiedDatetimeEnd = decoded.ModifiedDatetimeEnd + s.ModifiedDatetimeStart = decoded.ModifiedDatetimeStart + s.Prefix = decoded.Prefix + s.Version = decoded.Version + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonS3DatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := unmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AmazonS3DatasetTypeProperties': %+v", err) + } + s.Format = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go new file mode 100644 index 00000000000..8096fdf67ae --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_amazons3location.go @@ -0,0 +1,12 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonS3Location struct { + BucketName *interface{} `json:"bucketName,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` + Version *interface{} `json:"version,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go new file mode 100644 index 00000000000..9b66ffe4718 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_avrodataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AvroDataset{} + +type AvroDataset struct { + TypeProperties *AvroDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AvroDataset{} + +func (s AvroDataset) MarshalJSON() ([]byte, error) { + type wrapper AvroDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AvroDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AvroDataset: %+v", err) + } + decoded["type"] = "Avro" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AvroDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go new file mode 100644 index 00000000000..1c7fb02a314 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_avrodatasettypeproperties.go @@ -0,0 +1,42 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvroDatasetTypeProperties struct { + AvroCompressionCodec *interface{} `json:"avroCompressionCodec,omitempty"` + AvroCompressionLevel *int64 `json:"avroCompressionLevel,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &AvroDatasetTypeProperties{} + +func (s *AvroDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AvroDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AvroDatasetTypeProperties: %+v", err) + } + + s.AvroCompressionCodec = decoded.AvroCompressionCodec + s.AvroCompressionLevel = decoded.AvroCompressionLevel + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AvroDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'AvroDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go new file mode 100644 index 00000000000..757a8574f17 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_avroformat.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvroFormat struct { + Deserializer *interface{} `json:"deserializer,omitempty"` + Serializer *interface{} `json:"serializer,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go new file mode 100644 index 00000000000..39f87168d0e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureBlobDataset{} + +type AzureBlobDataset struct { + TypeProperties *AzureBlobDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureBlobDataset{} + +func (s AzureBlobDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobDataset: %+v", err) + } + decoded["type"] = "AzureBlob" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go new file mode 100644 index 00000000000..00b492a8ccd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobdatasettypeproperties.go @@ -0,0 +1,50 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + TableRootLocation *interface{} `json:"tableRootLocation,omitempty"` +} + +var _ json.Unmarshaler = &AzureBlobDatasetTypeProperties{} + +func (s *AzureBlobDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureBlobDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureBlobDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + s.ModifiedDatetimeEnd = decoded.ModifiedDatetimeEnd + s.ModifiedDatetimeStart = decoded.ModifiedDatetimeStart + s.TableRootLocation = decoded.TableRootLocation + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureBlobDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := unmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AzureBlobDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go new file mode 100644 index 00000000000..2a9d397aad7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureBlobFSDataset{} + +type AzureBlobFSDataset struct { + TypeProperties *AzureBlobFSDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureBlobFSDataset{} + +func (s AzureBlobFSDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobFSDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobFSDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobFSDataset: %+v", err) + } + decoded["type"] = "AzureBlobFSFile" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobFSDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go new file mode 100644 index 00000000000..777c9f6d4b0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfsdatasettypeproperties.go @@ -0,0 +1,44 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobFSDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` +} + +var _ json.Unmarshaler = &AzureBlobFSDatasetTypeProperties{} + +func (s *AzureBlobFSDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureBlobFSDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureBlobFSDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureBlobFSDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := unmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AzureBlobFSDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go new file mode 100644 index 00000000000..34770e8e691 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobfslocation.go @@ -0,0 +1,11 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobFSLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FileSystem *interface{} `json:"fileSystem,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go new file mode 100644 index 00000000000..3e0994ce5a0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azureblobstoragelocation.go @@ -0,0 +1,11 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobStorageLocation struct { + Container *interface{} `json:"container,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go new file mode 100644 index 00000000000..b21d48f7ab4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureDatabricksDeltaLakeDataset{} + +type AzureDatabricksDeltaLakeDataset struct { + TypeProperties *AzureDatabricksDeltaLakeDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureDatabricksDeltaLakeDataset{} + +func (s AzureDatabricksDeltaLakeDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureDatabricksDeltaLakeDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDatabricksDeltaLakeDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeDataset: %+v", err) + } + decoded["type"] = "AzureDatabricksDeltaLakeDataset" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDatabricksDeltaLakeDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedatasettypeproperties.go new file mode 100644 index 00000000000..9379813b983 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatabricksdeltalakedatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksDeltaLakeDatasetTypeProperties struct { + Database *interface{} `json:"database,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorerdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorerdatasettypeproperties.go new file mode 100644 index 00000000000..a14fda9d068 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorerdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataExplorerDatasetTypeProperties struct { + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go new file mode 100644 index 00000000000..69865e2a67f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredataexplorertabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureDataExplorerTableDataset{} + +type AzureDataExplorerTableDataset struct { + TypeProperties AzureDataExplorerDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureDataExplorerTableDataset{} + +func (s AzureDataExplorerTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureDataExplorerTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataExplorerTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataExplorerTableDataset: %+v", err) + } + decoded["type"] = "AzureDataExplorerTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataExplorerTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go new file mode 100644 index 00000000000..6918b7ee25d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureDataLakeStoreDataset{} + +type AzureDataLakeStoreDataset struct { + TypeProperties *AzureDataLakeStoreDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureDataLakeStoreDataset{} + +func (s AzureDataLakeStoreDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureDataLakeStoreDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataLakeStoreDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreDataset: %+v", err) + } + decoded["type"] = "AzureDataLakeStoreFile" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataLakeStoreDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go new file mode 100644 index 00000000000..6ab7caca55f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestoredatasettypeproperties.go @@ -0,0 +1,44 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` +} + +var _ json.Unmarshaler = &AzureDataLakeStoreDatasetTypeProperties{} + +func (s *AzureDataLakeStoreDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureDataLakeStoreDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureDataLakeStoreDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureDataLakeStoreDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := unmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'AzureDataLakeStoreDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go new file mode 100644 index 00000000000..d09d7a5a588 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuredatalakestorelocation.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go new file mode 100644 index 00000000000..cf5a34cd06f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azurefilestoragelocation.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureFileStorageLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go new file mode 100644 index 00000000000..ebe239abcaf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuremariadbtabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureMariaDBTableDataset{} + +type AzureMariaDBTableDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureMariaDBTableDataset{} + +func (s AzureMariaDBTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureMariaDBTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMariaDBTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMariaDBTableDataset: %+v", err) + } + decoded["type"] = "AzureMariaDBTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMariaDBTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go new file mode 100644 index 00000000000..5cc9a5476a8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureMySqlTableDataset{} + +type AzureMySqlTableDataset struct { + TypeProperties AzureMySqlTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureMySqlTableDataset{} + +func (s AzureMySqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureMySqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMySqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMySqlTableDataset: %+v", err) + } + decoded["type"] = "AzureMySqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMySqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledatasettypeproperties.go new file mode 100644 index 00000000000..694cc28215d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuremysqltabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMySqlTableDatasetTypeProperties struct { + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go new file mode 100644 index 00000000000..ffa368f6e41 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzurePostgreSqlTableDataset{} + +type AzurePostgreSqlTableDataset struct { + TypeProperties *AzurePostgreSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzurePostgreSqlTableDataset{} + +func (s AzurePostgreSqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzurePostgreSqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzurePostgreSqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzurePostgreSqlTableDataset: %+v", err) + } + decoded["type"] = "AzurePostgreSqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzurePostgreSqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledatasettypeproperties.go new file mode 100644 index 00000000000..677e937d931 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azurepostgresqltabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzurePostgreSqlTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go new file mode 100644 index 00000000000..61dcac613b6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureSearchIndexDataset{} + +type AzureSearchIndexDataset struct { + TypeProperties AzureSearchIndexDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureSearchIndexDataset{} + +func (s AzureSearchIndexDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSearchIndexDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSearchIndexDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSearchIndexDataset: %+v", err) + } + decoded["type"] = "AzureSearchIndex" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSearchIndexDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdatasettypeproperties.go new file mode 100644 index 00000000000..99b62a20062 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresearchindexdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSearchIndexDatasetTypeProperties struct { + IndexName interface{} `json:"indexName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go new file mode 100644 index 00000000000..8484c460390 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureSqlDWTableDataset{} + +type AzureSqlDWTableDataset struct { + TypeProperties *AzureSqlDWTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureSqlDWTableDataset{} + +func (s AzureSqlDWTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlDWTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlDWTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlDWTableDataset: %+v", err) + } + decoded["type"] = "AzureSqlDWTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlDWTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledatasettypeproperties.go new file mode 100644 index 00000000000..6a5bb0184f8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqldwtabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlDWTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go new file mode 100644 index 00000000000..d70740c0490 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureSqlMITableDataset{} + +type AzureSqlMITableDataset struct { + TypeProperties *AzureSqlMITableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureSqlMITableDataset{} + +func (s AzureSqlMITableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlMITableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlMITableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlMITableDataset: %+v", err) + } + decoded["type"] = "AzureSqlMITable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlMITableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledatasettypeproperties.go new file mode 100644 index 00000000000..a5b56d000e5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqlmitabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlMITableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go new file mode 100644 index 00000000000..0454ae6852e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureSqlTableDataset{} + +type AzureSqlTableDataset struct { + TypeProperties *AzureSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureSqlTableDataset{} + +func (s AzureSqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlTableDataset: %+v", err) + } + decoded["type"] = "AzureSqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledatasettypeproperties.go new file mode 100644 index 00000000000..6af4ad96d29 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuresqltabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go new file mode 100644 index 00000000000..05eca7ff7be --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = AzureTableDataset{} + +type AzureTableDataset struct { + TypeProperties AzureTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = AzureTableDataset{} + +func (s AzureTableDataset) MarshalJSON() ([]byte, error) { + type wrapper AzureTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureTableDataset: %+v", err) + } + decoded["type"] = "AzureTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledatasettypeproperties.go new file mode 100644 index 00000000000..0e0d0292147 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_azuretabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureTableDatasetTypeProperties struct { + TableName interface{} `json:"tableName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go new file mode 100644 index 00000000000..196324fd66e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_binarydataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = BinaryDataset{} + +type BinaryDataset struct { + TypeProperties *BinaryDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = BinaryDataset{} + +func (s BinaryDataset) MarshalJSON() ([]byte, error) { + type wrapper BinaryDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling BinaryDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling BinaryDataset: %+v", err) + } + decoded["type"] = "Binary" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling BinaryDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go new file mode 100644 index 00000000000..131a2afc289 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_binarydatasettypeproperties.go @@ -0,0 +1,40 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BinaryDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &BinaryDatasetTypeProperties{} + +func (s *BinaryDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias BinaryDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BinaryDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BinaryDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'BinaryDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go new file mode 100644 index 00000000000..e7942315113 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = CassandraTableDataset{} + +type CassandraTableDataset struct { + TypeProperties *CassandraTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = CassandraTableDataset{} + +func (s CassandraTableDataset) MarshalJSON() ([]byte, error) { + type wrapper CassandraTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CassandraTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CassandraTableDataset: %+v", err) + } + decoded["type"] = "CassandraTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CassandraTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledatasettypeproperties.go new file mode 100644 index 00000000000..0a5e4824ed7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cassandratabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CassandraTableDatasetTypeProperties struct { + Keyspace *interface{} `json:"keyspace,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go new file mode 100644 index 00000000000..ad74f0abb7a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = CommonDataServiceForAppsEntityDataset{} + +type CommonDataServiceForAppsEntityDataset struct { + TypeProperties *CommonDataServiceForAppsEntityDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = CommonDataServiceForAppsEntityDataset{} + +func (s CommonDataServiceForAppsEntityDataset) MarshalJSON() ([]byte, error) { + type wrapper CommonDataServiceForAppsEntityDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CommonDataServiceForAppsEntityDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CommonDataServiceForAppsEntityDataset: %+v", err) + } + decoded["type"] = "CommonDataServiceForAppsEntity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CommonDataServiceForAppsEntityDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydatasettypeproperties.go new file mode 100644 index 00000000000..7a13bb16d06 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_commondataserviceforappsentitydatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CommonDataServiceForAppsEntityDatasetTypeProperties struct { + EntityName *interface{} `json:"entityName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go new file mode 100644 index 00000000000..db94d9bd729 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_concurobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ConcurObjectDataset{} + +type ConcurObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ConcurObjectDataset{} + +func (s ConcurObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ConcurObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ConcurObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ConcurObjectDataset: %+v", err) + } + decoded["type"] = "ConcurObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ConcurObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go new file mode 100644 index 00000000000..247472f4caf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = CosmosDbMongoDbApiCollectionDataset{} + +type CosmosDbMongoDbApiCollectionDataset struct { + TypeProperties CosmosDbMongoDbApiCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = CosmosDbMongoDbApiCollectionDataset{} + +func (s CosmosDbMongoDbApiCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper CosmosDbMongoDbApiCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + decoded["type"] = "CosmosDbMongoDbApiCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondatasettypeproperties.go new file mode 100644 index 00000000000..8fd2357fce3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbmongodbapicollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbMongoDbApiCollectionDatasetTypeProperties struct { + Collection interface{} `json:"collection"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go new file mode 100644 index 00000000000..69af3cdad73 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = CosmosDbSqlApiCollectionDataset{} + +type CosmosDbSqlApiCollectionDataset struct { + TypeProperties CosmosDbSqlApiCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = CosmosDbSqlApiCollectionDataset{} + +func (s CosmosDbSqlApiCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper CosmosDbSqlApiCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CosmosDbSqlApiCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CosmosDbSqlApiCollectionDataset: %+v", err) + } + decoded["type"] = "CosmosDbSqlApiCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CosmosDbSqlApiCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondatasettypeproperties.go new file mode 100644 index 00000000000..279e6106008 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_cosmosdbsqlapicollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbSqlApiCollectionDatasetTypeProperties struct { + CollectionName interface{} `json:"collectionName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go new file mode 100644 index 00000000000..0126103e700 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_couchbasetabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = CouchbaseTableDataset{} + +type CouchbaseTableDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = CouchbaseTableDataset{} + +func (s CouchbaseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper CouchbaseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CouchbaseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CouchbaseTableDataset: %+v", err) + } + decoded["type"] = "CouchbaseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CouchbaseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go new file mode 100644 index 00000000000..6515e5d423c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_customdataset.go @@ -0,0 +1,16 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomDataset struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` + Type string `json:"type"` + TypeProperties *interface{} `json:"typeProperties,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go index ea0d977105e..09c6d9f751f 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dataset.go @@ -1,15 +1,869 @@ package datasets +import ( + "encoding/json" + "fmt" + "strings" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type Dataset struct { - Annotations *[]interface{} `json:"annotations,omitempty"` - Description *string `json:"description,omitempty"` - Folder *DatasetFolder `json:"folder,omitempty"` - LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` - Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` - Schema *interface{} `json:"schema,omitempty"` - Structure *interface{} `json:"structure,omitempty"` - Type string `json:"type"` +type Dataset interface { +} + +// RawDatasetImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDatasetImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalDatasetImplementation(input []byte) (Dataset, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling Dataset into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "AmazonMWSObject") { + var out AmazonMWSObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonMWSObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRdsForOracleTable") { + var out AmazonRdsForOracleTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRdsForOracleTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRdsForSqlServerTable") { + var out AmazonRdsForSqlServerTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRdsForSqlServerTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRedshiftTable") { + var out AmazonRedshiftTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRedshiftTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonS3Object") { + var out AmazonS3Dataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonS3Dataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Avro") { + var out AvroDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AvroDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlob") { + var out AzureBlobDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlobFSFile") { + var out AzureBlobFSDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobFSDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataExplorerTable") { + var out AzureDataExplorerTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataExplorerTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataLakeStoreFile") { + var out AzureDataLakeStoreDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataLakeStoreDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDatabricksDeltaLakeDataset") { + var out AzureDatabricksDeltaLakeDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDatabricksDeltaLakeDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMariaDBTable") { + var out AzureMariaDBTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMariaDBTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMySqlTable") { + var out AzureMySqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMySqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzurePostgreSqlTable") { + var out AzurePostgreSqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzurePostgreSqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSearchIndex") { + var out AzureSearchIndexDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSearchIndexDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlDWTable") { + var out AzureSqlDWTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlDWTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlMITable") { + var out AzureSqlMITableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlMITableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlTable") { + var out AzureSqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureTable") { + var out AzureTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Binary") { + var out BinaryDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into BinaryDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CassandraTable") { + var out CassandraTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CassandraTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CommonDataServiceForAppsEntity") { + var out CommonDataServiceForAppsEntityDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CommonDataServiceForAppsEntityDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ConcurObject") { + var out ConcurObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ConcurObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CosmosDbMongoDbApiCollection") { + var out CosmosDbMongoDbApiCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CosmosDbMongoDbApiCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CosmosDbSqlApiCollection") { + var out CosmosDbSqlApiCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CosmosDbSqlApiCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CouchbaseTable") { + var out CouchbaseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CouchbaseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Db2Table") { + var out Db2TableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Db2TableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DelimitedText") { + var out DelimitedTextDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DelimitedTextDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DocumentDbCollection") { + var out DocumentDbCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DocumentDbCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DrillTable") { + var out DrillTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DrillTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsAXResource") { + var out DynamicsAXResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsAXResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsCrmEntity") { + var out DynamicsCrmEntityDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsCrmEntityDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsEntity") { + var out DynamicsEntityDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsEntityDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "EloquaObject") { + var out EloquaObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EloquaObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Excel") { + var out ExcelDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExcelDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "FileShare") { + var out FileShareDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FileShareDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleAdWordsObject") { + var out GoogleAdWordsObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleAdWordsObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleBigQueryObject") { + var out GoogleBigQueryObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleBigQueryObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleBigQueryV2Object") { + var out GoogleBigQueryV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleBigQueryV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GreenplumTable") { + var out GreenplumTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GreenplumTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HBaseObject") { + var out HBaseObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HBaseObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HttpFile") { + var out HTTPDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HTTPDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HiveObject") { + var out HiveObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HiveObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HubspotObject") { + var out HubspotObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HubspotObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ImpalaObject") { + var out ImpalaObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ImpalaObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "InformixTable") { + var out InformixTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into InformixTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "JiraObject") { + var out JiraObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JiraObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Json") { + var out JsonDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JsonDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "LakeHouseTable") { + var out LakeHouseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LakeHouseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MagentoObject") { + var out MagentoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MagentoObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MariaDBTable") { + var out MariaDBTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MariaDBTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MarketoObject") { + var out MarketoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MarketoObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MicrosoftAccessTable") { + var out MicrosoftAccessTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MicrosoftAccessTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbAtlasCollection") { + var out MongoDbAtlasCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbAtlasCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbCollection") { + var out MongoDbCollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbCollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbV2Collection") { + var out MongoDbV2CollectionDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbV2CollectionDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MySqlTable") { + var out MySqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MySqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "NetezzaTable") { + var out NetezzaTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into NetezzaTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ODataResource") { + var out ODataResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ODataResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OdbcTable") { + var out OdbcTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OdbcTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Office365Table") { + var out Office365Dataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Office365Dataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OracleServiceCloudObject") { + var out OracleServiceCloudObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleServiceCloudObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OracleTable") { + var out OracleTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Orc") { + var out OrcDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OrcDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Parquet") { + var out ParquetDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ParquetDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PaypalObject") { + var out PaypalObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PaypalObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PhoenixObject") { + var out PhoenixObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PhoenixObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostgreSqlTable") { + var out PostgreSqlTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostgreSqlTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostgreSqlV2Table") { + var out PostgreSqlV2TableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostgreSqlV2TableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PrestoObject") { + var out PrestoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PrestoObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "QuickBooksObject") { + var out QuickBooksObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into QuickBooksObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RelationalTable") { + var out RelationalTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RelationalTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ResponsysObject") { + var out ResponsysObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ResponsysObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RestResource") { + var out RestResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RestResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceMarketingCloudObject") { + var out SalesforceMarketingCloudObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceMarketingCloudObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceObject") { + var out SalesforceObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceServiceCloudObject") { + var out SalesforceServiceCloudObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceServiceCloudObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceServiceCloudV2Object") { + var out SalesforceServiceCloudV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceV2Object") { + var out SalesforceV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapBwCube") { + var out SapBwCubeDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapBwCubeDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapCloudForCustomerResource") { + var out SapCloudForCustomerResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapCloudForCustomerResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapEccResource") { + var out SapEccResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapEccResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapHanaTable") { + var out SapHanaTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapHanaTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapOdpResource") { + var out SapOdpResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapOdpResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapOpenHubTable") { + var out SapOpenHubTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapOpenHubTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapTableResource") { + var out SapTableResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapTableResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServiceNowObject") { + var out ServiceNowObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceNowObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServiceNowV2Object") { + var out ServiceNowV2ObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceNowV2ObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SharePointOnlineListResource") { + var out SharePointOnlineListResourceDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SharePointOnlineListResourceDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ShopifyObject") { + var out ShopifyObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ShopifyObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SnowflakeTable") { + var out SnowflakeDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SnowflakeDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SnowflakeV2Table") { + var out SnowflakeV2Dataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SnowflakeV2Dataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SparkObject") { + var out SparkObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SparkObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SqlServerTable") { + var out SqlServerTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SqlServerTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SquareObject") { + var out SquareObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SquareObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SybaseTable") { + var out SybaseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SybaseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "TeradataTable") { + var out TeradataTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TeradataTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "VerticaTable") { + var out VerticaTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into VerticaTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WarehouseTable") { + var out WarehouseTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WarehouseTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WebTable") { + var out WebTableDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebTableDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "XeroObject") { + var out XeroObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into XeroObjectDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Xml") { + var out XmlDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into XmlDataset: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ZohoObject") { + var out ZohoObjectDataset + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ZohoObjectDataset: %+v", err) + } + return out, nil + } + + out := RawDatasetImpl{ + Type: value, + Values: temp, + } + return out, nil + } diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_datasetcompression.go b/resource-manager/datafactory/2018-06-01/datasets/model_datasetcompression.go new file mode 100644 index 00000000000..a3cb0f0c231 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_datasetcompression.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetCompression struct { + Level *interface{} `json:"level,omitempty"` + Type interface{} `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go new file mode 100644 index 00000000000..0eb2f7da0d5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_datasetlocation.go @@ -0,0 +1,44 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetLocation interface { +} + +// RawDatasetLocationImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDatasetLocationImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalDatasetLocationImplementation(input []byte) (DatasetLocation, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DatasetLocation into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawDatasetLocationImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go b/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go index 39a4bc0b181..e84d42a2de2 100644 --- a/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go +++ b/resource-manager/datafactory/2018-06-01/datasets/model_datasetresource.go @@ -1,5 +1,10 @@ package datasets +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -10,3 +15,32 @@ type DatasetResource struct { Properties Dataset `json:"properties"` Type *string `json:"type,omitempty"` } + +var _ json.Unmarshaler = &DatasetResource{} + +func (s *DatasetResource) UnmarshalJSON(bytes []byte) error { + type alias DatasetResource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DatasetResource: %+v", err) + } + + s.Etag = decoded.Etag + s.Id = decoded.Id + s.Name = decoded.Name + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DatasetResource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalDatasetImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'DatasetResource': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go new file mode 100644 index 00000000000..22c5b071c4d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_datasetstorageformat.go @@ -0,0 +1,44 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetStorageFormat interface { +} + +// RawDatasetStorageFormatImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDatasetStorageFormatImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalDatasetStorageFormatImplementation(input []byte) (DatasetStorageFormat, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DatasetStorageFormat into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawDatasetStorageFormatImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go new file mode 100644 index 00000000000..1c1ccb657f8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = Db2TableDataset{} + +type Db2TableDataset struct { + TypeProperties *Db2TableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = Db2TableDataset{} + +func (s Db2TableDataset) MarshalJSON() ([]byte, error) { + type wrapper Db2TableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Db2TableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Db2TableDataset: %+v", err) + } + decoded["type"] = "Db2Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Db2TableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledatasettypeproperties.go new file mode 100644 index 00000000000..25a314ea6a9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_db2tabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Db2TableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go new file mode 100644 index 00000000000..e06e38b5229 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = DelimitedTextDataset{} + +type DelimitedTextDataset struct { + TypeProperties *DelimitedTextDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = DelimitedTextDataset{} + +func (s DelimitedTextDataset) MarshalJSON() ([]byte, error) { + type wrapper DelimitedTextDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DelimitedTextDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DelimitedTextDataset: %+v", err) + } + decoded["type"] = "DelimitedText" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DelimitedTextDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go new file mode 100644 index 00000000000..6660ba0ca7e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_delimitedtextdatasettypeproperties.go @@ -0,0 +1,56 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DelimitedTextDatasetTypeProperties struct { + ColumnDelimiter *interface{} `json:"columnDelimiter,omitempty"` + CompressionCodec *interface{} `json:"compressionCodec,omitempty"` + CompressionLevel *interface{} `json:"compressionLevel,omitempty"` + EncodingName *interface{} `json:"encodingName,omitempty"` + EscapeChar *interface{} `json:"escapeChar,omitempty"` + FirstRowAsHeader *interface{} `json:"firstRowAsHeader,omitempty"` + Location DatasetLocation `json:"location"` + NullValue *interface{} `json:"nullValue,omitempty"` + QuoteChar *interface{} `json:"quoteChar,omitempty"` + RowDelimiter *interface{} `json:"rowDelimiter,omitempty"` +} + +var _ json.Unmarshaler = &DelimitedTextDatasetTypeProperties{} + +func (s *DelimitedTextDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias DelimitedTextDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DelimitedTextDatasetTypeProperties: %+v", err) + } + + s.ColumnDelimiter = decoded.ColumnDelimiter + s.CompressionCodec = decoded.CompressionCodec + s.CompressionLevel = decoded.CompressionLevel + s.EncodingName = decoded.EncodingName + s.EscapeChar = decoded.EscapeChar + s.FirstRowAsHeader = decoded.FirstRowAsHeader + s.NullValue = decoded.NullValue + s.QuoteChar = decoded.QuoteChar + s.RowDelimiter = decoded.RowDelimiter + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DelimitedTextDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'DelimitedTextDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go new file mode 100644 index 00000000000..adfc33da003 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = DocumentDbCollectionDataset{} + +type DocumentDbCollectionDataset struct { + TypeProperties DocumentDbCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = DocumentDbCollectionDataset{} + +func (s DocumentDbCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper DocumentDbCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DocumentDbCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DocumentDbCollectionDataset: %+v", err) + } + decoded["type"] = "DocumentDbCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DocumentDbCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondatasettypeproperties.go new file mode 100644 index 00000000000..62006e70c45 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_documentdbcollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DocumentDbCollectionDatasetTypeProperties struct { + CollectionName interface{} `json:"collectionName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_drilldatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_drilldatasettypeproperties.go new file mode 100644 index 00000000000..c04172259cb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_drilldatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DrillDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go new file mode 100644 index 00000000000..c9e7fa63684 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_drilltabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = DrillTableDataset{} + +type DrillTableDataset struct { + TypeProperties *DrillDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = DrillTableDataset{} + +func (s DrillTableDataset) MarshalJSON() ([]byte, error) { + type wrapper DrillTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DrillTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DrillTableDataset: %+v", err) + } + decoded["type"] = "DrillTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DrillTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go new file mode 100644 index 00000000000..e8284adc140 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = DynamicsAXResourceDataset{} + +type DynamicsAXResourceDataset struct { + TypeProperties DynamicsAXResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = DynamicsAXResourceDataset{} + +func (s DynamicsAXResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper DynamicsAXResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsAXResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsAXResourceDataset: %+v", err) + } + decoded["type"] = "DynamicsAXResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsAXResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedatasettypeproperties.go new file mode 100644 index 00000000000..74a9ced2ad4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsaxresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsAXResourceDatasetTypeProperties struct { + Path interface{} `json:"path"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go new file mode 100644 index 00000000000..df1870108e2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = DynamicsCrmEntityDataset{} + +type DynamicsCrmEntityDataset struct { + TypeProperties *DynamicsCrmEntityDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = DynamicsCrmEntityDataset{} + +func (s DynamicsCrmEntityDataset) MarshalJSON() ([]byte, error) { + type wrapper DynamicsCrmEntityDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsCrmEntityDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsCrmEntityDataset: %+v", err) + } + decoded["type"] = "DynamicsCrmEntity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsCrmEntityDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydatasettypeproperties.go new file mode 100644 index 00000000000..2258acd0165 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicscrmentitydatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsCrmEntityDatasetTypeProperties struct { + EntityName *interface{} `json:"entityName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go new file mode 100644 index 00000000000..fe27a29a6e8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = DynamicsEntityDataset{} + +type DynamicsEntityDataset struct { + TypeProperties *DynamicsEntityDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = DynamicsEntityDataset{} + +func (s DynamicsEntityDataset) MarshalJSON() ([]byte, error) { + type wrapper DynamicsEntityDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsEntityDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsEntityDataset: %+v", err) + } + decoded["type"] = "DynamicsEntity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsEntityDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydatasettypeproperties.go new file mode 100644 index 00000000000..cd5ddde6ef6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_dynamicsentitydatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsEntityDatasetTypeProperties struct { + EntityName *interface{} `json:"entityName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go new file mode 100644 index 00000000000..222e20eebc9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_eloquaobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = EloquaObjectDataset{} + +type EloquaObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = EloquaObjectDataset{} + +func (s EloquaObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper EloquaObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EloquaObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EloquaObjectDataset: %+v", err) + } + decoded["type"] = "EloquaObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EloquaObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go new file mode 100644 index 00000000000..4261922dba0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_exceldataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ExcelDataset{} + +type ExcelDataset struct { + TypeProperties *ExcelDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ExcelDataset{} + +func (s ExcelDataset) MarshalJSON() ([]byte, error) { + type wrapper ExcelDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExcelDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExcelDataset: %+v", err) + } + decoded["type"] = "Excel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExcelDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go new file mode 100644 index 00000000000..532c29f06b2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_exceldatasettypeproperties.go @@ -0,0 +1,50 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExcelDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FirstRowAsHeader *interface{} `json:"firstRowAsHeader,omitempty"` + Location DatasetLocation `json:"location"` + NullValue *interface{} `json:"nullValue,omitempty"` + Range *interface{} `json:"range,omitempty"` + SheetIndex *interface{} `json:"sheetIndex,omitempty"` + SheetName *interface{} `json:"sheetName,omitempty"` +} + +var _ json.Unmarshaler = &ExcelDatasetTypeProperties{} + +func (s *ExcelDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ExcelDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ExcelDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.FirstRowAsHeader = decoded.FirstRowAsHeader + s.NullValue = decoded.NullValue + s.Range = decoded.Range + s.SheetIndex = decoded.SheetIndex + s.SheetName = decoded.SheetName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ExcelDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'ExcelDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go new file mode 100644 index 00000000000..8d261b81a2e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_fileserverlocation.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileServerLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go new file mode 100644 index 00000000000..7046c6bd912 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = FileShareDataset{} + +type FileShareDataset struct { + TypeProperties *FileShareDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = FileShareDataset{} + +func (s FileShareDataset) MarshalJSON() ([]byte, error) { + type wrapper FileShareDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FileShareDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FileShareDataset: %+v", err) + } + decoded["type"] = "FileShare" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FileShareDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go new file mode 100644 index 00000000000..8fa6c99b2e8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_filesharedatasettypeproperties.go @@ -0,0 +1,50 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileShareDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + FileFilter *interface{} `json:"fileFilter,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Format DatasetStorageFormat `json:"format"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` +} + +var _ json.Unmarshaler = &FileShareDatasetTypeProperties{} + +func (s *FileShareDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias FileShareDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FileShareDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.FileFilter = decoded.FileFilter + s.FileName = decoded.FileName + s.FolderPath = decoded.FolderPath + s.ModifiedDatetimeEnd = decoded.ModifiedDatetimeEnd + s.ModifiedDatetimeStart = decoded.ModifiedDatetimeStart + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling FileShareDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := unmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'FileShareDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go new file mode 100644 index 00000000000..bd463a9f42e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_ftpserverlocation.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FtpServerLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_genericdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_genericdatasettypeproperties.go new file mode 100644 index 00000000000..b0b7fc4436e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_genericdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GenericDatasetTypeProperties struct { + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go new file mode 100644 index 00000000000..831ac1ad809 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googleadwordsobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = GoogleAdWordsObjectDataset{} + +type GoogleAdWordsObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = GoogleAdWordsObjectDataset{} + +func (s GoogleAdWordsObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper GoogleAdWordsObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleAdWordsObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleAdWordsObjectDataset: %+v", err) + } + decoded["type"] = "GoogleAdWordsObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleAdWordsObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigquerydatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigquerydatasettypeproperties.go new file mode 100644 index 00000000000..564794d787a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigquerydatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQueryDatasetTypeProperties struct { + Dataset *interface{} `json:"dataset,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go new file mode 100644 index 00000000000..fd5fbb2b15a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = GoogleBigQueryObjectDataset{} + +type GoogleBigQueryObjectDataset struct { + TypeProperties *GoogleBigQueryDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = GoogleBigQueryObjectDataset{} + +func (s GoogleBigQueryObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper GoogleBigQueryObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleBigQueryObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleBigQueryObjectDataset: %+v", err) + } + decoded["type"] = "GoogleBigQueryObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleBigQueryObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2datasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2datasettypeproperties.go new file mode 100644 index 00000000000..5b418072318 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2datasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQueryV2DatasetTypeProperties struct { + Dataset *interface{} `json:"dataset,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go new file mode 100644 index 00000000000..4ad3700793d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlebigqueryv2objectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = GoogleBigQueryV2ObjectDataset{} + +type GoogleBigQueryV2ObjectDataset struct { + TypeProperties *GoogleBigQueryV2DatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = GoogleBigQueryV2ObjectDataset{} + +func (s GoogleBigQueryV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper GoogleBigQueryV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleBigQueryV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleBigQueryV2ObjectDataset: %+v", err) + } + decoded["type"] = "GoogleBigQueryV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleBigQueryV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go new file mode 100644 index 00000000000..67bed9188a5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_googlecloudstoragelocation.go @@ -0,0 +1,12 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleCloudStorageLocation struct { + BucketName *interface{} `json:"bucketName,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` + Version *interface{} `json:"version,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_greenplumdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_greenplumdatasettypeproperties.go new file mode 100644 index 00000000000..f03ddee55fe --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_greenplumdatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GreenplumDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go new file mode 100644 index 00000000000..e7db7044c11 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_greenplumtabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = GreenplumTableDataset{} + +type GreenplumTableDataset struct { + TypeProperties *GreenplumDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = GreenplumTableDataset{} + +func (s GreenplumTableDataset) MarshalJSON() ([]byte, error) { + type wrapper GreenplumTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GreenplumTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GreenplumTableDataset: %+v", err) + } + decoded["type"] = "GreenplumTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GreenplumTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go new file mode 100644 index 00000000000..25594062387 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hbaseobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = HBaseObjectDataset{} + +type HBaseObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = HBaseObjectDataset{} + +func (s HBaseObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper HBaseObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HBaseObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HBaseObjectDataset: %+v", err) + } + decoded["type"] = "HBaseObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HBaseObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go new file mode 100644 index 00000000000..5017d854446 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hdfslocation.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HdfsLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hivedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_hivedatasettypeproperties.go new file mode 100644 index 00000000000..774f87b6cc2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hivedatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HiveDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go new file mode 100644 index 00000000000..163f9b84149 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hiveobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = HiveObjectDataset{} + +type HiveObjectDataset struct { + TypeProperties *HiveDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = HiveObjectDataset{} + +func (s HiveObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper HiveObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HiveObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HiveObjectDataset: %+v", err) + } + decoded["type"] = "HiveObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HiveObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go new file mode 100644 index 00000000000..63e6c8b1e02 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_httpdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = HTTPDataset{} + +type HTTPDataset struct { + TypeProperties *HTTPDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = HTTPDataset{} + +func (s HTTPDataset) MarshalJSON() ([]byte, error) { + type wrapper HTTPDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HTTPDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HTTPDataset: %+v", err) + } + decoded["type"] = "HttpFile" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HTTPDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go new file mode 100644 index 00000000000..14f4aae6a25 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_httpdatasettypeproperties.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPDatasetTypeProperties struct { + AdditionalHeaders *interface{} `json:"additionalHeaders,omitempty"` + Compression *DatasetCompression `json:"compression,omitempty"` + Format DatasetStorageFormat `json:"format"` + RelativeUrl *interface{} `json:"relativeUrl,omitempty"` + RequestBody *interface{} `json:"requestBody,omitempty"` + RequestMethod *interface{} `json:"requestMethod,omitempty"` +} + +var _ json.Unmarshaler = &HTTPDatasetTypeProperties{} + +func (s *HTTPDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HTTPDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HTTPDatasetTypeProperties: %+v", err) + } + + s.AdditionalHeaders = decoded.AdditionalHeaders + s.Compression = decoded.Compression + s.RelativeUrl = decoded.RelativeUrl + s.RequestBody = decoded.RequestBody + s.RequestMethod = decoded.RequestMethod + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HTTPDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["format"]; ok { + impl, err := unmarshalDatasetStorageFormatImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Format' for 'HTTPDatasetTypeProperties': %+v", err) + } + s.Format = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go new file mode 100644 index 00000000000..4908d1b5d7c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_httpserverlocation.go @@ -0,0 +1,11 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPServerLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + RelativeUrl *interface{} `json:"relativeUrl,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go new file mode 100644 index 00000000000..2d45a169dbf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_hubspotobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = HubspotObjectDataset{} + +type HubspotObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = HubspotObjectDataset{} + +func (s HubspotObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper HubspotObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HubspotObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HubspotObjectDataset: %+v", err) + } + decoded["type"] = "HubspotObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HubspotObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_impaladatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_impaladatasettypeproperties.go new file mode 100644 index 00000000000..61599844d26 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_impaladatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImpalaDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go new file mode 100644 index 00000000000..13c1bfb7bc0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_impalaobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ImpalaObjectDataset{} + +type ImpalaObjectDataset struct { + TypeProperties *ImpalaDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ImpalaObjectDataset{} + +func (s ImpalaObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ImpalaObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ImpalaObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ImpalaObjectDataset: %+v", err) + } + decoded["type"] = "ImpalaObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ImpalaObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go new file mode 100644 index 00000000000..65e4cdbecbb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = InformixTableDataset{} + +type InformixTableDataset struct { + TypeProperties *InformixTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = InformixTableDataset{} + +func (s InformixTableDataset) MarshalJSON() ([]byte, error) { + type wrapper InformixTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling InformixTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling InformixTableDataset: %+v", err) + } + decoded["type"] = "InformixTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling InformixTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledatasettypeproperties.go new file mode 100644 index 00000000000..e5e91581ab2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_informixtabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InformixTableDatasetTypeProperties struct { + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go new file mode 100644 index 00000000000..7674a8b4ce9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jiraobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = JiraObjectDataset{} + +type JiraObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = JiraObjectDataset{} + +func (s JiraObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper JiraObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JiraObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JiraObjectDataset: %+v", err) + } + decoded["type"] = "JiraObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JiraObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go new file mode 100644 index 00000000000..77f34fd6b24 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jsondataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = JsonDataset{} + +type JsonDataset struct { + TypeProperties *JsonDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = JsonDataset{} + +func (s JsonDataset) MarshalJSON() ([]byte, error) { + type wrapper JsonDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JsonDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JsonDataset: %+v", err) + } + decoded["type"] = "Json" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JsonDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go new file mode 100644 index 00000000000..9eee1689113 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jsondatasettypeproperties.go @@ -0,0 +1,42 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + EncodingName *interface{} `json:"encodingName,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &JsonDatasetTypeProperties{} + +func (s *JsonDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias JsonDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JsonDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.EncodingName = decoded.EncodingName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling JsonDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'JsonDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go new file mode 100644 index 00000000000..619b42ce877 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_jsonformat.go @@ -0,0 +1,15 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonFormat struct { + Deserializer *interface{} `json:"deserializer,omitempty"` + EncodingName *interface{} `json:"encodingName,omitempty"` + FilePattern *interface{} `json:"filePattern,omitempty"` + JsonNodeReference *interface{} `json:"jsonNodeReference,omitempty"` + JsonPathDefinition *interface{} `json:"jsonPathDefinition,omitempty"` + NestingSeparator *interface{} `json:"nestingSeparator,omitempty"` + Serializer *interface{} `json:"serializer,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go new file mode 100644 index 00000000000..582a223d4db --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_lakehouselocation.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go new file mode 100644 index 00000000000..e75058f6f0b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = LakeHouseTableDataset{} + +type LakeHouseTableDataset struct { + TypeProperties *LakeHouseTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = LakeHouseTableDataset{} + +func (s LakeHouseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper LakeHouseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LakeHouseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LakeHouseTableDataset: %+v", err) + } + decoded["type"] = "LakeHouseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LakeHouseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledatasettypeproperties.go new file mode 100644 index 00000000000..2dca10a473f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_lakehousetabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseTableDatasetTypeProperties struct { + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go new file mode 100644 index 00000000000..3a5d3041624 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_magentoobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MagentoObjectDataset{} + +type MagentoObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MagentoObjectDataset{} + +func (s MagentoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper MagentoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MagentoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MagentoObjectDataset: %+v", err) + } + decoded["type"] = "MagentoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MagentoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go new file mode 100644 index 00000000000..9c363dc3832 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mariadbtabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MariaDBTableDataset{} + +type MariaDBTableDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MariaDBTableDataset{} + +func (s MariaDBTableDataset) MarshalJSON() ([]byte, error) { + type wrapper MariaDBTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MariaDBTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MariaDBTableDataset: %+v", err) + } + decoded["type"] = "MariaDBTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MariaDBTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go new file mode 100644 index 00000000000..50561c5a193 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_marketoobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MarketoObjectDataset{} + +type MarketoObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MarketoObjectDataset{} + +func (s MarketoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper MarketoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MarketoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MarketoObjectDataset: %+v", err) + } + decoded["type"] = "MarketoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MarketoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go new file mode 100644 index 00000000000..023dd86b9af --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MicrosoftAccessTableDataset{} + +type MicrosoftAccessTableDataset struct { + TypeProperties *MicrosoftAccessTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MicrosoftAccessTableDataset{} + +func (s MicrosoftAccessTableDataset) MarshalJSON() ([]byte, error) { + type wrapper MicrosoftAccessTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MicrosoftAccessTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MicrosoftAccessTableDataset: %+v", err) + } + decoded["type"] = "MicrosoftAccessTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MicrosoftAccessTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledatasettypeproperties.go new file mode 100644 index 00000000000..d1c455e8714 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_microsoftaccesstabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MicrosoftAccessTableDatasetTypeProperties struct { + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go new file mode 100644 index 00000000000..de84e66a25c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MongoDbAtlasCollectionDataset{} + +type MongoDbAtlasCollectionDataset struct { + TypeProperties MongoDbAtlasCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MongoDbAtlasCollectionDataset{} + +func (s MongoDbAtlasCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper MongoDbAtlasCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbAtlasCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbAtlasCollectionDataset: %+v", err) + } + decoded["type"] = "MongoDbAtlasCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbAtlasCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondatasettypeproperties.go new file mode 100644 index 00000000000..c0447b17203 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbatlascollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbAtlasCollectionDatasetTypeProperties struct { + Collection interface{} `json:"collection"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go new file mode 100644 index 00000000000..ae2fa8ef9aa --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MongoDbCollectionDataset{} + +type MongoDbCollectionDataset struct { + TypeProperties MongoDbCollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MongoDbCollectionDataset{} + +func (s MongoDbCollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper MongoDbCollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbCollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbCollectionDataset: %+v", err) + } + decoded["type"] = "MongoDbCollection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbCollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondatasettypeproperties.go new file mode 100644 index 00000000000..4980dbdc0f7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbcollectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbCollectionDatasetTypeProperties struct { + CollectionName interface{} `json:"collectionName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go new file mode 100644 index 00000000000..9445652b37b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MongoDbV2CollectionDataset{} + +type MongoDbV2CollectionDataset struct { + TypeProperties MongoDbV2CollectionDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MongoDbV2CollectionDataset{} + +func (s MongoDbV2CollectionDataset) MarshalJSON() ([]byte, error) { + type wrapper MongoDbV2CollectionDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbV2CollectionDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbV2CollectionDataset: %+v", err) + } + decoded["type"] = "MongoDbV2Collection" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbV2CollectionDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondatasettypeproperties.go new file mode 100644 index 00000000000..4b3ab490a87 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mongodbv2collectiondatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbV2CollectionDatasetTypeProperties struct { + Collection interface{} `json:"collection"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go new file mode 100644 index 00000000000..6f8d7c93fa3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = MySqlTableDataset{} + +type MySqlTableDataset struct { + TypeProperties *MySqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = MySqlTableDataset{} + +func (s MySqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper MySqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MySqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MySqlTableDataset: %+v", err) + } + decoded["type"] = "MySqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MySqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledatasettypeproperties.go new file mode 100644 index 00000000000..83e9ad9bc16 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_mysqltabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MySqlTableDatasetTypeProperties struct { + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go new file mode 100644 index 00000000000..f00cb823ae6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = NetezzaTableDataset{} + +type NetezzaTableDataset struct { + TypeProperties *NetezzaTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = NetezzaTableDataset{} + +func (s NetezzaTableDataset) MarshalJSON() ([]byte, error) { + type wrapper NetezzaTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling NetezzaTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling NetezzaTableDataset: %+v", err) + } + decoded["type"] = "NetezzaTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling NetezzaTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledatasettypeproperties.go new file mode 100644 index 00000000000..b5e145dec95 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_netezzatabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetezzaTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go new file mode 100644 index 00000000000..cf0b94b785b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ODataResourceDataset{} + +type ODataResourceDataset struct { + TypeProperties *ODataResourceDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ODataResourceDataset{} + +func (s ODataResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper ODataResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ODataResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ODataResourceDataset: %+v", err) + } + decoded["type"] = "ODataResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ODataResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedatasettypeproperties.go new file mode 100644 index 00000000000..4a506e2b5b5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_odataresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ODataResourceDatasetTypeProperties struct { + Path *interface{} `json:"path,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go new file mode 100644 index 00000000000..bcccbc19231 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = OdbcTableDataset{} + +type OdbcTableDataset struct { + TypeProperties *OdbcTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = OdbcTableDataset{} + +func (s OdbcTableDataset) MarshalJSON() ([]byte, error) { + type wrapper OdbcTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OdbcTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OdbcTableDataset: %+v", err) + } + decoded["type"] = "OdbcTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OdbcTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledatasettypeproperties.go new file mode 100644 index 00000000000..f5727e31053 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_odbctabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OdbcTableDatasetTypeProperties struct { + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go new file mode 100644 index 00000000000..9494623e52b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_office365dataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = Office365Dataset{} + +type Office365Dataset struct { + TypeProperties Office365DatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = Office365Dataset{} + +func (s Office365Dataset) MarshalJSON() ([]byte, error) { + type wrapper Office365Dataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Office365Dataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Office365Dataset: %+v", err) + } + decoded["type"] = "Office365Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Office365Dataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_office365datasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_office365datasettypeproperties.go new file mode 100644 index 00000000000..73fbe87d882 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_office365datasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Office365DatasetTypeProperties struct { + Predicate *interface{} `json:"predicate,omitempty"` + TableName interface{} `json:"tableName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go new file mode 100644 index 00000000000..9cf6b2ea0e0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_oraclecloudstoragelocation.go @@ -0,0 +1,12 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleCloudStorageLocation struct { + BucketName *interface{} `json:"bucketName,omitempty"` + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` + Version *interface{} `json:"version,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go new file mode 100644 index 00000000000..e2aab43b082 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_oracleservicecloudobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = OracleServiceCloudObjectDataset{} + +type OracleServiceCloudObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = OracleServiceCloudObjectDataset{} + +func (s OracleServiceCloudObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper OracleServiceCloudObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleServiceCloudObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleServiceCloudObjectDataset: %+v", err) + } + decoded["type"] = "OracleServiceCloudObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleServiceCloudObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go new file mode 100644 index 00000000000..b68895d9767 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = OracleTableDataset{} + +type OracleTableDataset struct { + TypeProperties *OracleTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = OracleTableDataset{} + +func (s OracleTableDataset) MarshalJSON() ([]byte, error) { + type wrapper OracleTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleTableDataset: %+v", err) + } + decoded["type"] = "OracleTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledatasettypeproperties.go new file mode 100644 index 00000000000..27bd00869c5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_oracletabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go new file mode 100644 index 00000000000..905edad7add --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_orcdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = OrcDataset{} + +type OrcDataset struct { + TypeProperties *OrcDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = OrcDataset{} + +func (s OrcDataset) MarshalJSON() ([]byte, error) { + type wrapper OrcDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OrcDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OrcDataset: %+v", err) + } + decoded["type"] = "Orc" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OrcDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go new file mode 100644 index 00000000000..a474a77434e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_orcdatasettypeproperties.go @@ -0,0 +1,40 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OrcDatasetTypeProperties struct { + Location DatasetLocation `json:"location"` + OrcCompressionCodec *interface{} `json:"orcCompressionCodec,omitempty"` +} + +var _ json.Unmarshaler = &OrcDatasetTypeProperties{} + +func (s *OrcDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias OrcDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OrcDatasetTypeProperties: %+v", err) + } + + s.OrcCompressionCodec = decoded.OrcCompressionCodec + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OrcDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'OrcDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go new file mode 100644 index 00000000000..93d1228a88b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_orcformat.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OrcFormat struct { + Deserializer *interface{} `json:"deserializer,omitempty"` + Serializer *interface{} `json:"serializer,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go new file mode 100644 index 00000000000..fbbdf978ed1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ParquetDataset{} + +type ParquetDataset struct { + TypeProperties *ParquetDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ParquetDataset{} + +func (s ParquetDataset) MarshalJSON() ([]byte, error) { + type wrapper ParquetDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ParquetDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ParquetDataset: %+v", err) + } + decoded["type"] = "Parquet" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ParquetDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go new file mode 100644 index 00000000000..59404bf4a98 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_parquetdatasettypeproperties.go @@ -0,0 +1,40 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParquetDatasetTypeProperties struct { + CompressionCodec *interface{} `json:"compressionCodec,omitempty"` + Location DatasetLocation `json:"location"` +} + +var _ json.Unmarshaler = &ParquetDatasetTypeProperties{} + +func (s *ParquetDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ParquetDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ParquetDatasetTypeProperties: %+v", err) + } + + s.CompressionCodec = decoded.CompressionCodec + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ParquetDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'ParquetDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go new file mode 100644 index 00000000000..0a4ddcca2c6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_parquetformat.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParquetFormat struct { + Deserializer *interface{} `json:"deserializer,omitempty"` + Serializer *interface{} `json:"serializer,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go new file mode 100644 index 00000000000..bdba774505e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_paypalobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = PaypalObjectDataset{} + +type PaypalObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = PaypalObjectDataset{} + +func (s PaypalObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper PaypalObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PaypalObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PaypalObjectDataset: %+v", err) + } + decoded["type"] = "PaypalObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PaypalObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_phoenixdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_phoenixdatasettypeproperties.go new file mode 100644 index 00000000000..c87fdc1a15f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_phoenixdatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PhoenixDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go new file mode 100644 index 00000000000..fdf95c28be7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_phoenixobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = PhoenixObjectDataset{} + +type PhoenixObjectDataset struct { + TypeProperties *PhoenixDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = PhoenixObjectDataset{} + +func (s PhoenixObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper PhoenixObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PhoenixObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PhoenixObjectDataset: %+v", err) + } + decoded["type"] = "PhoenixObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PhoenixObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go new file mode 100644 index 00000000000..f8a0a47387f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = PostgreSqlTableDataset{} + +type PostgreSqlTableDataset struct { + TypeProperties *PostgreSqlTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = PostgreSqlTableDataset{} + +func (s PostgreSqlTableDataset) MarshalJSON() ([]byte, error) { + type wrapper PostgreSqlTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostgreSqlTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostgreSqlTableDataset: %+v", err) + } + decoded["type"] = "PostgreSqlTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostgreSqlTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledatasettypeproperties.go new file mode 100644 index 00000000000..0e504988911 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqltabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go new file mode 100644 index 00000000000..ae2e700d8da --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = PostgreSqlV2TableDataset{} + +type PostgreSqlV2TableDataset struct { + TypeProperties *PostgreSqlV2TableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = PostgreSqlV2TableDataset{} + +func (s PostgreSqlV2TableDataset) MarshalJSON() ([]byte, error) { + type wrapper PostgreSqlV2TableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostgreSqlV2TableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostgreSqlV2TableDataset: %+v", err) + } + decoded["type"] = "PostgreSqlV2Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostgreSqlV2TableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledatasettypeproperties.go new file mode 100644 index 00000000000..12ef851136a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_postgresqlv2tabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlV2TableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_prestodatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_prestodatasettypeproperties.go new file mode 100644 index 00000000000..970dc47774f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_prestodatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrestoDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go new file mode 100644 index 00000000000..b9236c39de9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_prestoobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = PrestoObjectDataset{} + +type PrestoObjectDataset struct { + TypeProperties *PrestoDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = PrestoObjectDataset{} + +func (s PrestoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper PrestoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PrestoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PrestoObjectDataset: %+v", err) + } + decoded["type"] = "PrestoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PrestoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go new file mode 100644 index 00000000000..036efa63894 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_quickbooksobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = QuickBooksObjectDataset{} + +type QuickBooksObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = QuickBooksObjectDataset{} + +func (s QuickBooksObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper QuickBooksObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling QuickBooksObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling QuickBooksObjectDataset: %+v", err) + } + decoded["type"] = "QuickBooksObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling QuickBooksObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go new file mode 100644 index 00000000000..eeb66a2f268 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = RelationalTableDataset{} + +type RelationalTableDataset struct { + TypeProperties *RelationalTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = RelationalTableDataset{} + +func (s RelationalTableDataset) MarshalJSON() ([]byte, error) { + type wrapper RelationalTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RelationalTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RelationalTableDataset: %+v", err) + } + decoded["type"] = "RelationalTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RelationalTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledatasettypeproperties.go new file mode 100644 index 00000000000..f8200806fbd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_relationaltabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RelationalTableDatasetTypeProperties struct { + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go new file mode 100644 index 00000000000..5bdd66ee820 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_responsysobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ResponsysObjectDataset{} + +type ResponsysObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ResponsysObjectDataset{} + +func (s ResponsysObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ResponsysObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ResponsysObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ResponsysObjectDataset: %+v", err) + } + decoded["type"] = "ResponsysObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ResponsysObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go new file mode 100644 index 00000000000..c2a82aa9883 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = RestResourceDataset{} + +type RestResourceDataset struct { + TypeProperties *RestResourceDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = RestResourceDataset{} + +func (s RestResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper RestResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RestResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RestResourceDataset: %+v", err) + } + decoded["type"] = "RestResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RestResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedatasettypeproperties.go new file mode 100644 index 00000000000..b97d4e27c89 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_restresourcedatasettypeproperties.go @@ -0,0 +1,12 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestResourceDatasetTypeProperties struct { + AdditionalHeaders *map[string]interface{} `json:"additionalHeaders,omitempty"` + PaginationRules *map[string]interface{} `json:"paginationRules,omitempty"` + RelativeUrl *interface{} `json:"relativeUrl,omitempty"` + RequestBody *interface{} `json:"requestBody,omitempty"` + RequestMethod *interface{} `json:"requestMethod,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go new file mode 100644 index 00000000000..fb6fbcfab50 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcemarketingcloudobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SalesforceMarketingCloudObjectDataset{} + +type SalesforceMarketingCloudObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SalesforceMarketingCloudObjectDataset{} + +func (s SalesforceMarketingCloudObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceMarketingCloudObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceMarketingCloudObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceMarketingCloudObjectDataset: %+v", err) + } + decoded["type"] = "SalesforceMarketingCloudObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceMarketingCloudObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go new file mode 100644 index 00000000000..20b449c28a0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SalesforceObjectDataset{} + +type SalesforceObjectDataset struct { + TypeProperties *SalesforceObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SalesforceObjectDataset{} + +func (s SalesforceObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceObjectDataset: %+v", err) + } + decoded["type"] = "SalesforceObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdatasettypeproperties.go new file mode 100644 index 00000000000..02076c4534a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceobjectdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceObjectDatasetTypeProperties struct { + ObjectApiName *interface{} `json:"objectApiName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go new file mode 100644 index 00000000000..a8e72503901 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SalesforceServiceCloudObjectDataset{} + +type SalesforceServiceCloudObjectDataset struct { + TypeProperties *SalesforceServiceCloudObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SalesforceServiceCloudObjectDataset{} + +func (s SalesforceServiceCloudObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceServiceCloudObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceServiceCloudObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudObjectDataset: %+v", err) + } + decoded["type"] = "SalesforceServiceCloudObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceServiceCloudObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdatasettypeproperties.go new file mode 100644 index 00000000000..866e6cb0bb4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudobjectdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudObjectDatasetTypeProperties struct { + ObjectApiName *interface{} `json:"objectApiName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go new file mode 100644 index 00000000000..30e0df6e166 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SalesforceServiceCloudV2ObjectDataset{} + +type SalesforceServiceCloudV2ObjectDataset struct { + TypeProperties *SalesforceServiceCloudV2ObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SalesforceServiceCloudV2ObjectDataset{} + +func (s SalesforceServiceCloudV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceServiceCloudV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + decoded["type"] = "SalesforceServiceCloudV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceServiceCloudV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdatasettypeproperties.go new file mode 100644 index 00000000000..293b89b3cb1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforceservicecloudv2objectdatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudV2ObjectDatasetTypeProperties struct { + ObjectApiName *interface{} `json:"objectApiName,omitempty"` + ReportId *interface{} `json:"reportId,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go new file mode 100644 index 00000000000..8370fe244bb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SalesforceV2ObjectDataset{} + +type SalesforceV2ObjectDataset struct { + TypeProperties *SalesforceV2ObjectDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SalesforceV2ObjectDataset{} + +func (s SalesforceV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SalesforceV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceV2ObjectDataset: %+v", err) + } + decoded["type"] = "SalesforceV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdatasettypeproperties.go new file mode 100644 index 00000000000..cd35d9b7384 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_salesforcev2objectdatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceV2ObjectDatasetTypeProperties struct { + ObjectApiName *interface{} `json:"objectApiName,omitempty"` + ReportId *interface{} `json:"reportId,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go new file mode 100644 index 00000000000..922fcc6d30c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapbwcubedataset.go @@ -0,0 +1,47 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SapBwCubeDataset{} + +type SapBwCubeDataset struct { + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SapBwCubeDataset{} + +func (s SapBwCubeDataset) MarshalJSON() ([]byte, error) { + type wrapper SapBwCubeDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapBwCubeDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapBwCubeDataset: %+v", err) + } + decoded["type"] = "SapBwCube" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapBwCubeDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go new file mode 100644 index 00000000000..43139ebb934 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SapCloudForCustomerResourceDataset{} + +type SapCloudForCustomerResourceDataset struct { + TypeProperties SapCloudForCustomerResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SapCloudForCustomerResourceDataset{} + +func (s SapCloudForCustomerResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapCloudForCustomerResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapCloudForCustomerResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapCloudForCustomerResourceDataset: %+v", err) + } + decoded["type"] = "SapCloudForCustomerResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapCloudForCustomerResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedatasettypeproperties.go new file mode 100644 index 00000000000..49ac58cb30e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapcloudforcustomerresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapCloudForCustomerResourceDatasetTypeProperties struct { + Path interface{} `json:"path"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go new file mode 100644 index 00000000000..9d635944b1c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SapEccResourceDataset{} + +type SapEccResourceDataset struct { + TypeProperties SapEccResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SapEccResourceDataset{} + +func (s SapEccResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapEccResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapEccResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapEccResourceDataset: %+v", err) + } + decoded["type"] = "SapEccResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapEccResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedatasettypeproperties.go new file mode 100644 index 00000000000..56779f627ed --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapeccresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapEccResourceDatasetTypeProperties struct { + Path interface{} `json:"path"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go new file mode 100644 index 00000000000..7720a0e5943 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SapHanaTableDataset{} + +type SapHanaTableDataset struct { + TypeProperties *SapHanaTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SapHanaTableDataset{} + +func (s SapHanaTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SapHanaTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapHanaTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapHanaTableDataset: %+v", err) + } + decoded["type"] = "SapHanaTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapHanaTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledatasettypeproperties.go new file mode 100644 index 00000000000..49d00a281b4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_saphanatabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapHanaTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go new file mode 100644 index 00000000000..16968f7e16c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SapOdpResourceDataset{} + +type SapOdpResourceDataset struct { + TypeProperties SapOdpResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SapOdpResourceDataset{} + +func (s SapOdpResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapOdpResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapOdpResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapOdpResourceDataset: %+v", err) + } + decoded["type"] = "SapOdpResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapOdpResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedatasettypeproperties.go new file mode 100644 index 00000000000..6449bb1034d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapodpresourcedatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOdpResourceDatasetTypeProperties struct { + Context interface{} `json:"context"` + ObjectName interface{} `json:"objectName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go new file mode 100644 index 00000000000..6c05b0b34fc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SapOpenHubTableDataset{} + +type SapOpenHubTableDataset struct { + TypeProperties SapOpenHubTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SapOpenHubTableDataset{} + +func (s SapOpenHubTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SapOpenHubTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapOpenHubTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapOpenHubTableDataset: %+v", err) + } + decoded["type"] = "SapOpenHubTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapOpenHubTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledatasettypeproperties.go new file mode 100644 index 00000000000..4a022995ebe --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sapopenhubtabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOpenHubTableDatasetTypeProperties struct { + BaseRequestId *interface{} `json:"baseRequestId,omitempty"` + ExcludeLastRequest *interface{} `json:"excludeLastRequest,omitempty"` + OpenHubDestinationName interface{} `json:"openHubDestinationName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go new file mode 100644 index 00000000000..7a350c2cf64 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SapTableResourceDataset{} + +type SapTableResourceDataset struct { + TypeProperties SapTableResourceDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SapTableResourceDataset{} + +func (s SapTableResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SapTableResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapTableResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapTableResourceDataset: %+v", err) + } + decoded["type"] = "SapTableResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapTableResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedatasettypeproperties.go new file mode 100644 index 00000000000..72e736a4b6f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_saptableresourcedatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapTableResourceDatasetTypeProperties struct { + TableName interface{} `json:"tableName"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go new file mode 100644 index 00000000000..7f55937902a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ServiceNowObjectDataset{} + +type ServiceNowObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ServiceNowObjectDataset{} + +func (s ServiceNowObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ServiceNowObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceNowObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceNowObjectDataset: %+v", err) + } + decoded["type"] = "ServiceNowObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceNowObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go new file mode 100644 index 00000000000..76425f9d156 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_servicenowv2objectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ServiceNowV2ObjectDataset{} + +type ServiceNowV2ObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ServiceNowV2ObjectDataset{} + +func (s ServiceNowV2ObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ServiceNowV2ObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceNowV2ObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceNowV2ObjectDataset: %+v", err) + } + decoded["type"] = "ServiceNowV2Object" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceNowV2ObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go b/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go new file mode 100644 index 00000000000..5873bff3bd0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sftplocation.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SftpLocation struct { + FileName *interface{} `json:"fileName,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistdatasettypeproperties.go new file mode 100644 index 00000000000..2afb4ede302 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistdatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SharePointOnlineListDatasetTypeProperties struct { + ListName *interface{} `json:"listName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go new file mode 100644 index 00000000000..10b1c60fe3e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sharepointonlinelistresourcedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SharePointOnlineListResourceDataset{} + +type SharePointOnlineListResourceDataset struct { + TypeProperties *SharePointOnlineListDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SharePointOnlineListResourceDataset{} + +func (s SharePointOnlineListResourceDataset) MarshalJSON() ([]byte, error) { + type wrapper SharePointOnlineListResourceDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SharePointOnlineListResourceDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SharePointOnlineListResourceDataset: %+v", err) + } + decoded["type"] = "SharePointOnlineListResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SharePointOnlineListResourceDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go new file mode 100644 index 00000000000..24899249693 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_shopifyobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ShopifyObjectDataset{} + +type ShopifyObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ShopifyObjectDataset{} + +func (s ShopifyObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ShopifyObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ShopifyObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ShopifyObjectDataset: %+v", err) + } + decoded["type"] = "ShopifyObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ShopifyObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go new file mode 100644 index 00000000000..957d1c855d8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SnowflakeDataset{} + +type SnowflakeDataset struct { + TypeProperties SnowflakeDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SnowflakeDataset{} + +func (s SnowflakeDataset) MarshalJSON() ([]byte, error) { + type wrapper SnowflakeDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SnowflakeDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SnowflakeDataset: %+v", err) + } + decoded["type"] = "SnowflakeTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SnowflakeDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedatasettypeproperties.go new file mode 100644 index 00000000000..bfb69d54329 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakedatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go new file mode 100644 index 00000000000..8eb3c076f68 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_snowflakev2dataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SnowflakeV2Dataset{} + +type SnowflakeV2Dataset struct { + TypeProperties SnowflakeDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SnowflakeV2Dataset{} + +func (s SnowflakeV2Dataset) MarshalJSON() ([]byte, error) { + type wrapper SnowflakeV2Dataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SnowflakeV2Dataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SnowflakeV2Dataset: %+v", err) + } + decoded["type"] = "SnowflakeV2Table" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SnowflakeV2Dataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sparkdatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sparkdatasettypeproperties.go new file mode 100644 index 00000000000..40d2523bad9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sparkdatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SparkDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go new file mode 100644 index 00000000000..b991dffc760 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sparkobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SparkObjectDataset{} + +type SparkObjectDataset struct { + TypeProperties *SparkDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SparkObjectDataset{} + +func (s SparkObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SparkObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SparkObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SparkObjectDataset: %+v", err) + } + decoded["type"] = "SparkObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SparkObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go new file mode 100644 index 00000000000..b1216c1ae53 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SqlServerTableDataset{} + +type SqlServerTableDataset struct { + TypeProperties *SqlServerTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SqlServerTableDataset{} + +func (s SqlServerTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SqlServerTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SqlServerTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SqlServerTableDataset: %+v", err) + } + decoded["type"] = "SqlServerTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SqlServerTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledatasettypeproperties.go new file mode 100644 index 00000000000..8e4656a1751 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sqlservertabledatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlServerTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go new file mode 100644 index 00000000000..197beccf51d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_squareobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SquareObjectDataset{} + +type SquareObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SquareObjectDataset{} + +func (s SquareObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper SquareObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SquareObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SquareObjectDataset: %+v", err) + } + decoded["type"] = "SquareObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SquareObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go new file mode 100644 index 00000000000..43e2aebbd9a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = SybaseTableDataset{} + +type SybaseTableDataset struct { + TypeProperties *SybaseTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = SybaseTableDataset{} + +func (s SybaseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper SybaseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SybaseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SybaseTableDataset: %+v", err) + } + decoded["type"] = "SybaseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SybaseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledatasettypeproperties.go new file mode 100644 index 00000000000..48b4fa2b478 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_sybasetabledatasettypeproperties.go @@ -0,0 +1,8 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SybaseTableDatasetTypeProperties struct { + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go new file mode 100644 index 00000000000..d96c76bc16e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = TeradataTableDataset{} + +type TeradataTableDataset struct { + TypeProperties *TeradataTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = TeradataTableDataset{} + +func (s TeradataTableDataset) MarshalJSON() ([]byte, error) { + type wrapper TeradataTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TeradataTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TeradataTableDataset: %+v", err) + } + decoded["type"] = "TeradataTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TeradataTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledatasettypeproperties.go new file mode 100644 index 00000000000..119c50c3fea --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_teradatatabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TeradataTableDatasetTypeProperties struct { + Database *interface{} `json:"database,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go b/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go new file mode 100644 index 00000000000..f18639b3447 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_textformat.go @@ -0,0 +1,19 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TextFormat struct { + ColumnDelimiter *interface{} `json:"columnDelimiter,omitempty"` + Deserializer *interface{} `json:"deserializer,omitempty"` + EncodingName *interface{} `json:"encodingName,omitempty"` + EscapeChar *interface{} `json:"escapeChar,omitempty"` + FirstRowAsHeader *interface{} `json:"firstRowAsHeader,omitempty"` + NullValue *interface{} `json:"nullValue,omitempty"` + QuoteChar *interface{} `json:"quoteChar,omitempty"` + RowDelimiter *interface{} `json:"rowDelimiter,omitempty"` + Serializer *interface{} `json:"serializer,omitempty"` + SkipLineCount *interface{} `json:"skipLineCount,omitempty"` + TreatEmptyAsNull *interface{} `json:"treatEmptyAsNull,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_verticadatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_verticadatasettypeproperties.go new file mode 100644 index 00000000000..33eaae55e14 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_verticadatasettypeproperties.go @@ -0,0 +1,10 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VerticaDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` + TableName *interface{} `json:"tableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go new file mode 100644 index 00000000000..1b1be813e2f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_verticatabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = VerticaTableDataset{} + +type VerticaTableDataset struct { + TypeProperties *VerticaDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = VerticaTableDataset{} + +func (s VerticaTableDataset) MarshalJSON() ([]byte, error) { + type wrapper VerticaTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling VerticaTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling VerticaTableDataset: %+v", err) + } + decoded["type"] = "VerticaTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling VerticaTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go new file mode 100644 index 00000000000..1be360d523f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = WarehouseTableDataset{} + +type WarehouseTableDataset struct { + TypeProperties *WarehouseTableDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = WarehouseTableDataset{} + +func (s WarehouseTableDataset) MarshalJSON() ([]byte, error) { + type wrapper WarehouseTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WarehouseTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WarehouseTableDataset: %+v", err) + } + decoded["type"] = "WarehouseTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WarehouseTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledatasettypeproperties.go new file mode 100644 index 00000000000..01b0d2829bf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_warehousetabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WarehouseTableDatasetTypeProperties struct { + Schema *interface{} `json:"schema,omitempty"` + Table *interface{} `json:"table,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go new file mode 100644 index 00000000000..43ac9694724 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_webtabledataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = WebTableDataset{} + +type WebTableDataset struct { + TypeProperties WebTableDatasetTypeProperties `json:"typeProperties"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = WebTableDataset{} + +func (s WebTableDataset) MarshalJSON() ([]byte, error) { + type wrapper WebTableDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebTableDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebTableDataset: %+v", err) + } + decoded["type"] = "WebTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebTableDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_webtabledatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_webtabledatasettypeproperties.go new file mode 100644 index 00000000000..b01f53873cb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_webtabledatasettypeproperties.go @@ -0,0 +1,9 @@ +package datasets + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebTableDatasetTypeProperties struct { + Index interface{} `json:"index"` + Path *interface{} `json:"path,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go new file mode 100644 index 00000000000..5181f88ed77 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_xeroobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = XeroObjectDataset{} + +type XeroObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = XeroObjectDataset{} + +func (s XeroObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper XeroObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling XeroObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling XeroObjectDataset: %+v", err) + } + decoded["type"] = "XeroObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling XeroObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go new file mode 100644 index 00000000000..e99d34f1a48 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_xmldataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = XmlDataset{} + +type XmlDataset struct { + TypeProperties *XmlDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = XmlDataset{} + +func (s XmlDataset) MarshalJSON() ([]byte, error) { + type wrapper XmlDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling XmlDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling XmlDataset: %+v", err) + } + decoded["type"] = "Xml" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling XmlDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go b/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go new file mode 100644 index 00000000000..224971bc8c8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_xmldatasettypeproperties.go @@ -0,0 +1,44 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type XmlDatasetTypeProperties struct { + Compression *DatasetCompression `json:"compression,omitempty"` + EncodingName *interface{} `json:"encodingName,omitempty"` + Location DatasetLocation `json:"location"` + NullValue *interface{} `json:"nullValue,omitempty"` +} + +var _ json.Unmarshaler = &XmlDatasetTypeProperties{} + +func (s *XmlDatasetTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias XmlDatasetTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into XmlDatasetTypeProperties: %+v", err) + } + + s.Compression = decoded.Compression + s.EncodingName = decoded.EncodingName + s.NullValue = decoded.NullValue + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling XmlDatasetTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["location"]; ok { + impl, err := unmarshalDatasetLocationImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Location' for 'XmlDatasetTypeProperties': %+v", err) + } + s.Location = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go b/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go new file mode 100644 index 00000000000..34fa0189186 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/datasets/model_zohoobjectdataset.go @@ -0,0 +1,48 @@ +package datasets + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Dataset = ZohoObjectDataset{} + +type ZohoObjectDataset struct { + TypeProperties *GenericDatasetTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from Dataset + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Folder *DatasetFolder `json:"folder,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Structure *interface{} `json:"structure,omitempty"` +} + +var _ json.Marshaler = ZohoObjectDataset{} + +func (s ZohoObjectDataset) MarshalJSON() ([]byte, error) { + type wrapper ZohoObjectDataset + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ZohoObjectDataset: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ZohoObjectDataset: %+v", err) + } + decoded["type"] = "ZohoObject" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ZohoObjectDataset: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/constants.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/constants.go index a26fa26d012..61c2d1d11f7 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/constants.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/constants.go @@ -9,6 +9,88 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type CredentialReferenceType string + +const ( + CredentialReferenceTypeCredentialReference CredentialReferenceType = "CredentialReference" +) + +func PossibleValuesForCredentialReferenceType() []string { + return []string{ + string(CredentialReferenceTypeCredentialReference), + } +} + +func (s *CredentialReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCredentialReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCredentialReferenceType(input string) (*CredentialReferenceType, error) { + vals := map[string]CredentialReferenceType{ + "credentialreference": CredentialReferenceTypeCredentialReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CredentialReferenceType(input) + return &out, nil +} + +type DataFlowComputeType string + +const ( + DataFlowComputeTypeComputeOptimized DataFlowComputeType = "ComputeOptimized" + DataFlowComputeTypeGeneral DataFlowComputeType = "General" + DataFlowComputeTypeMemoryOptimized DataFlowComputeType = "MemoryOptimized" +) + +func PossibleValuesForDataFlowComputeType() []string { + return []string{ + string(DataFlowComputeTypeComputeOptimized), + string(DataFlowComputeTypeGeneral), + string(DataFlowComputeTypeMemoryOptimized), + } +} + +func (s *DataFlowComputeType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDataFlowComputeType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDataFlowComputeType(input string) (*DataFlowComputeType, error) { + vals := map[string]DataFlowComputeType{ + "computeoptimized": DataFlowComputeTypeComputeOptimized, + "general": DataFlowComputeTypeGeneral, + "memoryoptimized": DataFlowComputeTypeMemoryOptimized, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DataFlowComputeType(input) + return &out, nil +} + type IntegrationRuntimeAuthKeyName string const ( @@ -91,6 +173,220 @@ func parseIntegrationRuntimeAutoUpdate(input string) (*IntegrationRuntimeAutoUpd return &out, nil } +type IntegrationRuntimeEdition string + +const ( + IntegrationRuntimeEditionEnterprise IntegrationRuntimeEdition = "Enterprise" + IntegrationRuntimeEditionStandard IntegrationRuntimeEdition = "Standard" +) + +func PossibleValuesForIntegrationRuntimeEdition() []string { + return []string{ + string(IntegrationRuntimeEditionEnterprise), + string(IntegrationRuntimeEditionStandard), + } +} + +func (s *IntegrationRuntimeEdition) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeEdition(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeEdition(input string) (*IntegrationRuntimeEdition, error) { + vals := map[string]IntegrationRuntimeEdition{ + "enterprise": IntegrationRuntimeEditionEnterprise, + "standard": IntegrationRuntimeEditionStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeEdition(input) + return &out, nil +} + +type IntegrationRuntimeEntityReferenceType string + +const ( + IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference IntegrationRuntimeEntityReferenceType = "IntegrationRuntimeReference" + IntegrationRuntimeEntityReferenceTypeLinkedServiceReference IntegrationRuntimeEntityReferenceType = "LinkedServiceReference" +) + +func PossibleValuesForIntegrationRuntimeEntityReferenceType() []string { + return []string{ + string(IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference), + string(IntegrationRuntimeEntityReferenceTypeLinkedServiceReference), + } +} + +func (s *IntegrationRuntimeEntityReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeEntityReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeEntityReferenceType(input string) (*IntegrationRuntimeEntityReferenceType, error) { + vals := map[string]IntegrationRuntimeEntityReferenceType{ + "integrationruntimereference": IntegrationRuntimeEntityReferenceTypeIntegrationRuntimeReference, + "linkedservicereference": IntegrationRuntimeEntityReferenceTypeLinkedServiceReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeEntityReferenceType(input) + return &out, nil +} + +type IntegrationRuntimeInternalChannelEncryptionMode string + +const ( + IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted IntegrationRuntimeInternalChannelEncryptionMode = "NotEncrypted" + IntegrationRuntimeInternalChannelEncryptionModeNotSet IntegrationRuntimeInternalChannelEncryptionMode = "NotSet" + IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted IntegrationRuntimeInternalChannelEncryptionMode = "SslEncrypted" +) + +func PossibleValuesForIntegrationRuntimeInternalChannelEncryptionMode() []string { + return []string{ + string(IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted), + string(IntegrationRuntimeInternalChannelEncryptionModeNotSet), + string(IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted), + } +} + +func (s *IntegrationRuntimeInternalChannelEncryptionMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeInternalChannelEncryptionMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeInternalChannelEncryptionMode(input string) (*IntegrationRuntimeInternalChannelEncryptionMode, error) { + vals := map[string]IntegrationRuntimeInternalChannelEncryptionMode{ + "notencrypted": IntegrationRuntimeInternalChannelEncryptionModeNotEncrypted, + "notset": IntegrationRuntimeInternalChannelEncryptionModeNotSet, + "sslencrypted": IntegrationRuntimeInternalChannelEncryptionModeSslEncrypted, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeInternalChannelEncryptionMode(input) + return &out, nil +} + +type IntegrationRuntimeLicenseType string + +const ( + IntegrationRuntimeLicenseTypeBasePrice IntegrationRuntimeLicenseType = "BasePrice" + IntegrationRuntimeLicenseTypeLicenseIncluded IntegrationRuntimeLicenseType = "LicenseIncluded" +) + +func PossibleValuesForIntegrationRuntimeLicenseType() []string { + return []string{ + string(IntegrationRuntimeLicenseTypeBasePrice), + string(IntegrationRuntimeLicenseTypeLicenseIncluded), + } +} + +func (s *IntegrationRuntimeLicenseType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeLicenseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeLicenseType(input string) (*IntegrationRuntimeLicenseType, error) { + vals := map[string]IntegrationRuntimeLicenseType{ + "baseprice": IntegrationRuntimeLicenseTypeBasePrice, + "licenseincluded": IntegrationRuntimeLicenseTypeLicenseIncluded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeLicenseType(input) + return &out, nil +} + +type IntegrationRuntimeSsisCatalogPricingTier string + +const ( + IntegrationRuntimeSsisCatalogPricingTierBasic IntegrationRuntimeSsisCatalogPricingTier = "Basic" + IntegrationRuntimeSsisCatalogPricingTierPremium IntegrationRuntimeSsisCatalogPricingTier = "Premium" + IntegrationRuntimeSsisCatalogPricingTierPremiumRS IntegrationRuntimeSsisCatalogPricingTier = "PremiumRS" + IntegrationRuntimeSsisCatalogPricingTierStandard IntegrationRuntimeSsisCatalogPricingTier = "Standard" +) + +func PossibleValuesForIntegrationRuntimeSsisCatalogPricingTier() []string { + return []string{ + string(IntegrationRuntimeSsisCatalogPricingTierBasic), + string(IntegrationRuntimeSsisCatalogPricingTierPremium), + string(IntegrationRuntimeSsisCatalogPricingTierPremiumRS), + string(IntegrationRuntimeSsisCatalogPricingTierStandard), + } +} + +func (s *IntegrationRuntimeSsisCatalogPricingTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeSsisCatalogPricingTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeSsisCatalogPricingTier(input string) (*IntegrationRuntimeSsisCatalogPricingTier, error) { + vals := map[string]IntegrationRuntimeSsisCatalogPricingTier{ + "basic": IntegrationRuntimeSsisCatalogPricingTierBasic, + "premium": IntegrationRuntimeSsisCatalogPricingTierPremium, + "premiumrs": IntegrationRuntimeSsisCatalogPricingTierPremiumRS, + "standard": IntegrationRuntimeSsisCatalogPricingTierStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeSsisCatalogPricingTier(input) + return &out, nil +} + type IntegrationRuntimeState string const ( @@ -196,3 +492,235 @@ func parseIntegrationRuntimeType(input string) (*IntegrationRuntimeType, error) out := IntegrationRuntimeType(input) return &out, nil } + +type IntegrationRuntimeUpdateResult string + +const ( + IntegrationRuntimeUpdateResultFail IntegrationRuntimeUpdateResult = "Fail" + IntegrationRuntimeUpdateResultNone IntegrationRuntimeUpdateResult = "None" + IntegrationRuntimeUpdateResultSucceed IntegrationRuntimeUpdateResult = "Succeed" +) + +func PossibleValuesForIntegrationRuntimeUpdateResult() []string { + return []string{ + string(IntegrationRuntimeUpdateResultFail), + string(IntegrationRuntimeUpdateResultNone), + string(IntegrationRuntimeUpdateResultSucceed), + } +} + +func (s *IntegrationRuntimeUpdateResult) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeUpdateResult(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeUpdateResult(input string) (*IntegrationRuntimeUpdateResult, error) { + vals := map[string]IntegrationRuntimeUpdateResult{ + "fail": IntegrationRuntimeUpdateResultFail, + "none": IntegrationRuntimeUpdateResultNone, + "succeed": IntegrationRuntimeUpdateResultSucceed, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeUpdateResult(input) + return &out, nil +} + +type ManagedIntegrationRuntimeNodeStatus string + +const ( + ManagedIntegrationRuntimeNodeStatusAvailable ManagedIntegrationRuntimeNodeStatus = "Available" + ManagedIntegrationRuntimeNodeStatusRecycling ManagedIntegrationRuntimeNodeStatus = "Recycling" + ManagedIntegrationRuntimeNodeStatusStarting ManagedIntegrationRuntimeNodeStatus = "Starting" + ManagedIntegrationRuntimeNodeStatusUnavailable ManagedIntegrationRuntimeNodeStatus = "Unavailable" +) + +func PossibleValuesForManagedIntegrationRuntimeNodeStatus() []string { + return []string{ + string(ManagedIntegrationRuntimeNodeStatusAvailable), + string(ManagedIntegrationRuntimeNodeStatusRecycling), + string(ManagedIntegrationRuntimeNodeStatusStarting), + string(ManagedIntegrationRuntimeNodeStatusUnavailable), + } +} + +func (s *ManagedIntegrationRuntimeNodeStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedIntegrationRuntimeNodeStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedIntegrationRuntimeNodeStatus(input string) (*ManagedIntegrationRuntimeNodeStatus, error) { + vals := map[string]ManagedIntegrationRuntimeNodeStatus{ + "available": ManagedIntegrationRuntimeNodeStatusAvailable, + "recycling": ManagedIntegrationRuntimeNodeStatusRecycling, + "starting": ManagedIntegrationRuntimeNodeStatusStarting, + "unavailable": ManagedIntegrationRuntimeNodeStatusUnavailable, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedIntegrationRuntimeNodeStatus(input) + return &out, nil +} + +type ManagedVirtualNetworkReferenceType string + +const ( + ManagedVirtualNetworkReferenceTypeManagedVirtualNetworkReference ManagedVirtualNetworkReferenceType = "ManagedVirtualNetworkReference" +) + +func PossibleValuesForManagedVirtualNetworkReferenceType() []string { + return []string{ + string(ManagedVirtualNetworkReferenceTypeManagedVirtualNetworkReference), + } +} + +func (s *ManagedVirtualNetworkReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedVirtualNetworkReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedVirtualNetworkReferenceType(input string) (*ManagedVirtualNetworkReferenceType, error) { + vals := map[string]ManagedVirtualNetworkReferenceType{ + "managedvirtualnetworkreference": ManagedVirtualNetworkReferenceTypeManagedVirtualNetworkReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedVirtualNetworkReferenceType(input) + return &out, nil +} + +type SelfHostedIntegrationRuntimeNodeStatus string + +const ( + SelfHostedIntegrationRuntimeNodeStatusInitializeFailed SelfHostedIntegrationRuntimeNodeStatus = "InitializeFailed" + SelfHostedIntegrationRuntimeNodeStatusInitializing SelfHostedIntegrationRuntimeNodeStatus = "Initializing" + SelfHostedIntegrationRuntimeNodeStatusLimited SelfHostedIntegrationRuntimeNodeStatus = "Limited" + SelfHostedIntegrationRuntimeNodeStatusNeedRegistration SelfHostedIntegrationRuntimeNodeStatus = "NeedRegistration" + SelfHostedIntegrationRuntimeNodeStatusOffline SelfHostedIntegrationRuntimeNodeStatus = "Offline" + SelfHostedIntegrationRuntimeNodeStatusOnline SelfHostedIntegrationRuntimeNodeStatus = "Online" + SelfHostedIntegrationRuntimeNodeStatusUpgrading SelfHostedIntegrationRuntimeNodeStatus = "Upgrading" +) + +func PossibleValuesForSelfHostedIntegrationRuntimeNodeStatus() []string { + return []string{ + string(SelfHostedIntegrationRuntimeNodeStatusInitializeFailed), + string(SelfHostedIntegrationRuntimeNodeStatusInitializing), + string(SelfHostedIntegrationRuntimeNodeStatusLimited), + string(SelfHostedIntegrationRuntimeNodeStatusNeedRegistration), + string(SelfHostedIntegrationRuntimeNodeStatusOffline), + string(SelfHostedIntegrationRuntimeNodeStatusOnline), + string(SelfHostedIntegrationRuntimeNodeStatusUpgrading), + } +} + +func (s *SelfHostedIntegrationRuntimeNodeStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSelfHostedIntegrationRuntimeNodeStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSelfHostedIntegrationRuntimeNodeStatus(input string) (*SelfHostedIntegrationRuntimeNodeStatus, error) { + vals := map[string]SelfHostedIntegrationRuntimeNodeStatus{ + "initializefailed": SelfHostedIntegrationRuntimeNodeStatusInitializeFailed, + "initializing": SelfHostedIntegrationRuntimeNodeStatusInitializing, + "limited": SelfHostedIntegrationRuntimeNodeStatusLimited, + "needregistration": SelfHostedIntegrationRuntimeNodeStatusNeedRegistration, + "offline": SelfHostedIntegrationRuntimeNodeStatusOffline, + "online": SelfHostedIntegrationRuntimeNodeStatusOnline, + "upgrading": SelfHostedIntegrationRuntimeNodeStatusUpgrading, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SelfHostedIntegrationRuntimeNodeStatus(input) + return &out, nil +} + +type SsisObjectMetadataType string + +const ( + SsisObjectMetadataTypeEnvironment SsisObjectMetadataType = "Environment" + SsisObjectMetadataTypeFolder SsisObjectMetadataType = "Folder" + SsisObjectMetadataTypePackage SsisObjectMetadataType = "Package" + SsisObjectMetadataTypeProject SsisObjectMetadataType = "Project" +) + +func PossibleValuesForSsisObjectMetadataType() []string { + return []string{ + string(SsisObjectMetadataTypeEnvironment), + string(SsisObjectMetadataTypeFolder), + string(SsisObjectMetadataTypePackage), + string(SsisObjectMetadataTypeProject), + } +} + +func (s *SsisObjectMetadataType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSsisObjectMetadataType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSsisObjectMetadataType(input string) (*SsisObjectMetadataType, error) { + vals := map[string]SsisObjectMetadataType{ + "environment": SsisObjectMetadataTypeEnvironment, + "folder": SsisObjectMetadataTypeFolder, + "package": SsisObjectMetadataTypePackage, + "project": SsisObjectMetadataTypeProject, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SsisObjectMetadataType(input) + return &out, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetup.go new file mode 100644 index 00000000000..5deb7afbb87 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetup.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzPowerShellSetup struct { + Type string `json:"type"` + TypeProperties AzPowerShellSetupTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetuptypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetuptypeproperties.go new file mode 100644 index 00000000000..984c39921bd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_azpowershellsetuptypeproperties.go @@ -0,0 +1,8 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzPowerShellSetupTypeProperties struct { + Version string `json:"version"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetup.go new file mode 100644 index 00000000000..1f67f3d7c24 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetup.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CmdkeySetup struct { + Type string `json:"type"` + TypeProperties CmdkeySetupTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetuptypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetuptypeproperties.go new file mode 100644 index 00000000000..b77118d5bbd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_cmdkeysetuptypeproperties.go @@ -0,0 +1,42 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CmdkeySetupTypeProperties struct { + Password SecretBase `json:"password"` + TargetName interface{} `json:"targetName"` + UserName interface{} `json:"userName"` +} + +var _ json.Unmarshaler = &CmdkeySetupTypeProperties{} + +func (s *CmdkeySetupTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias CmdkeySetupTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into CmdkeySetupTypeProperties: %+v", err) + } + + s.TargetName = decoded.TargetName + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling CmdkeySetupTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'CmdkeySetupTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_componentsetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_componentsetup.go new file mode 100644 index 00000000000..93723543a8d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_componentsetup.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ComponentSetup struct { + Type string `json:"type"` + TypeProperties LicensedComponentSetupTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_copycomputescaleproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_copycomputescaleproperties.go new file mode 100644 index 00000000000..dca0b30c314 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_copycomputescaleproperties.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CopyComputeScaleProperties struct { + DataIntegrationUnit *int64 `json:"dataIntegrationUnit,omitempty"` + TimeToLive *int64 `json:"timeToLive,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_credentialreference.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_credentialreference.go new file mode 100644 index 00000000000..38dd7143ce6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_credentialreference.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialReference struct { + ReferenceName string `json:"referenceName"` + Type CredentialReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_customsetupbase.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_customsetupbase.go new file mode 100644 index 00000000000..2d168f65eba --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_customsetupbase.go @@ -0,0 +1,44 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomSetupBase interface { +} + +// RawCustomSetupBaseImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawCustomSetupBaseImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalCustomSetupBaseImplementation(input []byte) (CustomSetupBase, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling CustomSetupBase into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawCustomSetupBaseImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_entityreference.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_entityreference.go new file mode 100644 index 00000000000..9d54c42333f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_entityreference.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EntityReference struct { + ReferenceName *string `json:"referenceName,omitempty"` + Type *IntegrationRuntimeEntityReferenceType `json:"type,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetup.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetup.go new file mode 100644 index 00000000000..9f0133eae04 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetup.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnvironmentVariableSetup struct { + Type string `json:"type"` + TypeProperties EnvironmentVariableSetupTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetuptypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetuptypeproperties.go new file mode 100644 index 00000000000..46be647e30b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_environmentvariablesetuptypeproperties.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EnvironmentVariableSetupTypeProperties struct { + VariableName string `json:"variableName"` + VariableValue string `json:"variableValue"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go index 9f62546dab8..e500a979909 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntime.go @@ -1,9 +1,61 @@ package integrationruntimes +import ( + "encoding/json" + "fmt" + "strings" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type IntegrationRuntime struct { - Description *string `json:"description,omitempty"` - Type IntegrationRuntimeType `json:"type"` +type IntegrationRuntime interface { +} + +// RawIntegrationRuntimeImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawIntegrationRuntimeImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalIntegrationRuntimeImplementation(input []byte) (IntegrationRuntime, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling IntegrationRuntime into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Managed") { + var out ManagedIntegrationRuntime + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ManagedIntegrationRuntime: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SelfHosted") { + var out SelfHostedIntegrationRuntime + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SelfHostedIntegrationRuntime: %+v", err) + } + return out, nil + } + + out := RawIntegrationRuntimeImpl{ + Type: value, + Values: temp, + } + return out, nil + } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecomputeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecomputeproperties.go new file mode 100644 index 00000000000..3b5fa38ccd7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecomputeproperties.go @@ -0,0 +1,15 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeComputeProperties struct { + CopyComputeScaleProperties *CopyComputeScaleProperties `json:"copyComputeScaleProperties,omitempty"` + DataFlowProperties *IntegrationRuntimeDataFlowProperties `json:"dataFlowProperties,omitempty"` + Location *string `json:"location,omitempty"` + MaxParallelExecutionsPerNode *int64 `json:"maxParallelExecutionsPerNode,omitempty"` + NodeSize *string `json:"nodeSize,omitempty"` + NumberOfNodes *int64 `json:"numberOfNodes,omitempty"` + PipelineExternalComputeScaleProperties *PipelineExternalComputeScaleProperties `json:"pipelineExternalComputeScaleProperties,omitempty"` + VNetProperties *IntegrationRuntimeVNetProperties `json:"vNetProperties,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecustomervirtualnetwork.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecustomervirtualnetwork.go new file mode 100644 index 00000000000..f1719be22a7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecustomervirtualnetwork.go @@ -0,0 +1,8 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeCustomerVirtualNetwork struct { + SubnetId *string `json:"subnetId,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecustomsetupscriptproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecustomsetupscriptproperties.go new file mode 100644 index 00000000000..87ef3692b17 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimecustomsetupscriptproperties.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeCustomSetupScriptProperties struct { + BlobContainerUri *string `json:"blobContainerUri,omitempty"` + SasToken *SecureString `json:"sasToken,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataflowproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataflowproperties.go new file mode 100644 index 00000000000..5accdfb0e0c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataflowproperties.go @@ -0,0 +1,12 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeDataFlowProperties struct { + Cleanup *bool `json:"cleanup,omitempty"` + ComputeType *DataFlowComputeType `json:"computeType,omitempty"` + CoreCount *int64 `json:"coreCount,omitempty"` + CustomProperties *[]IntegrationRuntimeDataFlowPropertiesCustomPropertiesInlined `json:"customProperties,omitempty"` + TimeToLive *int64 `json:"timeToLive,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataflowpropertiescustompropertiesinlined.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataflowpropertiescustompropertiesinlined.go new file mode 100644 index 00000000000..8ff1f4795b7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataflowpropertiescustompropertiesinlined.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeDataFlowPropertiesCustomPropertiesInlined struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataproxyproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataproxyproperties.go new file mode 100644 index 00000000000..9c68a989f02 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimedataproxyproperties.go @@ -0,0 +1,10 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeDataProxyProperties struct { + ConnectVia *EntityReference `json:"connectVia,omitempty"` + Path *string `json:"path,omitempty"` + StagingLinkedService *EntityReference `json:"stagingLinkedService,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go index 6c5ba64b97d..bc1a15b77fd 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimeresource.go @@ -1,5 +1,10 @@ package integrationruntimes +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -10,3 +15,32 @@ type IntegrationRuntimeResource struct { Properties IntegrationRuntime `json:"properties"` Type *string `json:"type,omitempty"` } + +var _ json.Unmarshaler = &IntegrationRuntimeResource{} + +func (s *IntegrationRuntimeResource) UnmarshalJSON(bytes []byte) error { + type alias IntegrationRuntimeResource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into IntegrationRuntimeResource: %+v", err) + } + + s.Etag = decoded.Etag + s.Id = decoded.Id + s.Name = decoded.Name + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling IntegrationRuntimeResource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalIntegrationRuntimeImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'IntegrationRuntimeResource': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessiscataloginfo.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessiscataloginfo.go new file mode 100644 index 00000000000..7910a7be155 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessiscataloginfo.go @@ -0,0 +1,12 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeSsisCatalogInfo struct { + CatalogAdminPassword *SecureString `json:"catalogAdminPassword,omitempty"` + CatalogAdminUserName *string `json:"catalogAdminUserName,omitempty"` + CatalogPricingTier *IntegrationRuntimeSsisCatalogPricingTier `json:"catalogPricingTier,omitempty"` + CatalogServerEndpoint *string `json:"catalogServerEndpoint,omitempty"` + DualStandbyPairName *string `json:"dualStandbyPairName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessisproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessisproperties.go new file mode 100644 index 00000000000..94a0d529d76 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimessisproperties.go @@ -0,0 +1,61 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeSsisProperties struct { + CatalogInfo *IntegrationRuntimeSsisCatalogInfo `json:"catalogInfo,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + CustomSetupScriptProperties *IntegrationRuntimeCustomSetupScriptProperties `json:"customSetupScriptProperties,omitempty"` + DataProxyProperties *IntegrationRuntimeDataProxyProperties `json:"dataProxyProperties,omitempty"` + Edition *IntegrationRuntimeEdition `json:"edition,omitempty"` + ExpressCustomSetupProperties *[]CustomSetupBase `json:"expressCustomSetupProperties,omitempty"` + LicenseType *IntegrationRuntimeLicenseType `json:"licenseType,omitempty"` + PackageStores *[]PackageStore `json:"packageStores,omitempty"` +} + +var _ json.Unmarshaler = &IntegrationRuntimeSsisProperties{} + +func (s *IntegrationRuntimeSsisProperties) UnmarshalJSON(bytes []byte) error { + type alias IntegrationRuntimeSsisProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into IntegrationRuntimeSsisProperties: %+v", err) + } + + s.CatalogInfo = decoded.CatalogInfo + s.Credential = decoded.Credential + s.CustomSetupScriptProperties = decoded.CustomSetupScriptProperties + s.DataProxyProperties = decoded.DataProxyProperties + s.Edition = decoded.Edition + s.LicenseType = decoded.LicenseType + s.PackageStores = decoded.PackageStores + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling IntegrationRuntimeSsisProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["expressCustomSetupProperties"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling ExpressCustomSetupProperties into list []json.RawMessage: %+v", err) + } + + output := make([]CustomSetupBase, 0) + for i, val := range listTemp { + impl, err := unmarshalCustomSetupBaseImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'ExpressCustomSetupProperties' for 'IntegrationRuntimeSsisProperties': %+v", i, err) + } + output = append(output, impl) + } + s.ExpressCustomSetupProperties = &output + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go index 4561be16145..a2423f57c4e 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatus.go @@ -1,10 +1,61 @@ package integrationruntimes +import ( + "encoding/json" + "fmt" + "strings" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type IntegrationRuntimeStatus struct { - DataFactoryName *string `json:"dataFactoryName,omitempty"` - State *IntegrationRuntimeState `json:"state,omitempty"` - Type IntegrationRuntimeType `json:"type"` +type IntegrationRuntimeStatus interface { +} + +// RawIntegrationRuntimeStatusImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawIntegrationRuntimeStatusImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalIntegrationRuntimeStatusImplementation(input []byte) (IntegrationRuntimeStatus, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling IntegrationRuntimeStatus into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Managed") { + var out ManagedIntegrationRuntimeStatus + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ManagedIntegrationRuntimeStatus: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SelfHosted") { + var out SelfHostedIntegrationRuntimeStatus + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SelfHostedIntegrationRuntimeStatus: %+v", err) + } + return out, nil + } + + out := RawIntegrationRuntimeStatusImpl{ + Type: value, + Values: temp, + } + return out, nil + } diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go index bd58500bb4f..5972880c1a5 100644 --- a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimestatusresponse.go @@ -1,5 +1,10 @@ package integrationruntimes +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -7,3 +12,29 @@ type IntegrationRuntimeStatusResponse struct { Name *string `json:"name,omitempty"` Properties IntegrationRuntimeStatus `json:"properties"` } + +var _ json.Unmarshaler = &IntegrationRuntimeStatusResponse{} + +func (s *IntegrationRuntimeStatusResponse) UnmarshalJSON(bytes []byte) error { + type alias IntegrationRuntimeStatusResponse + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into IntegrationRuntimeStatusResponse: %+v", err) + } + + s.Name = decoded.Name + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling IntegrationRuntimeStatusResponse into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalIntegrationRuntimeStatusImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'IntegrationRuntimeStatusResponse': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimevnetproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimevnetproperties.go new file mode 100644 index 00000000000..f58d93dce87 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_integrationruntimevnetproperties.go @@ -0,0 +1,11 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeVNetProperties struct { + PublicIPs *[]string `json:"publicIPs,omitempty"` + Subnet *string `json:"subnet,omitempty"` + SubnetId *string `json:"subnetId,omitempty"` + VNetId *string `json:"vNetId,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_licensedcomponentsetuptypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_licensedcomponentsetuptypeproperties.go new file mode 100644 index 00000000000..4d2c8aaf7b5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_licensedcomponentsetuptypeproperties.go @@ -0,0 +1,40 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LicensedComponentSetupTypeProperties struct { + ComponentName string `json:"componentName"` + LicenseKey SecretBase `json:"licenseKey"` +} + +var _ json.Unmarshaler = &LicensedComponentSetupTypeProperties{} + +func (s *LicensedComponentSetupTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias LicensedComponentSetupTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into LicensedComponentSetupTypeProperties: %+v", err) + } + + s.ComponentName = decoded.ComponentName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling LicensedComponentSetupTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["licenseKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'LicenseKey' for 'LicensedComponentSetupTypeProperties': %+v", err) + } + s.LicenseKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntime.go new file mode 100644 index 00000000000..6dd7df446f6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntime.go @@ -0,0 +1,30 @@ +package integrationruntimes + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedIntegrationRuntime struct { + CreateTime *string `json:"createTime,omitempty"` + DataFactoryLocation *string `json:"dataFactoryLocation,omitempty"` + DataFactoryName *string `json:"dataFactoryName,omitempty"` + Name *string `json:"name,omitempty"` + SubscriptionId *string `json:"subscriptionId,omitempty"` +} + +func (o *LinkedIntegrationRuntime) GetCreateTimeAsTime() (*time.Time, error) { + if o.CreateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *LinkedIntegrationRuntime) SetCreateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreateTime = &formatted +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimekeyauthorization.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimekeyauthorization.go new file mode 100644 index 00000000000..cb22fdbc6f3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimekeyauthorization.go @@ -0,0 +1,41 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedIntegrationRuntimeType = LinkedIntegrationRuntimeKeyAuthorization{} + +type LinkedIntegrationRuntimeKeyAuthorization struct { + Key SecureString `json:"key"` + + // Fields inherited from LinkedIntegrationRuntimeType +} + +var _ json.Marshaler = LinkedIntegrationRuntimeKeyAuthorization{} + +func (s LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) { + type wrapper LinkedIntegrationRuntimeKeyAuthorization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LinkedIntegrationRuntimeKeyAuthorization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LinkedIntegrationRuntimeKeyAuthorization: %+v", err) + } + decoded["authorizationType"] = "Key" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LinkedIntegrationRuntimeKeyAuthorization: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimerbacauthorization.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimerbacauthorization.go new file mode 100644 index 00000000000..eb4496f3de9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimerbacauthorization.go @@ -0,0 +1,42 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedIntegrationRuntimeType = LinkedIntegrationRuntimeRbacAuthorization{} + +type LinkedIntegrationRuntimeRbacAuthorization struct { + Credential *CredentialReference `json:"credential,omitempty"` + ResourceId string `json:"resourceId"` + + // Fields inherited from LinkedIntegrationRuntimeType +} + +var _ json.Marshaler = LinkedIntegrationRuntimeRbacAuthorization{} + +func (s LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) { + type wrapper LinkedIntegrationRuntimeRbacAuthorization + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LinkedIntegrationRuntimeRbacAuthorization: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LinkedIntegrationRuntimeRbacAuthorization: %+v", err) + } + decoded["authorizationType"] = "RBAC" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LinkedIntegrationRuntimeRbacAuthorization: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimetype.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimetype.go new file mode 100644 index 00000000000..9d27a96d530 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_linkedintegrationruntimetype.go @@ -0,0 +1,61 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedIntegrationRuntimeType interface { +} + +// RawLinkedIntegrationRuntimeTypeImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawLinkedIntegrationRuntimeTypeImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalLinkedIntegrationRuntimeTypeImplementation(input []byte) (LinkedIntegrationRuntimeType, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling LinkedIntegrationRuntimeType into map[string]interface: %+v", err) + } + + value, ok := temp["authorizationType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Key") { + var out LinkedIntegrationRuntimeKeyAuthorization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LinkedIntegrationRuntimeKeyAuthorization: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RBAC") { + var out LinkedIntegrationRuntimeRbacAuthorization + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LinkedIntegrationRuntimeRbacAuthorization: %+v", err) + } + return out, nil + } + + out := RawLinkedIntegrationRuntimeTypeImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntime.go new file mode 100644 index 00000000000..6fd19b011fd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntime.go @@ -0,0 +1,44 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ IntegrationRuntime = ManagedIntegrationRuntime{} + +type ManagedIntegrationRuntime struct { + ManagedVirtualNetwork *ManagedVirtualNetworkReference `json:"managedVirtualNetwork,omitempty"` + State *IntegrationRuntimeState `json:"state,omitempty"` + TypeProperties ManagedIntegrationRuntimeTypeProperties `json:"typeProperties"` + + // Fields inherited from IntegrationRuntime + Description *string `json:"description,omitempty"` +} + +var _ json.Marshaler = ManagedIntegrationRuntime{} + +func (s ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { + type wrapper ManagedIntegrationRuntime + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ManagedIntegrationRuntime: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ManagedIntegrationRuntime: %+v", err) + } + decoded["type"] = "Managed" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ManagedIntegrationRuntime: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimeerror.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimeerror.go new file mode 100644 index 00000000000..6c175e41d42 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimeerror.go @@ -0,0 +1,29 @@ +package integrationruntimes + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedIntegrationRuntimeError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Parameters *[]string `json:"parameters,omitempty"` + Time *string `json:"time,omitempty"` +} + +func (o *ManagedIntegrationRuntimeError) GetTimeAsTime() (*time.Time, error) { + if o.Time == nil { + return nil, nil + } + return dates.ParseAsFormat(o.Time, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedIntegrationRuntimeError) SetTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.Time = &formatted +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimenode.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimenode.go new file mode 100644 index 00000000000..4bb272c7c69 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimenode.go @@ -0,0 +1,10 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedIntegrationRuntimeNode struct { + Errors *[]ManagedIntegrationRuntimeError `json:"errors,omitempty"` + NodeId *string `json:"nodeId,omitempty"` + Status *ManagedIntegrationRuntimeNodeStatus `json:"status,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimeoperationresult.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimeoperationresult.go new file mode 100644 index 00000000000..a109571ed66 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimeoperationresult.go @@ -0,0 +1,31 @@ +package integrationruntimes + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedIntegrationRuntimeOperationResult struct { + ActivityId *string `json:"activityId,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + Parameters *[]string `json:"parameters,omitempty"` + Result *string `json:"result,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (o *ManagedIntegrationRuntimeOperationResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedIntegrationRuntimeOperationResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatus.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatus.go new file mode 100644 index 00000000000..4fec6362e36 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatus.go @@ -0,0 +1,43 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ IntegrationRuntimeStatus = ManagedIntegrationRuntimeStatus{} + +type ManagedIntegrationRuntimeStatus struct { + TypeProperties ManagedIntegrationRuntimeStatusTypeProperties `json:"typeProperties"` + + // Fields inherited from IntegrationRuntimeStatus + DataFactoryName *string `json:"dataFactoryName,omitempty"` + State *IntegrationRuntimeState `json:"state,omitempty"` +} + +var _ json.Marshaler = ManagedIntegrationRuntimeStatus{} + +func (s ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + type wrapper ManagedIntegrationRuntimeStatus + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ManagedIntegrationRuntimeStatus: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ManagedIntegrationRuntimeStatus: %+v", err) + } + decoded["type"] = "Managed" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ManagedIntegrationRuntimeStatus: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatustypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatustypeproperties.go new file mode 100644 index 00000000000..3c6528b0476 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimestatustypeproperties.go @@ -0,0 +1,29 @@ +package integrationruntimes + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedIntegrationRuntimeStatusTypeProperties struct { + CreateTime *string `json:"createTime,omitempty"` + LastOperation *ManagedIntegrationRuntimeOperationResult `json:"lastOperation,omitempty"` + Nodes *[]ManagedIntegrationRuntimeNode `json:"nodes,omitempty"` + OtherErrors *[]ManagedIntegrationRuntimeError `json:"otherErrors,omitempty"` +} + +func (o *ManagedIntegrationRuntimeStatusTypeProperties) GetCreateTimeAsTime() (*time.Time, error) { + if o.CreateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ManagedIntegrationRuntimeStatusTypeProperties) SetCreateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreateTime = &formatted +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimetypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimetypeproperties.go new file mode 100644 index 00000000000..e0196ff2d6e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedintegrationruntimetypeproperties.go @@ -0,0 +1,10 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedIntegrationRuntimeTypeProperties struct { + ComputeProperties *IntegrationRuntimeComputeProperties `json:"computeProperties,omitempty"` + CustomerVirtualNetwork *IntegrationRuntimeCustomerVirtualNetwork `json:"customerVirtualNetwork,omitempty"` + SsisProperties *IntegrationRuntimeSsisProperties `json:"ssisProperties,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedvirtualnetworkreference.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedvirtualnetworkreference.go new file mode 100644 index 00000000000..aecd5603c73 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_managedvirtualnetworkreference.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ManagedVirtualNetworkReference struct { + ReferenceName string `json:"referenceName"` + Type ManagedVirtualNetworkReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_packagestore.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_packagestore.go new file mode 100644 index 00000000000..054ab8ee655 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_packagestore.go @@ -0,0 +1,9 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PackageStore struct { + Name string `json:"name"` + PackageStoreLinkedService EntityReference `json:"packageStoreLinkedService"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_pipelineexternalcomputescaleproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_pipelineexternalcomputescaleproperties.go new file mode 100644 index 00000000000..abc6f741612 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_pipelineexternalcomputescaleproperties.go @@ -0,0 +1,10 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PipelineExternalComputeScaleProperties struct { + NumberOfExternalNodes *int64 `json:"numberOfExternalNodes,omitempty"` + NumberOfPipelineNodes *int64 `json:"numberOfPipelineNodes,omitempty"` + TimeToLive *int64 `json:"timeToLive,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_secretbase.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_secretbase.go new file mode 100644 index 00000000000..fedb949b9a3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_secretbase.go @@ -0,0 +1,53 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretBase interface { +} + +// RawSecretBaseImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSecretBaseImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SecretBase into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "SecureString") { + var out SecureString + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SecureString: %+v", err) + } + return out, nil + } + + out := RawSecretBaseImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_securestring.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_securestring.go new file mode 100644 index 00000000000..a737aa2596a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_securestring.go @@ -0,0 +1,41 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecretBase = SecureString{} + +type SecureString struct { + Value string `json:"value"` + + // Fields inherited from SecretBase +} + +var _ json.Marshaler = SecureString{} + +func (s SecureString) MarshalJSON() ([]byte, error) { + type wrapper SecureString + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SecureString: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SecureString: %+v", err) + } + decoded["type"] = "SecureString" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SecureString: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntime.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntime.go new file mode 100644 index 00000000000..53cb965b889 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntime.go @@ -0,0 +1,42 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ IntegrationRuntime = SelfHostedIntegrationRuntime{} + +type SelfHostedIntegrationRuntime struct { + TypeProperties *SelfHostedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` + + // Fields inherited from IntegrationRuntime + Description *string `json:"description,omitempty"` +} + +var _ json.Marshaler = SelfHostedIntegrationRuntime{} + +func (s SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) { + type wrapper SelfHostedIntegrationRuntime + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SelfHostedIntegrationRuntime: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SelfHostedIntegrationRuntime: %+v", err) + } + decoded["type"] = "SelfHosted" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SelfHostedIntegrationRuntime: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimenode.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimenode.go new file mode 100644 index 00000000000..6976903bbfc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimenode.go @@ -0,0 +1,115 @@ +package integrationruntimes + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SelfHostedIntegrationRuntimeNode struct { + Capabilities *map[string]string `json:"capabilities,omitempty"` + ConcurrentJobsLimit *int64 `json:"concurrentJobsLimit,omitempty"` + ExpiryTime *string `json:"expiryTime,omitempty"` + HostServiceUri *string `json:"hostServiceUri,omitempty"` + IsActiveDispatcher *bool `json:"isActiveDispatcher,omitempty"` + LastConnectTime *string `json:"lastConnectTime,omitempty"` + LastEndUpdateTime *string `json:"lastEndUpdateTime,omitempty"` + LastStartTime *string `json:"lastStartTime,omitempty"` + LastStartUpdateTime *string `json:"lastStartUpdateTime,omitempty"` + LastStopTime *string `json:"lastStopTime,omitempty"` + LastUpdateResult *IntegrationRuntimeUpdateResult `json:"lastUpdateResult,omitempty"` + MachineName *string `json:"machineName,omitempty"` + MaxConcurrentJobs *int64 `json:"maxConcurrentJobs,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + RegisterTime *string `json:"registerTime,omitempty"` + Status *SelfHostedIntegrationRuntimeNodeStatus `json:"status,omitempty"` + Version *string `json:"version,omitempty"` + VersionStatus *string `json:"versionStatus,omitempty"` +} + +func (o *SelfHostedIntegrationRuntimeNode) GetExpiryTimeAsTime() (*time.Time, error) { + if o.ExpiryTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ExpiryTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeNode) SetExpiryTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ExpiryTime = &formatted +} + +func (o *SelfHostedIntegrationRuntimeNode) GetLastConnectTimeAsTime() (*time.Time, error) { + if o.LastConnectTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastConnectTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeNode) SetLastConnectTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastConnectTime = &formatted +} + +func (o *SelfHostedIntegrationRuntimeNode) GetLastEndUpdateTimeAsTime() (*time.Time, error) { + if o.LastEndUpdateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastEndUpdateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeNode) SetLastEndUpdateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastEndUpdateTime = &formatted +} + +func (o *SelfHostedIntegrationRuntimeNode) GetLastStartTimeAsTime() (*time.Time, error) { + if o.LastStartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeNode) SetLastStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastStartTime = &formatted +} + +func (o *SelfHostedIntegrationRuntimeNode) GetLastStartUpdateTimeAsTime() (*time.Time, error) { + if o.LastStartUpdateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastStartUpdateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeNode) SetLastStartUpdateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastStartUpdateTime = &formatted +} + +func (o *SelfHostedIntegrationRuntimeNode) GetLastStopTimeAsTime() (*time.Time, error) { + if o.LastStopTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.LastStopTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeNode) SetLastStopTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.LastStopTime = &formatted +} + +func (o *SelfHostedIntegrationRuntimeNode) GetRegisterTimeAsTime() (*time.Time, error) { + if o.RegisterTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.RegisterTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeNode) SetRegisterTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RegisterTime = &formatted +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatus.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatus.go new file mode 100644 index 00000000000..effb44f6e55 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatus.go @@ -0,0 +1,43 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ IntegrationRuntimeStatus = SelfHostedIntegrationRuntimeStatus{} + +type SelfHostedIntegrationRuntimeStatus struct { + TypeProperties SelfHostedIntegrationRuntimeStatusTypeProperties `json:"typeProperties"` + + // Fields inherited from IntegrationRuntimeStatus + DataFactoryName *string `json:"dataFactoryName,omitempty"` + State *IntegrationRuntimeState `json:"state,omitempty"` +} + +var _ json.Marshaler = SelfHostedIntegrationRuntimeStatus{} + +func (s SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + type wrapper SelfHostedIntegrationRuntimeStatus + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SelfHostedIntegrationRuntimeStatus: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SelfHostedIntegrationRuntimeStatus: %+v", err) + } + decoded["type"] = "SelfHosted" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SelfHostedIntegrationRuntimeStatus: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatustypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatustypeproperties.go new file mode 100644 index 00000000000..9f283319226 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimestatustypeproperties.go @@ -0,0 +1,66 @@ +package integrationruntimes + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SelfHostedIntegrationRuntimeStatusTypeProperties struct { + AutoUpdate *IntegrationRuntimeAutoUpdate `json:"autoUpdate,omitempty"` + AutoUpdateETA *string `json:"autoUpdateETA,omitempty"` + Capabilities *map[string]string `json:"capabilities,omitempty"` + CreateTime *string `json:"createTime,omitempty"` + InternalChannelEncryption *IntegrationRuntimeInternalChannelEncryptionMode `json:"internalChannelEncryption,omitempty"` + LatestVersion *string `json:"latestVersion,omitempty"` + Links *[]LinkedIntegrationRuntime `json:"links,omitempty"` + LocalTimeZoneOffset *string `json:"localTimeZoneOffset,omitempty"` + Nodes *[]SelfHostedIntegrationRuntimeNode `json:"nodes,omitempty"` + PushedVersion *string `json:"pushedVersion,omitempty"` + ScheduledUpdateDate *string `json:"scheduledUpdateDate,omitempty"` + SelfContainedInteractiveAuthoringEnabled *bool `json:"selfContainedInteractiveAuthoringEnabled,omitempty"` + ServiceUrls *[]string `json:"serviceUrls,omitempty"` + TaskQueueId *string `json:"taskQueueId,omitempty"` + UpdateDelayOffset *string `json:"updateDelayOffset,omitempty"` + Version *string `json:"version,omitempty"` + VersionStatus *string `json:"versionStatus,omitempty"` +} + +func (o *SelfHostedIntegrationRuntimeStatusTypeProperties) GetAutoUpdateETAAsTime() (*time.Time, error) { + if o.AutoUpdateETA == nil { + return nil, nil + } + return dates.ParseAsFormat(o.AutoUpdateETA, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeStatusTypeProperties) SetAutoUpdateETAAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.AutoUpdateETA = &formatted +} + +func (o *SelfHostedIntegrationRuntimeStatusTypeProperties) GetCreateTimeAsTime() (*time.Time, error) { + if o.CreateTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreateTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeStatusTypeProperties) SetCreateTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreateTime = &formatted +} + +func (o *SelfHostedIntegrationRuntimeStatusTypeProperties) GetScheduledUpdateDateAsTime() (*time.Time, error) { + if o.ScheduledUpdateDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.ScheduledUpdateDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *SelfHostedIntegrationRuntimeStatusTypeProperties) SetScheduledUpdateDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.ScheduledUpdateDate = &formatted +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimetypeproperties.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimetypeproperties.go new file mode 100644 index 00000000000..af2513869f4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_selfhostedintegrationruntimetypeproperties.go @@ -0,0 +1,40 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SelfHostedIntegrationRuntimeTypeProperties struct { + LinkedInfo LinkedIntegrationRuntimeType `json:"linkedInfo"` + SelfContainedInteractiveAuthoringEnabled *bool `json:"selfContainedInteractiveAuthoringEnabled,omitempty"` +} + +var _ json.Unmarshaler = &SelfHostedIntegrationRuntimeTypeProperties{} + +func (s *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SelfHostedIntegrationRuntimeTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SelfHostedIntegrationRuntimeTypeProperties: %+v", err) + } + + s.SelfContainedInteractiveAuthoringEnabled = decoded.SelfContainedInteractiveAuthoringEnabled + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SelfHostedIntegrationRuntimeTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["linkedInfo"]; ok { + impl, err := unmarshalLinkedIntegrationRuntimeTypeImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'LinkedInfo' for 'SelfHostedIntegrationRuntimeTypeProperties': %+v", err) + } + s.LinkedInfo = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironment.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironment.go new file mode 100644 index 00000000000..6fc854a47fa --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironment.go @@ -0,0 +1,45 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SsisObjectMetadata = SsisEnvironment{} + +type SsisEnvironment struct { + FolderId *int64 `json:"folderId,omitempty"` + Variables *[]SsisVariable `json:"variables,omitempty"` + + // Fields inherited from SsisObjectMetadata + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +var _ json.Marshaler = SsisEnvironment{} + +func (s SsisEnvironment) MarshalJSON() ([]byte, error) { + type wrapper SsisEnvironment + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SsisEnvironment: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SsisEnvironment: %+v", err) + } + decoded["type"] = "Environment" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SsisEnvironment: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironmentreference.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironmentreference.go new file mode 100644 index 00000000000..76d0c323dc0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisenvironmentreference.go @@ -0,0 +1,11 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SsisEnvironmentReference struct { + EnvironmentFolderName *string `json:"environmentFolderName,omitempty"` + EnvironmentName *string `json:"environmentName,omitempty"` + Id *int64 `json:"id,omitempty"` + ReferenceType *string `json:"referenceType,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisfolder.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisfolder.go new file mode 100644 index 00000000000..a7a349ba9fb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisfolder.go @@ -0,0 +1,43 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SsisObjectMetadata = SsisFolder{} + +type SsisFolder struct { + + // Fields inherited from SsisObjectMetadata + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +var _ json.Marshaler = SsisFolder{} + +func (s SsisFolder) MarshalJSON() ([]byte, error) { + type wrapper SsisFolder + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SsisFolder: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SsisFolder: %+v", err) + } + decoded["type"] = "Folder" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SsisFolder: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisobjectmetadata.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisobjectmetadata.go new file mode 100644 index 00000000000..a09d65c1d1b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisobjectmetadata.go @@ -0,0 +1,77 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SsisObjectMetadata interface { +} + +// RawSsisObjectMetadataImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSsisObjectMetadataImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSsisObjectMetadataImplementation(input []byte) (SsisObjectMetadata, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SsisObjectMetadata into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Environment") { + var out SsisEnvironment + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SsisEnvironment: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Folder") { + var out SsisFolder + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SsisFolder: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Package") { + var out SsisPackage + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SsisPackage: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Project") { + var out SsisProject + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SsisProject: %+v", err) + } + return out, nil + } + + out := RawSsisObjectMetadataImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssispackage.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssispackage.go new file mode 100644 index 00000000000..58dfeef4504 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssispackage.go @@ -0,0 +1,47 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SsisObjectMetadata = SsisPackage{} + +type SsisPackage struct { + FolderId *int64 `json:"folderId,omitempty"` + Parameters *[]SsisParameter `json:"parameters,omitempty"` + ProjectId *int64 `json:"projectId,omitempty"` + ProjectVersion *int64 `json:"projectVersion,omitempty"` + + // Fields inherited from SsisObjectMetadata + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +var _ json.Marshaler = SsisPackage{} + +func (s SsisPackage) MarshalJSON() ([]byte, error) { + type wrapper SsisPackage + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SsisPackage: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SsisPackage: %+v", err) + } + decoded["type"] = "Package" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SsisPackage: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisparameter.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisparameter.go new file mode 100644 index 00000000000..9b0b75a488b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisparameter.go @@ -0,0 +1,19 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SsisParameter struct { + DataType *string `json:"dataType,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty"` + Description *string `json:"description,omitempty"` + DesignDefaultValue *string `json:"designDefaultValue,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Required *bool `json:"required,omitempty"` + Sensitive *bool `json:"sensitive,omitempty"` + SensitiveDefaultValue *string `json:"sensitiveDefaultValue,omitempty"` + ValueSet *bool `json:"valueSet,omitempty"` + ValueType *string `json:"valueType,omitempty"` + Variable *string `json:"variable,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisproject.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisproject.go new file mode 100644 index 00000000000..c7f5a7e8f0d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisproject.go @@ -0,0 +1,47 @@ +package integrationruntimes + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SsisObjectMetadata = SsisProject{} + +type SsisProject struct { + EnvironmentRefs *[]SsisEnvironmentReference `json:"environmentRefs,omitempty"` + FolderId *int64 `json:"folderId,omitempty"` + Parameters *[]SsisParameter `json:"parameters,omitempty"` + Version *int64 `json:"version,omitempty"` + + // Fields inherited from SsisObjectMetadata + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +var _ json.Marshaler = SsisProject{} + +func (s SsisProject) MarshalJSON() ([]byte, error) { + type wrapper SsisProject + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SsisProject: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SsisProject: %+v", err) + } + decoded["type"] = "Project" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SsisProject: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisvariable.go b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisvariable.go new file mode 100644 index 00000000000..1c073bd2c21 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/integrationruntimes/model_ssisvariable.go @@ -0,0 +1,14 @@ +package integrationruntimes + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SsisVariable struct { + DataType *string `json:"dataType,omitempty"` + Description *string `json:"description,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Sensitive *bool `json:"sensitive,omitempty"` + SensitiveValue *string `json:"sensitiveValue,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/constants.go b/resource-manager/datafactory/2018-06-01/linkedservices/constants.go index 82a039f00ba..4dec6ae6369 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/constants.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/constants.go @@ -9,36 +9,1203 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type AzureStorageAuthenticationType string + +const ( + AzureStorageAuthenticationTypeAccountKey AzureStorageAuthenticationType = "AccountKey" + AzureStorageAuthenticationTypeAnonymous AzureStorageAuthenticationType = "Anonymous" + AzureStorageAuthenticationTypeMsi AzureStorageAuthenticationType = "Msi" + AzureStorageAuthenticationTypeSasUri AzureStorageAuthenticationType = "SasUri" + AzureStorageAuthenticationTypeServicePrincipal AzureStorageAuthenticationType = "ServicePrincipal" +) + +func PossibleValuesForAzureStorageAuthenticationType() []string { + return []string{ + string(AzureStorageAuthenticationTypeAccountKey), + string(AzureStorageAuthenticationTypeAnonymous), + string(AzureStorageAuthenticationTypeMsi), + string(AzureStorageAuthenticationTypeSasUri), + string(AzureStorageAuthenticationTypeServicePrincipal), + } +} + +func (s *AzureStorageAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureStorageAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureStorageAuthenticationType(input string) (*AzureStorageAuthenticationType, error) { + vals := map[string]AzureStorageAuthenticationType{ + "accountkey": AzureStorageAuthenticationTypeAccountKey, + "anonymous": AzureStorageAuthenticationTypeAnonymous, + "msi": AzureStorageAuthenticationTypeMsi, + "sasuri": AzureStorageAuthenticationTypeSasUri, + "serviceprincipal": AzureStorageAuthenticationTypeServicePrincipal, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureStorageAuthenticationType(input) + return &out, nil +} + +type CosmosDbConnectionMode string + +const ( + CosmosDbConnectionModeDirect CosmosDbConnectionMode = "Direct" + CosmosDbConnectionModeGateway CosmosDbConnectionMode = "Gateway" +) + +func PossibleValuesForCosmosDbConnectionMode() []string { + return []string{ + string(CosmosDbConnectionModeDirect), + string(CosmosDbConnectionModeGateway), + } +} + +func (s *CosmosDbConnectionMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCosmosDbConnectionMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCosmosDbConnectionMode(input string) (*CosmosDbConnectionMode, error) { + vals := map[string]CosmosDbConnectionMode{ + "direct": CosmosDbConnectionModeDirect, + "gateway": CosmosDbConnectionModeGateway, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CosmosDbConnectionMode(input) + return &out, nil +} + +type CredentialReferenceType string + +const ( + CredentialReferenceTypeCredentialReference CredentialReferenceType = "CredentialReference" +) + +func PossibleValuesForCredentialReferenceType() []string { + return []string{ + string(CredentialReferenceTypeCredentialReference), + } +} + +func (s *CredentialReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCredentialReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCredentialReferenceType(input string) (*CredentialReferenceType, error) { + vals := map[string]CredentialReferenceType{ + "credentialreference": CredentialReferenceTypeCredentialReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CredentialReferenceType(input) + return &out, nil +} + +type Db2AuthenticationType string + +const ( + Db2AuthenticationTypeBasic Db2AuthenticationType = "Basic" +) + +func PossibleValuesForDb2AuthenticationType() []string { + return []string{ + string(Db2AuthenticationTypeBasic), + } +} + +func (s *Db2AuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDb2AuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDb2AuthenticationType(input string) (*Db2AuthenticationType, error) { + vals := map[string]Db2AuthenticationType{ + "basic": Db2AuthenticationTypeBasic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Db2AuthenticationType(input) + return &out, nil +} + +type FtpAuthenticationType string + +const ( + FtpAuthenticationTypeAnonymous FtpAuthenticationType = "Anonymous" + FtpAuthenticationTypeBasic FtpAuthenticationType = "Basic" +) + +func PossibleValuesForFtpAuthenticationType() []string { + return []string{ + string(FtpAuthenticationTypeAnonymous), + string(FtpAuthenticationTypeBasic), + } +} + +func (s *FtpAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFtpAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFtpAuthenticationType(input string) (*FtpAuthenticationType, error) { + vals := map[string]FtpAuthenticationType{ + "anonymous": FtpAuthenticationTypeAnonymous, + "basic": FtpAuthenticationTypeBasic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FtpAuthenticationType(input) + return &out, nil +} + +type GoogleAdWordsAuthenticationType string + +const ( + GoogleAdWordsAuthenticationTypeServiceAuthentication GoogleAdWordsAuthenticationType = "ServiceAuthentication" + GoogleAdWordsAuthenticationTypeUserAuthentication GoogleAdWordsAuthenticationType = "UserAuthentication" +) + +func PossibleValuesForGoogleAdWordsAuthenticationType() []string { + return []string{ + string(GoogleAdWordsAuthenticationTypeServiceAuthentication), + string(GoogleAdWordsAuthenticationTypeUserAuthentication), + } +} + +func (s *GoogleAdWordsAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGoogleAdWordsAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGoogleAdWordsAuthenticationType(input string) (*GoogleAdWordsAuthenticationType, error) { + vals := map[string]GoogleAdWordsAuthenticationType{ + "serviceauthentication": GoogleAdWordsAuthenticationTypeServiceAuthentication, + "userauthentication": GoogleAdWordsAuthenticationTypeUserAuthentication, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GoogleAdWordsAuthenticationType(input) + return &out, nil +} + +type GoogleBigQueryAuthenticationType string + +const ( + GoogleBigQueryAuthenticationTypeServiceAuthentication GoogleBigQueryAuthenticationType = "ServiceAuthentication" + GoogleBigQueryAuthenticationTypeUserAuthentication GoogleBigQueryAuthenticationType = "UserAuthentication" +) + +func PossibleValuesForGoogleBigQueryAuthenticationType() []string { + return []string{ + string(GoogleBigQueryAuthenticationTypeServiceAuthentication), + string(GoogleBigQueryAuthenticationTypeUserAuthentication), + } +} + +func (s *GoogleBigQueryAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGoogleBigQueryAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGoogleBigQueryAuthenticationType(input string) (*GoogleBigQueryAuthenticationType, error) { + vals := map[string]GoogleBigQueryAuthenticationType{ + "serviceauthentication": GoogleBigQueryAuthenticationTypeServiceAuthentication, + "userauthentication": GoogleBigQueryAuthenticationTypeUserAuthentication, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GoogleBigQueryAuthenticationType(input) + return &out, nil +} + +type GoogleBigQueryV2AuthenticationType string + +const ( + GoogleBigQueryV2AuthenticationTypeServiceAuthentication GoogleBigQueryV2AuthenticationType = "ServiceAuthentication" + GoogleBigQueryV2AuthenticationTypeUserAuthentication GoogleBigQueryV2AuthenticationType = "UserAuthentication" +) + +func PossibleValuesForGoogleBigQueryV2AuthenticationType() []string { + return []string{ + string(GoogleBigQueryV2AuthenticationTypeServiceAuthentication), + string(GoogleBigQueryV2AuthenticationTypeUserAuthentication), + } +} + +func (s *GoogleBigQueryV2AuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGoogleBigQueryV2AuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGoogleBigQueryV2AuthenticationType(input string) (*GoogleBigQueryV2AuthenticationType, error) { + vals := map[string]GoogleBigQueryV2AuthenticationType{ + "serviceauthentication": GoogleBigQueryV2AuthenticationTypeServiceAuthentication, + "userauthentication": GoogleBigQueryV2AuthenticationTypeUserAuthentication, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GoogleBigQueryV2AuthenticationType(input) + return &out, nil +} + +type HBaseAuthenticationType string + +const ( + HBaseAuthenticationTypeAnonymous HBaseAuthenticationType = "Anonymous" + HBaseAuthenticationTypeBasic HBaseAuthenticationType = "Basic" +) + +func PossibleValuesForHBaseAuthenticationType() []string { + return []string{ + string(HBaseAuthenticationTypeAnonymous), + string(HBaseAuthenticationTypeBasic), + } +} + +func (s *HBaseAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHBaseAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHBaseAuthenticationType(input string) (*HBaseAuthenticationType, error) { + vals := map[string]HBaseAuthenticationType{ + "anonymous": HBaseAuthenticationTypeAnonymous, + "basic": HBaseAuthenticationTypeBasic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HBaseAuthenticationType(input) + return &out, nil +} + +type HTTPAuthenticationType string + +const ( + HTTPAuthenticationTypeAnonymous HTTPAuthenticationType = "Anonymous" + HTTPAuthenticationTypeBasic HTTPAuthenticationType = "Basic" + HTTPAuthenticationTypeClientCertificate HTTPAuthenticationType = "ClientCertificate" + HTTPAuthenticationTypeDigest HTTPAuthenticationType = "Digest" + HTTPAuthenticationTypeWindows HTTPAuthenticationType = "Windows" +) + +func PossibleValuesForHTTPAuthenticationType() []string { + return []string{ + string(HTTPAuthenticationTypeAnonymous), + string(HTTPAuthenticationTypeBasic), + string(HTTPAuthenticationTypeClientCertificate), + string(HTTPAuthenticationTypeDigest), + string(HTTPAuthenticationTypeWindows), + } +} + +func (s *HTTPAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHTTPAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHTTPAuthenticationType(input string) (*HTTPAuthenticationType, error) { + vals := map[string]HTTPAuthenticationType{ + "anonymous": HTTPAuthenticationTypeAnonymous, + "basic": HTTPAuthenticationTypeBasic, + "clientcertificate": HTTPAuthenticationTypeClientCertificate, + "digest": HTTPAuthenticationTypeDigest, + "windows": HTTPAuthenticationTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HTTPAuthenticationType(input) + return &out, nil +} + +type HiveAuthenticationType string + +const ( + HiveAuthenticationTypeAnonymous HiveAuthenticationType = "Anonymous" + HiveAuthenticationTypeUsername HiveAuthenticationType = "Username" + HiveAuthenticationTypeUsernameAndPassword HiveAuthenticationType = "UsernameAndPassword" + HiveAuthenticationTypeWindowsAzureHDInsightService HiveAuthenticationType = "WindowsAzureHDInsightService" +) + +func PossibleValuesForHiveAuthenticationType() []string { + return []string{ + string(HiveAuthenticationTypeAnonymous), + string(HiveAuthenticationTypeUsername), + string(HiveAuthenticationTypeUsernameAndPassword), + string(HiveAuthenticationTypeWindowsAzureHDInsightService), + } +} + +func (s *HiveAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHiveAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHiveAuthenticationType(input string) (*HiveAuthenticationType, error) { + vals := map[string]HiveAuthenticationType{ + "anonymous": HiveAuthenticationTypeAnonymous, + "username": HiveAuthenticationTypeUsername, + "usernameandpassword": HiveAuthenticationTypeUsernameAndPassword, + "windowsazurehdinsightservice": HiveAuthenticationTypeWindowsAzureHDInsightService, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HiveAuthenticationType(input) + return &out, nil +} + +type HiveServerType string + +const ( + HiveServerTypeHiveServerOne HiveServerType = "HiveServer1" + HiveServerTypeHiveServerTwo HiveServerType = "HiveServer2" + HiveServerTypeHiveThriftServer HiveServerType = "HiveThriftServer" +) + +func PossibleValuesForHiveServerType() []string { + return []string{ + string(HiveServerTypeHiveServerOne), + string(HiveServerTypeHiveServerTwo), + string(HiveServerTypeHiveThriftServer), + } +} + +func (s *HiveServerType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHiveServerType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHiveServerType(input string) (*HiveServerType, error) { + vals := map[string]HiveServerType{ + "hiveserver1": HiveServerTypeHiveServerOne, + "hiveserver2": HiveServerTypeHiveServerTwo, + "hivethriftserver": HiveServerTypeHiveThriftServer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HiveServerType(input) + return &out, nil +} + +type HiveThriftTransportProtocol string + +const ( + HiveThriftTransportProtocolBinary HiveThriftTransportProtocol = "Binary" + HiveThriftTransportProtocolHTTP HiveThriftTransportProtocol = "HTTP " + HiveThriftTransportProtocolSASL HiveThriftTransportProtocol = "SASL" +) + +func PossibleValuesForHiveThriftTransportProtocol() []string { + return []string{ + string(HiveThriftTransportProtocolBinary), + string(HiveThriftTransportProtocolHTTP), + string(HiveThriftTransportProtocolSASL), + } +} + +func (s *HiveThriftTransportProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHiveThriftTransportProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHiveThriftTransportProtocol(input string) (*HiveThriftTransportProtocol, error) { + vals := map[string]HiveThriftTransportProtocol{ + "binary": HiveThriftTransportProtocolBinary, + "http ": HiveThriftTransportProtocolHTTP, + "sasl": HiveThriftTransportProtocolSASL, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HiveThriftTransportProtocol(input) + return &out, nil +} + +type ImpalaAuthenticationType string + +const ( + ImpalaAuthenticationTypeAnonymous ImpalaAuthenticationType = "Anonymous" + ImpalaAuthenticationTypeSASLUsername ImpalaAuthenticationType = "SASLUsername" + ImpalaAuthenticationTypeUsernameAndPassword ImpalaAuthenticationType = "UsernameAndPassword" +) + +func PossibleValuesForImpalaAuthenticationType() []string { + return []string{ + string(ImpalaAuthenticationTypeAnonymous), + string(ImpalaAuthenticationTypeSASLUsername), + string(ImpalaAuthenticationTypeUsernameAndPassword), + } +} + +func (s *ImpalaAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseImpalaAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseImpalaAuthenticationType(input string) (*ImpalaAuthenticationType, error) { + vals := map[string]ImpalaAuthenticationType{ + "anonymous": ImpalaAuthenticationTypeAnonymous, + "saslusername": ImpalaAuthenticationTypeSASLUsername, + "usernameandpassword": ImpalaAuthenticationTypeUsernameAndPassword, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ImpalaAuthenticationType(input) + return &out, nil +} + +type IntegrationRuntimeReferenceType string + +const ( + IntegrationRuntimeReferenceTypeIntegrationRuntimeReference IntegrationRuntimeReferenceType = "IntegrationRuntimeReference" +) + +func PossibleValuesForIntegrationRuntimeReferenceType() []string { + return []string{ + string(IntegrationRuntimeReferenceTypeIntegrationRuntimeReference), + } +} + +func (s *IntegrationRuntimeReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeReferenceType(input string) (*IntegrationRuntimeReferenceType, error) { + vals := map[string]IntegrationRuntimeReferenceType{ + "integrationruntimereference": IntegrationRuntimeReferenceTypeIntegrationRuntimeReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeReferenceType(input) + return &out, nil +} + +type MongoDbAuthenticationType string + +const ( + MongoDbAuthenticationTypeAnonymous MongoDbAuthenticationType = "Anonymous" + MongoDbAuthenticationTypeBasic MongoDbAuthenticationType = "Basic" +) + +func PossibleValuesForMongoDbAuthenticationType() []string { + return []string{ + string(MongoDbAuthenticationTypeAnonymous), + string(MongoDbAuthenticationTypeBasic), + } +} + +func (s *MongoDbAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMongoDbAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMongoDbAuthenticationType(input string) (*MongoDbAuthenticationType, error) { + vals := map[string]MongoDbAuthenticationType{ + "anonymous": MongoDbAuthenticationTypeAnonymous, + "basic": MongoDbAuthenticationTypeBasic, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MongoDbAuthenticationType(input) + return &out, nil +} + +type ODataAadServicePrincipalCredentialType string + +const ( + ODataAadServicePrincipalCredentialTypeServicePrincipalCert ODataAadServicePrincipalCredentialType = "ServicePrincipalCert" + ODataAadServicePrincipalCredentialTypeServicePrincipalKey ODataAadServicePrincipalCredentialType = "ServicePrincipalKey" +) + +func PossibleValuesForODataAadServicePrincipalCredentialType() []string { + return []string{ + string(ODataAadServicePrincipalCredentialTypeServicePrincipalCert), + string(ODataAadServicePrincipalCredentialTypeServicePrincipalKey), + } +} + +func (s *ODataAadServicePrincipalCredentialType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseODataAadServicePrincipalCredentialType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseODataAadServicePrincipalCredentialType(input string) (*ODataAadServicePrincipalCredentialType, error) { + vals := map[string]ODataAadServicePrincipalCredentialType{ + "serviceprincipalcert": ODataAadServicePrincipalCredentialTypeServicePrincipalCert, + "serviceprincipalkey": ODataAadServicePrincipalCredentialTypeServicePrincipalKey, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ODataAadServicePrincipalCredentialType(input) + return &out, nil +} + +type ODataAuthenticationType string + +const ( + ODataAuthenticationTypeAadServicePrincipal ODataAuthenticationType = "AadServicePrincipal" + ODataAuthenticationTypeAnonymous ODataAuthenticationType = "Anonymous" + ODataAuthenticationTypeBasic ODataAuthenticationType = "Basic" + ODataAuthenticationTypeManagedServiceIdentity ODataAuthenticationType = "ManagedServiceIdentity" + ODataAuthenticationTypeWindows ODataAuthenticationType = "Windows" +) + +func PossibleValuesForODataAuthenticationType() []string { + return []string{ + string(ODataAuthenticationTypeAadServicePrincipal), + string(ODataAuthenticationTypeAnonymous), + string(ODataAuthenticationTypeBasic), + string(ODataAuthenticationTypeManagedServiceIdentity), + string(ODataAuthenticationTypeWindows), + } +} + +func (s *ODataAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseODataAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseODataAuthenticationType(input string) (*ODataAuthenticationType, error) { + vals := map[string]ODataAuthenticationType{ + "aadserviceprincipal": ODataAuthenticationTypeAadServicePrincipal, + "anonymous": ODataAuthenticationTypeAnonymous, + "basic": ODataAuthenticationTypeBasic, + "managedserviceidentity": ODataAuthenticationTypeManagedServiceIdentity, + "windows": ODataAuthenticationTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ODataAuthenticationType(input) + return &out, nil +} + type ParameterType string const ( - ParameterTypeArray ParameterType = "Array" - ParameterTypeBool ParameterType = "Bool" - ParameterTypeFloat ParameterType = "Float" - ParameterTypeInt ParameterType = "Int" - ParameterTypeObject ParameterType = "Object" - ParameterTypeSecureString ParameterType = "SecureString" - ParameterTypeString ParameterType = "String" + ParameterTypeArray ParameterType = "Array" + ParameterTypeBool ParameterType = "Bool" + ParameterTypeFloat ParameterType = "Float" + ParameterTypeInt ParameterType = "Int" + ParameterTypeObject ParameterType = "Object" + ParameterTypeSecureString ParameterType = "SecureString" + ParameterTypeString ParameterType = "String" +) + +func PossibleValuesForParameterType() []string { + return []string{ + string(ParameterTypeArray), + string(ParameterTypeBool), + string(ParameterTypeFloat), + string(ParameterTypeInt), + string(ParameterTypeObject), + string(ParameterTypeSecureString), + string(ParameterTypeString), + } +} + +func (s *ParameterType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseParameterType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseParameterType(input string) (*ParameterType, error) { + vals := map[string]ParameterType{ + "array": ParameterTypeArray, + "bool": ParameterTypeBool, + "float": ParameterTypeFloat, + "int": ParameterTypeInt, + "object": ParameterTypeObject, + "securestring": ParameterTypeSecureString, + "string": ParameterTypeString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ParameterType(input) + return &out, nil +} + +type PhoenixAuthenticationType string + +const ( + PhoenixAuthenticationTypeAnonymous PhoenixAuthenticationType = "Anonymous" + PhoenixAuthenticationTypeUsernameAndPassword PhoenixAuthenticationType = "UsernameAndPassword" + PhoenixAuthenticationTypeWindowsAzureHDInsightService PhoenixAuthenticationType = "WindowsAzureHDInsightService" +) + +func PossibleValuesForPhoenixAuthenticationType() []string { + return []string{ + string(PhoenixAuthenticationTypeAnonymous), + string(PhoenixAuthenticationTypeUsernameAndPassword), + string(PhoenixAuthenticationTypeWindowsAzureHDInsightService), + } +} + +func (s *PhoenixAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePhoenixAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePhoenixAuthenticationType(input string) (*PhoenixAuthenticationType, error) { + vals := map[string]PhoenixAuthenticationType{ + "anonymous": PhoenixAuthenticationTypeAnonymous, + "usernameandpassword": PhoenixAuthenticationTypeUsernameAndPassword, + "windowsazurehdinsightservice": PhoenixAuthenticationTypeWindowsAzureHDInsightService, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PhoenixAuthenticationType(input) + return &out, nil +} + +type PrestoAuthenticationType string + +const ( + PrestoAuthenticationTypeAnonymous PrestoAuthenticationType = "Anonymous" + PrestoAuthenticationTypeLDAP PrestoAuthenticationType = "LDAP" +) + +func PossibleValuesForPrestoAuthenticationType() []string { + return []string{ + string(PrestoAuthenticationTypeAnonymous), + string(PrestoAuthenticationTypeLDAP), + } +} + +func (s *PrestoAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrestoAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrestoAuthenticationType(input string) (*PrestoAuthenticationType, error) { + vals := map[string]PrestoAuthenticationType{ + "anonymous": PrestoAuthenticationTypeAnonymous, + "ldap": PrestoAuthenticationTypeLDAP, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrestoAuthenticationType(input) + return &out, nil +} + +type RestServiceAuthenticationType string + +const ( + RestServiceAuthenticationTypeAadServicePrincipal RestServiceAuthenticationType = "AadServicePrincipal" + RestServiceAuthenticationTypeAnonymous RestServiceAuthenticationType = "Anonymous" + RestServiceAuthenticationTypeBasic RestServiceAuthenticationType = "Basic" + RestServiceAuthenticationTypeManagedServiceIdentity RestServiceAuthenticationType = "ManagedServiceIdentity" + RestServiceAuthenticationTypeOAuthTwoClientCredential RestServiceAuthenticationType = "OAuth2ClientCredential" +) + +func PossibleValuesForRestServiceAuthenticationType() []string { + return []string{ + string(RestServiceAuthenticationTypeAadServicePrincipal), + string(RestServiceAuthenticationTypeAnonymous), + string(RestServiceAuthenticationTypeBasic), + string(RestServiceAuthenticationTypeManagedServiceIdentity), + string(RestServiceAuthenticationTypeOAuthTwoClientCredential), + } +} + +func (s *RestServiceAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRestServiceAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRestServiceAuthenticationType(input string) (*RestServiceAuthenticationType, error) { + vals := map[string]RestServiceAuthenticationType{ + "aadserviceprincipal": RestServiceAuthenticationTypeAadServicePrincipal, + "anonymous": RestServiceAuthenticationTypeAnonymous, + "basic": RestServiceAuthenticationTypeBasic, + "managedserviceidentity": RestServiceAuthenticationTypeManagedServiceIdentity, + "oauth2clientcredential": RestServiceAuthenticationTypeOAuthTwoClientCredential, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RestServiceAuthenticationType(input) + return &out, nil +} + +type SapHanaAuthenticationType string + +const ( + SapHanaAuthenticationTypeBasic SapHanaAuthenticationType = "Basic" + SapHanaAuthenticationTypeWindows SapHanaAuthenticationType = "Windows" +) + +func PossibleValuesForSapHanaAuthenticationType() []string { + return []string{ + string(SapHanaAuthenticationTypeBasic), + string(SapHanaAuthenticationTypeWindows), + } +} + +func (s *SapHanaAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSapHanaAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSapHanaAuthenticationType(input string) (*SapHanaAuthenticationType, error) { + vals := map[string]SapHanaAuthenticationType{ + "basic": SapHanaAuthenticationTypeBasic, + "windows": SapHanaAuthenticationTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SapHanaAuthenticationType(input) + return &out, nil +} + +type ServiceNowAuthenticationType string + +const ( + ServiceNowAuthenticationTypeBasic ServiceNowAuthenticationType = "Basic" + ServiceNowAuthenticationTypeOAuthTwo ServiceNowAuthenticationType = "OAuth2" +) + +func PossibleValuesForServiceNowAuthenticationType() []string { + return []string{ + string(ServiceNowAuthenticationTypeBasic), + string(ServiceNowAuthenticationTypeOAuthTwo), + } +} + +func (s *ServiceNowAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServiceNowAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServiceNowAuthenticationType(input string) (*ServiceNowAuthenticationType, error) { + vals := map[string]ServiceNowAuthenticationType{ + "basic": ServiceNowAuthenticationTypeBasic, + "oauth2": ServiceNowAuthenticationTypeOAuthTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServiceNowAuthenticationType(input) + return &out, nil +} + +type ServiceNowV2AuthenticationType string + +const ( + ServiceNowV2AuthenticationTypeBasic ServiceNowV2AuthenticationType = "Basic" + ServiceNowV2AuthenticationTypeOAuthTwo ServiceNowV2AuthenticationType = "OAuth2" +) + +func PossibleValuesForServiceNowV2AuthenticationType() []string { + return []string{ + string(ServiceNowV2AuthenticationTypeBasic), + string(ServiceNowV2AuthenticationTypeOAuthTwo), + } +} + +func (s *ServiceNowV2AuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServiceNowV2AuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServiceNowV2AuthenticationType(input string) (*ServiceNowV2AuthenticationType, error) { + vals := map[string]ServiceNowV2AuthenticationType{ + "basic": ServiceNowV2AuthenticationTypeBasic, + "oauth2": ServiceNowV2AuthenticationTypeOAuthTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServiceNowV2AuthenticationType(input) + return &out, nil +} + +type SftpAuthenticationType string + +const ( + SftpAuthenticationTypeBasic SftpAuthenticationType = "Basic" + SftpAuthenticationTypeMultiFactor SftpAuthenticationType = "MultiFactor" + SftpAuthenticationTypeSshPublicKey SftpAuthenticationType = "SshPublicKey" +) + +func PossibleValuesForSftpAuthenticationType() []string { + return []string{ + string(SftpAuthenticationTypeBasic), + string(SftpAuthenticationTypeMultiFactor), + string(SftpAuthenticationTypeSshPublicKey), + } +} + +func (s *SftpAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSftpAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSftpAuthenticationType(input string) (*SftpAuthenticationType, error) { + vals := map[string]SftpAuthenticationType{ + "basic": SftpAuthenticationTypeBasic, + "multifactor": SftpAuthenticationTypeMultiFactor, + "sshpublickey": SftpAuthenticationTypeSshPublicKey, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SftpAuthenticationType(input) + return &out, nil +} + +type SnowflakeAuthenticationType string + +const ( + SnowflakeAuthenticationTypeAADServicePrincipal SnowflakeAuthenticationType = "AADServicePrincipal" + SnowflakeAuthenticationTypeBasic SnowflakeAuthenticationType = "Basic" + SnowflakeAuthenticationTypeKeyPair SnowflakeAuthenticationType = "KeyPair" +) + +func PossibleValuesForSnowflakeAuthenticationType() []string { + return []string{ + string(SnowflakeAuthenticationTypeAADServicePrincipal), + string(SnowflakeAuthenticationTypeBasic), + string(SnowflakeAuthenticationTypeKeyPair), + } +} + +func (s *SnowflakeAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSnowflakeAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSnowflakeAuthenticationType(input string) (*SnowflakeAuthenticationType, error) { + vals := map[string]SnowflakeAuthenticationType{ + "aadserviceprincipal": SnowflakeAuthenticationTypeAADServicePrincipal, + "basic": SnowflakeAuthenticationTypeBasic, + "keypair": SnowflakeAuthenticationTypeKeyPair, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SnowflakeAuthenticationType(input) + return &out, nil +} + +type SparkAuthenticationType string + +const ( + SparkAuthenticationTypeAnonymous SparkAuthenticationType = "Anonymous" + SparkAuthenticationTypeUsername SparkAuthenticationType = "Username" + SparkAuthenticationTypeUsernameAndPassword SparkAuthenticationType = "UsernameAndPassword" + SparkAuthenticationTypeWindowsAzureHDInsightService SparkAuthenticationType = "WindowsAzureHDInsightService" ) -func PossibleValuesForParameterType() []string { +func PossibleValuesForSparkAuthenticationType() []string { return []string{ - string(ParameterTypeArray), - string(ParameterTypeBool), - string(ParameterTypeFloat), - string(ParameterTypeInt), - string(ParameterTypeObject), - string(ParameterTypeSecureString), - string(ParameterTypeString), + string(SparkAuthenticationTypeAnonymous), + string(SparkAuthenticationTypeUsername), + string(SparkAuthenticationTypeUsernameAndPassword), + string(SparkAuthenticationTypeWindowsAzureHDInsightService), } } -func (s *ParameterType) UnmarshalJSON(bytes []byte) error { +func (s *SparkAuthenticationType) UnmarshalJSON(bytes []byte) error { var decoded string if err := json.Unmarshal(bytes, &decoded); err != nil { return fmt.Errorf("unmarshaling: %+v", err) } - out, err := parseParameterType(decoded) + out, err := parseSparkAuthenticationType(decoded) if err != nil { return fmt.Errorf("parsing %q: %+v", decoded, err) } @@ -46,34 +1213,286 @@ func (s *ParameterType) UnmarshalJSON(bytes []byte) error { return nil } -func parseParameterType(input string) (*ParameterType, error) { - vals := map[string]ParameterType{ - "array": ParameterTypeArray, - "bool": ParameterTypeBool, - "float": ParameterTypeFloat, - "int": ParameterTypeInt, - "object": ParameterTypeObject, - "securestring": ParameterTypeSecureString, - "string": ParameterTypeString, +func parseSparkAuthenticationType(input string) (*SparkAuthenticationType, error) { + vals := map[string]SparkAuthenticationType{ + "anonymous": SparkAuthenticationTypeAnonymous, + "username": SparkAuthenticationTypeUsername, + "usernameandpassword": SparkAuthenticationTypeUsernameAndPassword, + "windowsazurehdinsightservice": SparkAuthenticationTypeWindowsAzureHDInsightService, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } // otherwise presume it's an undefined value and best-effort it - out := ParameterType(input) + out := SparkAuthenticationType(input) + return &out, nil +} + +type SparkServerType string + +const ( + SparkServerTypeSharkServer SparkServerType = "SharkServer" + SparkServerTypeSharkServerTwo SparkServerType = "SharkServer2" + SparkServerTypeSparkThriftServer SparkServerType = "SparkThriftServer" +) + +func PossibleValuesForSparkServerType() []string { + return []string{ + string(SparkServerTypeSharkServer), + string(SparkServerTypeSharkServerTwo), + string(SparkServerTypeSparkThriftServer), + } +} + +func (s *SparkServerType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSparkServerType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSparkServerType(input string) (*SparkServerType, error) { + vals := map[string]SparkServerType{ + "sharkserver": SparkServerTypeSharkServer, + "sharkserver2": SparkServerTypeSharkServerTwo, + "sparkthriftserver": SparkServerTypeSparkThriftServer, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SparkServerType(input) + return &out, nil +} + +type SparkThriftTransportProtocol string + +const ( + SparkThriftTransportProtocolBinary SparkThriftTransportProtocol = "Binary" + SparkThriftTransportProtocolHTTP SparkThriftTransportProtocol = "HTTP " + SparkThriftTransportProtocolSASL SparkThriftTransportProtocol = "SASL" +) + +func PossibleValuesForSparkThriftTransportProtocol() []string { + return []string{ + string(SparkThriftTransportProtocolBinary), + string(SparkThriftTransportProtocolHTTP), + string(SparkThriftTransportProtocolSASL), + } +} + +func (s *SparkThriftTransportProtocol) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSparkThriftTransportProtocol(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSparkThriftTransportProtocol(input string) (*SparkThriftTransportProtocol, error) { + vals := map[string]SparkThriftTransportProtocol{ + "binary": SparkThriftTransportProtocolBinary, + "http ": SparkThriftTransportProtocolHTTP, + "sasl": SparkThriftTransportProtocolSASL, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SparkThriftTransportProtocol(input) + return &out, nil +} + +type SqlAlwaysEncryptedAkvAuthType string + +const ( + SqlAlwaysEncryptedAkvAuthTypeManagedIdentity SqlAlwaysEncryptedAkvAuthType = "ManagedIdentity" + SqlAlwaysEncryptedAkvAuthTypeServicePrincipal SqlAlwaysEncryptedAkvAuthType = "ServicePrincipal" + SqlAlwaysEncryptedAkvAuthTypeUserAssignedManagedIdentity SqlAlwaysEncryptedAkvAuthType = "UserAssignedManagedIdentity" +) + +func PossibleValuesForSqlAlwaysEncryptedAkvAuthType() []string { + return []string{ + string(SqlAlwaysEncryptedAkvAuthTypeManagedIdentity), + string(SqlAlwaysEncryptedAkvAuthTypeServicePrincipal), + string(SqlAlwaysEncryptedAkvAuthTypeUserAssignedManagedIdentity), + } +} + +func (s *SqlAlwaysEncryptedAkvAuthType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSqlAlwaysEncryptedAkvAuthType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSqlAlwaysEncryptedAkvAuthType(input string) (*SqlAlwaysEncryptedAkvAuthType, error) { + vals := map[string]SqlAlwaysEncryptedAkvAuthType{ + "managedidentity": SqlAlwaysEncryptedAkvAuthTypeManagedIdentity, + "serviceprincipal": SqlAlwaysEncryptedAkvAuthTypeServicePrincipal, + "userassignedmanagedidentity": SqlAlwaysEncryptedAkvAuthTypeUserAssignedManagedIdentity, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SqlAlwaysEncryptedAkvAuthType(input) + return &out, nil +} + +type SybaseAuthenticationType string + +const ( + SybaseAuthenticationTypeBasic SybaseAuthenticationType = "Basic" + SybaseAuthenticationTypeWindows SybaseAuthenticationType = "Windows" +) + +func PossibleValuesForSybaseAuthenticationType() []string { + return []string{ + string(SybaseAuthenticationTypeBasic), + string(SybaseAuthenticationTypeWindows), + } +} + +func (s *SybaseAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSybaseAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSybaseAuthenticationType(input string) (*SybaseAuthenticationType, error) { + vals := map[string]SybaseAuthenticationType{ + "basic": SybaseAuthenticationTypeBasic, + "windows": SybaseAuthenticationTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SybaseAuthenticationType(input) + return &out, nil +} + +type TeamDeskAuthenticationType string + +const ( + TeamDeskAuthenticationTypeBasic TeamDeskAuthenticationType = "Basic" + TeamDeskAuthenticationTypeToken TeamDeskAuthenticationType = "Token" +) + +func PossibleValuesForTeamDeskAuthenticationType() []string { + return []string{ + string(TeamDeskAuthenticationTypeBasic), + string(TeamDeskAuthenticationTypeToken), + } +} + +func (s *TeamDeskAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTeamDeskAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTeamDeskAuthenticationType(input string) (*TeamDeskAuthenticationType, error) { + vals := map[string]TeamDeskAuthenticationType{ + "basic": TeamDeskAuthenticationTypeBasic, + "token": TeamDeskAuthenticationTypeToken, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TeamDeskAuthenticationType(input) + return &out, nil +} + +type TeradataAuthenticationType string + +const ( + TeradataAuthenticationTypeBasic TeradataAuthenticationType = "Basic" + TeradataAuthenticationTypeWindows TeradataAuthenticationType = "Windows" +) + +func PossibleValuesForTeradataAuthenticationType() []string { + return []string{ + string(TeradataAuthenticationTypeBasic), + string(TeradataAuthenticationTypeWindows), + } +} + +func (s *TeradataAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTeradataAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTeradataAuthenticationType(input string) (*TeradataAuthenticationType, error) { + vals := map[string]TeradataAuthenticationType{ + "basic": TeradataAuthenticationTypeBasic, + "windows": TeradataAuthenticationTypeWindows, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TeradataAuthenticationType(input) return &out, nil } type Type string const ( - TypeIntegrationRuntimeReference Type = "IntegrationRuntimeReference" + TypeLinkedServiceReference Type = "LinkedServiceReference" ) func PossibleValuesForType() []string { return []string{ - string(TypeIntegrationRuntimeReference), + string(TypeLinkedServiceReference), } } @@ -92,7 +1511,7 @@ func (s *Type) UnmarshalJSON(bytes []byte) error { func parseType(input string) (*Type, error) { vals := map[string]Type{ - "integrationruntimereference": TypeIntegrationRuntimeReference, + "linkedservicereference": TypeLinkedServiceReference, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil @@ -102,3 +1521,88 @@ func parseType(input string) (*Type, error) { out := Type(input) return &out, nil } + +type WebAuthenticationType string + +const ( + WebAuthenticationTypeAnonymous WebAuthenticationType = "Anonymous" + WebAuthenticationTypeBasic WebAuthenticationType = "Basic" + WebAuthenticationTypeClientCertificate WebAuthenticationType = "ClientCertificate" +) + +func PossibleValuesForWebAuthenticationType() []string { + return []string{ + string(WebAuthenticationTypeAnonymous), + string(WebAuthenticationTypeBasic), + string(WebAuthenticationTypeClientCertificate), + } +} + +func (s *WebAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWebAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWebAuthenticationType(input string) (*WebAuthenticationType, error) { + vals := map[string]WebAuthenticationType{ + "anonymous": WebAuthenticationTypeAnonymous, + "basic": WebAuthenticationTypeBasic, + "clientcertificate": WebAuthenticationTypeClientCertificate, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WebAuthenticationType(input) + return &out, nil +} + +type ZendeskAuthenticationType string + +const ( + ZendeskAuthenticationTypeBasic ZendeskAuthenticationType = "Basic" + ZendeskAuthenticationTypeToken ZendeskAuthenticationType = "Token" +) + +func PossibleValuesForZendeskAuthenticationType() []string { + return []string{ + string(ZendeskAuthenticationTypeBasic), + string(ZendeskAuthenticationTypeToken), + } +} + +func (s *ZendeskAuthenticationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseZendeskAuthenticationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseZendeskAuthenticationType(input string) (*ZendeskAuthenticationType, error) { + vals := map[string]ZendeskAuthenticationType{ + "basic": ZendeskAuthenticationTypeBasic, + "token": ZendeskAuthenticationTypeToken, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ZendeskAuthenticationType(input) + return &out, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservice.go new file mode 100644 index 00000000000..1e0165486d3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AmazonMWSLinkedService{} + +type AmazonMWSLinkedService struct { + TypeProperties AmazonMWSLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AmazonMWSLinkedService{} + +func (s AmazonMWSLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AmazonMWSLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonMWSLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonMWSLinkedService: %+v", err) + } + decoded["type"] = "AmazonMWS" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonMWSLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservicetypeproperties.go new file mode 100644 index 00000000000..ef4cb0c2ca2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonmwslinkedservicetypeproperties.go @@ -0,0 +1,63 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonMWSLinkedServiceTypeProperties struct { + AccessKeyId interface{} `json:"accessKeyId"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint interface{} `json:"endpoint"` + MarketplaceID interface{} `json:"marketplaceID"` + MwsAuthToken SecretBase `json:"mwsAuthToken"` + SecretKey SecretBase `json:"secretKey"` + SellerID interface{} `json:"sellerID"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &AmazonMWSLinkedServiceTypeProperties{} + +func (s *AmazonMWSLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AmazonMWSLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AmazonMWSLinkedServiceTypeProperties: %+v", err) + } + + s.AccessKeyId = decoded.AccessKeyId + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.MarketplaceID = decoded.MarketplaceID + s.SellerID = decoded.SellerID + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonMWSLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["mwsAuthToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'MwsAuthToken' for 'AmazonMWSLinkedServiceTypeProperties': %+v", err) + } + s.MwsAuthToken = impl + } + + if v, ok := temp["secretKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SecretKey' for 'AmazonMWSLinkedServiceTypeProperties': %+v", err) + } + s.SecretKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforlinkedservicetypeproperties.go new file mode 100644 index 00000000000..0ee3c839381 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforlinkedservicetypeproperties.go @@ -0,0 +1,42 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForLinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` +} + +var _ json.Unmarshaler = &AmazonRdsForLinkedServiceTypeProperties{} + +func (s *AmazonRdsForLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AmazonRdsForLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AmazonRdsForLinkedServiceTypeProperties: %+v", err) + } + + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonRdsForLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'AmazonRdsForLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsfororaclelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsfororaclelinkedservice.go new file mode 100644 index 00000000000..84afccf51e7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsfororaclelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AmazonRdsForOracleLinkedService{} + +type AmazonRdsForOracleLinkedService struct { + TypeProperties AmazonRdsForLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AmazonRdsForOracleLinkedService{} + +func (s AmazonRdsForOracleLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AmazonRdsForOracleLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRdsForOracleLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRdsForOracleLinkedService: %+v", err) + } + decoded["type"] = "AmazonRdsForOracle" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRdsForOracleLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservice.go new file mode 100644 index 00000000000..ce9528ddc18 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AmazonRdsForSqlServerLinkedService{} + +type AmazonRdsForSqlServerLinkedService struct { + TypeProperties AmazonRdsForSqlServerLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AmazonRdsForSqlServerLinkedService{} + +func (s AmazonRdsForSqlServerLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AmazonRdsForSqlServerLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRdsForSqlServerLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRdsForSqlServerLinkedService: %+v", err) + } + decoded["type"] = "AmazonRdsForSqlServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRdsForSqlServerLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservicetypeproperties.go new file mode 100644 index 00000000000..75aeca4d8d0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonrdsforsqlserverlinkedservicetypeproperties.go @@ -0,0 +1,46 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForSqlServerLinkedServiceTypeProperties struct { + AlwaysEncryptedSettings *SqlAlwaysEncryptedProperties `json:"alwaysEncryptedSettings,omitempty"` + ConnectionString interface{} `json:"connectionString"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &AmazonRdsForSqlServerLinkedServiceTypeProperties{} + +func (s *AmazonRdsForSqlServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AmazonRdsForSqlServerLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AmazonRdsForSqlServerLinkedServiceTypeProperties: %+v", err) + } + + s.AlwaysEncryptedSettings = decoded.AlwaysEncryptedSettings + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonRdsForSqlServerLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'AmazonRdsForSqlServerLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservice.go new file mode 100644 index 00000000000..587ee841c5c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AmazonRedshiftLinkedService{} + +type AmazonRedshiftLinkedService struct { + TypeProperties AmazonRedshiftLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AmazonRedshiftLinkedService{} + +func (s AmazonRedshiftLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AmazonRedshiftLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonRedshiftLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonRedshiftLinkedService: %+v", err) + } + decoded["type"] = "AmazonRedshift" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonRedshiftLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservicetypeproperties.go new file mode 100644 index 00000000000..1b527cf4c94 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazonredshiftlinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRedshiftLinkedServiceTypeProperties struct { + Database interface{} `json:"database"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + Server interface{} `json:"server"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &AmazonRedshiftLinkedServiceTypeProperties{} + +func (s *AmazonRedshiftLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AmazonRedshiftLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AmazonRedshiftLinkedServiceTypeProperties: %+v", err) + } + + s.Database = decoded.Database + s.EncryptedCredential = decoded.EncryptedCredential + s.Port = decoded.Port + s.Server = decoded.Server + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonRedshiftLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'AmazonRedshiftLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservice.go new file mode 100644 index 00000000000..879b421c744 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AmazonS3CompatibleLinkedService{} + +type AmazonS3CompatibleLinkedService struct { + TypeProperties AmazonS3CompatibleLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AmazonS3CompatibleLinkedService{} + +func (s AmazonS3CompatibleLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AmazonS3CompatibleLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonS3CompatibleLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonS3CompatibleLinkedService: %+v", err) + } + decoded["type"] = "AmazonS3Compatible" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonS3CompatibleLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservicetypeproperties.go new file mode 100644 index 00000000000..6e7414dab09 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3compatiblelinkedservicetypeproperties.go @@ -0,0 +1,46 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonS3CompatibleLinkedServiceTypeProperties struct { + AccessKeyId *interface{} `json:"accessKeyId,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ForcePathStyle *interface{} `json:"forcePathStyle,omitempty"` + SecretAccessKey SecretBase `json:"secretAccessKey"` + ServiceUrl *interface{} `json:"serviceUrl,omitempty"` +} + +var _ json.Unmarshaler = &AmazonS3CompatibleLinkedServiceTypeProperties{} + +func (s *AmazonS3CompatibleLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AmazonS3CompatibleLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AmazonS3CompatibleLinkedServiceTypeProperties: %+v", err) + } + + s.AccessKeyId = decoded.AccessKeyId + s.EncryptedCredential = decoded.EncryptedCredential + s.ForcePathStyle = decoded.ForcePathStyle + s.ServiceUrl = decoded.ServiceUrl + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonS3CompatibleLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["secretAccessKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'AmazonS3CompatibleLinkedServiceTypeProperties': %+v", err) + } + s.SecretAccessKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservice.go new file mode 100644 index 00000000000..562412f0102 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AmazonS3LinkedService{} + +type AmazonS3LinkedService struct { + TypeProperties AmazonS3LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AmazonS3LinkedService{} + +func (s AmazonS3LinkedService) MarshalJSON() ([]byte, error) { + type wrapper AmazonS3LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AmazonS3LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AmazonS3LinkedService: %+v", err) + } + decoded["type"] = "AmazonS3" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AmazonS3LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservicetypeproperties.go new file mode 100644 index 00000000000..dea19591beb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_amazons3linkedservicetypeproperties.go @@ -0,0 +1,55 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonS3LinkedServiceTypeProperties struct { + AccessKeyId *interface{} `json:"accessKeyId,omitempty"` + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + SecretAccessKey SecretBase `json:"secretAccessKey"` + ServiceUrl *interface{} `json:"serviceUrl,omitempty"` + SessionToken SecretBase `json:"sessionToken"` +} + +var _ json.Unmarshaler = &AmazonS3LinkedServiceTypeProperties{} + +func (s *AmazonS3LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AmazonS3LinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AmazonS3LinkedServiceTypeProperties: %+v", err) + } + + s.AccessKeyId = decoded.AccessKeyId + s.AuthenticationType = decoded.AuthenticationType + s.EncryptedCredential = decoded.EncryptedCredential + s.ServiceUrl = decoded.ServiceUrl + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AmazonS3LinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["secretAccessKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'AmazonS3LinkedServiceTypeProperties': %+v", err) + } + s.SecretAccessKey = impl + } + + if v, ok := temp["sessionToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SessionToken' for 'AmazonS3LinkedServiceTypeProperties': %+v", err) + } + s.SessionToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservice.go new file mode 100644 index 00000000000..74d6307d11b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AppFiguresLinkedService{} + +type AppFiguresLinkedService struct { + TypeProperties AppFiguresLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AppFiguresLinkedService{} + +func (s AppFiguresLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AppFiguresLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AppFiguresLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AppFiguresLinkedService: %+v", err) + } + decoded["type"] = "AppFigures" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AppFiguresLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservicetypeproperties.go new file mode 100644 index 00000000000..8608629b1b2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_appfigureslinkedservicetypeproperties.go @@ -0,0 +1,49 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AppFiguresLinkedServiceTypeProperties struct { + ClientKey SecretBase `json:"clientKey"` + Password SecretBase `json:"password"` + UserName interface{} `json:"userName"` +} + +var _ json.Unmarshaler = &AppFiguresLinkedServiceTypeProperties{} + +func (s *AppFiguresLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AppFiguresLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AppFiguresLinkedServiceTypeProperties: %+v", err) + } + + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AppFiguresLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientKey' for 'AppFiguresLinkedServiceTypeProperties': %+v", err) + } + s.ClientKey = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'AppFiguresLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservice.go new file mode 100644 index 00000000000..9776413f2aa --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AsanaLinkedService{} + +type AsanaLinkedService struct { + TypeProperties AsanaLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AsanaLinkedService{} + +func (s AsanaLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AsanaLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AsanaLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AsanaLinkedService: %+v", err) + } + decoded["type"] = "Asana" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AsanaLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservicetypeproperties.go new file mode 100644 index 00000000000..8d182955a10 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_asanalinkedservicetypeproperties.go @@ -0,0 +1,40 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AsanaLinkedServiceTypeProperties struct { + ApiToken SecretBase `json:"apiToken"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` +} + +var _ json.Unmarshaler = &AsanaLinkedServiceTypeProperties{} + +func (s *AsanaLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AsanaLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AsanaLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AsanaLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["apiToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ApiToken' for 'AsanaLinkedServiceTypeProperties': %+v", err) + } + s.ApiToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservice.go new file mode 100644 index 00000000000..4efdf713eaf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureBatchLinkedService{} + +type AzureBatchLinkedService struct { + TypeProperties AzureBatchLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureBatchLinkedService{} + +func (s AzureBatchLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureBatchLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBatchLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBatchLinkedService: %+v", err) + } + decoded["type"] = "AzureBatch" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBatchLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservicetypeproperties.go new file mode 100644 index 00000000000..33c11c7592b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurebatchlinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBatchLinkedServiceTypeProperties struct { + AccessKey SecretBase `json:"accessKey"` + AccountName interface{} `json:"accountName"` + BatchUri interface{} `json:"batchUri"` + Credential *CredentialReference `json:"credential,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + PoolName interface{} `json:"poolName"` +} + +var _ json.Unmarshaler = &AzureBatchLinkedServiceTypeProperties{} + +func (s *AzureBatchLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureBatchLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureBatchLinkedServiceTypeProperties: %+v", err) + } + + s.AccountName = decoded.AccountName + s.BatchUri = decoded.BatchUri + s.Credential = decoded.Credential + s.EncryptedCredential = decoded.EncryptedCredential + s.LinkedServiceName = decoded.LinkedServiceName + s.PoolName = decoded.PoolName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureBatchLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessKey' for 'AzureBatchLinkedServiceTypeProperties': %+v", err) + } + s.AccessKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservice.go new file mode 100644 index 00000000000..f77b2c8e029 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureBlobFSLinkedService{} + +type AzureBlobFSLinkedService struct { + TypeProperties AzureBlobFSLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureBlobFSLinkedService{} + +func (s AzureBlobFSLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobFSLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobFSLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobFSLinkedService: %+v", err) + } + decoded["type"] = "AzureBlobFS" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobFSLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservicetypeproperties.go new file mode 100644 index 00000000000..b7f6268d99e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobfslinkedservicetypeproperties.go @@ -0,0 +1,74 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobFSLinkedServiceTypeProperties struct { + AccountKey *interface{} `json:"accountKey,omitempty"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + SasToken SecretBase `json:"sasToken"` + SasUri *interface{} `json:"sasUri,omitempty"` + ServicePrincipalCredential SecretBase `json:"servicePrincipalCredential"` + ServicePrincipalCredentialType *interface{} `json:"servicePrincipalCredentialType,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` + Url *interface{} `json:"url,omitempty"` +} + +var _ json.Unmarshaler = &AzureBlobFSLinkedServiceTypeProperties{} + +func (s *AzureBlobFSLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureBlobFSLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureBlobFSLinkedServiceTypeProperties: %+v", err) + } + + s.AccountKey = decoded.AccountKey + s.AzureCloudType = decoded.AzureCloudType + s.Credential = decoded.Credential + s.EncryptedCredential = decoded.EncryptedCredential + s.SasUri = decoded.SasUri + s.ServicePrincipalCredentialType = decoded.ServicePrincipalCredentialType + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + s.Url = decoded.Url + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureBlobFSLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["sasToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SasToken' for 'AzureBlobFSLinkedServiceTypeProperties': %+v", err) + } + s.SasToken = impl + } + + if v, ok := temp["servicePrincipalCredential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'AzureBlobFSLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalCredential = impl + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureBlobFSLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservice.go new file mode 100644 index 00000000000..23e8a912719 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureBlobStorageLinkedService{} + +type AzureBlobStorageLinkedService struct { + TypeProperties AzureBlobStorageLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureBlobStorageLinkedService{} + +func (s AzureBlobStorageLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureBlobStorageLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureBlobStorageLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureBlobStorageLinkedService: %+v", err) + } + decoded["type"] = "AzureBlobStorage" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureBlobStorageLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservicetypeproperties.go new file mode 100644 index 00000000000..17e1dc9e27b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azureblobstoragelinkedservicetypeproperties.go @@ -0,0 +1,64 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobStorageLinkedServiceTypeProperties struct { + AccountKey *AzureKeyVaultSecretReference `json:"accountKey,omitempty"` + AccountKind *interface{} `json:"accountKind,omitempty"` + AuthenticationType *AzureStorageAuthenticationType `json:"authenticationType,omitempty"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + ConnectionString *interface{} `json:"connectionString,omitempty"` + ContainerUri *interface{} `json:"containerUri,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + SasToken *AzureKeyVaultSecretReference `json:"sasToken,omitempty"` + SasUri *interface{} `json:"sasUri,omitempty"` + ServiceEndpoint *interface{} `json:"serviceEndpoint,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &AzureBlobStorageLinkedServiceTypeProperties{} + +func (s *AzureBlobStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureBlobStorageLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureBlobStorageLinkedServiceTypeProperties: %+v", err) + } + + s.AccountKey = decoded.AccountKey + s.AccountKind = decoded.AccountKind + s.AuthenticationType = decoded.AuthenticationType + s.AzureCloudType = decoded.AzureCloudType + s.ConnectionString = decoded.ConnectionString + s.ContainerUri = decoded.ContainerUri + s.Credential = decoded.Credential + s.EncryptedCredential = decoded.EncryptedCredential + s.SasToken = decoded.SasToken + s.SasUri = decoded.SasUri + s.ServiceEndpoint = decoded.ServiceEndpoint + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureBlobStorageLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureBlobStorageLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdeltalakelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdeltalakelinkedservice.go new file mode 100644 index 00000000000..8d8ee541932 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdeltalakelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureDatabricksDeltaLakeLinkedService{} + +type AzureDatabricksDeltaLakeLinkedService struct { + TypeProperties AzureDatabricksDetltaLakeLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureDatabricksDeltaLakeLinkedService{} + +func (s AzureDatabricksDeltaLakeLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureDatabricksDeltaLakeLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDatabricksDeltaLakeLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDatabricksDeltaLakeLinkedService: %+v", err) + } + decoded["type"] = "AzureDatabricksDeltaLake" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDatabricksDeltaLakeLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdetltalakelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdetltalakelinkedservicetypeproperties.go new file mode 100644 index 00000000000..413ec52eaba --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabricksdetltalakelinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksDetltaLakeLinkedServiceTypeProperties struct { + AccessToken SecretBase `json:"accessToken"` + ClusterId *interface{} `json:"clusterId,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + Domain interface{} `json:"domain"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + WorkspaceResourceId *interface{} `json:"workspaceResourceId,omitempty"` +} + +var _ json.Unmarshaler = &AzureDatabricksDetltaLakeLinkedServiceTypeProperties{} + +func (s *AzureDatabricksDetltaLakeLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureDatabricksDetltaLakeLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureDatabricksDetltaLakeLinkedServiceTypeProperties: %+v", err) + } + + s.ClusterId = decoded.ClusterId + s.Credential = decoded.Credential + s.Domain = decoded.Domain + s.EncryptedCredential = decoded.EncryptedCredential + s.WorkspaceResourceId = decoded.WorkspaceResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureDatabricksDetltaLakeLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessToken' for 'AzureDatabricksDetltaLakeLinkedServiceTypeProperties': %+v", err) + } + s.AccessToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservice.go new file mode 100644 index 00000000000..ac6c8324560 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureDatabricksLinkedService{} + +type AzureDatabricksLinkedService struct { + TypeProperties AzureDatabricksLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureDatabricksLinkedService{} + +func (s AzureDatabricksLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureDatabricksLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDatabricksLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDatabricksLinkedService: %+v", err) + } + decoded["type"] = "AzureDatabricks" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDatabricksLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservicetypeproperties.go new file mode 100644 index 00000000000..b307fd257e3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatabrickslinkedservicetypeproperties.go @@ -0,0 +1,74 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksLinkedServiceTypeProperties struct { + AccessToken SecretBase `json:"accessToken"` + Authentication *interface{} `json:"authentication,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + Domain interface{} `json:"domain"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ExistingClusterId *interface{} `json:"existingClusterId,omitempty"` + InstancePoolId *interface{} `json:"instancePoolId,omitempty"` + NewClusterCustomTags *map[string]interface{} `json:"newClusterCustomTags,omitempty"` + NewClusterDriverNodeType *interface{} `json:"newClusterDriverNodeType,omitempty"` + NewClusterEnableElasticDisk *interface{} `json:"newClusterEnableElasticDisk,omitempty"` + NewClusterInitScripts *interface{} `json:"newClusterInitScripts,omitempty"` + NewClusterLogDestination *interface{} `json:"newClusterLogDestination,omitempty"` + NewClusterNodeType *interface{} `json:"newClusterNodeType,omitempty"` + NewClusterNumOfWorker *interface{} `json:"newClusterNumOfWorker,omitempty"` + NewClusterSparkConf *map[string]interface{} `json:"newClusterSparkConf,omitempty"` + NewClusterSparkEnvVars *map[string]interface{} `json:"newClusterSparkEnvVars,omitempty"` + NewClusterVersion *interface{} `json:"newClusterVersion,omitempty"` + PolicyId *interface{} `json:"policyId,omitempty"` + WorkspaceResourceId *interface{} `json:"workspaceResourceId,omitempty"` +} + +var _ json.Unmarshaler = &AzureDatabricksLinkedServiceTypeProperties{} + +func (s *AzureDatabricksLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureDatabricksLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureDatabricksLinkedServiceTypeProperties: %+v", err) + } + + s.Authentication = decoded.Authentication + s.Credential = decoded.Credential + s.Domain = decoded.Domain + s.EncryptedCredential = decoded.EncryptedCredential + s.ExistingClusterId = decoded.ExistingClusterId + s.InstancePoolId = decoded.InstancePoolId + s.NewClusterCustomTags = decoded.NewClusterCustomTags + s.NewClusterDriverNodeType = decoded.NewClusterDriverNodeType + s.NewClusterEnableElasticDisk = decoded.NewClusterEnableElasticDisk + s.NewClusterInitScripts = decoded.NewClusterInitScripts + s.NewClusterLogDestination = decoded.NewClusterLogDestination + s.NewClusterNodeType = decoded.NewClusterNodeType + s.NewClusterNumOfWorker = decoded.NewClusterNumOfWorker + s.NewClusterSparkConf = decoded.NewClusterSparkConf + s.NewClusterSparkEnvVars = decoded.NewClusterSparkEnvVars + s.NewClusterVersion = decoded.NewClusterVersion + s.PolicyId = decoded.PolicyId + s.WorkspaceResourceId = decoded.WorkspaceResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureDatabricksLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessToken' for 'AzureDatabricksLinkedServiceTypeProperties': %+v", err) + } + s.AccessToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservice.go new file mode 100644 index 00000000000..64ab502fc36 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureDataExplorerLinkedService{} + +type AzureDataExplorerLinkedService struct { + TypeProperties AzureDataExplorerLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureDataExplorerLinkedService{} + +func (s AzureDataExplorerLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureDataExplorerLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataExplorerLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataExplorerLinkedService: %+v", err) + } + decoded["type"] = "AzureDataExplorer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataExplorerLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservicetypeproperties.go new file mode 100644 index 00000000000..274519bede0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredataexplorerlinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataExplorerLinkedServiceTypeProperties struct { + Credential *CredentialReference `json:"credential,omitempty"` + Database interface{} `json:"database"` + Endpoint interface{} `json:"endpoint"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &AzureDataExplorerLinkedServiceTypeProperties{} + +func (s *AzureDataExplorerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureDataExplorerLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureDataExplorerLinkedServiceTypeProperties: %+v", err) + } + + s.Credential = decoded.Credential + s.Database = decoded.Database + s.Endpoint = decoded.Endpoint + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureDataExplorerLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureDataExplorerLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservice.go new file mode 100644 index 00000000000..0fe4fc1ccd5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureDataLakeAnalyticsLinkedService{} + +type AzureDataLakeAnalyticsLinkedService struct { + TypeProperties AzureDataLakeAnalyticsLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureDataLakeAnalyticsLinkedService{} + +func (s AzureDataLakeAnalyticsLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureDataLakeAnalyticsLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataLakeAnalyticsLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataLakeAnalyticsLinkedService: %+v", err) + } + decoded["type"] = "AzureDataLakeAnalytics" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataLakeAnalyticsLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservicetypeproperties.go new file mode 100644 index 00000000000..5fc13210db4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakeanalyticslinkedservicetypeproperties.go @@ -0,0 +1,52 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeAnalyticsLinkedServiceTypeProperties struct { + AccountName interface{} `json:"accountName"` + DataLakeAnalyticsUri *interface{} `json:"dataLakeAnalyticsUri,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ResourceGroupName *interface{} `json:"resourceGroupName,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + SubscriptionId *interface{} `json:"subscriptionId,omitempty"` + Tenant interface{} `json:"tenant"` +} + +var _ json.Unmarshaler = &AzureDataLakeAnalyticsLinkedServiceTypeProperties{} + +func (s *AzureDataLakeAnalyticsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureDataLakeAnalyticsLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureDataLakeAnalyticsLinkedServiceTypeProperties: %+v", err) + } + + s.AccountName = decoded.AccountName + s.DataLakeAnalyticsUri = decoded.DataLakeAnalyticsUri + s.EncryptedCredential = decoded.EncryptedCredential + s.ResourceGroupName = decoded.ResourceGroupName + s.ServicePrincipalId = decoded.ServicePrincipalId + s.SubscriptionId = decoded.SubscriptionId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureDataLakeAnalyticsLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureDataLakeAnalyticsLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservice.go new file mode 100644 index 00000000000..72f5d61673a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureDataLakeStoreLinkedService{} + +type AzureDataLakeStoreLinkedService struct { + TypeProperties AzureDataLakeStoreLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureDataLakeStoreLinkedService{} + +func (s AzureDataLakeStoreLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureDataLakeStoreLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataLakeStoreLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreLinkedService: %+v", err) + } + decoded["type"] = "AzureDataLakeStore" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataLakeStoreLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservicetypeproperties.go new file mode 100644 index 00000000000..c3170b970ed --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuredatalakestorelinkedservicetypeproperties.go @@ -0,0 +1,56 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreLinkedServiceTypeProperties struct { + AccountName *interface{} `json:"accountName,omitempty"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + DataLakeStoreUri interface{} `json:"dataLakeStoreUri"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ResourceGroupName *interface{} `json:"resourceGroupName,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + SubscriptionId *interface{} `json:"subscriptionId,omitempty"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &AzureDataLakeStoreLinkedServiceTypeProperties{} + +func (s *AzureDataLakeStoreLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureDataLakeStoreLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureDataLakeStoreLinkedServiceTypeProperties: %+v", err) + } + + s.AccountName = decoded.AccountName + s.AzureCloudType = decoded.AzureCloudType + s.Credential = decoded.Credential + s.DataLakeStoreUri = decoded.DataLakeStoreUri + s.EncryptedCredential = decoded.EncryptedCredential + s.ResourceGroupName = decoded.ResourceGroupName + s.ServicePrincipalId = decoded.ServicePrincipalId + s.SubscriptionId = decoded.SubscriptionId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureDataLakeStoreLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureDataLakeStoreLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservice.go new file mode 100644 index 00000000000..09e726ed524 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureFileStorageLinkedService{} + +type AzureFileStorageLinkedService struct { + TypeProperties AzureFileStorageLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureFileStorageLinkedService{} + +func (s AzureFileStorageLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureFileStorageLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureFileStorageLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureFileStorageLinkedService: %+v", err) + } + decoded["type"] = "AzureFileStorage" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureFileStorageLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservicetypeproperties.go new file mode 100644 index 00000000000..af74388475d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefilestoragelinkedservicetypeproperties.go @@ -0,0 +1,56 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureFileStorageLinkedServiceTypeProperties struct { + AccountKey *AzureKeyVaultSecretReference `json:"accountKey,omitempty"` + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + FileShare *interface{} `json:"fileShare,omitempty"` + Host *interface{} `json:"host,omitempty"` + Password SecretBase `json:"password"` + SasToken *AzureKeyVaultSecretReference `json:"sasToken,omitempty"` + SasUri *interface{} `json:"sasUri,omitempty"` + Snapshot *interface{} `json:"snapshot,omitempty"` + UserId *interface{} `json:"userId,omitempty"` +} + +var _ json.Unmarshaler = &AzureFileStorageLinkedServiceTypeProperties{} + +func (s *AzureFileStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureFileStorageLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureFileStorageLinkedServiceTypeProperties: %+v", err) + } + + s.AccountKey = decoded.AccountKey + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.FileShare = decoded.FileShare + s.Host = decoded.Host + s.SasToken = decoded.SasToken + s.SasUri = decoded.SasUri + s.Snapshot = decoded.Snapshot + s.UserId = decoded.UserId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureFileStorageLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'AzureFileStorageLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservice.go new file mode 100644 index 00000000000..27d8c1c8476 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureFunctionLinkedService{} + +type AzureFunctionLinkedService struct { + TypeProperties AzureFunctionLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureFunctionLinkedService{} + +func (s AzureFunctionLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureFunctionLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureFunctionLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureFunctionLinkedService: %+v", err) + } + decoded["type"] = "AzureFunction" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureFunctionLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservicetypeproperties.go new file mode 100644 index 00000000000..90a7e3019b7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurefunctionlinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureFunctionLinkedServiceTypeProperties struct { + Authentication *interface{} `json:"authentication,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + FunctionAppUrl interface{} `json:"functionAppUrl"` + FunctionKey SecretBase `json:"functionKey"` + ResourceId *interface{} `json:"resourceId,omitempty"` +} + +var _ json.Unmarshaler = &AzureFunctionLinkedServiceTypeProperties{} + +func (s *AzureFunctionLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureFunctionLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureFunctionLinkedServiceTypeProperties: %+v", err) + } + + s.Authentication = decoded.Authentication + s.Credential = decoded.Credential + s.EncryptedCredential = decoded.EncryptedCredential + s.FunctionAppUrl = decoded.FunctionAppUrl + s.ResourceId = decoded.ResourceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureFunctionLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["functionKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'FunctionKey' for 'AzureFunctionLinkedServiceTypeProperties': %+v", err) + } + s.FunctionKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservice.go new file mode 100644 index 00000000000..d672dbcda8c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureKeyVaultLinkedService{} + +type AzureKeyVaultLinkedService struct { + TypeProperties AzureKeyVaultLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureKeyVaultLinkedService{} + +func (s AzureKeyVaultLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureKeyVaultLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureKeyVaultLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureKeyVaultLinkedService: %+v", err) + } + decoded["type"] = "AzureKeyVault" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureKeyVaultLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservicetypeproperties.go new file mode 100644 index 00000000000..3379e39a6c3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultlinkedservicetypeproperties.go @@ -0,0 +1,9 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureKeyVaultLinkedServiceTypeProperties struct { + BaseUrl interface{} `json:"baseUrl"` + Credential *CredentialReference `json:"credential,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultsecretreference.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultsecretreference.go new file mode 100644 index 00000000000..3d8260ca821 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurekeyvaultsecretreference.go @@ -0,0 +1,43 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecretBase = AzureKeyVaultSecretReference{} + +type AzureKeyVaultSecretReference struct { + SecretName interface{} `json:"secretName"` + SecretVersion *interface{} `json:"secretVersion,omitempty"` + Store LinkedServiceReference `json:"store"` + + // Fields inherited from SecretBase +} + +var _ json.Marshaler = AzureKeyVaultSecretReference{} + +func (s AzureKeyVaultSecretReference) MarshalJSON() ([]byte, error) { + type wrapper AzureKeyVaultSecretReference + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureKeyVaultSecretReference: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureKeyVaultSecretReference: %+v", err) + } + decoded["type"] = "AzureKeyVaultSecret" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureKeyVaultSecretReference: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservice.go new file mode 100644 index 00000000000..dac3f81da27 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureMariaDBLinkedService{} + +type AzureMariaDBLinkedService struct { + TypeProperties AzureMariaDBLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureMariaDBLinkedService{} + +func (s AzureMariaDBLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureMariaDBLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMariaDBLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMariaDBLinkedService: %+v", err) + } + decoded["type"] = "AzureMariaDB" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMariaDBLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservicetypeproperties.go new file mode 100644 index 00000000000..65d7eaecac3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremariadblinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMariaDBLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Pwd *AzureKeyVaultSecretReference `json:"pwd,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservice.go new file mode 100644 index 00000000000..a4446119187 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureMLLinkedService{} + +type AzureMLLinkedService struct { + TypeProperties AzureMLLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureMLLinkedService{} + +func (s AzureMLLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureMLLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMLLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMLLinkedService: %+v", err) + } + decoded["type"] = "AzureML" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMLLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservicetypeproperties.go new file mode 100644 index 00000000000..12cf6a6fed4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremllinkedservicetypeproperties.go @@ -0,0 +1,59 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMLLinkedServiceTypeProperties struct { + ApiKey SecretBase `json:"apiKey"` + Authentication *interface{} `json:"authentication,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + MlEndpoint interface{} `json:"mlEndpoint"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` + UpdateResourceEndpoint *interface{} `json:"updateResourceEndpoint,omitempty"` +} + +var _ json.Unmarshaler = &AzureMLLinkedServiceTypeProperties{} + +func (s *AzureMLLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureMLLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureMLLinkedServiceTypeProperties: %+v", err) + } + + s.Authentication = decoded.Authentication + s.EncryptedCredential = decoded.EncryptedCredential + s.MlEndpoint = decoded.MlEndpoint + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + s.UpdateResourceEndpoint = decoded.UpdateResourceEndpoint + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureMLLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["apiKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ApiKey' for 'AzureMLLinkedServiceTypeProperties': %+v", err) + } + s.ApiKey = impl + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureMLLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservice.go new file mode 100644 index 00000000000..79b9839e3cd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureMLServiceLinkedService{} + +type AzureMLServiceLinkedService struct { + TypeProperties AzureMLServiceLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureMLServiceLinkedService{} + +func (s AzureMLServiceLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureMLServiceLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMLServiceLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMLServiceLinkedService: %+v", err) + } + decoded["type"] = "AzureMLService" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMLServiceLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservicetypeproperties.go new file mode 100644 index 00000000000..39ece528182 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremlservicelinkedservicetypeproperties.go @@ -0,0 +1,52 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMLServiceLinkedServiceTypeProperties struct { + Authentication *interface{} `json:"authentication,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + MlWorkspaceName interface{} `json:"mlWorkspaceName"` + ResourceGroupName interface{} `json:"resourceGroupName"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + SubscriptionId interface{} `json:"subscriptionId"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &AzureMLServiceLinkedServiceTypeProperties{} + +func (s *AzureMLServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureMLServiceLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureMLServiceLinkedServiceTypeProperties: %+v", err) + } + + s.Authentication = decoded.Authentication + s.EncryptedCredential = decoded.EncryptedCredential + s.MlWorkspaceName = decoded.MlWorkspaceName + s.ResourceGroupName = decoded.ResourceGroupName + s.ServicePrincipalId = decoded.ServicePrincipalId + s.SubscriptionId = decoded.SubscriptionId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureMLServiceLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureMLServiceLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservice.go new file mode 100644 index 00000000000..d7b4a90b3bc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureMySqlLinkedService{} + +type AzureMySqlLinkedService struct { + TypeProperties AzureMySqlLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureMySqlLinkedService{} + +func (s AzureMySqlLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureMySqlLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMySqlLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMySqlLinkedService: %+v", err) + } + decoded["type"] = "AzureMySql" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMySqlLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservicetypeproperties.go new file mode 100644 index 00000000000..c7a12fd68c9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuremysqllinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMySqlLinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservice.go new file mode 100644 index 00000000000..6437e7f7c1f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzurePostgreSqlLinkedService{} + +type AzurePostgreSqlLinkedService struct { + TypeProperties AzurePostgreSqlLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzurePostgreSqlLinkedService{} + +func (s AzurePostgreSqlLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzurePostgreSqlLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzurePostgreSqlLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzurePostgreSqlLinkedService: %+v", err) + } + decoded["type"] = "AzurePostgreSql" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzurePostgreSqlLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservicetypeproperties.go new file mode 100644 index 00000000000..e20237c6a7f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurepostgresqllinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzurePostgreSqlLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservice.go new file mode 100644 index 00000000000..243610dccf3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureSearchLinkedService{} + +type AzureSearchLinkedService struct { + TypeProperties AzureSearchLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureSearchLinkedService{} + +func (s AzureSearchLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureSearchLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSearchLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSearchLinkedService: %+v", err) + } + decoded["type"] = "AzureSearch" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSearchLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservicetypeproperties.go new file mode 100644 index 00000000000..c4e65c4d305 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresearchlinkedservicetypeproperties.go @@ -0,0 +1,42 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSearchLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Key SecretBase `json:"key"` + Url interface{} `json:"url"` +} + +var _ json.Unmarshaler = &AzureSearchLinkedServiceTypeProperties{} + +func (s *AzureSearchLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureSearchLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureSearchLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureSearchLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["key"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Key' for 'AzureSearchLinkedServiceTypeProperties': %+v", err) + } + s.Key = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservice.go new file mode 100644 index 00000000000..5974264c47b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureSqlDatabaseLinkedService{} + +type AzureSqlDatabaseLinkedService struct { + TypeProperties AzureSqlDatabaseLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureSqlDatabaseLinkedService{} + +func (s AzureSqlDatabaseLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlDatabaseLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlDatabaseLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlDatabaseLinkedService: %+v", err) + } + decoded["type"] = "AzureSqlDatabase" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlDatabaseLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservicetypeproperties.go new file mode 100644 index 00000000000..6eb4ff46600 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldatabaselinkedservicetypeproperties.go @@ -0,0 +1,54 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlDatabaseLinkedServiceTypeProperties struct { + AlwaysEncryptedSettings *SqlAlwaysEncryptedProperties `json:"alwaysEncryptedSettings,omitempty"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + ConnectionString interface{} `json:"connectionString"` + Credential *CredentialReference `json:"credential,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &AzureSqlDatabaseLinkedServiceTypeProperties{} + +func (s *AzureSqlDatabaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureSqlDatabaseLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureSqlDatabaseLinkedServiceTypeProperties: %+v", err) + } + + s.AlwaysEncryptedSettings = decoded.AlwaysEncryptedSettings + s.AzureCloudType = decoded.AzureCloudType + s.ConnectionString = decoded.ConnectionString + s.Credential = decoded.Credential + s.EncryptedCredential = decoded.EncryptedCredential + s.Password = decoded.Password + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureSqlDatabaseLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureSqlDatabaseLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservice.go new file mode 100644 index 00000000000..1f788611b09 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureSqlDWLinkedService{} + +type AzureSqlDWLinkedService struct { + TypeProperties AzureSqlDWLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureSqlDWLinkedService{} + +func (s AzureSqlDWLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlDWLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlDWLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlDWLinkedService: %+v", err) + } + decoded["type"] = "AzureSqlDW" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlDWLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservicetypeproperties.go new file mode 100644 index 00000000000..bc06df4648b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqldwlinkedservicetypeproperties.go @@ -0,0 +1,52 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlDWLinkedServiceTypeProperties struct { + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + ConnectionString interface{} `json:"connectionString"` + Credential *CredentialReference `json:"credential,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &AzureSqlDWLinkedServiceTypeProperties{} + +func (s *AzureSqlDWLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureSqlDWLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureSqlDWLinkedServiceTypeProperties: %+v", err) + } + + s.AzureCloudType = decoded.AzureCloudType + s.ConnectionString = decoded.ConnectionString + s.Credential = decoded.Credential + s.EncryptedCredential = decoded.EncryptedCredential + s.Password = decoded.Password + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureSqlDWLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureSqlDWLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservice.go new file mode 100644 index 00000000000..57f6418e422 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureSqlMILinkedService{} + +type AzureSqlMILinkedService struct { + TypeProperties AzureSqlMILinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureSqlMILinkedService{} + +func (s AzureSqlMILinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureSqlMILinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSqlMILinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSqlMILinkedService: %+v", err) + } + decoded["type"] = "AzureSqlMI" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSqlMILinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservicetypeproperties.go new file mode 100644 index 00000000000..cb7e4849871 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresqlmilinkedservicetypeproperties.go @@ -0,0 +1,54 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlMILinkedServiceTypeProperties struct { + AlwaysEncryptedSettings *SqlAlwaysEncryptedProperties `json:"alwaysEncryptedSettings,omitempty"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + ConnectionString interface{} `json:"connectionString"` + Credential *CredentialReference `json:"credential,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &AzureSqlMILinkedServiceTypeProperties{} + +func (s *AzureSqlMILinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias AzureSqlMILinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AzureSqlMILinkedServiceTypeProperties: %+v", err) + } + + s.AlwaysEncryptedSettings = decoded.AlwaysEncryptedSettings + s.AzureCloudType = decoded.AzureCloudType + s.ConnectionString = decoded.ConnectionString + s.Credential = decoded.Credential + s.EncryptedCredential = decoded.EncryptedCredential + s.Password = decoded.Password + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AzureSqlMILinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'AzureSqlMILinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservice.go new file mode 100644 index 00000000000..f085a0fd398 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureStorageLinkedService{} + +type AzureStorageLinkedService struct { + TypeProperties AzureStorageLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureStorageLinkedService{} + +func (s AzureStorageLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureStorageLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureStorageLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureStorageLinkedService: %+v", err) + } + decoded["type"] = "AzureStorage" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureStorageLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservicetypeproperties.go new file mode 100644 index 00000000000..d0862bad234 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azurestoragelinkedservicetypeproperties.go @@ -0,0 +1,12 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureStorageLinkedServiceTypeProperties struct { + AccountKey *AzureKeyVaultSecretReference `json:"accountKey,omitempty"` + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + SasToken *AzureKeyVaultSecretReference `json:"sasToken,omitempty"` + SasUri *interface{} `json:"sasUri,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservice.go new file mode 100644 index 00000000000..3226ba5d449 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureSynapseArtifactsLinkedService{} + +type AzureSynapseArtifactsLinkedService struct { + TypeProperties AzureSynapseArtifactsLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureSynapseArtifactsLinkedService{} + +func (s AzureSynapseArtifactsLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureSynapseArtifactsLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureSynapseArtifactsLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureSynapseArtifactsLinkedService: %+v", err) + } + decoded["type"] = "AzureSynapseArtifacts" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureSynapseArtifactsLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservicetypeproperties.go new file mode 100644 index 00000000000..b1de51a0abf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuresynapseartifactslinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSynapseArtifactsLinkedServiceTypeProperties struct { + Authentication *interface{} `json:"authentication,omitempty"` + Endpoint interface{} `json:"endpoint"` + WorkspaceResourceId *interface{} `json:"workspaceResourceId,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_azuretablestoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuretablestoragelinkedservice.go new file mode 100644 index 00000000000..85d31b3e0f6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_azuretablestoragelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = AzureTableStorageLinkedService{} + +type AzureTableStorageLinkedService struct { + TypeProperties AzureStorageLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = AzureTableStorageLinkedService{} + +func (s AzureTableStorageLinkedService) MarshalJSON() ([]byte, error) { + type wrapper AzureTableStorageLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureTableStorageLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureTableStorageLinkedService: %+v", err) + } + decoded["type"] = "AzureTableStorage" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureTableStorageLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservice.go new file mode 100644 index 00000000000..e0b41b7f79d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = CassandraLinkedService{} + +type CassandraLinkedService struct { + TypeProperties CassandraLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = CassandraLinkedService{} + +func (s CassandraLinkedService) MarshalJSON() ([]byte, error) { + type wrapper CassandraLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CassandraLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CassandraLinkedService: %+v", err) + } + decoded["type"] = "Cassandra" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CassandraLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservicetypeproperties.go new file mode 100644 index 00000000000..37f154555b9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cassandralinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CassandraLinkedServiceTypeProperties struct { + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &CassandraLinkedServiceTypeProperties{} + +func (s *CassandraLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias CassandraLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into CassandraLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.Port = decoded.Port + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling CassandraLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'CassandraLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservice.go new file mode 100644 index 00000000000..7564c3330e7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = CommonDataServiceForAppsLinkedService{} + +type CommonDataServiceForAppsLinkedService struct { + TypeProperties CommonDataServiceForAppsLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = CommonDataServiceForAppsLinkedService{} + +func (s CommonDataServiceForAppsLinkedService) MarshalJSON() ([]byte, error) { + type wrapper CommonDataServiceForAppsLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CommonDataServiceForAppsLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CommonDataServiceForAppsLinkedService: %+v", err) + } + decoded["type"] = "CommonDataServiceForApps" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CommonDataServiceForAppsLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservicetypeproperties.go new file mode 100644 index 00000000000..26cf4ca0c69 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_commondataserviceforappslinkedservicetypeproperties.go @@ -0,0 +1,67 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CommonDataServiceForAppsLinkedServiceTypeProperties struct { + AuthenticationType interface{} `json:"authenticationType"` + DeploymentType interface{} `json:"deploymentType"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HostName *interface{} `json:"hostName,omitempty"` + OrganizationName *interface{} `json:"organizationName,omitempty"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + ServicePrincipalCredential SecretBase `json:"servicePrincipalCredential"` + ServicePrincipalCredentialType *interface{} `json:"servicePrincipalCredentialType,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServiceUri *interface{} `json:"serviceUri,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &CommonDataServiceForAppsLinkedServiceTypeProperties{} + +func (s *CommonDataServiceForAppsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias CommonDataServiceForAppsLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into CommonDataServiceForAppsLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.DeploymentType = decoded.DeploymentType + s.EncryptedCredential = decoded.EncryptedCredential + s.HostName = decoded.HostName + s.OrganizationName = decoded.OrganizationName + s.Port = decoded.Port + s.ServicePrincipalCredentialType = decoded.ServicePrincipalCredentialType + s.ServicePrincipalId = decoded.ServicePrincipalId + s.ServiceUri = decoded.ServiceUri + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling CommonDataServiceForAppsLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'CommonDataServiceForAppsLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["servicePrincipalCredential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'CommonDataServiceForAppsLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalCredential = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservice.go new file mode 100644 index 00000000000..0b94180b20a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ConcurLinkedService{} + +type ConcurLinkedService struct { + TypeProperties ConcurLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ConcurLinkedService{} + +func (s ConcurLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ConcurLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ConcurLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ConcurLinkedService: %+v", err) + } + decoded["type"] = "Concur" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ConcurLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservicetypeproperties.go new file mode 100644 index 00000000000..1eee5cfe361 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_concurlinkedservicetypeproperties.go @@ -0,0 +1,52 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConcurLinkedServiceTypeProperties struct { + ClientId interface{} `json:"clientId"` + ConnectionProperties *interface{} `json:"connectionProperties,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` + Username interface{} `json:"username"` +} + +var _ json.Unmarshaler = &ConcurLinkedServiceTypeProperties{} + +func (s *ConcurLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ConcurLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ConcurLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.ConnectionProperties = decoded.ConnectionProperties + s.EncryptedCredential = decoded.EncryptedCredential + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ConcurLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'ConcurLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservice.go new file mode 100644 index 00000000000..bca8f76f89c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = CosmosDbLinkedService{} + +type CosmosDbLinkedService struct { + TypeProperties CosmosDbLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = CosmosDbLinkedService{} + +func (s CosmosDbLinkedService) MarshalJSON() ([]byte, error) { + type wrapper CosmosDbLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CosmosDbLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CosmosDbLinkedService: %+v", err) + } + decoded["type"] = "CosmosDb" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CosmosDbLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservicetypeproperties.go new file mode 100644 index 00000000000..e0d2f0ade61 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdblinkedservicetypeproperties.go @@ -0,0 +1,67 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbLinkedServiceTypeProperties struct { + AccountEndpoint *interface{} `json:"accountEndpoint,omitempty"` + AccountKey SecretBase `json:"accountKey"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + ConnectionMode *CosmosDbConnectionMode `json:"connectionMode,omitempty"` + ConnectionString *interface{} `json:"connectionString,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + Database *interface{} `json:"database,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ServicePrincipalCredential SecretBase `json:"servicePrincipalCredential"` + ServicePrincipalCredentialType *interface{} `json:"servicePrincipalCredentialType,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + Tenant *interface{} `json:"tenant,omitempty"` +} + +var _ json.Unmarshaler = &CosmosDbLinkedServiceTypeProperties{} + +func (s *CosmosDbLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias CosmosDbLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into CosmosDbLinkedServiceTypeProperties: %+v", err) + } + + s.AccountEndpoint = decoded.AccountEndpoint + s.AzureCloudType = decoded.AzureCloudType + s.ConnectionMode = decoded.ConnectionMode + s.ConnectionString = decoded.ConnectionString + s.Credential = decoded.Credential + s.Database = decoded.Database + s.EncryptedCredential = decoded.EncryptedCredential + s.ServicePrincipalCredentialType = decoded.ServicePrincipalCredentialType + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling CosmosDbLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accountKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccountKey' for 'CosmosDbLinkedServiceTypeProperties': %+v", err) + } + s.AccountKey = impl + } + + if v, ok := temp["servicePrincipalCredential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'CosmosDbLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalCredential = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservice.go new file mode 100644 index 00000000000..10ef8d70ee3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = CosmosDbMongoDbApiLinkedService{} + +type CosmosDbMongoDbApiLinkedService struct { + TypeProperties CosmosDbMongoDbApiLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = CosmosDbMongoDbApiLinkedService{} + +func (s CosmosDbMongoDbApiLinkedService) MarshalJSON() ([]byte, error) { + type wrapper CosmosDbMongoDbApiLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CosmosDbMongoDbApiLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CosmosDbMongoDbApiLinkedService: %+v", err) + } + decoded["type"] = "CosmosDbMongoDbApi" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CosmosDbMongoDbApiLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservicetypeproperties.go new file mode 100644 index 00000000000..1b206599929 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_cosmosdbmongodbapilinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbMongoDbApiLinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + Database interface{} `json:"database"` + IsServerVersionAbove32 *interface{} `json:"isServerVersionAbove32,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservice.go new file mode 100644 index 00000000000..8d644c47f47 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = CouchbaseLinkedService{} + +type CouchbaseLinkedService struct { + TypeProperties CouchbaseLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = CouchbaseLinkedService{} + +func (s CouchbaseLinkedService) MarshalJSON() ([]byte, error) { + type wrapper CouchbaseLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CouchbaseLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CouchbaseLinkedService: %+v", err) + } + decoded["type"] = "Couchbase" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CouchbaseLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservicetypeproperties.go new file mode 100644 index 00000000000..a0dec95c04f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_couchbaselinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CouchbaseLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + CredString *AzureKeyVaultSecretReference `json:"credString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_credentialreference.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_credentialreference.go new file mode 100644 index 00000000000..6cb3580a486 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_credentialreference.go @@ -0,0 +1,9 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialReference struct { + ReferenceName string `json:"referenceName"` + Type CredentialReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_customdatasourcelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_customdatasourcelinkedservice.go new file mode 100644 index 00000000000..6584262ef60 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_customdatasourcelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = CustomDataSourceLinkedService{} + +type CustomDataSourceLinkedService struct { + TypeProperties interface{} `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = CustomDataSourceLinkedService{} + +func (s CustomDataSourceLinkedService) MarshalJSON() ([]byte, error) { + type wrapper CustomDataSourceLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CustomDataSourceLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CustomDataSourceLinkedService: %+v", err) + } + decoded["type"] = "CustomDataSource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CustomDataSourceLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservice.go new file mode 100644 index 00000000000..62bc7c66e6f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = DataworldLinkedService{} + +type DataworldLinkedService struct { + TypeProperties DataworldLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = DataworldLinkedService{} + +func (s DataworldLinkedService) MarshalJSON() ([]byte, error) { + type wrapper DataworldLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DataworldLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DataworldLinkedService: %+v", err) + } + decoded["type"] = "Dataworld" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DataworldLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservicetypeproperties.go new file mode 100644 index 00000000000..69173deb237 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dataworldlinkedservicetypeproperties.go @@ -0,0 +1,40 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataworldLinkedServiceTypeProperties struct { + ApiToken SecretBase `json:"apiToken"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` +} + +var _ json.Unmarshaler = &DataworldLinkedServiceTypeProperties{} + +func (s *DataworldLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias DataworldLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DataworldLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DataworldLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["apiToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ApiToken' for 'DataworldLinkedServiceTypeProperties': %+v", err) + } + s.ApiToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservice.go new file mode 100644 index 00000000000..b74eb395c2a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = Db2LinkedService{} + +type Db2LinkedService struct { + TypeProperties Db2LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = Db2LinkedService{} + +func (s Db2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper Db2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Db2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Db2LinkedService: %+v", err) + } + decoded["type"] = "Db2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Db2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservicetypeproperties.go new file mode 100644 index 00000000000..ebcf43ca378 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_db2linkedservicetypeproperties.go @@ -0,0 +1,54 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Db2LinkedServiceTypeProperties struct { + AuthenticationType *Db2AuthenticationType `json:"authenticationType,omitempty"` + CertificateCommonName *interface{} `json:"certificateCommonName,omitempty"` + ConnectionString *interface{} `json:"connectionString,omitempty"` + Database *interface{} `json:"database,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + PackageCollection *interface{} `json:"packageCollection,omitempty"` + Password SecretBase `json:"password"` + Server *interface{} `json:"server,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &Db2LinkedServiceTypeProperties{} + +func (s *Db2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias Db2LinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into Db2LinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.CertificateCommonName = decoded.CertificateCommonName + s.ConnectionString = decoded.ConnectionString + s.Database = decoded.Database + s.EncryptedCredential = decoded.EncryptedCredential + s.PackageCollection = decoded.PackageCollection + s.Server = decoded.Server + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling Db2LinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'Db2LinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservice.go new file mode 100644 index 00000000000..3a7945559bf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = DrillLinkedService{} + +type DrillLinkedService struct { + TypeProperties DrillLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = DrillLinkedService{} + +func (s DrillLinkedService) MarshalJSON() ([]byte, error) { + type wrapper DrillLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DrillLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DrillLinkedService: %+v", err) + } + decoded["type"] = "Drill" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DrillLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservicetypeproperties.go new file mode 100644 index 00000000000..9d1b03ad415 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_drilllinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DrillLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Pwd *AzureKeyVaultSecretReference `json:"pwd,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservice.go new file mode 100644 index 00000000000..06f412b82f3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = DynamicsAXLinkedService{} + +type DynamicsAXLinkedService struct { + TypeProperties DynamicsAXLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = DynamicsAXLinkedService{} + +func (s DynamicsAXLinkedService) MarshalJSON() ([]byte, error) { + type wrapper DynamicsAXLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsAXLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsAXLinkedService: %+v", err) + } + decoded["type"] = "DynamicsAX" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsAXLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservicetypeproperties.go new file mode 100644 index 00000000000..ed49d7e2c38 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicsaxlinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsAXLinkedServiceTypeProperties struct { + AadResourceId interface{} `json:"aadResourceId"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ServicePrincipalId interface{} `json:"servicePrincipalId"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant interface{} `json:"tenant"` + Url interface{} `json:"url"` +} + +var _ json.Unmarshaler = &DynamicsAXLinkedServiceTypeProperties{} + +func (s *DynamicsAXLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias DynamicsAXLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DynamicsAXLinkedServiceTypeProperties: %+v", err) + } + + s.AadResourceId = decoded.AadResourceId + s.EncryptedCredential = decoded.EncryptedCredential + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + s.Url = decoded.Url + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DynamicsAXLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'DynamicsAXLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservice.go new file mode 100644 index 00000000000..8a5941c5f1d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = DynamicsCrmLinkedService{} + +type DynamicsCrmLinkedService struct { + TypeProperties DynamicsCrmLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = DynamicsCrmLinkedService{} + +func (s DynamicsCrmLinkedService) MarshalJSON() ([]byte, error) { + type wrapper DynamicsCrmLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsCrmLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsCrmLinkedService: %+v", err) + } + decoded["type"] = "DynamicsCrm" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsCrmLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservicetypeproperties.go new file mode 100644 index 00000000000..f2b7bf52edd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicscrmlinkedservicetypeproperties.go @@ -0,0 +1,67 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsCrmLinkedServiceTypeProperties struct { + AuthenticationType interface{} `json:"authenticationType"` + DeploymentType interface{} `json:"deploymentType"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HostName *interface{} `json:"hostName,omitempty"` + OrganizationName *interface{} `json:"organizationName,omitempty"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + ServicePrincipalCredential SecretBase `json:"servicePrincipalCredential"` + ServicePrincipalCredentialType *interface{} `json:"servicePrincipalCredentialType,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServiceUri *interface{} `json:"serviceUri,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &DynamicsCrmLinkedServiceTypeProperties{} + +func (s *DynamicsCrmLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias DynamicsCrmLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DynamicsCrmLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.DeploymentType = decoded.DeploymentType + s.EncryptedCredential = decoded.EncryptedCredential + s.HostName = decoded.HostName + s.OrganizationName = decoded.OrganizationName + s.Port = decoded.Port + s.ServicePrincipalCredentialType = decoded.ServicePrincipalCredentialType + s.ServicePrincipalId = decoded.ServicePrincipalId + s.ServiceUri = decoded.ServiceUri + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DynamicsCrmLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'DynamicsCrmLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["servicePrincipalCredential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'DynamicsCrmLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalCredential = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservice.go new file mode 100644 index 00000000000..799d79bce96 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = DynamicsLinkedService{} + +type DynamicsLinkedService struct { + TypeProperties DynamicsLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = DynamicsLinkedService{} + +func (s DynamicsLinkedService) MarshalJSON() ([]byte, error) { + type wrapper DynamicsLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DynamicsLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DynamicsLinkedService: %+v", err) + } + decoded["type"] = "Dynamics" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DynamicsLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservicetypeproperties.go new file mode 100644 index 00000000000..2f152de9dbe --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_dynamicslinkedservicetypeproperties.go @@ -0,0 +1,69 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsLinkedServiceTypeProperties struct { + AuthenticationType interface{} `json:"authenticationType"` + Credential *CredentialReference `json:"credential,omitempty"` + DeploymentType interface{} `json:"deploymentType"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HostName *interface{} `json:"hostName,omitempty"` + OrganizationName *interface{} `json:"organizationName,omitempty"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + ServicePrincipalCredential SecretBase `json:"servicePrincipalCredential"` + ServicePrincipalCredentialType *interface{} `json:"servicePrincipalCredentialType,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServiceUri *interface{} `json:"serviceUri,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &DynamicsLinkedServiceTypeProperties{} + +func (s *DynamicsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias DynamicsLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DynamicsLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.Credential = decoded.Credential + s.DeploymentType = decoded.DeploymentType + s.EncryptedCredential = decoded.EncryptedCredential + s.HostName = decoded.HostName + s.OrganizationName = decoded.OrganizationName + s.Port = decoded.Port + s.ServicePrincipalCredentialType = decoded.ServicePrincipalCredentialType + s.ServicePrincipalId = decoded.ServicePrincipalId + s.ServiceUri = decoded.ServiceUri + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DynamicsLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'DynamicsLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["servicePrincipalCredential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'DynamicsLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalCredential = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservice.go new file mode 100644 index 00000000000..427ac2b8123 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = EloquaLinkedService{} + +type EloquaLinkedService struct { + TypeProperties EloquaLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = EloquaLinkedService{} + +func (s EloquaLinkedService) MarshalJSON() ([]byte, error) { + type wrapper EloquaLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EloquaLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EloquaLinkedService: %+v", err) + } + decoded["type"] = "Eloqua" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EloquaLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservicetypeproperties.go new file mode 100644 index 00000000000..07fe0754c36 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_eloqualinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EloquaLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint interface{} `json:"endpoint"` + Password SecretBase `json:"password"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` + Username interface{} `json:"username"` +} + +var _ json.Unmarshaler = &EloquaLinkedServiceTypeProperties{} + +func (s *EloquaLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias EloquaLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into EloquaLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling EloquaLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'EloquaLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservice.go new file mode 100644 index 00000000000..43f1d20fc95 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = FileServerLinkedService{} + +type FileServerLinkedService struct { + TypeProperties FileServerLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = FileServerLinkedService{} + +func (s FileServerLinkedService) MarshalJSON() ([]byte, error) { + type wrapper FileServerLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FileServerLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FileServerLinkedService: %+v", err) + } + decoded["type"] = "FileServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FileServerLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservicetypeproperties.go new file mode 100644 index 00000000000..2ae155d4f43 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_fileserverlinkedservicetypeproperties.go @@ -0,0 +1,44 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileServerLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + UserId *interface{} `json:"userId,omitempty"` +} + +var _ json.Unmarshaler = &FileServerLinkedServiceTypeProperties{} + +func (s *FileServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias FileServerLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FileServerLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.UserId = decoded.UserId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling FileServerLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'FileServerLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservice.go new file mode 100644 index 00000000000..a1ef4d75e1c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = FtpServerLinkedService{} + +type FtpServerLinkedService struct { + TypeProperties FtpServerLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = FtpServerLinkedService{} + +func (s FtpServerLinkedService) MarshalJSON() ([]byte, error) { + type wrapper FtpServerLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FtpServerLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FtpServerLinkedService: %+v", err) + } + decoded["type"] = "FtpServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FtpServerLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservicetypeproperties.go new file mode 100644 index 00000000000..8262067f0b4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_ftpserverlinkedservicetypeproperties.go @@ -0,0 +1,52 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FtpServerLinkedServiceTypeProperties struct { + AuthenticationType *FtpAuthenticationType `json:"authenticationType,omitempty"` + EnableServerCertificateValidation *interface{} `json:"enableServerCertificateValidation,omitempty"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &FtpServerLinkedServiceTypeProperties{} + +func (s *FtpServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias FtpServerLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into FtpServerLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.EnableServerCertificateValidation = decoded.EnableServerCertificateValidation + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.Port = decoded.Port + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling FtpServerLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'FtpServerLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservice.go new file mode 100644 index 00000000000..1c5c98da228 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = GoogleAdWordsLinkedService{} + +type GoogleAdWordsLinkedService struct { + TypeProperties GoogleAdWordsLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = GoogleAdWordsLinkedService{} + +func (s GoogleAdWordsLinkedService) MarshalJSON() ([]byte, error) { + type wrapper GoogleAdWordsLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleAdWordsLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleAdWordsLinkedService: %+v", err) + } + decoded["type"] = "GoogleAdWords" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleAdWordsLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservicetypeproperties.go new file mode 100644 index 00000000000..7ca0a06c20a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googleadwordslinkedservicetypeproperties.go @@ -0,0 +1,89 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleAdWordsLinkedServiceTypeProperties struct { + AuthenticationType *GoogleAdWordsAuthenticationType `json:"authenticationType,omitempty"` + ClientCustomerID *interface{} `json:"clientCustomerID,omitempty"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + ConnectionProperties *interface{} `json:"connectionProperties,omitempty"` + DeveloperToken SecretBase `json:"developerToken"` + Email *interface{} `json:"email,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + GoogleAdsApiVersion *interface{} `json:"googleAdsApiVersion,omitempty"` + KeyFilePath *interface{} `json:"keyFilePath,omitempty"` + LoginCustomerID *interface{} `json:"loginCustomerID,omitempty"` + PrivateKey SecretBase `json:"privateKey"` + RefreshToken SecretBase `json:"refreshToken"` + SupportLegacyDataTypes *interface{} `json:"supportLegacyDataTypes,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` +} + +var _ json.Unmarshaler = &GoogleAdWordsLinkedServiceTypeProperties{} + +func (s *GoogleAdWordsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias GoogleAdWordsLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into GoogleAdWordsLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ClientCustomerID = decoded.ClientCustomerID + s.ClientId = decoded.ClientId + s.ConnectionProperties = decoded.ConnectionProperties + s.Email = decoded.Email + s.EncryptedCredential = decoded.EncryptedCredential + s.GoogleAdsApiVersion = decoded.GoogleAdsApiVersion + s.KeyFilePath = decoded.KeyFilePath + s.LoginCustomerID = decoded.LoginCustomerID + s.SupportLegacyDataTypes = decoded.SupportLegacyDataTypes + s.TrustedCertPath = decoded.TrustedCertPath + s.UseSystemTrustStore = decoded.UseSystemTrustStore + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling GoogleAdWordsLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["developerToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'DeveloperToken' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) + } + s.DeveloperToken = impl + } + + if v, ok := temp["privateKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PrivateKey' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) + } + s.PrivateKey = impl + } + + if v, ok := temp["refreshToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RefreshToken' for 'GoogleAdWordsLinkedServiceTypeProperties': %+v", err) + } + s.RefreshToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservice.go new file mode 100644 index 00000000000..e967e3308b2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = GoogleBigQueryLinkedService{} + +type GoogleBigQueryLinkedService struct { + TypeProperties GoogleBigQueryLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = GoogleBigQueryLinkedService{} + +func (s GoogleBigQueryLinkedService) MarshalJSON() ([]byte, error) { + type wrapper GoogleBigQueryLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleBigQueryLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleBigQueryLinkedService: %+v", err) + } + decoded["type"] = "GoogleBigQuery" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleBigQueryLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservicetypeproperties.go new file mode 100644 index 00000000000..debf8e20fc3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigquerylinkedservicetypeproperties.go @@ -0,0 +1,67 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQueryLinkedServiceTypeProperties struct { + AdditionalProjects *interface{} `json:"additionalProjects,omitempty"` + AuthenticationType GoogleBigQueryAuthenticationType `json:"authenticationType"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + Email *interface{} `json:"email,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + KeyFilePath *interface{} `json:"keyFilePath,omitempty"` + Project interface{} `json:"project"` + RefreshToken SecretBase `json:"refreshToken"` + RequestGoogleDriveScope *interface{} `json:"requestGoogleDriveScope,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` +} + +var _ json.Unmarshaler = &GoogleBigQueryLinkedServiceTypeProperties{} + +func (s *GoogleBigQueryLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias GoogleBigQueryLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into GoogleBigQueryLinkedServiceTypeProperties: %+v", err) + } + + s.AdditionalProjects = decoded.AdditionalProjects + s.AuthenticationType = decoded.AuthenticationType + s.ClientId = decoded.ClientId + s.Email = decoded.Email + s.EncryptedCredential = decoded.EncryptedCredential + s.KeyFilePath = decoded.KeyFilePath + s.Project = decoded.Project + s.RequestGoogleDriveScope = decoded.RequestGoogleDriveScope + s.TrustedCertPath = decoded.TrustedCertPath + s.UseSystemTrustStore = decoded.UseSystemTrustStore + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling GoogleBigQueryLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'GoogleBigQueryLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["refreshToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RefreshToken' for 'GoogleBigQueryLinkedServiceTypeProperties': %+v", err) + } + s.RefreshToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservice.go new file mode 100644 index 00000000000..673146f1951 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = GoogleBigQueryV2LinkedService{} + +type GoogleBigQueryV2LinkedService struct { + TypeProperties GoogleBigQueryV2LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = GoogleBigQueryV2LinkedService{} + +func (s GoogleBigQueryV2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper GoogleBigQueryV2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleBigQueryV2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleBigQueryV2LinkedService: %+v", err) + } + decoded["type"] = "GoogleBigQueryV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleBigQueryV2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservicetypeproperties.go new file mode 100644 index 00000000000..439783711dd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlebigqueryv2linkedservicetypeproperties.go @@ -0,0 +1,64 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQueryV2LinkedServiceTypeProperties struct { + AuthenticationType GoogleBigQueryV2AuthenticationType `json:"authenticationType"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + KeyFileContent SecretBase `json:"keyFileContent"` + ProjectId interface{} `json:"projectId"` + RefreshToken SecretBase `json:"refreshToken"` +} + +var _ json.Unmarshaler = &GoogleBigQueryV2LinkedServiceTypeProperties{} + +func (s *GoogleBigQueryV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias GoogleBigQueryV2LinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into GoogleBigQueryV2LinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.ProjectId = decoded.ProjectId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling GoogleBigQueryV2LinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'GoogleBigQueryV2LinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["keyFileContent"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'KeyFileContent' for 'GoogleBigQueryV2LinkedServiceTypeProperties': %+v", err) + } + s.KeyFileContent = impl + } + + if v, ok := temp["refreshToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RefreshToken' for 'GoogleBigQueryV2LinkedServiceTypeProperties': %+v", err) + } + s.RefreshToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservice.go new file mode 100644 index 00000000000..6c9ce28c0f5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = GoogleCloudStorageLinkedService{} + +type GoogleCloudStorageLinkedService struct { + TypeProperties GoogleCloudStorageLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = GoogleCloudStorageLinkedService{} + +func (s GoogleCloudStorageLinkedService) MarshalJSON() ([]byte, error) { + type wrapper GoogleCloudStorageLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleCloudStorageLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleCloudStorageLinkedService: %+v", err) + } + decoded["type"] = "GoogleCloudStorage" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleCloudStorageLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservicetypeproperties.go new file mode 100644 index 00000000000..317f3028175 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlecloudstoragelinkedservicetypeproperties.go @@ -0,0 +1,44 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleCloudStorageLinkedServiceTypeProperties struct { + AccessKeyId *interface{} `json:"accessKeyId,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + SecretAccessKey SecretBase `json:"secretAccessKey"` + ServiceUrl *interface{} `json:"serviceUrl,omitempty"` +} + +var _ json.Unmarshaler = &GoogleCloudStorageLinkedServiceTypeProperties{} + +func (s *GoogleCloudStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias GoogleCloudStorageLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into GoogleCloudStorageLinkedServiceTypeProperties: %+v", err) + } + + s.AccessKeyId = decoded.AccessKeyId + s.EncryptedCredential = decoded.EncryptedCredential + s.ServiceUrl = decoded.ServiceUrl + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling GoogleCloudStorageLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["secretAccessKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'GoogleCloudStorageLinkedServiceTypeProperties': %+v", err) + } + s.SecretAccessKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservice.go new file mode 100644 index 00000000000..ae961e2befc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = GoogleSheetsLinkedService{} + +type GoogleSheetsLinkedService struct { + TypeProperties GoogleSheetsLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = GoogleSheetsLinkedService{} + +func (s GoogleSheetsLinkedService) MarshalJSON() ([]byte, error) { + type wrapper GoogleSheetsLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GoogleSheetsLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GoogleSheetsLinkedService: %+v", err) + } + decoded["type"] = "GoogleSheets" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GoogleSheetsLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservicetypeproperties.go new file mode 100644 index 00000000000..c05a89d0294 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_googlesheetslinkedservicetypeproperties.go @@ -0,0 +1,40 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleSheetsLinkedServiceTypeProperties struct { + ApiToken SecretBase `json:"apiToken"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` +} + +var _ json.Unmarshaler = &GoogleSheetsLinkedServiceTypeProperties{} + +func (s *GoogleSheetsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias GoogleSheetsLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into GoogleSheetsLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling GoogleSheetsLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["apiToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ApiToken' for 'GoogleSheetsLinkedServiceTypeProperties': %+v", err) + } + s.ApiToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservice.go new file mode 100644 index 00000000000..cf63b2a3c73 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = GreenplumLinkedService{} + +type GreenplumLinkedService struct { + TypeProperties GreenplumLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = GreenplumLinkedService{} + +func (s GreenplumLinkedService) MarshalJSON() ([]byte, error) { + type wrapper GreenplumLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GreenplumLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GreenplumLinkedService: %+v", err) + } + decoded["type"] = "Greenplum" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GreenplumLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservicetypeproperties.go new file mode 100644 index 00000000000..15a713451f7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_greenplumlinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GreenplumLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Pwd *AzureKeyVaultSecretReference `json:"pwd,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservice.go new file mode 100644 index 00000000000..277587a58d5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = HBaseLinkedService{} + +type HBaseLinkedService struct { + TypeProperties HBaseLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = HBaseLinkedService{} + +func (s HBaseLinkedService) MarshalJSON() ([]byte, error) { + type wrapper HBaseLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HBaseLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HBaseLinkedService: %+v", err) + } + decoded["type"] = "HBase" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HBaseLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservicetypeproperties.go new file mode 100644 index 00000000000..8deb1dacf3c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hbaselinkedservicetypeproperties.go @@ -0,0 +1,58 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HBaseLinkedServiceTypeProperties struct { + AllowHostNameCNMismatch *interface{} `json:"allowHostNameCNMismatch,omitempty"` + AllowSelfSignedServerCert *interface{} `json:"allowSelfSignedServerCert,omitempty"` + AuthenticationType HBaseAuthenticationType `json:"authenticationType"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HTTPPath *interface{} `json:"httpPath,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &HBaseLinkedServiceTypeProperties{} + +func (s *HBaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HBaseLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HBaseLinkedServiceTypeProperties: %+v", err) + } + + s.AllowHostNameCNMismatch = decoded.AllowHostNameCNMismatch + s.AllowSelfSignedServerCert = decoded.AllowSelfSignedServerCert + s.AuthenticationType = decoded.AuthenticationType + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.HTTPPath = decoded.HTTPPath + s.Host = decoded.Host + s.Port = decoded.Port + s.TrustedCertPath = decoded.TrustedCertPath + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HBaseLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'HBaseLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservice.go new file mode 100644 index 00000000000..335b7259b33 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = HdfsLinkedService{} + +type HdfsLinkedService struct { + TypeProperties HdfsLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = HdfsLinkedService{} + +func (s HdfsLinkedService) MarshalJSON() ([]byte, error) { + type wrapper HdfsLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HdfsLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HdfsLinkedService: %+v", err) + } + decoded["type"] = "Hdfs" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HdfsLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservicetypeproperties.go new file mode 100644 index 00000000000..9dab7601753 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdfslinkedservicetypeproperties.go @@ -0,0 +1,46 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HdfsLinkedServiceTypeProperties struct { + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Url interface{} `json:"url"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &HdfsLinkedServiceTypeProperties{} + +func (s *HdfsLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HdfsLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HdfsLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HdfsLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'HdfsLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservice.go new file mode 100644 index 00000000000..cd45046fa23 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = HDInsightLinkedService{} + +type HDInsightLinkedService struct { + TypeProperties HDInsightLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = HDInsightLinkedService{} + +func (s HDInsightLinkedService) MarshalJSON() ([]byte, error) { + type wrapper HDInsightLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HDInsightLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HDInsightLinkedService: %+v", err) + } + decoded["type"] = "HDInsight" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HDInsightLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservicetypeproperties.go new file mode 100644 index 00000000000..165894bd01a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightlinkedservicetypeproperties.go @@ -0,0 +1,52 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HDInsightLinkedServiceTypeProperties struct { + ClusterUri interface{} `json:"clusterUri"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + FileSystem *interface{} `json:"fileSystem,omitempty"` + HcatalogLinkedServiceName *LinkedServiceReference `json:"hcatalogLinkedServiceName,omitempty"` + IsEspEnabled *interface{} `json:"isEspEnabled,omitempty"` + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Password SecretBase `json:"password"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &HDInsightLinkedServiceTypeProperties{} + +func (s *HDInsightLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HDInsightLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HDInsightLinkedServiceTypeProperties: %+v", err) + } + + s.ClusterUri = decoded.ClusterUri + s.EncryptedCredential = decoded.EncryptedCredential + s.FileSystem = decoded.FileSystem + s.HcatalogLinkedServiceName = decoded.HcatalogLinkedServiceName + s.IsEspEnabled = decoded.IsEspEnabled + s.LinkedServiceName = decoded.LinkedServiceName + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HDInsightLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'HDInsightLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservice.go new file mode 100644 index 00000000000..a4d8341e7e3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = HDInsightOnDemandLinkedService{} + +type HDInsightOnDemandLinkedService struct { + TypeProperties HDInsightOnDemandLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = HDInsightOnDemandLinkedService{} + +func (s HDInsightOnDemandLinkedService) MarshalJSON() ([]byte, error) { + type wrapper HDInsightOnDemandLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HDInsightOnDemandLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HDInsightOnDemandLinkedService: %+v", err) + } + decoded["type"] = "HDInsightOnDemand" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HDInsightOnDemandLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservicetypeproperties.go new file mode 100644 index 00000000000..4aa756cc8a3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hdinsightondemandlinkedservicetypeproperties.go @@ -0,0 +1,118 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HDInsightOnDemandLinkedServiceTypeProperties struct { + AdditionalLinkedServiceNames *[]LinkedServiceReference `json:"additionalLinkedServiceNames,omitempty"` + ClusterNamePrefix *interface{} `json:"clusterNamePrefix,omitempty"` + ClusterPassword SecretBase `json:"clusterPassword"` + ClusterResourceGroup interface{} `json:"clusterResourceGroup"` + ClusterSize interface{} `json:"clusterSize"` + ClusterSshPassword SecretBase `json:"clusterSshPassword"` + ClusterSshUserName *interface{} `json:"clusterSshUserName,omitempty"` + ClusterType *interface{} `json:"clusterType,omitempty"` + ClusterUserName *interface{} `json:"clusterUserName,omitempty"` + CoreConfiguration *interface{} `json:"coreConfiguration,omitempty"` + Credential *CredentialReference `json:"credential,omitempty"` + DataNodeSize *interface{} `json:"dataNodeSize,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HBaseConfiguration *interface{} `json:"hBaseConfiguration,omitempty"` + HcatalogLinkedServiceName *LinkedServiceReference `json:"hcatalogLinkedServiceName,omitempty"` + HdfsConfiguration *interface{} `json:"hdfsConfiguration,omitempty"` + HeadNodeSize *interface{} `json:"headNodeSize,omitempty"` + HiveConfiguration *interface{} `json:"hiveConfiguration,omitempty"` + HostSubscriptionId interface{} `json:"hostSubscriptionId"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + MapReduceConfiguration *interface{} `json:"mapReduceConfiguration,omitempty"` + OozieConfiguration *interface{} `json:"oozieConfiguration,omitempty"` + ScriptActions *[]ScriptAction `json:"scriptActions,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + SparkVersion *interface{} `json:"sparkVersion,omitempty"` + StormConfiguration *interface{} `json:"stormConfiguration,omitempty"` + SubnetName *interface{} `json:"subnetName,omitempty"` + Tenant interface{} `json:"tenant"` + TimeToLive interface{} `json:"timeToLive"` + Version interface{} `json:"version"` + VirtualNetworkId *interface{} `json:"virtualNetworkId,omitempty"` + YarnConfiguration *interface{} `json:"yarnConfiguration,omitempty"` + ZookeeperNodeSize *interface{} `json:"zookeeperNodeSize,omitempty"` +} + +var _ json.Unmarshaler = &HDInsightOnDemandLinkedServiceTypeProperties{} + +func (s *HDInsightOnDemandLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HDInsightOnDemandLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HDInsightOnDemandLinkedServiceTypeProperties: %+v", err) + } + + s.AdditionalLinkedServiceNames = decoded.AdditionalLinkedServiceNames + s.ClusterNamePrefix = decoded.ClusterNamePrefix + s.ClusterResourceGroup = decoded.ClusterResourceGroup + s.ClusterSize = decoded.ClusterSize + s.ClusterSshUserName = decoded.ClusterSshUserName + s.ClusterType = decoded.ClusterType + s.ClusterUserName = decoded.ClusterUserName + s.CoreConfiguration = decoded.CoreConfiguration + s.Credential = decoded.Credential + s.DataNodeSize = decoded.DataNodeSize + s.EncryptedCredential = decoded.EncryptedCredential + s.HBaseConfiguration = decoded.HBaseConfiguration + s.HcatalogLinkedServiceName = decoded.HcatalogLinkedServiceName + s.HdfsConfiguration = decoded.HdfsConfiguration + s.HeadNodeSize = decoded.HeadNodeSize + s.HiveConfiguration = decoded.HiveConfiguration + s.HostSubscriptionId = decoded.HostSubscriptionId + s.LinkedServiceName = decoded.LinkedServiceName + s.MapReduceConfiguration = decoded.MapReduceConfiguration + s.OozieConfiguration = decoded.OozieConfiguration + s.ScriptActions = decoded.ScriptActions + s.ServicePrincipalId = decoded.ServicePrincipalId + s.SparkVersion = decoded.SparkVersion + s.StormConfiguration = decoded.StormConfiguration + s.SubnetName = decoded.SubnetName + s.Tenant = decoded.Tenant + s.TimeToLive = decoded.TimeToLive + s.Version = decoded.Version + s.VirtualNetworkId = decoded.VirtualNetworkId + s.YarnConfiguration = decoded.YarnConfiguration + s.ZookeeperNodeSize = decoded.ZookeeperNodeSize + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HDInsightOnDemandLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clusterPassword"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClusterPassword' for 'HDInsightOnDemandLinkedServiceTypeProperties': %+v", err) + } + s.ClusterPassword = impl + } + + if v, ok := temp["clusterSshPassword"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClusterSshPassword' for 'HDInsightOnDemandLinkedServiceTypeProperties': %+v", err) + } + s.ClusterSshPassword = impl + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'HDInsightOnDemandLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservice.go new file mode 100644 index 00000000000..3fec2933e02 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = HiveLinkedService{} + +type HiveLinkedService struct { + TypeProperties HiveLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = HiveLinkedService{} + +func (s HiveLinkedService) MarshalJSON() ([]byte, error) { + type wrapper HiveLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HiveLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HiveLinkedService: %+v", err) + } + decoded["type"] = "Hive" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HiveLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservicetypeproperties.go new file mode 100644 index 00000000000..4bcd5741536 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hivelinkedservicetypeproperties.go @@ -0,0 +1,70 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HiveLinkedServiceTypeProperties struct { + AllowHostNameCNMismatch *interface{} `json:"allowHostNameCNMismatch,omitempty"` + AllowSelfSignedServerCert *interface{} `json:"allowSelfSignedServerCert,omitempty"` + AuthenticationType HiveAuthenticationType `json:"authenticationType"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HTTPPath *interface{} `json:"httpPath,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + ServerType *HiveServerType `json:"serverType,omitempty"` + ServiceDiscoveryMode *interface{} `json:"serviceDiscoveryMode,omitempty"` + ThriftTransportProtocol *HiveThriftTransportProtocol `json:"thriftTransportProtocol,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + UseNativeQuery *interface{} `json:"useNativeQuery,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` + Username *interface{} `json:"username,omitempty"` + ZooKeeperNameSpace *interface{} `json:"zooKeeperNameSpace,omitempty"` +} + +var _ json.Unmarshaler = &HiveLinkedServiceTypeProperties{} + +func (s *HiveLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HiveLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HiveLinkedServiceTypeProperties: %+v", err) + } + + s.AllowHostNameCNMismatch = decoded.AllowHostNameCNMismatch + s.AllowSelfSignedServerCert = decoded.AllowSelfSignedServerCert + s.AuthenticationType = decoded.AuthenticationType + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.HTTPPath = decoded.HTTPPath + s.Host = decoded.Host + s.Port = decoded.Port + s.ServerType = decoded.ServerType + s.ServiceDiscoveryMode = decoded.ServiceDiscoveryMode + s.ThriftTransportProtocol = decoded.ThriftTransportProtocol + s.TrustedCertPath = decoded.TrustedCertPath + s.UseNativeQuery = decoded.UseNativeQuery + s.UseSystemTrustStore = decoded.UseSystemTrustStore + s.Username = decoded.Username + s.ZooKeeperNameSpace = decoded.ZooKeeperNameSpace + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HiveLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'HiveLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservice.go new file mode 100644 index 00000000000..c4f9ef19830 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = HTTPLinkedService{} + +type HTTPLinkedService struct { + TypeProperties HTTPLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = HTTPLinkedService{} + +func (s HTTPLinkedService) MarshalJSON() ([]byte, error) { + type wrapper HTTPLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HTTPLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HTTPLinkedService: %+v", err) + } + decoded["type"] = "HttpServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HTTPLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservicetypeproperties.go new file mode 100644 index 00000000000..31370e3e31a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_httplinkedservicetypeproperties.go @@ -0,0 +1,54 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPLinkedServiceTypeProperties struct { + AuthHeaders *interface{} `json:"authHeaders,omitempty"` + AuthenticationType *HTTPAuthenticationType `json:"authenticationType,omitempty"` + CertThumbprint *interface{} `json:"certThumbprint,omitempty"` + EmbeddedCertData *interface{} `json:"embeddedCertData,omitempty"` + EnableServerCertificateValidation *interface{} `json:"enableServerCertificateValidation,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Url interface{} `json:"url"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &HTTPLinkedServiceTypeProperties{} + +func (s *HTTPLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HTTPLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HTTPLinkedServiceTypeProperties: %+v", err) + } + + s.AuthHeaders = decoded.AuthHeaders + s.AuthenticationType = decoded.AuthenticationType + s.CertThumbprint = decoded.CertThumbprint + s.EmbeddedCertData = decoded.EmbeddedCertData + s.EnableServerCertificateValidation = decoded.EnableServerCertificateValidation + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HTTPLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'HTTPLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservice.go new file mode 100644 index 00000000000..d2f8d4e49b6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = HubspotLinkedService{} + +type HubspotLinkedService struct { + TypeProperties HubspotLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = HubspotLinkedService{} + +func (s HubspotLinkedService) MarshalJSON() ([]byte, error) { + type wrapper HubspotLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HubspotLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HubspotLinkedService: %+v", err) + } + decoded["type"] = "Hubspot" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HubspotLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservicetypeproperties.go new file mode 100644 index 00000000000..403b566697d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_hubspotlinkedservicetypeproperties.go @@ -0,0 +1,66 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HubspotLinkedServiceTypeProperties struct { + AccessToken SecretBase `json:"accessToken"` + ClientId interface{} `json:"clientId"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + RefreshToken SecretBase `json:"refreshToken"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &HubspotLinkedServiceTypeProperties{} + +func (s *HubspotLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias HubspotLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into HubspotLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling HubspotLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessToken' for 'HubspotLinkedServiceTypeProperties': %+v", err) + } + s.AccessToken = impl + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'HubspotLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["refreshToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'RefreshToken' for 'HubspotLinkedServiceTypeProperties': %+v", err) + } + s.RefreshToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservice.go new file mode 100644 index 00000000000..494d1d116b2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ImpalaLinkedService{} + +type ImpalaLinkedService struct { + TypeProperties ImpalaLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ImpalaLinkedService{} + +func (s ImpalaLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ImpalaLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ImpalaLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ImpalaLinkedService: %+v", err) + } + decoded["type"] = "Impala" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ImpalaLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservicetypeproperties.go new file mode 100644 index 00000000000..0f81523c607 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_impalalinkedservicetypeproperties.go @@ -0,0 +1,58 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImpalaLinkedServiceTypeProperties struct { + AllowHostNameCNMismatch *interface{} `json:"allowHostNameCNMismatch,omitempty"` + AllowSelfSignedServerCert *interface{} `json:"allowSelfSignedServerCert,omitempty"` + AuthenticationType ImpalaAuthenticationType `json:"authenticationType"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &ImpalaLinkedServiceTypeProperties{} + +func (s *ImpalaLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ImpalaLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ImpalaLinkedServiceTypeProperties: %+v", err) + } + + s.AllowHostNameCNMismatch = decoded.AllowHostNameCNMismatch + s.AllowSelfSignedServerCert = decoded.AllowSelfSignedServerCert + s.AuthenticationType = decoded.AuthenticationType + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.Port = decoded.Port + s.TrustedCertPath = decoded.TrustedCertPath + s.UseSystemTrustStore = decoded.UseSystemTrustStore + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ImpalaLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'ImpalaLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservice.go new file mode 100644 index 00000000000..e14390c1a0f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = InformixLinkedService{} + +type InformixLinkedService struct { + TypeProperties InformixLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = InformixLinkedService{} + +func (s InformixLinkedService) MarshalJSON() ([]byte, error) { + type wrapper InformixLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling InformixLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling InformixLinkedService: %+v", err) + } + decoded["type"] = "Informix" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling InformixLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservicetypeproperties.go new file mode 100644 index 00000000000..effb13978eb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_informixlinkedservicetypeproperties.go @@ -0,0 +1,55 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InformixLinkedServiceTypeProperties struct { + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + ConnectionString interface{} `json:"connectionString"` + Credential SecretBase `json:"credential"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &InformixLinkedServiceTypeProperties{} + +func (s *InformixLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias InformixLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into InformixLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling InformixLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["credential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Credential' for 'InformixLinkedServiceTypeProperties': %+v", err) + } + s.Credential = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'InformixLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_integrationruntimereference.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_integrationruntimereference.go index e9798389663..5c157028644 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_integrationruntimereference.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_integrationruntimereference.go @@ -4,7 +4,7 @@ package linkedservices // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type IntegrationRuntimeReference struct { - Parameters *map[string]interface{} `json:"parameters,omitempty"` - ReferenceName string `json:"referenceName"` - Type Type `json:"type"` + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type IntegrationRuntimeReferenceType `json:"type"` } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservice.go new file mode 100644 index 00000000000..25f31aa2bae --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = JiraLinkedService{} + +type JiraLinkedService struct { + TypeProperties JiraLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = JiraLinkedService{} + +func (s JiraLinkedService) MarshalJSON() ([]byte, error) { + type wrapper JiraLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling JiraLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling JiraLinkedService: %+v", err) + } + decoded["type"] = "Jira" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling JiraLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservicetypeproperties.go new file mode 100644 index 00000000000..66b6f7a98be --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_jiralinkedservicetypeproperties.go @@ -0,0 +1,52 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JiraLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` + Username interface{} `json:"username"` +} + +var _ json.Unmarshaler = &JiraLinkedServiceTypeProperties{} + +func (s *JiraLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias JiraLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JiraLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.Port = decoded.Port + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling JiraLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'JiraLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go new file mode 100644 index 00000000000..c1e06adc0eb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = LakeHouseLinkedService{} + +type LakeHouseLinkedService struct { + TypeProperties LakeHouseLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = LakeHouseLinkedService{} + +func (s LakeHouseLinkedService) MarshalJSON() ([]byte, error) { + type wrapper LakeHouseLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LakeHouseLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LakeHouseLinkedService: %+v", err) + } + decoded["type"] = "LakeHouse" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LakeHouseLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservicetypeproperties.go new file mode 100644 index 00000000000..05c83fc594f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_lakehouselinkedservicetypeproperties.go @@ -0,0 +1,59 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseLinkedServiceTypeProperties struct { + ArtifactId *interface{} `json:"artifactId,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ServicePrincipalCredential SecretBase `json:"servicePrincipalCredential"` + ServicePrincipalCredentialType *interface{} `json:"servicePrincipalCredentialType,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` + WorkspaceId *interface{} `json:"workspaceId,omitempty"` +} + +var _ json.Unmarshaler = &LakeHouseLinkedServiceTypeProperties{} + +func (s *LakeHouseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias LakeHouseLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into LakeHouseLinkedServiceTypeProperties: %+v", err) + } + + s.ArtifactId = decoded.ArtifactId + s.EncryptedCredential = decoded.EncryptedCredential + s.ServicePrincipalCredentialType = decoded.ServicePrincipalCredentialType + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + s.WorkspaceId = decoded.WorkspaceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling LakeHouseLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalCredential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'LakeHouseLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalCredential = impl + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'LakeHouseLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go index 52abd77228a..18c95b2c651 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservice.go @@ -1,12 +1,1013 @@ package linkedservices +import ( + "encoding/json" + "fmt" + "strings" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type LinkedService struct { - Annotations *[]interface{} `json:"annotations,omitempty"` - ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` - Description *string `json:"description,omitempty"` - Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` - Type string `json:"type"` +type LinkedService interface { +} + +// RawLinkedServiceImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawLinkedServiceImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalLinkedServiceImplementation(input []byte) (LinkedService, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling LinkedService into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "AmazonMWS") { + var out AmazonMWSLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonMWSLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRdsForOracle") { + var out AmazonRdsForOracleLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRdsForOracleLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRdsForSqlServer") { + var out AmazonRdsForSqlServerLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRdsForSqlServerLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonRedshift") { + var out AmazonRedshiftLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonRedshiftLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonS3Compatible") { + var out AmazonS3CompatibleLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonS3CompatibleLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AmazonS3") { + var out AmazonS3LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AmazonS3LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AppFigures") { + var out AppFiguresLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AppFiguresLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Asana") { + var out AsanaLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AsanaLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBatch") { + var out AzureBatchLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBatchLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlobFS") { + var out AzureBlobFSLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobFSLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureBlobStorage") { + var out AzureBlobStorageLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureBlobStorageLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataExplorer") { + var out AzureDataExplorerLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataExplorerLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataLakeAnalytics") { + var out AzureDataLakeAnalyticsLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataLakeAnalyticsLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataLakeStore") { + var out AzureDataLakeStoreLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataLakeStoreLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDatabricksDeltaLake") { + var out AzureDatabricksDeltaLakeLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDatabricksDeltaLakeLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDatabricks") { + var out AzureDatabricksLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDatabricksLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureFileStorage") { + var out AzureFileStorageLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureFileStorageLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureFunction") { + var out AzureFunctionLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureFunctionLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureKeyVault") { + var out AzureKeyVaultLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureKeyVaultLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureML") { + var out AzureMLLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMLLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMLService") { + var out AzureMLServiceLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMLServiceLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMariaDB") { + var out AzureMariaDBLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMariaDBLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMySql") { + var out AzureMySqlLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMySqlLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzurePostgreSql") { + var out AzurePostgreSqlLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzurePostgreSqlLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSearch") { + var out AzureSearchLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSearchLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlDW") { + var out AzureSqlDWLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlDWLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlDatabase") { + var out AzureSqlDatabaseLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlDatabaseLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSqlMI") { + var out AzureSqlMILinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSqlMILinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureStorage") { + var out AzureStorageLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureStorageLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureSynapseArtifacts") { + var out AzureSynapseArtifactsLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureSynapseArtifactsLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureTableStorage") { + var out AzureTableStorageLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureTableStorageLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Cassandra") { + var out CassandraLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CassandraLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CommonDataServiceForApps") { + var out CommonDataServiceForAppsLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CommonDataServiceForAppsLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Concur") { + var out ConcurLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ConcurLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CosmosDb") { + var out CosmosDbLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CosmosDbLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CosmosDbMongoDbApi") { + var out CosmosDbMongoDbApiLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CosmosDbMongoDbApiLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Couchbase") { + var out CouchbaseLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CouchbaseLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "CustomDataSource") { + var out CustomDataSourceLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CustomDataSourceLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Dataworld") { + var out DataworldLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DataworldLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Db2") { + var out Db2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Db2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Drill") { + var out DrillLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DrillLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsAX") { + var out DynamicsAXLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsAXLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DynamicsCrm") { + var out DynamicsCrmLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsCrmLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Dynamics") { + var out DynamicsLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DynamicsLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Eloqua") { + var out EloquaLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EloquaLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "FileServer") { + var out FileServerLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FileServerLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "FtpServer") { + var out FtpServerLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FtpServerLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleAdWords") { + var out GoogleAdWordsLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleAdWordsLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleBigQuery") { + var out GoogleBigQueryLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleBigQueryLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleBigQueryV2") { + var out GoogleBigQueryV2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleBigQueryV2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleCloudStorage") { + var out GoogleCloudStorageLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleCloudStorageLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GoogleSheets") { + var out GoogleSheetsLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GoogleSheetsLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Greenplum") { + var out GreenplumLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GreenplumLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HBase") { + var out HBaseLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HBaseLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HDInsight") { + var out HDInsightLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HDInsightLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HDInsightOnDemand") { + var out HDInsightOnDemandLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HDInsightOnDemandLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HttpServer") { + var out HTTPLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HTTPLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Hdfs") { + var out HdfsLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HdfsLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Hive") { + var out HiveLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HiveLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Hubspot") { + var out HubspotLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HubspotLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Impala") { + var out ImpalaLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ImpalaLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Informix") { + var out InformixLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into InformixLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Jira") { + var out JiraLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into JiraLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "LakeHouse") { + var out LakeHouseLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LakeHouseLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Magento") { + var out MagentoLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MagentoLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MariaDB") { + var out MariaDBLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MariaDBLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Marketo") { + var out MarketoLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MarketoLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MicrosoftAccess") { + var out MicrosoftAccessLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MicrosoftAccessLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbAtlas") { + var out MongoDbAtlasLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbAtlasLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDb") { + var out MongoDbLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MongoDbV2") { + var out MongoDbV2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MongoDbV2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MySql") { + var out MySqlLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MySqlLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Netezza") { + var out NetezzaLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into NetezzaLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OData") { + var out ODataLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ODataLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Odbc") { + var out OdbcLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OdbcLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Office365") { + var out Office365LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Office365LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OracleCloudStorage") { + var out OracleCloudStorageLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleCloudStorageLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Oracle") { + var out OracleLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OracleServiceCloud") { + var out OracleServiceCloudLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OracleServiceCloudLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Paypal") { + var out PaypalLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PaypalLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Phoenix") { + var out PhoenixLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PhoenixLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostgreSql") { + var out PostgreSqlLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostgreSqlLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "PostgreSqlV2") { + var out PostgreSqlV2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PostgreSqlV2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Presto") { + var out PrestoLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into PrestoLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "QuickBooks") { + var out QuickBooksLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into QuickBooksLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Quickbase") { + var out QuickbaseLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into QuickbaseLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Responsys") { + var out ResponsysLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ResponsysLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "RestService") { + var out RestServiceLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into RestServiceLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Salesforce") { + var out SalesforceLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceMarketingCloud") { + var out SalesforceMarketingCloudLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceMarketingCloudLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceServiceCloud") { + var out SalesforceServiceCloudLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceServiceCloudLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceServiceCloudV2") { + var out SalesforceServiceCloudV2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceServiceCloudV2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SalesforceV2") { + var out SalesforceV2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SalesforceV2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapBW") { + var out SapBWLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapBWLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapCloudForCustomer") { + var out SapCloudForCustomerLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapCloudForCustomerLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapEcc") { + var out SapEccLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapEccLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapHana") { + var out SapHanaLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapHanaLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapOdp") { + var out SapOdpLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapOdpLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapOpenHub") { + var out SapOpenHubLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapOpenHubLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SapTable") { + var out SapTableLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SapTableLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServiceNow") { + var out ServiceNowLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceNowLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ServiceNowV2") { + var out ServiceNowV2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ServiceNowV2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Sftp") { + var out SftpServerLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SftpServerLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SharePointOnlineList") { + var out SharePointOnlineListLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SharePointOnlineListLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Shopify") { + var out ShopifyLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ShopifyLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Smartsheet") { + var out SmartsheetLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SmartsheetLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Snowflake") { + var out SnowflakeLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SnowflakeLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SnowflakeV2") { + var out SnowflakeV2LinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SnowflakeV2LinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Spark") { + var out SparkLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SparkLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SqlServer") { + var out SqlServerLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SqlServerLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Square") { + var out SquareLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SquareLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Sybase") { + var out SybaseLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SybaseLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "TeamDesk") { + var out TeamDeskLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TeamDeskLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Teradata") { + var out TeradataLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TeradataLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Twilio") { + var out TwilioLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TwilioLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Vertica") { + var out VerticaLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into VerticaLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Warehouse") { + var out WarehouseLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WarehouseLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Web") { + var out WebLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Xero") { + var out XeroLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into XeroLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Zendesk") { + var out ZendeskLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ZendeskLinkedService: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Zoho") { + var out ZohoLinkedService + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ZohoLinkedService: %+v", err) + } + return out, nil + } + + out := RawLinkedServiceImpl{ + Type: value, + Values: temp, + } + return out, nil + } diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservicereference.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservicereference.go new file mode 100644 index 00000000000..754aaf4a5e9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedservicereference.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedServiceReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type Type `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go index c4033d61bb9..f691316e49d 100644 --- a/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_linkedserviceresource.go @@ -1,5 +1,10 @@ package linkedservices +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -10,3 +15,32 @@ type LinkedServiceResource struct { Properties LinkedService `json:"properties"` Type *string `json:"type,omitempty"` } + +var _ json.Unmarshaler = &LinkedServiceResource{} + +func (s *LinkedServiceResource) UnmarshalJSON(bytes []byte) error { + type alias LinkedServiceResource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into LinkedServiceResource: %+v", err) + } + + s.Etag = decoded.Etag + s.Id = decoded.Id + s.Name = decoded.Name + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling LinkedServiceResource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalLinkedServiceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'LinkedServiceResource': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservice.go new file mode 100644 index 00000000000..ee85ea21104 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MagentoLinkedService{} + +type MagentoLinkedService struct { + TypeProperties MagentoLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MagentoLinkedService{} + +func (s MagentoLinkedService) MarshalJSON() ([]byte, error) { + type wrapper MagentoLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MagentoLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MagentoLinkedService: %+v", err) + } + decoded["type"] = "Magento" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MagentoLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservicetypeproperties.go new file mode 100644 index 00000000000..a56b29d9277 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_magentolinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MagentoLinkedServiceTypeProperties struct { + AccessToken SecretBase `json:"accessToken"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &MagentoLinkedServiceTypeProperties{} + +func (s *MagentoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias MagentoLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into MagentoLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling MagentoLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessToken' for 'MagentoLinkedServiceTypeProperties': %+v", err) + } + s.AccessToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservice.go new file mode 100644 index 00000000000..29f478c6abb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MariaDBLinkedService{} + +type MariaDBLinkedService struct { + TypeProperties MariaDBLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MariaDBLinkedService{} + +func (s MariaDBLinkedService) MarshalJSON() ([]byte, error) { + type wrapper MariaDBLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MariaDBLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MariaDBLinkedService: %+v", err) + } + decoded["type"] = "MariaDB" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MariaDBLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservicetypeproperties.go new file mode 100644 index 00000000000..9d4ee4f11bb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mariadblinkedservicetypeproperties.go @@ -0,0 +1,15 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MariaDBLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + Database *interface{} `json:"database,omitempty"` + DriverVersion *interface{} `json:"driverVersion,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` + Port *interface{} `json:"port,omitempty"` + Server *interface{} `json:"server,omitempty"` + Username *interface{} `json:"username,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservice.go new file mode 100644 index 00000000000..e0cea063e34 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MarketoLinkedService{} + +type MarketoLinkedService struct { + TypeProperties MarketoLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MarketoLinkedService{} + +func (s MarketoLinkedService) MarshalJSON() ([]byte, error) { + type wrapper MarketoLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MarketoLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MarketoLinkedService: %+v", err) + } + decoded["type"] = "Marketo" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MarketoLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservicetypeproperties.go new file mode 100644 index 00000000000..d83016dddc8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_marketolinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketoLinkedServiceTypeProperties struct { + ClientId interface{} `json:"clientId"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint interface{} `json:"endpoint"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &MarketoLinkedServiceTypeProperties{} + +func (s *MarketoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias MarketoLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into MarketoLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling MarketoLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'MarketoLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservice.go new file mode 100644 index 00000000000..0ffa17c2daa --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MicrosoftAccessLinkedService{} + +type MicrosoftAccessLinkedService struct { + TypeProperties MicrosoftAccessLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MicrosoftAccessLinkedService{} + +func (s MicrosoftAccessLinkedService) MarshalJSON() ([]byte, error) { + type wrapper MicrosoftAccessLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MicrosoftAccessLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MicrosoftAccessLinkedService: %+v", err) + } + decoded["type"] = "MicrosoftAccess" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MicrosoftAccessLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservicetypeproperties.go new file mode 100644 index 00000000000..cb981b58b2c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_microsoftaccesslinkedservicetypeproperties.go @@ -0,0 +1,55 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MicrosoftAccessLinkedServiceTypeProperties struct { + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + ConnectionString interface{} `json:"connectionString"` + Credential SecretBase `json:"credential"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &MicrosoftAccessLinkedServiceTypeProperties{} + +func (s *MicrosoftAccessLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias MicrosoftAccessLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into MicrosoftAccessLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling MicrosoftAccessLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["credential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Credential' for 'MicrosoftAccessLinkedServiceTypeProperties': %+v", err) + } + s.Credential = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'MicrosoftAccessLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservice.go new file mode 100644 index 00000000000..bf104cf302c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MongoDbAtlasLinkedService{} + +type MongoDbAtlasLinkedService struct { + TypeProperties MongoDbAtlasLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MongoDbAtlasLinkedService{} + +func (s MongoDbAtlasLinkedService) MarshalJSON() ([]byte, error) { + type wrapper MongoDbAtlasLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbAtlasLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbAtlasLinkedService: %+v", err) + } + decoded["type"] = "MongoDbAtlas" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbAtlasLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservicetypeproperties.go new file mode 100644 index 00000000000..453d2a77559 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbatlaslinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbAtlasLinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + Database interface{} `json:"database"` + DriverVersion *interface{} `json:"driverVersion,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservice.go new file mode 100644 index 00000000000..ce431bb22a7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MongoDbLinkedService{} + +type MongoDbLinkedService struct { + TypeProperties MongoDbLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MongoDbLinkedService{} + +func (s MongoDbLinkedService) MarshalJSON() ([]byte, error) { + type wrapper MongoDbLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbLinkedService: %+v", err) + } + decoded["type"] = "MongoDb" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservicetypeproperties.go new file mode 100644 index 00000000000..2b691259c18 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodblinkedservicetypeproperties.go @@ -0,0 +1,56 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbLinkedServiceTypeProperties struct { + AllowSelfSignedServerCert *interface{} `json:"allowSelfSignedServerCert,omitempty"` + AuthSource *interface{} `json:"authSource,omitempty"` + AuthenticationType *MongoDbAuthenticationType `json:"authenticationType,omitempty"` + DatabaseName interface{} `json:"databaseName"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + Server interface{} `json:"server"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &MongoDbLinkedServiceTypeProperties{} + +func (s *MongoDbLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias MongoDbLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into MongoDbLinkedServiceTypeProperties: %+v", err) + } + + s.AllowSelfSignedServerCert = decoded.AllowSelfSignedServerCert + s.AuthSource = decoded.AuthSource + s.AuthenticationType = decoded.AuthenticationType + s.DatabaseName = decoded.DatabaseName + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.Port = decoded.Port + s.Server = decoded.Server + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling MongoDbLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'MongoDbLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservice.go new file mode 100644 index 00000000000..a6daffd5e0c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MongoDbV2LinkedService{} + +type MongoDbV2LinkedService struct { + TypeProperties MongoDbV2LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MongoDbV2LinkedService{} + +func (s MongoDbV2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper MongoDbV2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MongoDbV2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MongoDbV2LinkedService: %+v", err) + } + decoded["type"] = "MongoDbV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MongoDbV2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservicetypeproperties.go new file mode 100644 index 00000000000..0907639a373 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mongodbv2linkedservicetypeproperties.go @@ -0,0 +1,9 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbV2LinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + Database interface{} `json:"database"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservice.go new file mode 100644 index 00000000000..c0c1147a6e9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = MySqlLinkedService{} + +type MySqlLinkedService struct { + TypeProperties MySqlLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = MySqlLinkedService{} + +func (s MySqlLinkedService) MarshalJSON() ([]byte, error) { + type wrapper MySqlLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MySqlLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MySqlLinkedService: %+v", err) + } + decoded["type"] = "MySql" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MySqlLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservicetypeproperties.go new file mode 100644 index 00000000000..2e1ff71f422 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_mysqllinkedservicetypeproperties.go @@ -0,0 +1,17 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MySqlLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + Database *interface{} `json:"database,omitempty"` + DriverVersion *interface{} `json:"driverVersion,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` + Port *interface{} `json:"port,omitempty"` + Server *interface{} `json:"server,omitempty"` + SslMode *interface{} `json:"sslMode,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` + Username *interface{} `json:"username,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservice.go new file mode 100644 index 00000000000..c517e8cd046 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = NetezzaLinkedService{} + +type NetezzaLinkedService struct { + TypeProperties NetezzaLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = NetezzaLinkedService{} + +func (s NetezzaLinkedService) MarshalJSON() ([]byte, error) { + type wrapper NetezzaLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling NetezzaLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling NetezzaLinkedService: %+v", err) + } + decoded["type"] = "Netezza" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling NetezzaLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservicetypeproperties.go new file mode 100644 index 00000000000..5713639f114 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_netezzalinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetezzaLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Pwd *AzureKeyVaultSecretReference `json:"pwd,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservice.go new file mode 100644 index 00000000000..0c84f4809f9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ODataLinkedService{} + +type ODataLinkedService struct { + TypeProperties ODataLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ODataLinkedService{} + +func (s ODataLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ODataLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ODataLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ODataLinkedService: %+v", err) + } + decoded["type"] = "OData" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ODataLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservicetypeproperties.go new file mode 100644 index 00000000000..aceb1439c37 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odatalinkedservicetypeproperties.go @@ -0,0 +1,85 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ODataLinkedServiceTypeProperties struct { + AadResourceId *interface{} `json:"aadResourceId,omitempty"` + AadServicePrincipalCredentialType *ODataAadServicePrincipalCredentialType `json:"aadServicePrincipalCredentialType,omitempty"` + AuthHeaders *interface{} `json:"authHeaders,omitempty"` + AuthenticationType *ODataAuthenticationType `json:"authenticationType,omitempty"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + ServicePrincipalEmbeddedCert SecretBase `json:"servicePrincipalEmbeddedCert"` + ServicePrincipalEmbeddedCertPassword SecretBase `json:"servicePrincipalEmbeddedCertPassword"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` + Url interface{} `json:"url"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &ODataLinkedServiceTypeProperties{} + +func (s *ODataLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ODataLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ODataLinkedServiceTypeProperties: %+v", err) + } + + s.AadResourceId = decoded.AadResourceId + s.AadServicePrincipalCredentialType = decoded.AadServicePrincipalCredentialType + s.AuthHeaders = decoded.AuthHeaders + s.AuthenticationType = decoded.AuthenticationType + s.AzureCloudType = decoded.AzureCloudType + s.EncryptedCredential = decoded.EncryptedCredential + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + s.Url = decoded.Url + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ODataLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'ODataLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["servicePrincipalEmbeddedCert"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCert' for 'ODataLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalEmbeddedCert = impl + } + + if v, ok := temp["servicePrincipalEmbeddedCertPassword"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalEmbeddedCertPassword' for 'ODataLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalEmbeddedCertPassword = impl + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'ODataLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservice.go new file mode 100644 index 00000000000..0e1201a3699 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = OdbcLinkedService{} + +type OdbcLinkedService struct { + TypeProperties OdbcLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = OdbcLinkedService{} + +func (s OdbcLinkedService) MarshalJSON() ([]byte, error) { + type wrapper OdbcLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OdbcLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OdbcLinkedService: %+v", err) + } + decoded["type"] = "Odbc" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OdbcLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservicetypeproperties.go new file mode 100644 index 00000000000..663c7135436 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_odbclinkedservicetypeproperties.go @@ -0,0 +1,55 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OdbcLinkedServiceTypeProperties struct { + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + ConnectionString interface{} `json:"connectionString"` + Credential SecretBase `json:"credential"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &OdbcLinkedServiceTypeProperties{} + +func (s *OdbcLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias OdbcLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OdbcLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OdbcLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["credential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Credential' for 'OdbcLinkedServiceTypeProperties': %+v", err) + } + s.Credential = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'OdbcLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservice.go new file mode 100644 index 00000000000..45dbe3eced9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = Office365LinkedService{} + +type Office365LinkedService struct { + TypeProperties Office365LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = Office365LinkedService{} + +func (s Office365LinkedService) MarshalJSON() ([]byte, error) { + type wrapper Office365LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Office365LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Office365LinkedService: %+v", err) + } + decoded["type"] = "Office365" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Office365LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservicetypeproperties.go new file mode 100644 index 00000000000..b697c939445 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_office365linkedservicetypeproperties.go @@ -0,0 +1,46 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Office365LinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Office365TenantId interface{} `json:"office365TenantId"` + ServicePrincipalId interface{} `json:"servicePrincipalId"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + ServicePrincipalTenantId interface{} `json:"servicePrincipalTenantId"` +} + +var _ json.Unmarshaler = &Office365LinkedServiceTypeProperties{} + +func (s *Office365LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias Office365LinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into Office365LinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Office365TenantId = decoded.Office365TenantId + s.ServicePrincipalId = decoded.ServicePrincipalId + s.ServicePrincipalTenantId = decoded.ServicePrincipalTenantId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling Office365LinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'Office365LinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservice.go new file mode 100644 index 00000000000..9a6fc8cbbf6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = OracleCloudStorageLinkedService{} + +type OracleCloudStorageLinkedService struct { + TypeProperties OracleCloudStorageLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = OracleCloudStorageLinkedService{} + +func (s OracleCloudStorageLinkedService) MarshalJSON() ([]byte, error) { + type wrapper OracleCloudStorageLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleCloudStorageLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleCloudStorageLinkedService: %+v", err) + } + decoded["type"] = "OracleCloudStorage" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleCloudStorageLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservicetypeproperties.go new file mode 100644 index 00000000000..32771cf0d09 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclecloudstoragelinkedservicetypeproperties.go @@ -0,0 +1,44 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleCloudStorageLinkedServiceTypeProperties struct { + AccessKeyId *interface{} `json:"accessKeyId,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + SecretAccessKey SecretBase `json:"secretAccessKey"` + ServiceUrl *interface{} `json:"serviceUrl,omitempty"` +} + +var _ json.Unmarshaler = &OracleCloudStorageLinkedServiceTypeProperties{} + +func (s *OracleCloudStorageLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias OracleCloudStorageLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OracleCloudStorageLinkedServiceTypeProperties: %+v", err) + } + + s.AccessKeyId = decoded.AccessKeyId + s.EncryptedCredential = decoded.EncryptedCredential + s.ServiceUrl = decoded.ServiceUrl + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OracleCloudStorageLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["secretAccessKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SecretAccessKey' for 'OracleCloudStorageLinkedServiceTypeProperties': %+v", err) + } + s.SecretAccessKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservice.go new file mode 100644 index 00000000000..c963bbeed18 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = OracleLinkedService{} + +type OracleLinkedService struct { + TypeProperties OracleLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = OracleLinkedService{} + +func (s OracleLinkedService) MarshalJSON() ([]byte, error) { + type wrapper OracleLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleLinkedService: %+v", err) + } + decoded["type"] = "Oracle" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservicetypeproperties.go new file mode 100644 index 00000000000..fb06f36d337 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oraclelinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleLinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservice.go new file mode 100644 index 00000000000..367ae8d958a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = OracleServiceCloudLinkedService{} + +type OracleServiceCloudLinkedService struct { + TypeProperties OracleServiceCloudLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = OracleServiceCloudLinkedService{} + +func (s OracleServiceCloudLinkedService) MarshalJSON() ([]byte, error) { + type wrapper OracleServiceCloudLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OracleServiceCloudLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OracleServiceCloudLinkedService: %+v", err) + } + decoded["type"] = "OracleServiceCloud" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OracleServiceCloudLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservicetypeproperties.go new file mode 100644 index 00000000000..28b38d2e4c8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_oracleservicecloudlinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleServiceCloudLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` + Username interface{} `json:"username"` +} + +var _ json.Unmarshaler = &OracleServiceCloudLinkedServiceTypeProperties{} + +func (s *OracleServiceCloudLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias OracleServiceCloudLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OracleServiceCloudLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OracleServiceCloudLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'OracleServiceCloudLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservice.go new file mode 100644 index 00000000000..420bfa46629 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = PaypalLinkedService{} + +type PaypalLinkedService struct { + TypeProperties PaypalLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = PaypalLinkedService{} + +func (s PaypalLinkedService) MarshalJSON() ([]byte, error) { + type wrapper PaypalLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PaypalLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PaypalLinkedService: %+v", err) + } + decoded["type"] = "Paypal" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PaypalLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservicetypeproperties.go new file mode 100644 index 00000000000..d384390d8b2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_paypallinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PaypalLinkedServiceTypeProperties struct { + ClientId interface{} `json:"clientId"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &PaypalLinkedServiceTypeProperties{} + +func (s *PaypalLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias PaypalLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into PaypalLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling PaypalLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'PaypalLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservice.go new file mode 100644 index 00000000000..7066f0c7aba --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = PhoenixLinkedService{} + +type PhoenixLinkedService struct { + TypeProperties PhoenixLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = PhoenixLinkedService{} + +func (s PhoenixLinkedService) MarshalJSON() ([]byte, error) { + type wrapper PhoenixLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PhoenixLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PhoenixLinkedService: %+v", err) + } + decoded["type"] = "Phoenix" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PhoenixLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservicetypeproperties.go new file mode 100644 index 00000000000..3592904d52b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_phoenixlinkedservicetypeproperties.go @@ -0,0 +1,60 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PhoenixLinkedServiceTypeProperties struct { + AllowHostNameCNMismatch *interface{} `json:"allowHostNameCNMismatch,omitempty"` + AllowSelfSignedServerCert *interface{} `json:"allowSelfSignedServerCert,omitempty"` + AuthenticationType PhoenixAuthenticationType `json:"authenticationType"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HTTPPath *interface{} `json:"httpPath,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &PhoenixLinkedServiceTypeProperties{} + +func (s *PhoenixLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias PhoenixLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into PhoenixLinkedServiceTypeProperties: %+v", err) + } + + s.AllowHostNameCNMismatch = decoded.AllowHostNameCNMismatch + s.AllowSelfSignedServerCert = decoded.AllowSelfSignedServerCert + s.AuthenticationType = decoded.AuthenticationType + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.HTTPPath = decoded.HTTPPath + s.Host = decoded.Host + s.Port = decoded.Port + s.TrustedCertPath = decoded.TrustedCertPath + s.UseSystemTrustStore = decoded.UseSystemTrustStore + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling PhoenixLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'PhoenixLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservice.go new file mode 100644 index 00000000000..7ecbf925d3b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = PostgreSqlLinkedService{} + +type PostgreSqlLinkedService struct { + TypeProperties PostgreSqlLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = PostgreSqlLinkedService{} + +func (s PostgreSqlLinkedService) MarshalJSON() ([]byte, error) { + type wrapper PostgreSqlLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostgreSqlLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostgreSqlLinkedService: %+v", err) + } + decoded["type"] = "PostgreSql" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostgreSqlLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservicetypeproperties.go new file mode 100644 index 00000000000..df7907a7131 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqllinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlLinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservice.go new file mode 100644 index 00000000000..2e327fcf069 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = PostgreSqlV2LinkedService{} + +type PostgreSqlV2LinkedService struct { + TypeProperties PostgreSqlV2LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = PostgreSqlV2LinkedService{} + +func (s PostgreSqlV2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper PostgreSqlV2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PostgreSqlV2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PostgreSqlV2LinkedService: %+v", err) + } + decoded["type"] = "PostgreSqlV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PostgreSqlV2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservicetypeproperties.go new file mode 100644 index 00000000000..e905dce49d3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_postgresqlv2linkedservicetypeproperties.go @@ -0,0 +1,26 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlV2LinkedServiceTypeProperties struct { + CommandTimeout *interface{} `json:"commandTimeout,omitempty"` + ConnectionTimeout *interface{} `json:"connectionTimeout,omitempty"` + Database interface{} `json:"database"` + Encoding *interface{} `json:"encoding,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + LogParameters *interface{} `json:"logParameters,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` + Pooling *interface{} `json:"pooling,omitempty"` + Port *interface{} `json:"port,omitempty"` + ReadBufferSize *interface{} `json:"readBufferSize,omitempty"` + Schema *interface{} `json:"schema,omitempty"` + Server interface{} `json:"server"` + SslCertificate *interface{} `json:"sslCertificate,omitempty"` + SslKey *interface{} `json:"sslKey,omitempty"` + SslMode interface{} `json:"sslMode"` + SslPassword *interface{} `json:"sslPassword,omitempty"` + Timezone *interface{} `json:"timezone,omitempty"` + TrustServerCertificate *interface{} `json:"trustServerCertificate,omitempty"` + Username interface{} `json:"username"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservice.go new file mode 100644 index 00000000000..fff46355e25 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = PrestoLinkedService{} + +type PrestoLinkedService struct { + TypeProperties PrestoLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = PrestoLinkedService{} + +func (s PrestoLinkedService) MarshalJSON() ([]byte, error) { + type wrapper PrestoLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling PrestoLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling PrestoLinkedService: %+v", err) + } + decoded["type"] = "Presto" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling PrestoLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservicetypeproperties.go new file mode 100644 index 00000000000..d6a4129af9e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_prestolinkedservicetypeproperties.go @@ -0,0 +1,64 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrestoLinkedServiceTypeProperties struct { + AllowHostNameCNMismatch *interface{} `json:"allowHostNameCNMismatch,omitempty"` + AllowSelfSignedServerCert *interface{} `json:"allowSelfSignedServerCert,omitempty"` + AuthenticationType PrestoAuthenticationType `json:"authenticationType"` + Catalog interface{} `json:"catalog"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + ServerVersion interface{} `json:"serverVersion"` + TimeZoneID *interface{} `json:"timeZoneID,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &PrestoLinkedServiceTypeProperties{} + +func (s *PrestoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias PrestoLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into PrestoLinkedServiceTypeProperties: %+v", err) + } + + s.AllowHostNameCNMismatch = decoded.AllowHostNameCNMismatch + s.AllowSelfSignedServerCert = decoded.AllowSelfSignedServerCert + s.AuthenticationType = decoded.AuthenticationType + s.Catalog = decoded.Catalog + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.Port = decoded.Port + s.ServerVersion = decoded.ServerVersion + s.TimeZoneID = decoded.TimeZoneID + s.TrustedCertPath = decoded.TrustedCertPath + s.UseSystemTrustStore = decoded.UseSystemTrustStore + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling PrestoLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'PrestoLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservice.go new file mode 100644 index 00000000000..4b7d503547f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = QuickbaseLinkedService{} + +type QuickbaseLinkedService struct { + TypeProperties QuickbaseLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = QuickbaseLinkedService{} + +func (s QuickbaseLinkedService) MarshalJSON() ([]byte, error) { + type wrapper QuickbaseLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling QuickbaseLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling QuickbaseLinkedService: %+v", err) + } + decoded["type"] = "Quickbase" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling QuickbaseLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservicetypeproperties.go new file mode 100644 index 00000000000..487f415e360 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbaselinkedservicetypeproperties.go @@ -0,0 +1,42 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QuickbaseLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Url interface{} `json:"url"` + UserToken SecretBase `json:"userToken"` +} + +var _ json.Unmarshaler = &QuickbaseLinkedServiceTypeProperties{} + +func (s *QuickbaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias QuickbaseLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into QuickbaseLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling QuickbaseLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["userToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'UserToken' for 'QuickbaseLinkedServiceTypeProperties': %+v", err) + } + s.UserToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservice.go new file mode 100644 index 00000000000..20e326f7a39 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = QuickBooksLinkedService{} + +type QuickBooksLinkedService struct { + TypeProperties QuickBooksLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = QuickBooksLinkedService{} + +func (s QuickBooksLinkedService) MarshalJSON() ([]byte, error) { + type wrapper QuickBooksLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling QuickBooksLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling QuickBooksLinkedService: %+v", err) + } + decoded["type"] = "QuickBooks" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling QuickBooksLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservicetypeproperties.go new file mode 100644 index 00000000000..9c793d00b6f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_quickbookslinkedservicetypeproperties.go @@ -0,0 +1,68 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QuickBooksLinkedServiceTypeProperties struct { + AccessToken SecretBase `json:"accessToken"` + AccessTokenSecret SecretBase `json:"accessTokenSecret"` + CompanyId *interface{} `json:"companyId,omitempty"` + ConnectionProperties *interface{} `json:"connectionProperties,omitempty"` + ConsumerKey *interface{} `json:"consumerKey,omitempty"` + ConsumerSecret SecretBase `json:"consumerSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint *interface{} `json:"endpoint,omitempty"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` +} + +var _ json.Unmarshaler = &QuickBooksLinkedServiceTypeProperties{} + +func (s *QuickBooksLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias QuickBooksLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into QuickBooksLinkedServiceTypeProperties: %+v", err) + } + + s.CompanyId = decoded.CompanyId + s.ConnectionProperties = decoded.ConnectionProperties + s.ConsumerKey = decoded.ConsumerKey + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling QuickBooksLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessToken' for 'QuickBooksLinkedServiceTypeProperties': %+v", err) + } + s.AccessToken = impl + } + + if v, ok := temp["accessTokenSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessTokenSecret' for 'QuickBooksLinkedServiceTypeProperties': %+v", err) + } + s.AccessTokenSecret = impl + } + + if v, ok := temp["consumerSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ConsumerSecret' for 'QuickBooksLinkedServiceTypeProperties': %+v", err) + } + s.ConsumerSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservice.go new file mode 100644 index 00000000000..16a5bb0ff42 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ResponsysLinkedService{} + +type ResponsysLinkedService struct { + TypeProperties ResponsysLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ResponsysLinkedService{} + +func (s ResponsysLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ResponsysLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ResponsysLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ResponsysLinkedService: %+v", err) + } + decoded["type"] = "Responsys" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ResponsysLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservicetypeproperties.go new file mode 100644 index 00000000000..5a0fe5c8c59 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_responsyslinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResponsysLinkedServiceTypeProperties struct { + ClientId interface{} `json:"clientId"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint interface{} `json:"endpoint"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &ResponsysLinkedServiceTypeProperties{} + +func (s *ResponsysLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ResponsysLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ResponsysLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ResponsysLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'ResponsysLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservice.go new file mode 100644 index 00000000000..fcde71874d8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = RestServiceLinkedService{} + +type RestServiceLinkedService struct { + TypeProperties RestServiceLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = RestServiceLinkedService{} + +func (s RestServiceLinkedService) MarshalJSON() ([]byte, error) { + type wrapper RestServiceLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling RestServiceLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling RestServiceLinkedService: %+v", err) + } + decoded["type"] = "RestService" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling RestServiceLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservicetypeproperties.go new file mode 100644 index 00000000000..eeaa9a75c99 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_restservicelinkedservicetypeproperties.go @@ -0,0 +1,86 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestServiceLinkedServiceTypeProperties struct { + AadResourceId *interface{} `json:"aadResourceId,omitempty"` + AuthHeaders *interface{} `json:"authHeaders,omitempty"` + AuthenticationType RestServiceAuthenticationType `json:"authenticationType"` + AzureCloudType *interface{} `json:"azureCloudType,omitempty"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + Credential *CredentialReference `json:"credential,omitempty"` + EnableServerCertificateValidation *interface{} `json:"enableServerCertificateValidation,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Resource *interface{} `json:"resource,omitempty"` + Scope *interface{} `json:"scope,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` + TokenEndpoint *interface{} `json:"tokenEndpoint,omitempty"` + Url interface{} `json:"url"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &RestServiceLinkedServiceTypeProperties{} + +func (s *RestServiceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias RestServiceLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into RestServiceLinkedServiceTypeProperties: %+v", err) + } + + s.AadResourceId = decoded.AadResourceId + s.AuthHeaders = decoded.AuthHeaders + s.AuthenticationType = decoded.AuthenticationType + s.AzureCloudType = decoded.AzureCloudType + s.ClientId = decoded.ClientId + s.Credential = decoded.Credential + s.EnableServerCertificateValidation = decoded.EnableServerCertificateValidation + s.EncryptedCredential = decoded.EncryptedCredential + s.Resource = decoded.Resource + s.Scope = decoded.Scope + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + s.TokenEndpoint = decoded.TokenEndpoint + s.Url = decoded.Url + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling RestServiceLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'RestServiceLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'RestServiceLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'RestServiceLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservice.go new file mode 100644 index 00000000000..ef4b65db4a2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SalesforceLinkedService{} + +type SalesforceLinkedService struct { + TypeProperties SalesforceLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SalesforceLinkedService{} + +func (s SalesforceLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SalesforceLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceLinkedService: %+v", err) + } + decoded["type"] = "Salesforce" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservicetypeproperties.go new file mode 100644 index 00000000000..4e1fc266e43 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcelinkedservicetypeproperties.go @@ -0,0 +1,55 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceLinkedServiceTypeProperties struct { + ApiVersion *interface{} `json:"apiVersion,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + EnvironmentUrl *interface{} `json:"environmentUrl,omitempty"` + Password SecretBase `json:"password"` + SecurityToken SecretBase `json:"securityToken"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &SalesforceLinkedServiceTypeProperties{} + +func (s *SalesforceLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SalesforceLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SalesforceLinkedServiceTypeProperties: %+v", err) + } + + s.ApiVersion = decoded.ApiVersion + s.EncryptedCredential = decoded.EncryptedCredential + s.EnvironmentUrl = decoded.EnvironmentUrl + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SalesforceLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SalesforceLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["securityToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SecurityToken' for 'SalesforceLinkedServiceTypeProperties': %+v", err) + } + s.SecurityToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservice.go new file mode 100644 index 00000000000..29d59b7817f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SalesforceMarketingCloudLinkedService{} + +type SalesforceMarketingCloudLinkedService struct { + TypeProperties SalesforceMarketingCloudLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SalesforceMarketingCloudLinkedService{} + +func (s SalesforceMarketingCloudLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SalesforceMarketingCloudLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceMarketingCloudLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceMarketingCloudLinkedService: %+v", err) + } + decoded["type"] = "SalesforceMarketingCloud" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceMarketingCloudLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservicetypeproperties.go new file mode 100644 index 00000000000..478a842456e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcemarketingcloudlinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceMarketingCloudLinkedServiceTypeProperties struct { + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + ConnectionProperties *interface{} `json:"connectionProperties,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &SalesforceMarketingCloudLinkedServiceTypeProperties{} + +func (s *SalesforceMarketingCloudLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SalesforceMarketingCloudLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SalesforceMarketingCloudLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.ConnectionProperties = decoded.ConnectionProperties + s.EncryptedCredential = decoded.EncryptedCredential + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SalesforceMarketingCloudLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SalesforceMarketingCloudLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservice.go new file mode 100644 index 00000000000..381c89f82c8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SalesforceServiceCloudLinkedService{} + +type SalesforceServiceCloudLinkedService struct { + TypeProperties SalesforceServiceCloudLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SalesforceServiceCloudLinkedService{} + +func (s SalesforceServiceCloudLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SalesforceServiceCloudLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceServiceCloudLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudLinkedService: %+v", err) + } + decoded["type"] = "SalesforceServiceCloud" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceServiceCloudLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservicetypeproperties.go new file mode 100644 index 00000000000..310bb7d2559 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudlinkedservicetypeproperties.go @@ -0,0 +1,57 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudLinkedServiceTypeProperties struct { + ApiVersion *interface{} `json:"apiVersion,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + EnvironmentUrl *interface{} `json:"environmentUrl,omitempty"` + ExtendedProperties *interface{} `json:"extendedProperties,omitempty"` + Password SecretBase `json:"password"` + SecurityToken SecretBase `json:"securityToken"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &SalesforceServiceCloudLinkedServiceTypeProperties{} + +func (s *SalesforceServiceCloudLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SalesforceServiceCloudLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SalesforceServiceCloudLinkedServiceTypeProperties: %+v", err) + } + + s.ApiVersion = decoded.ApiVersion + s.EncryptedCredential = decoded.EncryptedCredential + s.EnvironmentUrl = decoded.EnvironmentUrl + s.ExtendedProperties = decoded.ExtendedProperties + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SalesforceServiceCloudLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SalesforceServiceCloudLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["securityToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'SecurityToken' for 'SalesforceServiceCloudLinkedServiceTypeProperties': %+v", err) + } + s.SecurityToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservice.go new file mode 100644 index 00000000000..7edfb8447e3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SalesforceServiceCloudV2LinkedService{} + +type SalesforceServiceCloudV2LinkedService struct { + TypeProperties SalesforceServiceCloudV2LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SalesforceServiceCloudV2LinkedService{} + +func (s SalesforceServiceCloudV2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper SalesforceServiceCloudV2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceServiceCloudV2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceServiceCloudV2LinkedService: %+v", err) + } + decoded["type"] = "SalesforceServiceCloudV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceServiceCloudV2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservicetypeproperties.go new file mode 100644 index 00000000000..66fc460cc0b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforceservicecloudv2linkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudV2LinkedServiceTypeProperties struct { + ApiVersion *interface{} `json:"apiVersion,omitempty"` + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + EnvironmentUrl *interface{} `json:"environmentUrl,omitempty"` +} + +var _ json.Unmarshaler = &SalesforceServiceCloudV2LinkedServiceTypeProperties{} + +func (s *SalesforceServiceCloudV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SalesforceServiceCloudV2LinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SalesforceServiceCloudV2LinkedServiceTypeProperties: %+v", err) + } + + s.ApiVersion = decoded.ApiVersion + s.AuthenticationType = decoded.AuthenticationType + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.EnvironmentUrl = decoded.EnvironmentUrl + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SalesforceServiceCloudV2LinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SalesforceServiceCloudV2LinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservice.go new file mode 100644 index 00000000000..46f4ba52e82 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SalesforceV2LinkedService{} + +type SalesforceV2LinkedService struct { + TypeProperties SalesforceV2LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SalesforceV2LinkedService{} + +func (s SalesforceV2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper SalesforceV2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SalesforceV2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SalesforceV2LinkedService: %+v", err) + } + decoded["type"] = "SalesforceV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SalesforceV2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservicetypeproperties.go new file mode 100644 index 00000000000..5aad5eeb7cf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_salesforcev2linkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceV2LinkedServiceTypeProperties struct { + ApiVersion *interface{} `json:"apiVersion,omitempty"` + AuthenticationType *interface{} `json:"authenticationType,omitempty"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + EnvironmentUrl *interface{} `json:"environmentUrl,omitempty"` +} + +var _ json.Unmarshaler = &SalesforceV2LinkedServiceTypeProperties{} + +func (s *SalesforceV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SalesforceV2LinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SalesforceV2LinkedServiceTypeProperties: %+v", err) + } + + s.ApiVersion = decoded.ApiVersion + s.AuthenticationType = decoded.AuthenticationType + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.EnvironmentUrl = decoded.EnvironmentUrl + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SalesforceV2LinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SalesforceV2LinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservice.go new file mode 100644 index 00000000000..3f21cbf98e3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SapBWLinkedService{} + +type SapBWLinkedService struct { + TypeProperties SapBWLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SapBWLinkedService{} + +func (s SapBWLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SapBWLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapBWLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapBWLinkedService: %+v", err) + } + decoded["type"] = "SapBW" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapBWLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservicetypeproperties.go new file mode 100644 index 00000000000..59287a4ac38 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapbwlinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapBWLinkedServiceTypeProperties struct { + ClientId interface{} `json:"clientId"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Server interface{} `json:"server"` + SystemNumber interface{} `json:"systemNumber"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &SapBWLinkedServiceTypeProperties{} + +func (s *SapBWLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SapBWLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SapBWLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Server = decoded.Server + s.SystemNumber = decoded.SystemNumber + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SapBWLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SapBWLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservice.go new file mode 100644 index 00000000000..1073f8611ff --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SapCloudForCustomerLinkedService{} + +type SapCloudForCustomerLinkedService struct { + TypeProperties SapCloudForCustomerLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SapCloudForCustomerLinkedService{} + +func (s SapCloudForCustomerLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SapCloudForCustomerLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapCloudForCustomerLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapCloudForCustomerLinkedService: %+v", err) + } + decoded["type"] = "SapCloudForCustomer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapCloudForCustomerLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservicetypeproperties.go new file mode 100644 index 00000000000..c86cade309d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapcloudforcustomerlinkedservicetypeproperties.go @@ -0,0 +1,44 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapCloudForCustomerLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Url interface{} `json:"url"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &SapCloudForCustomerLinkedServiceTypeProperties{} + +func (s *SapCloudForCustomerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SapCloudForCustomerLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SapCloudForCustomerLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SapCloudForCustomerLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SapCloudForCustomerLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservice.go new file mode 100644 index 00000000000..8e92aec416d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SapEccLinkedService{} + +type SapEccLinkedService struct { + TypeProperties SapEccLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SapEccLinkedService{} + +func (s SapEccLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SapEccLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapEccLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapEccLinkedService: %+v", err) + } + decoded["type"] = "SapEcc" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapEccLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservicetypeproperties.go new file mode 100644 index 00000000000..ceeab0a707a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapecclinkedservicetypeproperties.go @@ -0,0 +1,44 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapEccLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Url interface{} `json:"url"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &SapEccLinkedServiceTypeProperties{} + +func (s *SapEccLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SapEccLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SapEccLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SapEccLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SapEccLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedservice.go new file mode 100644 index 00000000000..657d480b970 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SapHanaLinkedService{} + +type SapHanaLinkedService struct { + TypeProperties SapHanaLinkedServiceProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SapHanaLinkedService{} + +func (s SapHanaLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SapHanaLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapHanaLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapHanaLinkedService: %+v", err) + } + decoded["type"] = "SapHana" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapHanaLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedserviceproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedserviceproperties.go new file mode 100644 index 00000000000..ca8f33c21db --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saphanalinkedserviceproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapHanaLinkedServiceProperties struct { + AuthenticationType *SapHanaAuthenticationType `json:"authenticationType,omitempty"` + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Server *interface{} `json:"server,omitempty"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &SapHanaLinkedServiceProperties{} + +func (s *SapHanaLinkedServiceProperties) UnmarshalJSON(bytes []byte) error { + type alias SapHanaLinkedServiceProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SapHanaLinkedServiceProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.Server = decoded.Server + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SapHanaLinkedServiceProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SapHanaLinkedServiceProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservice.go new file mode 100644 index 00000000000..0c830e382a3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SapOdpLinkedService{} + +type SapOdpLinkedService struct { + TypeProperties SapOdpLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SapOdpLinkedService{} + +func (s SapOdpLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SapOdpLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapOdpLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapOdpLinkedService: %+v", err) + } + decoded["type"] = "SapOdp" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapOdpLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go new file mode 100644 index 00000000000..806ea09b4e9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapodplinkedservicetypeproperties.go @@ -0,0 +1,72 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOdpLinkedServiceTypeProperties struct { + ClientId *interface{} `json:"clientId,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Language *interface{} `json:"language,omitempty"` + LogonGroup *interface{} `json:"logonGroup,omitempty"` + MessageServer *interface{} `json:"messageServer,omitempty"` + MessageServerService *interface{} `json:"messageServerService,omitempty"` + Password SecretBase `json:"password"` + Server *interface{} `json:"server,omitempty"` + SncLibraryPath *interface{} `json:"sncLibraryPath,omitempty"` + SncMode *interface{} `json:"sncMode,omitempty"` + SncMyName *interface{} `json:"sncMyName,omitempty"` + SncPartnerName *interface{} `json:"sncPartnerName,omitempty"` + SncQop *interface{} `json:"sncQop,omitempty"` + SubscriberName *interface{} `json:"subscriberName,omitempty"` + SystemId *interface{} `json:"systemId,omitempty"` + SystemNumber *interface{} `json:"systemNumber,omitempty"` + UserName *interface{} `json:"userName,omitempty"` + X509CertificatePath *interface{} `json:"x509CertificatePath,omitempty"` +} + +var _ json.Unmarshaler = &SapOdpLinkedServiceTypeProperties{} + +func (s *SapOdpLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SapOdpLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SapOdpLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Language = decoded.Language + s.LogonGroup = decoded.LogonGroup + s.MessageServer = decoded.MessageServer + s.MessageServerService = decoded.MessageServerService + s.Server = decoded.Server + s.SncLibraryPath = decoded.SncLibraryPath + s.SncMode = decoded.SncMode + s.SncMyName = decoded.SncMyName + s.SncPartnerName = decoded.SncPartnerName + s.SncQop = decoded.SncQop + s.SubscriberName = decoded.SubscriberName + s.SystemId = decoded.SystemId + s.SystemNumber = decoded.SystemNumber + s.UserName = decoded.UserName + s.X509CertificatePath = decoded.X509CertificatePath + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SapOdpLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SapOdpLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservice.go new file mode 100644 index 00000000000..ab83564aa9a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SapOpenHubLinkedService{} + +type SapOpenHubLinkedService struct { + TypeProperties SapOpenHubLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SapOpenHubLinkedService{} + +func (s SapOpenHubLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SapOpenHubLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapOpenHubLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapOpenHubLinkedService: %+v", err) + } + decoded["type"] = "SapOpenHub" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapOpenHubLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservicetypeproperties.go new file mode 100644 index 00000000000..39c319c5bc1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sapopenhublinkedservicetypeproperties.go @@ -0,0 +1,58 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOpenHubLinkedServiceTypeProperties struct { + ClientId *interface{} `json:"clientId,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Language *interface{} `json:"language,omitempty"` + LogonGroup *interface{} `json:"logonGroup,omitempty"` + MessageServer *interface{} `json:"messageServer,omitempty"` + MessageServerService *interface{} `json:"messageServerService,omitempty"` + Password SecretBase `json:"password"` + Server *interface{} `json:"server,omitempty"` + SystemId *interface{} `json:"systemId,omitempty"` + SystemNumber *interface{} `json:"systemNumber,omitempty"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &SapOpenHubLinkedServiceTypeProperties{} + +func (s *SapOpenHubLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SapOpenHubLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SapOpenHubLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Language = decoded.Language + s.LogonGroup = decoded.LogonGroup + s.MessageServer = decoded.MessageServer + s.MessageServerService = decoded.MessageServerService + s.Server = decoded.Server + s.SystemId = decoded.SystemId + s.SystemNumber = decoded.SystemNumber + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SapOpenHubLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SapOpenHubLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservice.go new file mode 100644 index 00000000000..3defdb70713 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SapTableLinkedService{} + +type SapTableLinkedService struct { + TypeProperties SapTableLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SapTableLinkedService{} + +func (s SapTableLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SapTableLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SapTableLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SapTableLinkedService: %+v", err) + } + decoded["type"] = "SapTable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SapTableLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go new file mode 100644 index 00000000000..c4cbbc94fac --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_saptablelinkedservicetypeproperties.go @@ -0,0 +1,68 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapTableLinkedServiceTypeProperties struct { + ClientId *interface{} `json:"clientId,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Language *interface{} `json:"language,omitempty"` + LogonGroup *interface{} `json:"logonGroup,omitempty"` + MessageServer *interface{} `json:"messageServer,omitempty"` + MessageServerService *interface{} `json:"messageServerService,omitempty"` + Password SecretBase `json:"password"` + Server *interface{} `json:"server,omitempty"` + SncLibraryPath *interface{} `json:"sncLibraryPath,omitempty"` + SncMode *interface{} `json:"sncMode,omitempty"` + SncMyName *interface{} `json:"sncMyName,omitempty"` + SncPartnerName *interface{} `json:"sncPartnerName,omitempty"` + SncQop *interface{} `json:"sncQop,omitempty"` + SystemId *interface{} `json:"systemId,omitempty"` + SystemNumber *interface{} `json:"systemNumber,omitempty"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &SapTableLinkedServiceTypeProperties{} + +func (s *SapTableLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SapTableLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SapTableLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Language = decoded.Language + s.LogonGroup = decoded.LogonGroup + s.MessageServer = decoded.MessageServer + s.MessageServerService = decoded.MessageServerService + s.Server = decoded.Server + s.SncLibraryPath = decoded.SncLibraryPath + s.SncMode = decoded.SncMode + s.SncMyName = decoded.SncMyName + s.SncPartnerName = decoded.SncPartnerName + s.SncQop = decoded.SncQop + s.SystemId = decoded.SystemId + s.SystemNumber = decoded.SystemNumber + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SapTableLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SapTableLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_scriptaction.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_scriptaction.go new file mode 100644 index 00000000000..3ae2afb789f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_scriptaction.go @@ -0,0 +1,11 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScriptAction struct { + Name string `json:"name"` + Parameters *string `json:"parameters,omitempty"` + Roles interface{} `json:"roles"` + Uri string `json:"uri"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_secretbase.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_secretbase.go new file mode 100644 index 00000000000..5c0c14a5405 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_secretbase.go @@ -0,0 +1,53 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretBase interface { +} + +// RawSecretBaseImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSecretBaseImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SecretBase into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "AzureKeyVaultSecret") { + var out AzureKeyVaultSecretReference + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureKeyVaultSecretReference: %+v", err) + } + return out, nil + } + + out := RawSecretBaseImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservice.go new file mode 100644 index 00000000000..2f8bb68765d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ServiceNowLinkedService{} + +type ServiceNowLinkedService struct { + TypeProperties ServiceNowLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ServiceNowLinkedService{} + +func (s ServiceNowLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ServiceNowLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceNowLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceNowLinkedService: %+v", err) + } + decoded["type"] = "ServiceNow" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceNowLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservicetypeproperties.go new file mode 100644 index 00000000000..631b5aa1454 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowlinkedservicetypeproperties.go @@ -0,0 +1,63 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceNowLinkedServiceTypeProperties struct { + AuthenticationType ServiceNowAuthenticationType `json:"authenticationType"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint interface{} `json:"endpoint"` + Password SecretBase `json:"password"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &ServiceNowLinkedServiceTypeProperties{} + +func (s *ServiceNowLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ServiceNowLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ServiceNowLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ServiceNowLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'ServiceNowLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'ServiceNowLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservice.go new file mode 100644 index 00000000000..df43da70803 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ServiceNowV2LinkedService{} + +type ServiceNowV2LinkedService struct { + TypeProperties ServiceNowV2LinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ServiceNowV2LinkedService{} + +func (s ServiceNowV2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper ServiceNowV2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ServiceNowV2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ServiceNowV2LinkedService: %+v", err) + } + decoded["type"] = "ServiceNowV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ServiceNowV2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservicetypeproperties.go new file mode 100644 index 00000000000..44eb19bd587 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_servicenowv2linkedservicetypeproperties.go @@ -0,0 +1,59 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceNowV2LinkedServiceTypeProperties struct { + AuthenticationType ServiceNowV2AuthenticationType `json:"authenticationType"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint interface{} `json:"endpoint"` + GrantType *interface{} `json:"grantType,omitempty"` + Password SecretBase `json:"password"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &ServiceNowV2LinkedServiceTypeProperties{} + +func (s *ServiceNowV2LinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ServiceNowV2LinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ServiceNowV2LinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ClientId = decoded.ClientId + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.GrantType = decoded.GrantType + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ServiceNowV2LinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'ServiceNowV2LinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'ServiceNowV2LinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservice.go new file mode 100644 index 00000000000..dd8c2f0a273 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SftpServerLinkedService{} + +type SftpServerLinkedService struct { + TypeProperties SftpServerLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SftpServerLinkedService{} + +func (s SftpServerLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SftpServerLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SftpServerLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SftpServerLinkedService: %+v", err) + } + decoded["type"] = "Sftp" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SftpServerLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservicetypeproperties.go new file mode 100644 index 00000000000..c5e21bceb3a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sftpserverlinkedservicetypeproperties.go @@ -0,0 +1,72 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SftpServerLinkedServiceTypeProperties struct { + AuthenticationType *SftpAuthenticationType `json:"authenticationType,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + HostKeyFingerprint *interface{} `json:"hostKeyFingerprint,omitempty"` + PassPhrase SecretBase `json:"passPhrase"` + Password SecretBase `json:"password"` + Port *interface{} `json:"port,omitempty"` + PrivateKeyContent SecretBase `json:"privateKeyContent"` + PrivateKeyPath *interface{} `json:"privateKeyPath,omitempty"` + SkipHostKeyValidation *interface{} `json:"skipHostKeyValidation,omitempty"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &SftpServerLinkedServiceTypeProperties{} + +func (s *SftpServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SftpServerLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SftpServerLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.HostKeyFingerprint = decoded.HostKeyFingerprint + s.Port = decoded.Port + s.PrivateKeyPath = decoded.PrivateKeyPath + s.SkipHostKeyValidation = decoded.SkipHostKeyValidation + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SftpServerLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["passPhrase"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PassPhrase' for 'SftpServerLinkedServiceTypeProperties': %+v", err) + } + s.PassPhrase = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SftpServerLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["privateKeyContent"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PrivateKeyContent' for 'SftpServerLinkedServiceTypeProperties': %+v", err) + } + s.PrivateKeyContent = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservice.go new file mode 100644 index 00000000000..17804ebc36d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SharePointOnlineListLinkedService{} + +type SharePointOnlineListLinkedService struct { + TypeProperties SharePointOnlineListLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SharePointOnlineListLinkedService{} + +func (s SharePointOnlineListLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SharePointOnlineListLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SharePointOnlineListLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SharePointOnlineListLinkedService: %+v", err) + } + decoded["type"] = "SharePointOnlineList" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SharePointOnlineListLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservicetypeproperties.go new file mode 100644 index 00000000000..d9b579e362e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sharepointonlinelistlinkedservicetypeproperties.go @@ -0,0 +1,46 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SharePointOnlineListLinkedServiceTypeProperties struct { + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + ServicePrincipalId interface{} `json:"servicePrincipalId"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + SiteUrl interface{} `json:"siteUrl"` + TenantId interface{} `json:"tenantId"` +} + +var _ json.Unmarshaler = &SharePointOnlineListLinkedServiceTypeProperties{} + +func (s *SharePointOnlineListLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SharePointOnlineListLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SharePointOnlineListLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.ServicePrincipalId = decoded.ServicePrincipalId + s.SiteUrl = decoded.SiteUrl + s.TenantId = decoded.TenantId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SharePointOnlineListLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'SharePointOnlineListLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservice.go new file mode 100644 index 00000000000..bf8a2ff940a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ShopifyLinkedService{} + +type ShopifyLinkedService struct { + TypeProperties ShopifyLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ShopifyLinkedService{} + +func (s ShopifyLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ShopifyLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ShopifyLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ShopifyLinkedService: %+v", err) + } + decoded["type"] = "Shopify" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ShopifyLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservicetypeproperties.go new file mode 100644 index 00000000000..6d48e5fb44e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_shopifylinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ShopifyLinkedServiceTypeProperties struct { + AccessToken SecretBase `json:"accessToken"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host interface{} `json:"host"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &ShopifyLinkedServiceTypeProperties{} + +func (s *ShopifyLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ShopifyLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ShopifyLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ShopifyLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessToken' for 'ShopifyLinkedServiceTypeProperties': %+v", err) + } + s.AccessToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservice.go new file mode 100644 index 00000000000..0aaf9444193 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SmartsheetLinkedService{} + +type SmartsheetLinkedService struct { + TypeProperties SmartsheetLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SmartsheetLinkedService{} + +func (s SmartsheetLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SmartsheetLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SmartsheetLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SmartsheetLinkedService: %+v", err) + } + decoded["type"] = "Smartsheet" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SmartsheetLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservicetypeproperties.go new file mode 100644 index 00000000000..2c4ac318c65 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_smartsheetlinkedservicetypeproperties.go @@ -0,0 +1,40 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SmartsheetLinkedServiceTypeProperties struct { + ApiToken SecretBase `json:"apiToken"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` +} + +var _ json.Unmarshaler = &SmartsheetLinkedServiceTypeProperties{} + +func (s *SmartsheetLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SmartsheetLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SmartsheetLinkedServiceTypeProperties: %+v", err) + } + + s.EncryptedCredential = decoded.EncryptedCredential + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SmartsheetLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["apiToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ApiToken' for 'SmartsheetLinkedServiceTypeProperties': %+v", err) + } + s.ApiToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservice.go new file mode 100644 index 00000000000..d161a18c06d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SnowflakeLinkedService{} + +type SnowflakeLinkedService struct { + TypeProperties SnowflakeLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SnowflakeLinkedService{} + +func (s SnowflakeLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SnowflakeLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SnowflakeLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SnowflakeLinkedService: %+v", err) + } + decoded["type"] = "Snowflake" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SnowflakeLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservicetypeproperties.go new file mode 100644 index 00000000000..aaf508d1a5a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeLinkedServiceTypeProperties struct { + ConnectionString interface{} `json:"connectionString"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password *AzureKeyVaultSecretReference `json:"password,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedv2servicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedv2servicetypeproperties.go new file mode 100644 index 00000000000..85b7ac21dc8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakelinkedv2servicetypeproperties.go @@ -0,0 +1,83 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeLinkedV2ServiceTypeProperties struct { + AccountIdentifier interface{} `json:"accountIdentifier"` + AuthenticationType *SnowflakeAuthenticationType `json:"authenticationType,omitempty"` + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + Database interface{} `json:"database"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + PrivateKey SecretBase `json:"privateKey"` + PrivateKeyPassphrase SecretBase `json:"privateKeyPassphrase"` + Scope *interface{} `json:"scope,omitempty"` + TenantId *interface{} `json:"tenantId,omitempty"` + User *interface{} `json:"user,omitempty"` + Warehouse interface{} `json:"warehouse"` +} + +var _ json.Unmarshaler = &SnowflakeLinkedV2ServiceTypeProperties{} + +func (s *SnowflakeLinkedV2ServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SnowflakeLinkedV2ServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SnowflakeLinkedV2ServiceTypeProperties: %+v", err) + } + + s.AccountIdentifier = decoded.AccountIdentifier + s.AuthenticationType = decoded.AuthenticationType + s.ClientId = decoded.ClientId + s.Database = decoded.Database + s.EncryptedCredential = decoded.EncryptedCredential + s.Scope = decoded.Scope + s.TenantId = decoded.TenantId + s.User = decoded.User + s.Warehouse = decoded.Warehouse + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SnowflakeLinkedV2ServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["privateKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PrivateKey' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) + } + s.PrivateKey = impl + } + + if v, ok := temp["privateKeyPassphrase"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PrivateKeyPassphrase' for 'SnowflakeLinkedV2ServiceTypeProperties': %+v", err) + } + s.PrivateKeyPassphrase = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakev2linkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakev2linkedservice.go new file mode 100644 index 00000000000..5bdd9fe2e75 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_snowflakev2linkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SnowflakeV2LinkedService{} + +type SnowflakeV2LinkedService struct { + TypeProperties SnowflakeLinkedV2ServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SnowflakeV2LinkedService{} + +func (s SnowflakeV2LinkedService) MarshalJSON() ([]byte, error) { + type wrapper SnowflakeV2LinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SnowflakeV2LinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SnowflakeV2LinkedService: %+v", err) + } + decoded["type"] = "SnowflakeV2" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SnowflakeV2LinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservice.go new file mode 100644 index 00000000000..cdf95071e13 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SparkLinkedService{} + +type SparkLinkedService struct { + TypeProperties SparkLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SparkLinkedService{} + +func (s SparkLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SparkLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SparkLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SparkLinkedService: %+v", err) + } + decoded["type"] = "Spark" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SparkLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservicetypeproperties.go new file mode 100644 index 00000000000..03b2abf8ce3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sparklinkedservicetypeproperties.go @@ -0,0 +1,64 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SparkLinkedServiceTypeProperties struct { + AllowHostNameCNMismatch *interface{} `json:"allowHostNameCNMismatch,omitempty"` + AllowSelfSignedServerCert *interface{} `json:"allowSelfSignedServerCert,omitempty"` + AuthenticationType SparkAuthenticationType `json:"authenticationType"` + EnableSsl *interface{} `json:"enableSsl,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + HTTPPath *interface{} `json:"httpPath,omitempty"` + Host interface{} `json:"host"` + Password SecretBase `json:"password"` + Port interface{} `json:"port"` + ServerType *SparkServerType `json:"serverType,omitempty"` + ThriftTransportProtocol *SparkThriftTransportProtocol `json:"thriftTransportProtocol,omitempty"` + TrustedCertPath *interface{} `json:"trustedCertPath,omitempty"` + UseSystemTrustStore *interface{} `json:"useSystemTrustStore,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &SparkLinkedServiceTypeProperties{} + +func (s *SparkLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SparkLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SparkLinkedServiceTypeProperties: %+v", err) + } + + s.AllowHostNameCNMismatch = decoded.AllowHostNameCNMismatch + s.AllowSelfSignedServerCert = decoded.AllowSelfSignedServerCert + s.AuthenticationType = decoded.AuthenticationType + s.EnableSsl = decoded.EnableSsl + s.EncryptedCredential = decoded.EncryptedCredential + s.HTTPPath = decoded.HTTPPath + s.Host = decoded.Host + s.Port = decoded.Port + s.ServerType = decoded.ServerType + s.ThriftTransportProtocol = decoded.ThriftTransportProtocol + s.TrustedCertPath = decoded.TrustedCertPath + s.UseSystemTrustStore = decoded.UseSystemTrustStore + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SparkLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SparkLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlalwaysencryptedproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlalwaysencryptedproperties.go new file mode 100644 index 00000000000..236a5064351 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlalwaysencryptedproperties.go @@ -0,0 +1,44 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlAlwaysEncryptedProperties struct { + AlwaysEncryptedAkvAuthType SqlAlwaysEncryptedAkvAuthType `json:"alwaysEncryptedAkvAuthType"` + Credential *CredentialReference `json:"credential,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` +} + +var _ json.Unmarshaler = &SqlAlwaysEncryptedProperties{} + +func (s *SqlAlwaysEncryptedProperties) UnmarshalJSON(bytes []byte) error { + type alias SqlAlwaysEncryptedProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SqlAlwaysEncryptedProperties: %+v", err) + } + + s.AlwaysEncryptedAkvAuthType = decoded.AlwaysEncryptedAkvAuthType + s.Credential = decoded.Credential + s.ServicePrincipalId = decoded.ServicePrincipalId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SqlAlwaysEncryptedProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'SqlAlwaysEncryptedProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservice.go new file mode 100644 index 00000000000..ee9daae3176 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SqlServerLinkedService{} + +type SqlServerLinkedService struct { + TypeProperties SqlServerLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SqlServerLinkedService{} + +func (s SqlServerLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SqlServerLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SqlServerLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SqlServerLinkedService: %+v", err) + } + decoded["type"] = "SqlServer" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SqlServerLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservicetypeproperties.go new file mode 100644 index 00000000000..1f5e67613e7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sqlserverlinkedservicetypeproperties.go @@ -0,0 +1,46 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlServerLinkedServiceTypeProperties struct { + AlwaysEncryptedSettings *SqlAlwaysEncryptedProperties `json:"alwaysEncryptedSettings,omitempty"` + ConnectionString interface{} `json:"connectionString"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &SqlServerLinkedServiceTypeProperties{} + +func (s *SqlServerLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SqlServerLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SqlServerLinkedServiceTypeProperties: %+v", err) + } + + s.AlwaysEncryptedSettings = decoded.AlwaysEncryptedSettings + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SqlServerLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SqlServerLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservice.go new file mode 100644 index 00000000000..3babb1ae9f2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SquareLinkedService{} + +type SquareLinkedService struct { + TypeProperties SquareLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SquareLinkedService{} + +func (s SquareLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SquareLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SquareLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SquareLinkedService: %+v", err) + } + decoded["type"] = "Square" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SquareLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservicetypeproperties.go new file mode 100644 index 00000000000..943842ac0c3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_squarelinkedservicetypeproperties.go @@ -0,0 +1,54 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SquareLinkedServiceTypeProperties struct { + ClientId *interface{} `json:"clientId,omitempty"` + ClientSecret SecretBase `json:"clientSecret"` + ConnectionProperties *interface{} `json:"connectionProperties,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host *interface{} `json:"host,omitempty"` + RedirectUri *interface{} `json:"redirectUri,omitempty"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &SquareLinkedServiceTypeProperties{} + +func (s *SquareLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SquareLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SquareLinkedServiceTypeProperties: %+v", err) + } + + s.ClientId = decoded.ClientId + s.ConnectionProperties = decoded.ConnectionProperties + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.RedirectUri = decoded.RedirectUri + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SquareLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["clientSecret"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ClientSecret' for 'SquareLinkedServiceTypeProperties': %+v", err) + } + s.ClientSecret = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservice.go new file mode 100644 index 00000000000..4f5d004632f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = SybaseLinkedService{} + +type SybaseLinkedService struct { + TypeProperties SybaseLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = SybaseLinkedService{} + +func (s SybaseLinkedService) MarshalJSON() ([]byte, error) { + type wrapper SybaseLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SybaseLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SybaseLinkedService: %+v", err) + } + decoded["type"] = "Sybase" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SybaseLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservicetypeproperties.go new file mode 100644 index 00000000000..99e938edfd8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_sybaselinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SybaseLinkedServiceTypeProperties struct { + AuthenticationType *SybaseAuthenticationType `json:"authenticationType,omitempty"` + Database interface{} `json:"database"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Schema *interface{} `json:"schema,omitempty"` + Server interface{} `json:"server"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &SybaseLinkedServiceTypeProperties{} + +func (s *SybaseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SybaseLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SybaseLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.Database = decoded.Database + s.EncryptedCredential = decoded.EncryptedCredential + s.Schema = decoded.Schema + s.Server = decoded.Server + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SybaseLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SybaseLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservice.go new file mode 100644 index 00000000000..b0027c8fa24 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = TeamDeskLinkedService{} + +type TeamDeskLinkedService struct { + TypeProperties TeamDeskLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = TeamDeskLinkedService{} + +func (s TeamDeskLinkedService) MarshalJSON() ([]byte, error) { + type wrapper TeamDeskLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TeamDeskLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TeamDeskLinkedService: %+v", err) + } + decoded["type"] = "TeamDesk" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TeamDeskLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservicetypeproperties.go new file mode 100644 index 00000000000..bbd7a0b38c8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teamdesklinkedservicetypeproperties.go @@ -0,0 +1,55 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TeamDeskLinkedServiceTypeProperties struct { + ApiToken SecretBase `json:"apiToken"` + AuthenticationType TeamDeskAuthenticationType `json:"authenticationType"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Url interface{} `json:"url"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &TeamDeskLinkedServiceTypeProperties{} + +func (s *TeamDeskLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias TeamDeskLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into TeamDeskLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling TeamDeskLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["apiToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ApiToken' for 'TeamDeskLinkedServiceTypeProperties': %+v", err) + } + s.ApiToken = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'TeamDeskLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservice.go new file mode 100644 index 00000000000..366f108b3ed --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = TeradataLinkedService{} + +type TeradataLinkedService struct { + TypeProperties TeradataLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = TeradataLinkedService{} + +func (s TeradataLinkedService) MarshalJSON() ([]byte, error) { + type wrapper TeradataLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TeradataLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TeradataLinkedService: %+v", err) + } + decoded["type"] = "Teradata" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TeradataLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservicetypeproperties.go new file mode 100644 index 00000000000..3c046f9232f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_teradatalinkedservicetypeproperties.go @@ -0,0 +1,48 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TeradataLinkedServiceTypeProperties struct { + AuthenticationType *TeradataAuthenticationType `json:"authenticationType,omitempty"` + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Server *interface{} `json:"server,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &TeradataLinkedServiceTypeProperties{} + +func (s *TeradataLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias TeradataLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into TeradataLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.ConnectionString = decoded.ConnectionString + s.EncryptedCredential = decoded.EncryptedCredential + s.Server = decoded.Server + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling TeradataLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'TeradataLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservice.go new file mode 100644 index 00000000000..fd4fcc5dcca --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = TwilioLinkedService{} + +type TwilioLinkedService struct { + TypeProperties TwilioLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = TwilioLinkedService{} + +func (s TwilioLinkedService) MarshalJSON() ([]byte, error) { + type wrapper TwilioLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TwilioLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TwilioLinkedService: %+v", err) + } + decoded["type"] = "Twilio" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TwilioLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservicetypeproperties.go new file mode 100644 index 00000000000..52047c10852 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_twiliolinkedservicetypeproperties.go @@ -0,0 +1,40 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TwilioLinkedServiceTypeProperties struct { + Password SecretBase `json:"password"` + UserName interface{} `json:"userName"` +} + +var _ json.Unmarshaler = &TwilioLinkedServiceTypeProperties{} + +func (s *TwilioLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias TwilioLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into TwilioLinkedServiceTypeProperties: %+v", err) + } + + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling TwilioLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'TwilioLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservice.go new file mode 100644 index 00000000000..7564a8a5698 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = VerticaLinkedService{} + +type VerticaLinkedService struct { + TypeProperties VerticaLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = VerticaLinkedService{} + +func (s VerticaLinkedService) MarshalJSON() ([]byte, error) { + type wrapper VerticaLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling VerticaLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling VerticaLinkedService: %+v", err) + } + decoded["type"] = "Vertica" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling VerticaLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservicetypeproperties.go new file mode 100644 index 00000000000..5d98821078d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_verticalinkedservicetypeproperties.go @@ -0,0 +1,10 @@ +package linkedservices + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VerticaLinkedServiceTypeProperties struct { + ConnectionString *interface{} `json:"connectionString,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Pwd *AzureKeyVaultSecretReference `json:"pwd,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservice.go new file mode 100644 index 00000000000..bd621c61218 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = WarehouseLinkedService{} + +type WarehouseLinkedService struct { + TypeProperties WarehouseLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = WarehouseLinkedService{} + +func (s WarehouseLinkedService) MarshalJSON() ([]byte, error) { + type wrapper WarehouseLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WarehouseLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WarehouseLinkedService: %+v", err) + } + decoded["type"] = "Warehouse" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WarehouseLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservicetypeproperties.go new file mode 100644 index 00000000000..d6afd89992f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_warehouselinkedservicetypeproperties.go @@ -0,0 +1,61 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WarehouseLinkedServiceTypeProperties struct { + ArtifactId interface{} `json:"artifactId"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint interface{} `json:"endpoint"` + ServicePrincipalCredential SecretBase `json:"servicePrincipalCredential"` + ServicePrincipalCredentialType *interface{} `json:"servicePrincipalCredentialType,omitempty"` + ServicePrincipalId *interface{} `json:"servicePrincipalId,omitempty"` + ServicePrincipalKey SecretBase `json:"servicePrincipalKey"` + Tenant *interface{} `json:"tenant,omitempty"` + WorkspaceId *interface{} `json:"workspaceId,omitempty"` +} + +var _ json.Unmarshaler = &WarehouseLinkedServiceTypeProperties{} + +func (s *WarehouseLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias WarehouseLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into WarehouseLinkedServiceTypeProperties: %+v", err) + } + + s.ArtifactId = decoded.ArtifactId + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.ServicePrincipalCredentialType = decoded.ServicePrincipalCredentialType + s.ServicePrincipalId = decoded.ServicePrincipalId + s.Tenant = decoded.Tenant + s.WorkspaceId = decoded.WorkspaceId + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling WarehouseLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["servicePrincipalCredential"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalCredential' for 'WarehouseLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalCredential = impl + } + + if v, ok := temp["servicePrincipalKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ServicePrincipalKey' for 'WarehouseLinkedServiceTypeProperties': %+v", err) + } + s.ServicePrincipalKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_webanonymousauthentication.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_webanonymousauthentication.go new file mode 100644 index 00000000000..4fa6b684ce0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_webanonymousauthentication.go @@ -0,0 +1,41 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ WebLinkedServiceTypeProperties = WebAnonymousAuthentication{} + +type WebAnonymousAuthentication struct { + + // Fields inherited from WebLinkedServiceTypeProperties + Url interface{} `json:"url"` +} + +var _ json.Marshaler = WebAnonymousAuthentication{} + +func (s WebAnonymousAuthentication) MarshalJSON() ([]byte, error) { + type wrapper WebAnonymousAuthentication + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebAnonymousAuthentication: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebAnonymousAuthentication: %+v", err) + } + decoded["authenticationType"] = "Anonymous" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebAnonymousAuthentication: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_webbasicauthentication.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_webbasicauthentication.go new file mode 100644 index 00000000000..118b6040531 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_webbasicauthentication.go @@ -0,0 +1,70 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ WebLinkedServiceTypeProperties = WebBasicAuthentication{} + +type WebBasicAuthentication struct { + Password SecretBase `json:"password"` + Username interface{} `json:"username"` + + // Fields inherited from WebLinkedServiceTypeProperties + Url interface{} `json:"url"` +} + +var _ json.Marshaler = WebBasicAuthentication{} + +func (s WebBasicAuthentication) MarshalJSON() ([]byte, error) { + type wrapper WebBasicAuthentication + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebBasicAuthentication: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebBasicAuthentication: %+v", err) + } + decoded["authenticationType"] = "Basic" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebBasicAuthentication: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &WebBasicAuthentication{} + +func (s *WebBasicAuthentication) UnmarshalJSON(bytes []byte) error { + type alias WebBasicAuthentication + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into WebBasicAuthentication: %+v", err) + } + + s.Url = decoded.Url + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling WebBasicAuthentication into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'WebBasicAuthentication': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_webclientcertificateauthentication.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_webclientcertificateauthentication.go new file mode 100644 index 00000000000..91d257d09e9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_webclientcertificateauthentication.go @@ -0,0 +1,77 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ WebLinkedServiceTypeProperties = WebClientCertificateAuthentication{} + +type WebClientCertificateAuthentication struct { + Password SecretBase `json:"password"` + Pfx SecretBase `json:"pfx"` + + // Fields inherited from WebLinkedServiceTypeProperties + Url interface{} `json:"url"` +} + +var _ json.Marshaler = WebClientCertificateAuthentication{} + +func (s WebClientCertificateAuthentication) MarshalJSON() ([]byte, error) { + type wrapper WebClientCertificateAuthentication + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebClientCertificateAuthentication: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebClientCertificateAuthentication: %+v", err) + } + decoded["authenticationType"] = "ClientCertificate" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebClientCertificateAuthentication: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &WebClientCertificateAuthentication{} + +func (s *WebClientCertificateAuthentication) UnmarshalJSON(bytes []byte) error { + type alias WebClientCertificateAuthentication + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into WebClientCertificateAuthentication: %+v", err) + } + + s.Url = decoded.Url + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling WebClientCertificateAuthentication into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'WebClientCertificateAuthentication': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["pfx"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Pfx' for 'WebClientCertificateAuthentication': %+v", err) + } + s.Pfx = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservice.go new file mode 100644 index 00000000000..9580babcbf3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservice.go @@ -0,0 +1,74 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = WebLinkedService{} + +type WebLinkedService struct { + TypeProperties WebLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = WebLinkedService{} + +func (s WebLinkedService) MarshalJSON() ([]byte, error) { + type wrapper WebLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebLinkedService: %+v", err) + } + decoded["type"] = "Web" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebLinkedService: %+v", err) + } + + return encoded, nil +} + +var _ json.Unmarshaler = &WebLinkedService{} + +func (s *WebLinkedService) UnmarshalJSON(bytes []byte) error { + type alias WebLinkedService + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into WebLinkedService: %+v", err) + } + + s.Annotations = decoded.Annotations + s.ConnectVia = decoded.ConnectVia + s.Description = decoded.Description + s.Parameters = decoded.Parameters + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling WebLinkedService into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["typeProperties"]; ok { + impl, err := unmarshalWebLinkedServiceTypePropertiesImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'TypeProperties' for 'WebLinkedService': %+v", err) + } + s.TypeProperties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservicetypeproperties.go new file mode 100644 index 00000000000..86ef4335677 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_weblinkedservicetypeproperties.go @@ -0,0 +1,69 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebLinkedServiceTypeProperties interface { +} + +// RawWebLinkedServiceTypePropertiesImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawWebLinkedServiceTypePropertiesImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalWebLinkedServiceTypePropertiesImplementation(input []byte) (WebLinkedServiceTypeProperties, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling WebLinkedServiceTypeProperties into map[string]interface: %+v", err) + } + + value, ok := temp["authenticationType"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "Anonymous") { + var out WebAnonymousAuthentication + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebAnonymousAuthentication: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Basic") { + var out WebBasicAuthentication + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebBasicAuthentication: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ClientCertificate") { + var out WebClientCertificateAuthentication + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebClientCertificateAuthentication: %+v", err) + } + return out, nil + } + + out := RawWebLinkedServiceTypePropertiesImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservice.go new file mode 100644 index 00000000000..6162a2a7bc9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = XeroLinkedService{} + +type XeroLinkedService struct { + TypeProperties XeroLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = XeroLinkedService{} + +func (s XeroLinkedService) MarshalJSON() ([]byte, error) { + type wrapper XeroLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling XeroLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling XeroLinkedService: %+v", err) + } + decoded["type"] = "Xero" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling XeroLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservicetypeproperties.go new file mode 100644 index 00000000000..24bb336cfeb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_xerolinkedservicetypeproperties.go @@ -0,0 +1,59 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type XeroLinkedServiceTypeProperties struct { + ConnectionProperties *interface{} `json:"connectionProperties,omitempty"` + ConsumerKey SecretBase `json:"consumerKey"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Host *interface{} `json:"host,omitempty"` + PrivateKey SecretBase `json:"privateKey"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &XeroLinkedServiceTypeProperties{} + +func (s *XeroLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias XeroLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into XeroLinkedServiceTypeProperties: %+v", err) + } + + s.ConnectionProperties = decoded.ConnectionProperties + s.EncryptedCredential = decoded.EncryptedCredential + s.Host = decoded.Host + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling XeroLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["consumerKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ConsumerKey' for 'XeroLinkedServiceTypeProperties': %+v", err) + } + s.ConsumerKey = impl + } + + if v, ok := temp["privateKey"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PrivateKey' for 'XeroLinkedServiceTypeProperties': %+v", err) + } + s.PrivateKey = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservice.go new file mode 100644 index 00000000000..865c7b7dd3b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ZendeskLinkedService{} + +type ZendeskLinkedService struct { + TypeProperties ZendeskLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ZendeskLinkedService{} + +func (s ZendeskLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ZendeskLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ZendeskLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ZendeskLinkedService: %+v", err) + } + decoded["type"] = "Zendesk" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ZendeskLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservicetypeproperties.go new file mode 100644 index 00000000000..9be4ef59a89 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zendesklinkedservicetypeproperties.go @@ -0,0 +1,55 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ZendeskLinkedServiceTypeProperties struct { + ApiToken SecretBase `json:"apiToken"` + AuthenticationType ZendeskAuthenticationType `json:"authenticationType"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Password SecretBase `json:"password"` + Url interface{} `json:"url"` + UserName *interface{} `json:"userName,omitempty"` +} + +var _ json.Unmarshaler = &ZendeskLinkedServiceTypeProperties{} + +func (s *ZendeskLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ZendeskLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ZendeskLinkedServiceTypeProperties: %+v", err) + } + + s.AuthenticationType = decoded.AuthenticationType + s.EncryptedCredential = decoded.EncryptedCredential + s.Url = decoded.Url + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ZendeskLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["apiToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'ApiToken' for 'ZendeskLinkedServiceTypeProperties': %+v", err) + } + s.ApiToken = impl + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'ZendeskLinkedServiceTypeProperties': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservice.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservice.go new file mode 100644 index 00000000000..e83da2c4b8a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservice.go @@ -0,0 +1,45 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ LinkedService = ZohoLinkedService{} + +type ZohoLinkedService struct { + TypeProperties ZohoLinkedServiceTypeProperties `json:"typeProperties"` + + // Fields inherited from LinkedService + Annotations *[]interface{} `json:"annotations,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Description *string `json:"description,omitempty"` + Parameters *map[string]ParameterSpecification `json:"parameters,omitempty"` +} + +var _ json.Marshaler = ZohoLinkedService{} + +func (s ZohoLinkedService) MarshalJSON() ([]byte, error) { + type wrapper ZohoLinkedService + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ZohoLinkedService: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ZohoLinkedService: %+v", err) + } + decoded["type"] = "Zoho" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ZohoLinkedService: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservicetypeproperties.go b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservicetypeproperties.go new file mode 100644 index 00000000000..351e072059f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/linkedservices/model_zoholinkedservicetypeproperties.go @@ -0,0 +1,50 @@ +package linkedservices + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ZohoLinkedServiceTypeProperties struct { + AccessToken SecretBase `json:"accessToken"` + ConnectionProperties *interface{} `json:"connectionProperties,omitempty"` + EncryptedCredential *string `json:"encryptedCredential,omitempty"` + Endpoint *interface{} `json:"endpoint,omitempty"` + UseEncryptedEndpoints *interface{} `json:"useEncryptedEndpoints,omitempty"` + UseHostVerification *interface{} `json:"useHostVerification,omitempty"` + UsePeerVerification *interface{} `json:"usePeerVerification,omitempty"` +} + +var _ json.Unmarshaler = &ZohoLinkedServiceTypeProperties{} + +func (s *ZohoLinkedServiceTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ZohoLinkedServiceTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ZohoLinkedServiceTypeProperties: %+v", err) + } + + s.ConnectionProperties = decoded.ConnectionProperties + s.EncryptedCredential = decoded.EncryptedCredential + s.Endpoint = decoded.Endpoint + s.UseEncryptedEndpoints = decoded.UseEncryptedEndpoints + s.UseHostVerification = decoded.UseHostVerification + s.UsePeerVerification = decoded.UsePeerVerification + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ZohoLinkedServiceTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["accessToken"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'AccessToken' for 'ZohoLinkedServiceTypeProperties': %+v", err) + } + s.AccessToken = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/constants.go b/resource-manager/datafactory/2018-06-01/pipelines/constants.go index 3f824aa4c19..8bb7c18bf2c 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/constants.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/constants.go @@ -94,30 +94,1084 @@ func parseActivityState(input string) (*ActivityState, error) { return &out, nil } +type AzureFunctionActivityMethod string + +const ( + AzureFunctionActivityMethodDELETE AzureFunctionActivityMethod = "DELETE" + AzureFunctionActivityMethodGET AzureFunctionActivityMethod = "GET" + AzureFunctionActivityMethodHEAD AzureFunctionActivityMethod = "HEAD" + AzureFunctionActivityMethodOPTIONS AzureFunctionActivityMethod = "OPTIONS" + AzureFunctionActivityMethodPOST AzureFunctionActivityMethod = "POST" + AzureFunctionActivityMethodPUT AzureFunctionActivityMethod = "PUT" + AzureFunctionActivityMethodTRACE AzureFunctionActivityMethod = "TRACE" +) + +func PossibleValuesForAzureFunctionActivityMethod() []string { + return []string{ + string(AzureFunctionActivityMethodDELETE), + string(AzureFunctionActivityMethodGET), + string(AzureFunctionActivityMethodHEAD), + string(AzureFunctionActivityMethodOPTIONS), + string(AzureFunctionActivityMethodPOST), + string(AzureFunctionActivityMethodPUT), + string(AzureFunctionActivityMethodTRACE), + } +} + +func (s *AzureFunctionActivityMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureFunctionActivityMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureFunctionActivityMethod(input string) (*AzureFunctionActivityMethod, error) { + vals := map[string]AzureFunctionActivityMethod{ + "delete": AzureFunctionActivityMethodDELETE, + "get": AzureFunctionActivityMethodGET, + "head": AzureFunctionActivityMethodHEAD, + "options": AzureFunctionActivityMethodOPTIONS, + "post": AzureFunctionActivityMethodPOST, + "put": AzureFunctionActivityMethodPUT, + "trace": AzureFunctionActivityMethodTRACE, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureFunctionActivityMethod(input) + return &out, nil +} + +type AzureSearchIndexWriteBehaviorType string + +const ( + AzureSearchIndexWriteBehaviorTypeMerge AzureSearchIndexWriteBehaviorType = "Merge" + AzureSearchIndexWriteBehaviorTypeUpload AzureSearchIndexWriteBehaviorType = "Upload" +) + +func PossibleValuesForAzureSearchIndexWriteBehaviorType() []string { + return []string{ + string(AzureSearchIndexWriteBehaviorTypeMerge), + string(AzureSearchIndexWriteBehaviorTypeUpload), + } +} + +func (s *AzureSearchIndexWriteBehaviorType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAzureSearchIndexWriteBehaviorType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAzureSearchIndexWriteBehaviorType(input string) (*AzureSearchIndexWriteBehaviorType, error) { + vals := map[string]AzureSearchIndexWriteBehaviorType{ + "merge": AzureSearchIndexWriteBehaviorTypeMerge, + "upload": AzureSearchIndexWriteBehaviorTypeUpload, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AzureSearchIndexWriteBehaviorType(input) + return &out, nil +} + +type BigDataPoolReferenceType string + +const ( + BigDataPoolReferenceTypeBigDataPoolReference BigDataPoolReferenceType = "BigDataPoolReference" +) + +func PossibleValuesForBigDataPoolReferenceType() []string { + return []string{ + string(BigDataPoolReferenceTypeBigDataPoolReference), + } +} + +func (s *BigDataPoolReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBigDataPoolReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBigDataPoolReferenceType(input string) (*BigDataPoolReferenceType, error) { + vals := map[string]BigDataPoolReferenceType{ + "bigdatapoolreference": BigDataPoolReferenceTypeBigDataPoolReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BigDataPoolReferenceType(input) + return &out, nil +} + +type CassandraSourceReadConsistencyLevels string + +const ( + CassandraSourceReadConsistencyLevelsALL CassandraSourceReadConsistencyLevels = "ALL" + CassandraSourceReadConsistencyLevelsEACHQUORUM CassandraSourceReadConsistencyLevels = "EACH_QUORUM" + CassandraSourceReadConsistencyLevelsLOCALONE CassandraSourceReadConsistencyLevels = "LOCAL_ONE" + CassandraSourceReadConsistencyLevelsLOCALQUORUM CassandraSourceReadConsistencyLevels = "LOCAL_QUORUM" + CassandraSourceReadConsistencyLevelsLOCALSERIAL CassandraSourceReadConsistencyLevels = "LOCAL_SERIAL" + CassandraSourceReadConsistencyLevelsONE CassandraSourceReadConsistencyLevels = "ONE" + CassandraSourceReadConsistencyLevelsQUORUM CassandraSourceReadConsistencyLevels = "QUORUM" + CassandraSourceReadConsistencyLevelsSERIAL CassandraSourceReadConsistencyLevels = "SERIAL" + CassandraSourceReadConsistencyLevelsTHREE CassandraSourceReadConsistencyLevels = "THREE" + CassandraSourceReadConsistencyLevelsTWO CassandraSourceReadConsistencyLevels = "TWO" +) + +func PossibleValuesForCassandraSourceReadConsistencyLevels() []string { + return []string{ + string(CassandraSourceReadConsistencyLevelsALL), + string(CassandraSourceReadConsistencyLevelsEACHQUORUM), + string(CassandraSourceReadConsistencyLevelsLOCALONE), + string(CassandraSourceReadConsistencyLevelsLOCALQUORUM), + string(CassandraSourceReadConsistencyLevelsLOCALSERIAL), + string(CassandraSourceReadConsistencyLevelsONE), + string(CassandraSourceReadConsistencyLevelsQUORUM), + string(CassandraSourceReadConsistencyLevelsSERIAL), + string(CassandraSourceReadConsistencyLevelsTHREE), + string(CassandraSourceReadConsistencyLevelsTWO), + } +} + +func (s *CassandraSourceReadConsistencyLevels) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCassandraSourceReadConsistencyLevels(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCassandraSourceReadConsistencyLevels(input string) (*CassandraSourceReadConsistencyLevels, error) { + vals := map[string]CassandraSourceReadConsistencyLevels{ + "all": CassandraSourceReadConsistencyLevelsALL, + "each_quorum": CassandraSourceReadConsistencyLevelsEACHQUORUM, + "local_one": CassandraSourceReadConsistencyLevelsLOCALONE, + "local_quorum": CassandraSourceReadConsistencyLevelsLOCALQUORUM, + "local_serial": CassandraSourceReadConsistencyLevelsLOCALSERIAL, + "one": CassandraSourceReadConsistencyLevelsONE, + "quorum": CassandraSourceReadConsistencyLevelsQUORUM, + "serial": CassandraSourceReadConsistencyLevelsSERIAL, + "three": CassandraSourceReadConsistencyLevelsTHREE, + "two": CassandraSourceReadConsistencyLevelsTWO, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CassandraSourceReadConsistencyLevels(input) + return &out, nil +} + +type ConfigurationType string + +const ( + ConfigurationTypeArtifact ConfigurationType = "Artifact" + ConfigurationTypeCustomized ConfigurationType = "Customized" + ConfigurationTypeDefault ConfigurationType = "Default" +) + +func PossibleValuesForConfigurationType() []string { + return []string{ + string(ConfigurationTypeArtifact), + string(ConfigurationTypeCustomized), + string(ConfigurationTypeDefault), + } +} + +func (s *ConfigurationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseConfigurationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseConfigurationType(input string) (*ConfigurationType, error) { + vals := map[string]ConfigurationType{ + "artifact": ConfigurationTypeArtifact, + "customized": ConfigurationTypeCustomized, + "default": ConfigurationTypeDefault, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ConfigurationType(input) + return &out, nil +} + +type CredentialReferenceType string + +const ( + CredentialReferenceTypeCredentialReference CredentialReferenceType = "CredentialReference" +) + +func PossibleValuesForCredentialReferenceType() []string { + return []string{ + string(CredentialReferenceTypeCredentialReference), + } +} + +func (s *CredentialReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCredentialReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCredentialReferenceType(input string) (*CredentialReferenceType, error) { + vals := map[string]CredentialReferenceType{ + "credentialreference": CredentialReferenceTypeCredentialReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CredentialReferenceType(input) + return &out, nil +} + +type DataFlowReferenceType string + +const ( + DataFlowReferenceTypeDataFlowReference DataFlowReferenceType = "DataFlowReference" +) + +func PossibleValuesForDataFlowReferenceType() []string { + return []string{ + string(DataFlowReferenceTypeDataFlowReference), + } +} + +func (s *DataFlowReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDataFlowReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDataFlowReferenceType(input string) (*DataFlowReferenceType, error) { + vals := map[string]DataFlowReferenceType{ + "dataflowreference": DataFlowReferenceTypeDataFlowReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DataFlowReferenceType(input) + return &out, nil +} + +type DatasetReferenceType string + +const ( + DatasetReferenceTypeDatasetReference DatasetReferenceType = "DatasetReference" +) + +func PossibleValuesForDatasetReferenceType() []string { + return []string{ + string(DatasetReferenceTypeDatasetReference), + } +} + +func (s *DatasetReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDatasetReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDatasetReferenceType(input string) (*DatasetReferenceType, error) { + vals := map[string]DatasetReferenceType{ + "datasetreference": DatasetReferenceTypeDatasetReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DatasetReferenceType(input) + return &out, nil +} + type DependencyCondition string const ( - DependencyConditionCompleted DependencyCondition = "Completed" - DependencyConditionFailed DependencyCondition = "Failed" - DependencyConditionSkipped DependencyCondition = "Skipped" - DependencyConditionSucceeded DependencyCondition = "Succeeded" + DependencyConditionCompleted DependencyCondition = "Completed" + DependencyConditionFailed DependencyCondition = "Failed" + DependencyConditionSkipped DependencyCondition = "Skipped" + DependencyConditionSucceeded DependencyCondition = "Succeeded" +) + +func PossibleValuesForDependencyCondition() []string { + return []string{ + string(DependencyConditionCompleted), + string(DependencyConditionFailed), + string(DependencyConditionSkipped), + string(DependencyConditionSucceeded), + } +} + +func (s *DependencyCondition) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDependencyCondition(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDependencyCondition(input string) (*DependencyCondition, error) { + vals := map[string]DependencyCondition{ + "completed": DependencyConditionCompleted, + "failed": DependencyConditionFailed, + "skipped": DependencyConditionSkipped, + "succeeded": DependencyConditionSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DependencyCondition(input) + return &out, nil +} + +type DynamicsSinkWriteBehavior string + +const ( + DynamicsSinkWriteBehaviorUpsert DynamicsSinkWriteBehavior = "Upsert" +) + +func PossibleValuesForDynamicsSinkWriteBehavior() []string { + return []string{ + string(DynamicsSinkWriteBehaviorUpsert), + } +} + +func (s *DynamicsSinkWriteBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDynamicsSinkWriteBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDynamicsSinkWriteBehavior(input string) (*DynamicsSinkWriteBehavior, error) { + vals := map[string]DynamicsSinkWriteBehavior{ + "upsert": DynamicsSinkWriteBehaviorUpsert, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DynamicsSinkWriteBehavior(input) + return &out, nil +} + +type ExpressionType string + +const ( + ExpressionTypeExpression ExpressionType = "Expression" +) + +func PossibleValuesForExpressionType() []string { + return []string{ + string(ExpressionTypeExpression), + } +} + +func (s *ExpressionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExpressionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExpressionType(input string) (*ExpressionType, error) { + vals := map[string]ExpressionType{ + "expression": ExpressionTypeExpression, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExpressionType(input) + return &out, nil +} + +type ExpressionV2Type string + +const ( + ExpressionV2TypeBinary ExpressionV2Type = "Binary" + ExpressionV2TypeConstant ExpressionV2Type = "Constant" + ExpressionV2TypeField ExpressionV2Type = "Field" + ExpressionV2TypeUnary ExpressionV2Type = "Unary" +) + +func PossibleValuesForExpressionV2Type() []string { + return []string{ + string(ExpressionV2TypeBinary), + string(ExpressionV2TypeConstant), + string(ExpressionV2TypeField), + string(ExpressionV2TypeUnary), + } +} + +func (s *ExpressionV2Type) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExpressionV2Type(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExpressionV2Type(input string) (*ExpressionV2Type, error) { + vals := map[string]ExpressionV2Type{ + "binary": ExpressionV2TypeBinary, + "constant": ExpressionV2TypeConstant, + "field": ExpressionV2TypeField, + "unary": ExpressionV2TypeUnary, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExpressionV2Type(input) + return &out, nil +} + +type HDInsightActivityDebugInfoOption string + +const ( + HDInsightActivityDebugInfoOptionAlways HDInsightActivityDebugInfoOption = "Always" + HDInsightActivityDebugInfoOptionFailure HDInsightActivityDebugInfoOption = "Failure" + HDInsightActivityDebugInfoOptionNone HDInsightActivityDebugInfoOption = "None" +) + +func PossibleValuesForHDInsightActivityDebugInfoOption() []string { + return []string{ + string(HDInsightActivityDebugInfoOptionAlways), + string(HDInsightActivityDebugInfoOptionFailure), + string(HDInsightActivityDebugInfoOptionNone), + } +} + +func (s *HDInsightActivityDebugInfoOption) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHDInsightActivityDebugInfoOption(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHDInsightActivityDebugInfoOption(input string) (*HDInsightActivityDebugInfoOption, error) { + vals := map[string]HDInsightActivityDebugInfoOption{ + "always": HDInsightActivityDebugInfoOptionAlways, + "failure": HDInsightActivityDebugInfoOptionFailure, + "none": HDInsightActivityDebugInfoOptionNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HDInsightActivityDebugInfoOption(input) + return &out, nil +} + +type IntegrationRuntimeReferenceType string + +const ( + IntegrationRuntimeReferenceTypeIntegrationRuntimeReference IntegrationRuntimeReferenceType = "IntegrationRuntimeReference" +) + +func PossibleValuesForIntegrationRuntimeReferenceType() []string { + return []string{ + string(IntegrationRuntimeReferenceTypeIntegrationRuntimeReference), + } +} + +func (s *IntegrationRuntimeReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseIntegrationRuntimeReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseIntegrationRuntimeReferenceType(input string) (*IntegrationRuntimeReferenceType, error) { + vals := map[string]IntegrationRuntimeReferenceType{ + "integrationruntimereference": IntegrationRuntimeReferenceTypeIntegrationRuntimeReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := IntegrationRuntimeReferenceType(input) + return &out, nil +} + +type NotebookParameterType string + +const ( + NotebookParameterTypeBool NotebookParameterType = "bool" + NotebookParameterTypeFloat NotebookParameterType = "float" + NotebookParameterTypeInt NotebookParameterType = "int" + NotebookParameterTypeString NotebookParameterType = "string" +) + +func PossibleValuesForNotebookParameterType() []string { + return []string{ + string(NotebookParameterTypeBool), + string(NotebookParameterTypeFloat), + string(NotebookParameterTypeInt), + string(NotebookParameterTypeString), + } +} + +func (s *NotebookParameterType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNotebookParameterType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNotebookParameterType(input string) (*NotebookParameterType, error) { + vals := map[string]NotebookParameterType{ + "bool": NotebookParameterTypeBool, + "float": NotebookParameterTypeFloat, + "int": NotebookParameterTypeInt, + "string": NotebookParameterTypeString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NotebookParameterType(input) + return &out, nil +} + +type NotebookReferenceType string + +const ( + NotebookReferenceTypeNotebookReference NotebookReferenceType = "NotebookReference" +) + +func PossibleValuesForNotebookReferenceType() []string { + return []string{ + string(NotebookReferenceTypeNotebookReference), + } +} + +func (s *NotebookReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseNotebookReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseNotebookReferenceType(input string) (*NotebookReferenceType, error) { + vals := map[string]NotebookReferenceType{ + "notebookreference": NotebookReferenceTypeNotebookReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := NotebookReferenceType(input) + return &out, nil +} + +type ParameterType string + +const ( + ParameterTypeArray ParameterType = "Array" + ParameterTypeBool ParameterType = "Bool" + ParameterTypeFloat ParameterType = "Float" + ParameterTypeInt ParameterType = "Int" + ParameterTypeObject ParameterType = "Object" + ParameterTypeSecureString ParameterType = "SecureString" + ParameterTypeString ParameterType = "String" +) + +func PossibleValuesForParameterType() []string { + return []string{ + string(ParameterTypeArray), + string(ParameterTypeBool), + string(ParameterTypeFloat), + string(ParameterTypeInt), + string(ParameterTypeObject), + string(ParameterTypeSecureString), + string(ParameterTypeString), + } +} + +func (s *ParameterType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseParameterType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseParameterType(input string) (*ParameterType, error) { + vals := map[string]ParameterType{ + "array": ParameterTypeArray, + "bool": ParameterTypeBool, + "float": ParameterTypeFloat, + "int": ParameterTypeInt, + "object": ParameterTypeObject, + "securestring": ParameterTypeSecureString, + "string": ParameterTypeString, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ParameterType(input) + return &out, nil +} + +type PipelineReferenceType string + +const ( + PipelineReferenceTypePipelineReference PipelineReferenceType = "PipelineReference" +) + +func PossibleValuesForPipelineReferenceType() []string { + return []string{ + string(PipelineReferenceTypePipelineReference), + } +} + +func (s *PipelineReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePipelineReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePipelineReferenceType(input string) (*PipelineReferenceType, error) { + vals := map[string]PipelineReferenceType{ + "pipelinereference": PipelineReferenceTypePipelineReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PipelineReferenceType(input) + return &out, nil +} + +type PolybaseSettingsRejectType string + +const ( + PolybaseSettingsRejectTypePercentage PolybaseSettingsRejectType = "percentage" + PolybaseSettingsRejectTypeValue PolybaseSettingsRejectType = "value" +) + +func PossibleValuesForPolybaseSettingsRejectType() []string { + return []string{ + string(PolybaseSettingsRejectTypePercentage), + string(PolybaseSettingsRejectTypeValue), + } +} + +func (s *PolybaseSettingsRejectType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePolybaseSettingsRejectType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePolybaseSettingsRejectType(input string) (*PolybaseSettingsRejectType, error) { + vals := map[string]PolybaseSettingsRejectType{ + "percentage": PolybaseSettingsRejectTypePercentage, + "value": PolybaseSettingsRejectTypeValue, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PolybaseSettingsRejectType(input) + return &out, nil +} + +type SalesforceSinkWriteBehavior string + +const ( + SalesforceSinkWriteBehaviorInsert SalesforceSinkWriteBehavior = "Insert" + SalesforceSinkWriteBehaviorUpsert SalesforceSinkWriteBehavior = "Upsert" +) + +func PossibleValuesForSalesforceSinkWriteBehavior() []string { + return []string{ + string(SalesforceSinkWriteBehaviorInsert), + string(SalesforceSinkWriteBehaviorUpsert), + } +} + +func (s *SalesforceSinkWriteBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSalesforceSinkWriteBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSalesforceSinkWriteBehavior(input string) (*SalesforceSinkWriteBehavior, error) { + vals := map[string]SalesforceSinkWriteBehavior{ + "insert": SalesforceSinkWriteBehaviorInsert, + "upsert": SalesforceSinkWriteBehaviorUpsert, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SalesforceSinkWriteBehavior(input) + return &out, nil +} + +type SalesforceV2SinkWriteBehavior string + +const ( + SalesforceV2SinkWriteBehaviorInsert SalesforceV2SinkWriteBehavior = "Insert" + SalesforceV2SinkWriteBehaviorUpsert SalesforceV2SinkWriteBehavior = "Upsert" +) + +func PossibleValuesForSalesforceV2SinkWriteBehavior() []string { + return []string{ + string(SalesforceV2SinkWriteBehaviorInsert), + string(SalesforceV2SinkWriteBehaviorUpsert), + } +} + +func (s *SalesforceV2SinkWriteBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSalesforceV2SinkWriteBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSalesforceV2SinkWriteBehavior(input string) (*SalesforceV2SinkWriteBehavior, error) { + vals := map[string]SalesforceV2SinkWriteBehavior{ + "insert": SalesforceV2SinkWriteBehaviorInsert, + "upsert": SalesforceV2SinkWriteBehaviorUpsert, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SalesforceV2SinkWriteBehavior(input) + return &out, nil +} + +type SapCloudForCustomerSinkWriteBehavior string + +const ( + SapCloudForCustomerSinkWriteBehaviorInsert SapCloudForCustomerSinkWriteBehavior = "Insert" + SapCloudForCustomerSinkWriteBehaviorUpdate SapCloudForCustomerSinkWriteBehavior = "Update" +) + +func PossibleValuesForSapCloudForCustomerSinkWriteBehavior() []string { + return []string{ + string(SapCloudForCustomerSinkWriteBehaviorInsert), + string(SapCloudForCustomerSinkWriteBehaviorUpdate), + } +} + +func (s *SapCloudForCustomerSinkWriteBehavior) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSapCloudForCustomerSinkWriteBehavior(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSapCloudForCustomerSinkWriteBehavior(input string) (*SapCloudForCustomerSinkWriteBehavior, error) { + vals := map[string]SapCloudForCustomerSinkWriteBehavior{ + "insert": SapCloudForCustomerSinkWriteBehaviorInsert, + "update": SapCloudForCustomerSinkWriteBehaviorUpdate, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SapCloudForCustomerSinkWriteBehavior(input) + return &out, nil +} + +type ScriptActivityLogDestination string + +const ( + ScriptActivityLogDestinationActivityOutput ScriptActivityLogDestination = "ActivityOutput" + ScriptActivityLogDestinationExternalStore ScriptActivityLogDestination = "ExternalStore" +) + +func PossibleValuesForScriptActivityLogDestination() []string { + return []string{ + string(ScriptActivityLogDestinationActivityOutput), + string(ScriptActivityLogDestinationExternalStore), + } +} + +func (s *ScriptActivityLogDestination) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScriptActivityLogDestination(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScriptActivityLogDestination(input string) (*ScriptActivityLogDestination, error) { + vals := map[string]ScriptActivityLogDestination{ + "activityoutput": ScriptActivityLogDestinationActivityOutput, + "externalstore": ScriptActivityLogDestinationExternalStore, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScriptActivityLogDestination(input) + return &out, nil +} + +type ScriptActivityParameterDirection string + +const ( + ScriptActivityParameterDirectionInput ScriptActivityParameterDirection = "Input" + ScriptActivityParameterDirectionInputOutput ScriptActivityParameterDirection = "InputOutput" + ScriptActivityParameterDirectionOutput ScriptActivityParameterDirection = "Output" +) + +func PossibleValuesForScriptActivityParameterDirection() []string { + return []string{ + string(ScriptActivityParameterDirectionInput), + string(ScriptActivityParameterDirectionInputOutput), + string(ScriptActivityParameterDirectionOutput), + } +} + +func (s *ScriptActivityParameterDirection) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseScriptActivityParameterDirection(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseScriptActivityParameterDirection(input string) (*ScriptActivityParameterDirection, error) { + vals := map[string]ScriptActivityParameterDirection{ + "input": ScriptActivityParameterDirectionInput, + "inputoutput": ScriptActivityParameterDirectionInputOutput, + "output": ScriptActivityParameterDirectionOutput, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ScriptActivityParameterDirection(input) + return &out, nil +} + +type ScriptActivityParameterType string + +const ( + ScriptActivityParameterTypeBoolean ScriptActivityParameterType = "Boolean" + ScriptActivityParameterTypeDateTime ScriptActivityParameterType = "DateTime" + ScriptActivityParameterTypeDateTimeOffset ScriptActivityParameterType = "DateTimeOffset" + ScriptActivityParameterTypeDecimal ScriptActivityParameterType = "Decimal" + ScriptActivityParameterTypeDouble ScriptActivityParameterType = "Double" + ScriptActivityParameterTypeGuid ScriptActivityParameterType = "Guid" + ScriptActivityParameterTypeIntOneSix ScriptActivityParameterType = "Int16" + ScriptActivityParameterTypeIntSixFour ScriptActivityParameterType = "Int64" + ScriptActivityParameterTypeIntThreeTwo ScriptActivityParameterType = "Int32" + ScriptActivityParameterTypeSingle ScriptActivityParameterType = "Single" + ScriptActivityParameterTypeString ScriptActivityParameterType = "String" + ScriptActivityParameterTypeTimespan ScriptActivityParameterType = "Timespan" ) -func PossibleValuesForDependencyCondition() []string { +func PossibleValuesForScriptActivityParameterType() []string { return []string{ - string(DependencyConditionCompleted), - string(DependencyConditionFailed), - string(DependencyConditionSkipped), - string(DependencyConditionSucceeded), + string(ScriptActivityParameterTypeBoolean), + string(ScriptActivityParameterTypeDateTime), + string(ScriptActivityParameterTypeDateTimeOffset), + string(ScriptActivityParameterTypeDecimal), + string(ScriptActivityParameterTypeDouble), + string(ScriptActivityParameterTypeGuid), + string(ScriptActivityParameterTypeIntOneSix), + string(ScriptActivityParameterTypeIntSixFour), + string(ScriptActivityParameterTypeIntThreeTwo), + string(ScriptActivityParameterTypeSingle), + string(ScriptActivityParameterTypeString), + string(ScriptActivityParameterTypeTimespan), } } -func (s *DependencyCondition) UnmarshalJSON(bytes []byte) error { +func (s *ScriptActivityParameterType) UnmarshalJSON(bytes []byte) error { var decoded string if err := json.Unmarshal(bytes, &decoded); err != nil { return fmt.Errorf("unmarshaling: %+v", err) } - out, err := parseDependencyCondition(decoded) + out, err := parseScriptActivityParameterType(decoded) if err != nil { return fmt.Errorf("parsing %q: %+v", decoded, err) } @@ -125,52 +1179,50 @@ func (s *DependencyCondition) UnmarshalJSON(bytes []byte) error { return nil } -func parseDependencyCondition(input string) (*DependencyCondition, error) { - vals := map[string]DependencyCondition{ - "completed": DependencyConditionCompleted, - "failed": DependencyConditionFailed, - "skipped": DependencyConditionSkipped, - "succeeded": DependencyConditionSucceeded, +func parseScriptActivityParameterType(input string) (*ScriptActivityParameterType, error) { + vals := map[string]ScriptActivityParameterType{ + "boolean": ScriptActivityParameterTypeBoolean, + "datetime": ScriptActivityParameterTypeDateTime, + "datetimeoffset": ScriptActivityParameterTypeDateTimeOffset, + "decimal": ScriptActivityParameterTypeDecimal, + "double": ScriptActivityParameterTypeDouble, + "guid": ScriptActivityParameterTypeGuid, + "int16": ScriptActivityParameterTypeIntOneSix, + "int64": ScriptActivityParameterTypeIntSixFour, + "int32": ScriptActivityParameterTypeIntThreeTwo, + "single": ScriptActivityParameterTypeSingle, + "string": ScriptActivityParameterTypeString, + "timespan": ScriptActivityParameterTypeTimespan, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } // otherwise presume it's an undefined value and best-effort it - out := DependencyCondition(input) + out := ScriptActivityParameterType(input) return &out, nil } -type ParameterType string +type ScriptType string const ( - ParameterTypeArray ParameterType = "Array" - ParameterTypeBool ParameterType = "Bool" - ParameterTypeFloat ParameterType = "Float" - ParameterTypeInt ParameterType = "Int" - ParameterTypeObject ParameterType = "Object" - ParameterTypeSecureString ParameterType = "SecureString" - ParameterTypeString ParameterType = "String" + ScriptTypeNonQuery ScriptType = "NonQuery" + ScriptTypeQuery ScriptType = "Query" ) -func PossibleValuesForParameterType() []string { +func PossibleValuesForScriptType() []string { return []string{ - string(ParameterTypeArray), - string(ParameterTypeBool), - string(ParameterTypeFloat), - string(ParameterTypeInt), - string(ParameterTypeObject), - string(ParameterTypeSecureString), - string(ParameterTypeString), + string(ScriptTypeNonQuery), + string(ScriptTypeQuery), } } -func (s *ParameterType) UnmarshalJSON(bytes []byte) error { +func (s *ScriptType) UnmarshalJSON(bytes []byte) error { var decoded string if err := json.Unmarshal(bytes, &decoded); err != nil { return fmt.Errorf("unmarshaling: %+v", err) } - out, err := parseParameterType(decoded) + out, err := parseScriptType(decoded) if err != nil { return fmt.Errorf("parsing %q: %+v", decoded, err) } @@ -178,22 +1230,216 @@ func (s *ParameterType) UnmarshalJSON(bytes []byte) error { return nil } -func parseParameterType(input string) (*ParameterType, error) { - vals := map[string]ParameterType{ - "array": ParameterTypeArray, - "bool": ParameterTypeBool, - "float": ParameterTypeFloat, - "int": ParameterTypeInt, - "object": ParameterTypeObject, - "securestring": ParameterTypeSecureString, - "string": ParameterTypeString, +func parseScriptType(input string) (*ScriptType, error) { + vals := map[string]ScriptType{ + "nonquery": ScriptTypeNonQuery, + "query": ScriptTypeQuery, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } // otherwise presume it's an undefined value and best-effort it - out := ParameterType(input) + out := ScriptType(input) + return &out, nil +} + +type SparkConfigurationReferenceType string + +const ( + SparkConfigurationReferenceTypeSparkConfigurationReference SparkConfigurationReferenceType = "SparkConfigurationReference" +) + +func PossibleValuesForSparkConfigurationReferenceType() []string { + return []string{ + string(SparkConfigurationReferenceTypeSparkConfigurationReference), + } +} + +func (s *SparkConfigurationReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSparkConfigurationReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSparkConfigurationReferenceType(input string) (*SparkConfigurationReferenceType, error) { + vals := map[string]SparkConfigurationReferenceType{ + "sparkconfigurationreference": SparkConfigurationReferenceTypeSparkConfigurationReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SparkConfigurationReferenceType(input) + return &out, nil +} + +type SparkJobReferenceType string + +const ( + SparkJobReferenceTypeSparkJobDefinitionReference SparkJobReferenceType = "SparkJobDefinitionReference" +) + +func PossibleValuesForSparkJobReferenceType() []string { + return []string{ + string(SparkJobReferenceTypeSparkJobDefinitionReference), + } +} + +func (s *SparkJobReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSparkJobReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSparkJobReferenceType(input string) (*SparkJobReferenceType, error) { + vals := map[string]SparkJobReferenceType{ + "sparkjobdefinitionreference": SparkJobReferenceTypeSparkJobDefinitionReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SparkJobReferenceType(input) + return &out, nil +} + +type SsisLogLocationType string + +const ( + SsisLogLocationTypeFile SsisLogLocationType = "File" +) + +func PossibleValuesForSsisLogLocationType() []string { + return []string{ + string(SsisLogLocationTypeFile), + } +} + +func (s *SsisLogLocationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSsisLogLocationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSsisLogLocationType(input string) (*SsisLogLocationType, error) { + vals := map[string]SsisLogLocationType{ + "file": SsisLogLocationTypeFile, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SsisLogLocationType(input) + return &out, nil +} + +type SsisPackageLocationType string + +const ( + SsisPackageLocationTypeFile SsisPackageLocationType = "File" + SsisPackageLocationTypeInlinePackage SsisPackageLocationType = "InlinePackage" + SsisPackageLocationTypePackageStore SsisPackageLocationType = "PackageStore" + SsisPackageLocationTypeSSISDB SsisPackageLocationType = "SSISDB" +) + +func PossibleValuesForSsisPackageLocationType() []string { + return []string{ + string(SsisPackageLocationTypeFile), + string(SsisPackageLocationTypeInlinePackage), + string(SsisPackageLocationTypePackageStore), + string(SsisPackageLocationTypeSSISDB), + } +} + +func (s *SsisPackageLocationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSsisPackageLocationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSsisPackageLocationType(input string) (*SsisPackageLocationType, error) { + vals := map[string]SsisPackageLocationType{ + "file": SsisPackageLocationTypeFile, + "inlinepackage": SsisPackageLocationTypeInlinePackage, + "packagestore": SsisPackageLocationTypePackageStore, + "ssisdb": SsisPackageLocationTypeSSISDB, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SsisPackageLocationType(input) + return &out, nil +} + +type Type string + +const ( + TypeLinkedServiceReference Type = "LinkedServiceReference" +) + +func PossibleValuesForType() []string { + return []string{ + string(TypeLinkedServiceReference), + } +} + +func (s *Type) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseType(input string) (*Type, error) { + vals := map[string]Type{ + "linkedservicereference": TypeLinkedServiceReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Type(input) return &out, nil } @@ -240,3 +1486,88 @@ func parseVariableType(input string) (*VariableType, error) { out := VariableType(input) return &out, nil } + +type WebActivityMethod string + +const ( + WebActivityMethodDELETE WebActivityMethod = "DELETE" + WebActivityMethodGET WebActivityMethod = "GET" + WebActivityMethodPOST WebActivityMethod = "POST" + WebActivityMethodPUT WebActivityMethod = "PUT" +) + +func PossibleValuesForWebActivityMethod() []string { + return []string{ + string(WebActivityMethodDELETE), + string(WebActivityMethodGET), + string(WebActivityMethodPOST), + string(WebActivityMethodPUT), + } +} + +func (s *WebActivityMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWebActivityMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWebActivityMethod(input string) (*WebActivityMethod, error) { + vals := map[string]WebActivityMethod{ + "delete": WebActivityMethodDELETE, + "get": WebActivityMethodGET, + "post": WebActivityMethodPOST, + "put": WebActivityMethodPUT, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WebActivityMethod(input) + return &out, nil +} + +type WebHookActivityMethod string + +const ( + WebHookActivityMethodPOST WebHookActivityMethod = "POST" +) + +func PossibleValuesForWebHookActivityMethod() []string { + return []string{ + string(WebHookActivityMethodPOST), + } +} + +func (s *WebHookActivityMethod) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseWebHookActivityMethod(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseWebHookActivityMethod(input string) (*WebHookActivityMethod, error) { + vals := map[string]WebHookActivityMethod{ + "post": WebHookActivityMethodPOST, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := WebHookActivityMethod(input) + return &out, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go index dfe12c08ba0..f53c2e480c1 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_activity.go @@ -1,14 +1,373 @@ package pipelines +import ( + "encoding/json" + "fmt" + "strings" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type Activity struct { - DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` - Description *string `json:"description,omitempty"` - Name string `json:"name"` - OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` - State *ActivityState `json:"state,omitempty"` - Type string `json:"type"` - UserProperties *[]UserProperty `json:"userProperties,omitempty"` +type Activity interface { +} + +// RawActivityImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawActivityImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalActivityImplementation(input []byte) (Activity, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling Activity into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "AppendVariable") { + var out AppendVariableActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AppendVariableActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureDataExplorerCommand") { + var out AzureDataExplorerCommandActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureDataExplorerCommandActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureFunctionActivity") { + var out AzureFunctionActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureFunctionActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMLBatchExecution") { + var out AzureMLBatchExecutionActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMLBatchExecutionActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMLExecutePipeline") { + var out AzureMLExecutePipelineActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMLExecutePipelineActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AzureMLUpdateResource") { + var out AzureMLUpdateResourceActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AzureMLUpdateResourceActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Container") { + var out ControlActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ControlActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Copy") { + var out CopyActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CopyActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Custom") { + var out CustomActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into CustomActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DataLakeAnalyticsU-SQL") { + var out DataLakeAnalyticsUSQLActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DataLakeAnalyticsUSQLActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DatabricksNotebook") { + var out DatabricksNotebookActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DatabricksNotebookActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DatabricksSparkJar") { + var out DatabricksSparkJarActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DatabricksSparkJarActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DatabricksSparkPython") { + var out DatabricksSparkPythonActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DatabricksSparkPythonActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Delete") { + var out DeleteActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DeleteActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ExecuteDataFlow") { + var out ExecuteDataFlowActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExecuteDataFlowActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ExecutePipeline") { + var out ExecutePipelineActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExecutePipelineActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ExecuteSSISPackage") { + var out ExecuteSSISPackageActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExecuteSSISPackageActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ExecuteWranglingDataflow") { + var out ExecuteWranglingDataflowActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExecuteWranglingDataflowActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Execution") { + var out ExecutionActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ExecutionActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Fail") { + var out FailActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FailActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Filter") { + var out FilterActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FilterActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ForEach") { + var out ForEachActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ForEachActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "GetMetadata") { + var out GetMetadataActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into GetMetadataActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HDInsightHive") { + var out HDInsightHiveActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HDInsightHiveActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HDInsightMapReduce") { + var out HDInsightMapReduceActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HDInsightMapReduceActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HDInsightPig") { + var out HDInsightPigActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HDInsightPigActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HDInsightSpark") { + var out HDInsightSparkActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HDInsightSparkActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "HDInsightStreaming") { + var out HDInsightStreamingActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into HDInsightStreamingActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "IfCondition") { + var out IfConditionActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into IfConditionActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Lookup") { + var out LookupActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LookupActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Script") { + var out ScriptActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ScriptActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SetVariable") { + var out SetVariableActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SetVariableActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SqlServerStoredProcedure") { + var out SqlServerStoredProcedureActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SqlServerStoredProcedureActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Switch") { + var out SwitchActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SwitchActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SynapseNotebook") { + var out SynapseNotebookActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SynapseNotebookActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SparkJob") { + var out SynapseSparkJobDefinitionActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SynapseSparkJobDefinitionActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Until") { + var out UntilActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into UntilActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Validation") { + var out ValidationActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ValidationActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Wait") { + var out WaitActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WaitActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WebActivity") { + var out WebActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebActivity: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WebHook") { + var out WebHookActivity + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebHookActivity: %+v", err) + } + return out, nil + } + + out := RawActivityImpl{ + Type: value, + Values: temp, + } + return out, nil + } diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_activitypolicy.go b/resource-manager/datafactory/2018-06-01/pipelines/model_activitypolicy.go new file mode 100644 index 00000000000..45ea97ee8ca --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_activitypolicy.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ActivityPolicy struct { + Retry *interface{} `json:"retry,omitempty"` + RetryIntervalInSeconds *int64 `json:"retryIntervalInSeconds,omitempty"` + SecureInput *bool `json:"secureInput,omitempty"` + SecureOutput *bool `json:"secureOutput,omitempty"` + Timeout *interface{} `json:"timeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonmwssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonmwssource.go new file mode 100644 index 00000000000..da5f73ee29a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonmwssource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonMWSSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclepartitionsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclepartitionsettings.go new file mode 100644 index 00000000000..0f416291c81 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclepartitionsettings.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForOraclePartitionSettings struct { + PartitionColumnName *interface{} `json:"partitionColumnName,omitempty"` + PartitionLowerBound *interface{} `json:"partitionLowerBound,omitempty"` + PartitionNames *interface{} `json:"partitionNames,omitempty"` + PartitionUpperBound *interface{} `json:"partitionUpperBound,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclesource.go new file mode 100644 index 00000000000..1b6cd0b19e3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsfororaclesource.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForOracleSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + OracleReaderQuery *interface{} `json:"oracleReaderQuery,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *AmazonRdsForOraclePartitionSettings `json:"partitionSettings,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsforsqlserversource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsforsqlserversource.go new file mode 100644 index 00000000000..9f7f4c95f49 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonrdsforsqlserversource.go @@ -0,0 +1,21 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRdsForSqlServerSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IsolationLevel *interface{} `json:"isolationLevel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SqlPartitionSettings `json:"partitionSettings,omitempty"` + ProduceAdditionalTypes *interface{} `json:"produceAdditionalTypes,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SqlReaderQuery *interface{} `json:"sqlReaderQuery,omitempty"` + SqlReaderStoredProcedureName *interface{} `json:"sqlReaderStoredProcedureName,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazonredshiftsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonredshiftsource.go new file mode 100644 index 00000000000..a3d6e459f23 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazonredshiftsource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonRedshiftSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + RedshiftUnloadSettings *RedshiftUnloadSettings `json:"redshiftUnloadSettings,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3compatiblereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3compatiblereadsettings.go new file mode 100644 index 00000000000..9f6c9bbc8f0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3compatiblereadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonS3CompatibleReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Prefix *interface{} `json:"prefix,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3readsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3readsettings.go new file mode 100644 index 00000000000..727f66104dd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_amazons3readsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AmazonS3ReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Prefix *interface{} `json:"prefix,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivity.go new file mode 100644 index 00000000000..2c9b30fdb45 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = AppendVariableActivity{} + +type AppendVariableActivity struct { + TypeProperties AppendVariableActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = AppendVariableActivity{} + +func (s AppendVariableActivity) MarshalJSON() ([]byte, error) { + type wrapper AppendVariableActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AppendVariableActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AppendVariableActivity: %+v", err) + } + decoded["type"] = "AppendVariable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AppendVariableActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivitytypeproperties.go new file mode 100644 index 00000000000..dca6d58a6aa --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_appendvariableactivitytypeproperties.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AppendVariableActivityTypeProperties struct { + Value *interface{} `json:"value,omitempty"` + VariableName *string `json:"variableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_avrosink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosink.go new file mode 100644 index 00000000000..08c175520da --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosink.go @@ -0,0 +1,54 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvroSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *AvroWriteSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + StoreSettings StoreWriteSettings `json:"storeSettings"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} + +var _ json.Unmarshaler = &AvroSink{} + +func (s *AvroSink) UnmarshalJSON(bytes []byte) error { + type alias AvroSink + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AvroSink: %+v", err) + } + + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SinkRetryCount = decoded.SinkRetryCount + s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type + s.WriteBatchSize = decoded.WriteBatchSize + s.WriteBatchTimeout = decoded.WriteBatchTimeout + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AvroSink into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreWriteSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'AvroSink': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_avrosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosource.go new file mode 100644 index 00000000000..1f77ea0c401 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_avrosource.go @@ -0,0 +1,50 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvroSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &AvroSource{} + +func (s *AvroSource) UnmarshalJSON(bytes []byte) error { + type alias AvroSource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into AvroSource: %+v", err) + } + + s.AdditionalColumns = decoded.AdditionalColumns + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling AvroSource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'AvroSource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_avrowritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_avrowritesettings.go new file mode 100644 index 00000000000..f8ab86a2308 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_avrowritesettings.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AvroWriteSettings struct { + FileNamePrefix *interface{} `json:"fileNamePrefix,omitempty"` + MaxRowsPerFile *interface{} `json:"maxRowsPerFile,omitempty"` + RecordName *string `json:"recordName,omitempty"` + RecordNamespace *string `json:"recordNamespace,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfsreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfsreadsettings.go new file mode 100644 index 00000000000..0cba5801053 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfsreadsettings.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobFSReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssink.go new file mode 100644 index 00000000000..a73ab186f06 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssink.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobFSSink struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssource.go new file mode 100644 index 00000000000..f4031d0d2ba --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfssource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobFSSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + SkipHeaderLineCount *interface{} `json:"skipHeaderLineCount,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + TreatEmptyAsNull *interface{} `json:"treatEmptyAsNull,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfswritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfswritesettings.go new file mode 100644 index 00000000000..7b5a5eae437 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobfswritesettings.go @@ -0,0 +1,13 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobFSWriteSettings struct { + BlockSizeInMB *interface{} `json:"blockSizeInMB,omitempty"` + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragereadsettings.go new file mode 100644 index 00000000000..86a74161ceb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragereadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobStorageReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Prefix *interface{} `json:"prefix,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragewritesettings.go new file mode 100644 index 00000000000..0b4a187ab13 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azureblobstoragewritesettings.go @@ -0,0 +1,13 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureBlobStorageWriteSettings struct { + BlockSizeInMB *interface{} `json:"blockSizeInMB,omitempty"` + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeexportcommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeexportcommand.go new file mode 100644 index 00000000000..271e656a7dc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeexportcommand.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksDeltaLakeExportCommand struct { + DateFormat *interface{} `json:"dateFormat,omitempty"` + TimestampFormat *interface{} `json:"timestampFormat,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeimportcommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeimportcommand.go new file mode 100644 index 00000000000..38fdc945592 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakeimportcommand.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksDeltaLakeImportCommand struct { + DateFormat *interface{} `json:"dateFormat,omitempty"` + TimestampFormat *interface{} `json:"timestampFormat,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesink.go new file mode 100644 index 00000000000..5685ab66f3a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesink.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksDeltaLakeSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ImportSettings *AzureDatabricksDeltaLakeImportCommand `json:"importSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesource.go new file mode 100644 index 00000000000..64ef870d31e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatabricksdeltalakesource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDatabricksDeltaLakeSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExportSettings *AzureDatabricksDeltaLakeExportCommand `json:"exportSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivity.go new file mode 100644 index 00000000000..0c58527f7e8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = AzureDataExplorerCommandActivity{} + +type AzureDataExplorerCommandActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties AzureDataExplorerCommandActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = AzureDataExplorerCommandActivity{} + +func (s AzureDataExplorerCommandActivity) MarshalJSON() ([]byte, error) { + type wrapper AzureDataExplorerCommandActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureDataExplorerCommandActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureDataExplorerCommandActivity: %+v", err) + } + decoded["type"] = "AzureDataExplorerCommand" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureDataExplorerCommandActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivitytypeproperties.go new file mode 100644 index 00000000000..83479b8b5de --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorercommandactivitytypeproperties.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataExplorerCommandActivityTypeProperties struct { + Command interface{} `json:"command"` + CommandTimeout *interface{} `json:"commandTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersink.go new file mode 100644 index 00000000000..e65b0b94cea --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataExplorerSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FlushImmediately *interface{} `json:"flushImmediately,omitempty"` + IngestionMappingAsJson *interface{} `json:"ingestionMappingAsJson,omitempty"` + IngestionMappingName *interface{} `json:"ingestionMappingName,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersource.go new file mode 100644 index 00000000000..7903ae4e0a4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredataexplorersource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataExplorerSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + NoTruncation *interface{} `json:"noTruncation,omitempty"` + Query interface{} `json:"query"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorereadsettings.go new file mode 100644 index 00000000000..a2587a494d2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorereadsettings.go @@ -0,0 +1,21 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + ListAfter *interface{} `json:"listAfter,omitempty"` + ListBefore *interface{} `json:"listBefore,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresink.go new file mode 100644 index 00000000000..6740a742766 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresink.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreSink struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnableAdlsSingleFileParallel *interface{} `json:"enableAdlsSingleFileParallel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresource.go new file mode 100644 index 00000000000..014d86596cc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestoresource.go @@ -0,0 +1,13 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorewritesettings.go new file mode 100644 index 00000000000..081a3ebd560 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuredatalakestorewritesettings.go @@ -0,0 +1,13 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureDataLakeStoreWriteSettings struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExpiryDateTime *interface{} `json:"expiryDateTime,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragereadsettings.go new file mode 100644 index 00000000000..9aeae72266c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragereadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureFileStorageReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Prefix *interface{} `json:"prefix,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragewritesettings.go new file mode 100644 index 00000000000..cc4a1212702 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefilestoragewritesettings.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureFileStorageWriteSettings struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivity.go new file mode 100644 index 00000000000..90f4369b556 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = AzureFunctionActivity{} + +type AzureFunctionActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties AzureFunctionActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = AzureFunctionActivity{} + +func (s AzureFunctionActivity) MarshalJSON() ([]byte, error) { + type wrapper AzureFunctionActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureFunctionActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureFunctionActivity: %+v", err) + } + decoded["type"] = "AzureFunctionActivity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureFunctionActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivitytypeproperties.go new file mode 100644 index 00000000000..16d8da6ae76 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurefunctionactivitytypeproperties.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureFunctionActivityTypeProperties struct { + Body *interface{} `json:"body,omitempty"` + FunctionName interface{} `json:"functionName"` + Headers *map[string]interface{} `json:"headers,omitempty"` + Method AzureFunctionActivityMethod `json:"method"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremariadbsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremariadbsource.go new file mode 100644 index 00000000000..10a20e5b788 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremariadbsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMariaDBSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivity.go new file mode 100644 index 00000000000..adb4fe6ce14 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = AzureMLBatchExecutionActivity{} + +type AzureMLBatchExecutionActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties AzureMLBatchExecutionActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = AzureMLBatchExecutionActivity{} + +func (s AzureMLBatchExecutionActivity) MarshalJSON() ([]byte, error) { + type wrapper AzureMLBatchExecutionActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMLBatchExecutionActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMLBatchExecutionActivity: %+v", err) + } + decoded["type"] = "AzureMLBatchExecution" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMLBatchExecutionActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivitytypeproperties.go new file mode 100644 index 00000000000..be45b6d0266 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlbatchexecutionactivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMLBatchExecutionActivityTypeProperties struct { + GlobalParameters *map[string]interface{} `json:"globalParameters,omitempty"` + WebServiceInputs *map[string]AzureMLWebServiceFile `json:"webServiceInputs,omitempty"` + WebServiceOutputs *map[string]AzureMLWebServiceFile `json:"webServiceOutputs,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivity.go new file mode 100644 index 00000000000..1499a1835c9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = AzureMLExecutePipelineActivity{} + +type AzureMLExecutePipelineActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties AzureMLExecutePipelineActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = AzureMLExecutePipelineActivity{} + +func (s AzureMLExecutePipelineActivity) MarshalJSON() ([]byte, error) { + type wrapper AzureMLExecutePipelineActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMLExecutePipelineActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMLExecutePipelineActivity: %+v", err) + } + decoded["type"] = "AzureMLExecutePipeline" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMLExecutePipelineActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivitytypeproperties.go new file mode 100644 index 00000000000..0acc410a096 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlexecutepipelineactivitytypeproperties.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMLExecutePipelineActivityTypeProperties struct { + ContinueOnStepFailure *interface{} `json:"continueOnStepFailure,omitempty"` + DataPathAssignments *interface{} `json:"dataPathAssignments,omitempty"` + ExperimentName *interface{} `json:"experimentName,omitempty"` + MlParentRunId *interface{} `json:"mlParentRunId,omitempty"` + MlPipelineEndpointId *interface{} `json:"mlPipelineEndpointId,omitempty"` + MlPipelineId *interface{} `json:"mlPipelineId,omitempty"` + MlPipelineParameters *interface{} `json:"mlPipelineParameters,omitempty"` + Version *interface{} `json:"version,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivity.go new file mode 100644 index 00000000000..dce4f0179f1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = AzureMLUpdateResourceActivity{} + +type AzureMLUpdateResourceActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties AzureMLUpdateResourceActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = AzureMLUpdateResourceActivity{} + +func (s AzureMLUpdateResourceActivity) MarshalJSON() ([]byte, error) { + type wrapper AzureMLUpdateResourceActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AzureMLUpdateResourceActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AzureMLUpdateResourceActivity: %+v", err) + } + decoded["type"] = "AzureMLUpdateResource" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AzureMLUpdateResourceActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivitytypeproperties.go new file mode 100644 index 00000000000..46db456f1ad --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlupdateresourceactivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMLUpdateResourceActivityTypeProperties struct { + TrainedModelFilePath interface{} `json:"trainedModelFilePath"` + TrainedModelLinkedServiceName LinkedServiceReference `json:"trainedModelLinkedServiceName"` + TrainedModelName interface{} `json:"trainedModelName"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlwebservicefile.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlwebservicefile.go new file mode 100644 index 00000000000..63405cebd24 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremlwebservicefile.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMLWebServiceFile struct { + FilePath interface{} `json:"filePath"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsink.go new file mode 100644 index 00000000000..a62ad08aa0f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMySqlSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsource.go new file mode 100644 index 00000000000..6b7582097e1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuremysqlsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureMySqlSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsink.go new file mode 100644 index 00000000000..46d87349216 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzurePostgreSqlSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsource.go new file mode 100644 index 00000000000..6e937a1d65d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurepostgresqlsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzurePostgreSqlSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azurequeuesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azurequeuesink.go new file mode 100644 index 00000000000..b73fba67fc9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azurequeuesink.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureQueueSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresearchindexsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresearchindexsink.go new file mode 100644 index 00000000000..09b4b1f372c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresearchindexsink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSearchIndexSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *AzureSearchIndexWriteBehaviorType `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsink.go new file mode 100644 index 00000000000..ab6ea0d78fc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsink.go @@ -0,0 +1,23 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + SqlWriterStoredProcedureName *interface{} `json:"sqlWriterStoredProcedureName,omitempty"` + SqlWriterTableType *interface{} `json:"sqlWriterTableType,omitempty"` + SqlWriterUseTableLock *interface{} `json:"sqlWriterUseTableLock,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + StoredProcedureTableTypeParameterName *interface{} `json:"storedProcedureTableTypeParameterName,omitempty"` + TableOption *interface{} `json:"tableOption,omitempty"` + Type string `json:"type"` + UpsertSettings *SqlUpsertSettings `json:"upsertSettings,omitempty"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsource.go new file mode 100644 index 00000000000..aa1e01e168d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuresqlsource.go @@ -0,0 +1,21 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureSqlSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IsolationLevel *interface{} `json:"isolationLevel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SqlPartitionSettings `json:"partitionSettings,omitempty"` + ProduceAdditionalTypes *interface{} `json:"produceAdditionalTypes,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SqlReaderQuery *interface{} `json:"sqlReaderQuery,omitempty"` + SqlReaderStoredProcedureName *interface{} `json:"sqlReaderStoredProcedureName,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesink.go new file mode 100644 index 00000000000..8aa8cf158b0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesink.go @@ -0,0 +1,18 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureTableSink struct { + AzureTableDefaultPartitionKeyValue *interface{} `json:"azureTableDefaultPartitionKeyValue,omitempty"` + AzureTableInsertType *interface{} `json:"azureTableInsertType,omitempty"` + AzureTablePartitionKeyName *interface{} `json:"azureTablePartitionKeyName,omitempty"` + AzureTableRowKeyName *interface{} `json:"azureTableRowKeyName,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesource.go new file mode 100644 index 00000000000..49b3700b7f1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_azuretablesource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AzureTableSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + AzureTableSourceIgnoreTableNotFound *interface{} `json:"azureTableSourceIgnoreTableNotFound,omitempty"` + AzureTableSourceQuery *interface{} `json:"azureTableSourceQuery,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_bigdatapoolparametrizationreference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_bigdatapoolparametrizationreference.go new file mode 100644 index 00000000000..c8bec1e945b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_bigdatapoolparametrizationreference.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BigDataPoolParametrizationReference struct { + ReferenceName interface{} `json:"referenceName"` + Type BigDataPoolReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_binaryreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_binaryreadsettings.go new file mode 100644 index 00000000000..4e0cc973e69 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_binaryreadsettings.go @@ -0,0 +1,40 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BinaryReadSettings struct { + CompressionProperties CompressionReadSettings `json:"compressionProperties"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &BinaryReadSettings{} + +func (s *BinaryReadSettings) UnmarshalJSON(bytes []byte) error { + type alias BinaryReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BinaryReadSettings: %+v", err) + } + + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BinaryReadSettings into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["compressionProperties"]; ok { + impl, err := unmarshalCompressionReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'BinaryReadSettings': %+v", err) + } + s.CompressionProperties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_binarysink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysink.go new file mode 100644 index 00000000000..347c4ca3186 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysink.go @@ -0,0 +1,52 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BinarySink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + StoreSettings StoreWriteSettings `json:"storeSettings"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} + +var _ json.Unmarshaler = &BinarySink{} + +func (s *BinarySink) UnmarshalJSON(bytes []byte) error { + type alias BinarySink + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BinarySink: %+v", err) + } + + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SinkRetryCount = decoded.SinkRetryCount + s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type + s.WriteBatchSize = decoded.WriteBatchSize + s.WriteBatchTimeout = decoded.WriteBatchTimeout + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BinarySink into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreWriteSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'BinarySink': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_binarysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysource.go new file mode 100644 index 00000000000..dee6bd9f68e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_binarysource.go @@ -0,0 +1,50 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BinarySource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *BinaryReadSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &BinarySource{} + +func (s *BinarySource) UnmarshalJSON(bytes []byte) error { + type alias BinarySource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BinarySource: %+v", err) + } + + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BinarySource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'BinarySource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_blobsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsink.go new file mode 100644 index 00000000000..5054e77de83 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsink.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobSink struct { + BlobWriterAddHeader *interface{} `json:"blobWriterAddHeader,omitempty"` + BlobWriterDateTimeFormat *interface{} `json:"blobWriterDateTimeFormat,omitempty"` + BlobWriterOverwriteFiles *interface{} `json:"blobWriterOverwriteFiles,omitempty"` + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_blobsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsource.go new file mode 100644 index 00000000000..0e96da60511 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_blobsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + SkipHeaderLineCount *interface{} `json:"skipHeaderLineCount,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + TreatEmptyAsNull *interface{} `json:"treatEmptyAsNull,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cassandrasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cassandrasource.go new file mode 100644 index 00000000000..65a19205efc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cassandrasource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CassandraSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + ConsistencyLevel *CassandraSourceReadConsistencyLevels `json:"consistencyLevel,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssink.go new file mode 100644 index 00000000000..02640c9b56e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CommonDataServiceForAppsSink struct { + AlternateKeyName *interface{} `json:"alternateKeyName,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IgnoreNullValues *interface{} `json:"ignoreNullValues,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior DynamicsSinkWriteBehavior `json:"writeBehavior"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssource.go new file mode 100644 index 00000000000..b7bbde43324 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_commondataserviceforappssource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CommonDataServiceForAppsSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_compressionreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_compressionreadsettings.go new file mode 100644 index 00000000000..7892042b1a7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_compressionreadsettings.go @@ -0,0 +1,44 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CompressionReadSettings interface { +} + +// RawCompressionReadSettingsImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawCompressionReadSettingsImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalCompressionReadSettingsImplementation(input []byte) (CompressionReadSettings, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling CompressionReadSettings into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawCompressionReadSettingsImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_concursource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_concursource.go new file mode 100644 index 00000000000..836fcc831ec --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_concursource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ConcurSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_controlactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_controlactivity.go new file mode 100644 index 00000000000..212dbcaad46 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_controlactivity.go @@ -0,0 +1,46 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ControlActivity{} + +type ControlActivity struct { + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ControlActivity{} + +func (s ControlActivity) MarshalJSON() ([]byte, error) { + type wrapper ControlActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ControlActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ControlActivity: %+v", err) + } + decoded["type"] = "Container" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ControlActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivity.go new file mode 100644 index 00000000000..e64d4f9f4d9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivity.go @@ -0,0 +1,51 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = CopyActivity{} + +type CopyActivity struct { + Inputs *[]DatasetReference `json:"inputs,omitempty"` + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Outputs *[]DatasetReference `json:"outputs,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties CopyActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = CopyActivity{} + +func (s CopyActivity) MarshalJSON() ([]byte, error) { + type wrapper CopyActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CopyActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CopyActivity: %+v", err) + } + decoded["type"] = "Copy" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CopyActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitylogsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitylogsettings.go new file mode 100644 index 00000000000..3ef48410938 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitylogsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CopyActivityLogSettings struct { + EnableReliableLogging *interface{} `json:"enableReliableLogging,omitempty"` + LogLevel *interface{} `json:"logLevel,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitytypeproperties.go new file mode 100644 index 00000000000..5da09f199bf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copyactivitytypeproperties.go @@ -0,0 +1,73 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CopyActivityTypeProperties struct { + DataIntegrationUnits *interface{} `json:"dataIntegrationUnits,omitempty"` + EnableSkipIncompatibleRow *interface{} `json:"enableSkipIncompatibleRow,omitempty"` + EnableStaging *interface{} `json:"enableStaging,omitempty"` + LogSettings *LogSettings `json:"logSettings,omitempty"` + LogStorageSettings *LogStorageSettings `json:"logStorageSettings,omitempty"` + ParallelCopies *interface{} `json:"parallelCopies,omitempty"` + Preserve *[]interface{} `json:"preserve,omitempty"` + PreserveRules *[]interface{} `json:"preserveRules,omitempty"` + RedirectIncompatibleRowSettings *RedirectIncompatibleRowSettings `json:"redirectIncompatibleRowSettings,omitempty"` + Sink CopySink `json:"sink"` + SkipErrorFile *SkipErrorFile `json:"skipErrorFile,omitempty"` + Source CopySource `json:"source"` + StagingSettings *StagingSettings `json:"stagingSettings,omitempty"` + Translator *interface{} `json:"translator,omitempty"` + ValidateDataConsistency *interface{} `json:"validateDataConsistency,omitempty"` +} + +var _ json.Unmarshaler = &CopyActivityTypeProperties{} + +func (s *CopyActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias CopyActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into CopyActivityTypeProperties: %+v", err) + } + + s.DataIntegrationUnits = decoded.DataIntegrationUnits + s.EnableSkipIncompatibleRow = decoded.EnableSkipIncompatibleRow + s.EnableStaging = decoded.EnableStaging + s.LogSettings = decoded.LogSettings + s.LogStorageSettings = decoded.LogStorageSettings + s.ParallelCopies = decoded.ParallelCopies + s.Preserve = decoded.Preserve + s.PreserveRules = decoded.PreserveRules + s.RedirectIncompatibleRowSettings = decoded.RedirectIncompatibleRowSettings + s.SkipErrorFile = decoded.SkipErrorFile + s.StagingSettings = decoded.StagingSettings + s.Translator = decoded.Translator + s.ValidateDataConsistency = decoded.ValidateDataConsistency + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling CopyActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["sink"]; ok { + impl, err := unmarshalCopySinkImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Sink' for 'CopyActivityTypeProperties': %+v", err) + } + s.Sink = impl + } + + if v, ok := temp["source"]; ok { + impl, err := unmarshalCopySourceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Source' for 'CopyActivityTypeProperties': %+v", err) + } + s.Source = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copysink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copysink.go new file mode 100644 index 00000000000..ae16f9b37ff --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copysink.go @@ -0,0 +1,44 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CopySink interface { +} + +// RawCopySinkImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawCopySinkImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalCopySinkImplementation(input []byte) (CopySink, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling CopySink into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawCopySinkImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_copysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_copysource.go new file mode 100644 index 00000000000..676d087cd53 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_copysource.go @@ -0,0 +1,44 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CopySource interface { +} + +// RawCopySourceImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawCopySourceImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalCopySourceImplementation(input []byte) (CopySource, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling CopySource into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawCopySourceImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisink.go new file mode 100644 index 00000000000..cef735af92f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbMongoDbApiSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisource.go new file mode 100644 index 00000000000..33dee68cd4d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbmongodbapisource.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbMongoDbApiSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + BatchSize *interface{} `json:"batchSize,omitempty"` + CursorMethods *MongoDbCursorMethodsProperties `json:"cursorMethods,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + Filter *interface{} `json:"filter,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisink.go new file mode 100644 index 00000000000..73cf2f0999e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbSqlApiSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisource.go new file mode 100644 index 00000000000..f913acf6690 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_cosmosdbsqlapisource.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CosmosDbSqlApiSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DetectDatetime *interface{} `json:"detectDatetime,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PageSize *interface{} `json:"pageSize,omitempty"` + PreferredRegions *interface{} `json:"preferredRegions,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_couchbasesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_couchbasesource.go new file mode 100644 index 00000000000..33e17aa40d0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_couchbasesource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CouchbaseSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_credentialreference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_credentialreference.go new file mode 100644 index 00000000000..de886022f01 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_credentialreference.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CredentialReference struct { + ReferenceName string `json:"referenceName"` + Type CredentialReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_customactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivity.go new file mode 100644 index 00000000000..e1e2185427a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = CustomActivity{} + +type CustomActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties CustomActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = CustomActivity{} + +func (s CustomActivity) MarshalJSON() ([]byte, error) { + type wrapper CustomActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling CustomActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling CustomActivity: %+v", err) + } + decoded["type"] = "Custom" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling CustomActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_customactivityreferenceobject.go b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivityreferenceobject.go new file mode 100644 index 00000000000..289b17b69f9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivityreferenceobject.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomActivityReferenceObject struct { + Datasets *[]DatasetReference `json:"datasets,omitempty"` + LinkedServices *[]LinkedServiceReference `json:"linkedServices,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_customactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivitytypeproperties.go new file mode 100644 index 00000000000..744c53fde59 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_customactivitytypeproperties.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomActivityTypeProperties struct { + AutoUserSpecification *interface{} `json:"autoUserSpecification,omitempty"` + Command interface{} `json:"command"` + ExtendedProperties *map[string]interface{} `json:"extendedProperties,omitempty"` + FolderPath *interface{} `json:"folderPath,omitempty"` + ReferenceObjects *CustomActivityReferenceObject `json:"referenceObjects,omitempty"` + ResourceLinkedService *LinkedServiceReference `json:"resourceLinkedService,omitempty"` + RetentionTimeInDays *interface{} `json:"retentionTimeInDays,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivity.go new file mode 100644 index 00000000000..e400b68132e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = DatabricksNotebookActivity{} + +type DatabricksNotebookActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties DatabricksNotebookActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = DatabricksNotebookActivity{} + +func (s DatabricksNotebookActivity) MarshalJSON() ([]byte, error) { + type wrapper DatabricksNotebookActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DatabricksNotebookActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DatabricksNotebookActivity: %+v", err) + } + decoded["type"] = "DatabricksNotebook" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DatabricksNotebookActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivitytypeproperties.go new file mode 100644 index 00000000000..241a81cf566 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databricksnotebookactivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabricksNotebookActivityTypeProperties struct { + BaseParameters *map[string]interface{} `json:"baseParameters,omitempty"` + Libraries *[]map[string]interface{} `json:"libraries,omitempty"` + NotebookPath interface{} `json:"notebookPath"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivity.go new file mode 100644 index 00000000000..b45b74beb42 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = DatabricksSparkJarActivity{} + +type DatabricksSparkJarActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties DatabricksSparkJarActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = DatabricksSparkJarActivity{} + +func (s DatabricksSparkJarActivity) MarshalJSON() ([]byte, error) { + type wrapper DatabricksSparkJarActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DatabricksSparkJarActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DatabricksSparkJarActivity: %+v", err) + } + decoded["type"] = "DatabricksSparkJar" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DatabricksSparkJarActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivitytypeproperties.go new file mode 100644 index 00000000000..394b84e453f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkjaractivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabricksSparkJarActivityTypeProperties struct { + Libraries *[]map[string]interface{} `json:"libraries,omitempty"` + MainClassName interface{} `json:"mainClassName"` + Parameters *[]interface{} `json:"parameters,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivity.go new file mode 100644 index 00000000000..95a89beed78 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = DatabricksSparkPythonActivity{} + +type DatabricksSparkPythonActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties DatabricksSparkPythonActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = DatabricksSparkPythonActivity{} + +func (s DatabricksSparkPythonActivity) MarshalJSON() ([]byte, error) { + type wrapper DatabricksSparkPythonActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DatabricksSparkPythonActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DatabricksSparkPythonActivity: %+v", err) + } + decoded["type"] = "DatabricksSparkPython" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DatabricksSparkPythonActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivitytypeproperties.go new file mode 100644 index 00000000000..dccb0a5d634 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_databrickssparkpythonactivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatabricksSparkPythonActivityTypeProperties struct { + Libraries *[]map[string]interface{} `json:"libraries,omitempty"` + Parameters *[]interface{} `json:"parameters,omitempty"` + PythonFile interface{} `json:"pythonFile"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dataflowreference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dataflowreference.go new file mode 100644 index 00000000000..099796a552b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dataflowreference.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataFlowReference struct { + DatasetParameters *interface{} `json:"datasetParameters,omitempty"` + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type DataFlowReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dataflowstaginginfo.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dataflowstaginginfo.go new file mode 100644 index 00000000000..e49e7dedf29 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dataflowstaginginfo.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataFlowStagingInfo struct { + FolderPath *interface{} `json:"folderPath,omitempty"` + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivity.go new file mode 100644 index 00000000000..00364ff95e0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = DataLakeAnalyticsUSQLActivity{} + +type DataLakeAnalyticsUSQLActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties DataLakeAnalyticsUSQLActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = DataLakeAnalyticsUSQLActivity{} + +func (s DataLakeAnalyticsUSQLActivity) MarshalJSON() ([]byte, error) { + type wrapper DataLakeAnalyticsUSQLActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DataLakeAnalyticsUSQLActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DataLakeAnalyticsUSQLActivity: %+v", err) + } + decoded["type"] = "DataLakeAnalyticsU-SQL" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DataLakeAnalyticsUSQLActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivitytypeproperties.go new file mode 100644 index 00000000000..3312fcec489 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_datalakeanalyticsusqlactivitytypeproperties.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataLakeAnalyticsUSQLActivityTypeProperties struct { + CompilationMode *interface{} `json:"compilationMode,omitempty"` + DegreeOfParallelism *interface{} `json:"degreeOfParallelism,omitempty"` + Parameters *map[string]interface{} `json:"parameters,omitempty"` + Priority *interface{} `json:"priority,omitempty"` + RuntimeVersion *interface{} `json:"runtimeVersion,omitempty"` + ScriptLinkedService LinkedServiceReference `json:"scriptLinkedService"` + ScriptPath interface{} `json:"scriptPath"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_datasetreference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_datasetreference.go new file mode 100644 index 00000000000..98e4b23c0ee --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_datasetreference.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DatasetReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type DatasetReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_db2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_db2source.go new file mode 100644 index 00000000000..593c5664c36 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_db2source.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Db2Source struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivity.go new file mode 100644 index 00000000000..6cfee1a9b37 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = DeleteActivity{} + +type DeleteActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties DeleteActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = DeleteActivity{} + +func (s DeleteActivity) MarshalJSON() ([]byte, error) { + type wrapper DeleteActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DeleteActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DeleteActivity: %+v", err) + } + decoded["type"] = "Delete" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DeleteActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivitytypeproperties.go new file mode 100644 index 00000000000..63d0907509a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_deleteactivitytypeproperties.go @@ -0,0 +1,48 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteActivityTypeProperties struct { + Dataset DatasetReference `json:"dataset"` + EnableLogging *interface{} `json:"enableLogging,omitempty"` + LogStorageSettings *LogStorageSettings `json:"logStorageSettings,omitempty"` + MaxConcurrentConnections *int64 `json:"maxConcurrentConnections,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` +} + +var _ json.Unmarshaler = &DeleteActivityTypeProperties{} + +func (s *DeleteActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias DeleteActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DeleteActivityTypeProperties: %+v", err) + } + + s.Dataset = decoded.Dataset + s.EnableLogging = decoded.EnableLogging + s.LogStorageSettings = decoded.LogStorageSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.Recursive = decoded.Recursive + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DeleteActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'DeleteActivityTypeProperties': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextreadsettings.go new file mode 100644 index 00000000000..cc965a34fca --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextreadsettings.go @@ -0,0 +1,42 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DelimitedTextReadSettings struct { + CompressionProperties CompressionReadSettings `json:"compressionProperties"` + SkipLineCount *interface{} `json:"skipLineCount,omitempty"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &DelimitedTextReadSettings{} + +func (s *DelimitedTextReadSettings) UnmarshalJSON(bytes []byte) error { + type alias DelimitedTextReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DelimitedTextReadSettings: %+v", err) + } + + s.SkipLineCount = decoded.SkipLineCount + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DelimitedTextReadSettings into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["compressionProperties"]; ok { + impl, err := unmarshalCompressionReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'DelimitedTextReadSettings': %+v", err) + } + s.CompressionProperties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsink.go new file mode 100644 index 00000000000..662e339c701 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsink.go @@ -0,0 +1,54 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DelimitedTextSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *DelimitedTextWriteSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + StoreSettings StoreWriteSettings `json:"storeSettings"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} + +var _ json.Unmarshaler = &DelimitedTextSink{} + +func (s *DelimitedTextSink) UnmarshalJSON(bytes []byte) error { + type alias DelimitedTextSink + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DelimitedTextSink: %+v", err) + } + + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SinkRetryCount = decoded.SinkRetryCount + s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type + s.WriteBatchSize = decoded.WriteBatchSize + s.WriteBatchTimeout = decoded.WriteBatchTimeout + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DelimitedTextSink into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreWriteSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'DelimitedTextSink': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsource.go new file mode 100644 index 00000000000..a4ec2f9c314 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextsource.go @@ -0,0 +1,52 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DelimitedTextSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *DelimitedTextReadSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &DelimitedTextSource{} + +func (s *DelimitedTextSource) UnmarshalJSON(bytes []byte) error { + type alias DelimitedTextSource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into DelimitedTextSource: %+v", err) + } + + s.AdditionalColumns = decoded.AdditionalColumns + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling DelimitedTextSource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'DelimitedTextSource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextwritesettings.go new file mode 100644 index 00000000000..0fb6ed9c2ab --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_delimitedtextwritesettings.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DelimitedTextWriteSettings struct { + FileExtension interface{} `json:"fileExtension"` + FileNamePrefix *interface{} `json:"fileNamePrefix,omitempty"` + MaxRowsPerFile *interface{} `json:"maxRowsPerFile,omitempty"` + QuoteAllText *interface{} `json:"quoteAllText,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_distcpsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_distcpsettings.go new file mode 100644 index 00000000000..7ccb12908c0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_distcpsettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DistcpSettings struct { + DistcpOptions *interface{} `json:"distcpOptions,omitempty"` + ResourceManagerEndpoint interface{} `json:"resourceManagerEndpoint"` + TempScriptPath interface{} `json:"tempScriptPath"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsink.go new file mode 100644 index 00000000000..31dbef303ab --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsink.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DocumentDbCollectionSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + NestingSeparator *interface{} `json:"nestingSeparator,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsource.go new file mode 100644 index 00000000000..0ebf2ff0975 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_documentdbcollectionsource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DocumentDbCollectionSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + NestingSeparator *interface{} `json:"nestingSeparator,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_drillsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_drillsource.go new file mode 100644 index 00000000000..93adfd6abc2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_drillsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DrillSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dwcopycommanddefaultvalue.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dwcopycommanddefaultvalue.go new file mode 100644 index 00000000000..7a3af21e4af --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dwcopycommanddefaultvalue.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DWCopyCommandDefaultValue struct { + ColumnName *interface{} `json:"columnName,omitempty"` + DefaultValue *interface{} `json:"defaultValue,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dwcopycommandsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dwcopycommandsettings.go new file mode 100644 index 00000000000..82200d0165a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dwcopycommandsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DWCopyCommandSettings struct { + AdditionalOptions *map[string]string `json:"additionalOptions,omitempty"` + DefaultValues *[]DWCopyCommandDefaultValue `json:"defaultValues,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicsaxsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicsaxsource.go new file mode 100644 index 00000000000..689cc19fea8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicsaxsource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsAXSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsink.go new file mode 100644 index 00000000000..ba6d9efcd5b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsCrmSink struct { + AlternateKeyName *interface{} `json:"alternateKeyName,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IgnoreNullValues *interface{} `json:"ignoreNullValues,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior DynamicsSinkWriteBehavior `json:"writeBehavior"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsource.go new file mode 100644 index 00000000000..ec8f28f4d23 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicscrmsource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsCrmSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssink.go new file mode 100644 index 00000000000..85f468a9059 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsSink struct { + AlternateKeyName *interface{} `json:"alternateKeyName,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IgnoreNullValues *interface{} `json:"ignoreNullValues,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior DynamicsSinkWriteBehavior `json:"writeBehavior"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssource.go new file mode 100644 index 00000000000..be825106448 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_dynamicssource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DynamicsSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_eloquasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_eloquasource.go new file mode 100644 index 00000000000..2b2087f505c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_eloquasource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EloquaSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_excelsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_excelsource.go new file mode 100644 index 00000000000..d1255b35304 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_excelsource.go @@ -0,0 +1,50 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExcelSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &ExcelSource{} + +func (s *ExcelSource) UnmarshalJSON(bytes []byte) error { + type alias ExcelSource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ExcelSource: %+v", err) + } + + s.AdditionalColumns = decoded.AdditionalColumns + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ExcelSource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'ExcelSource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivity.go new file mode 100644 index 00000000000..e4e71110c75 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ExecuteDataFlowActivity{} + +type ExecuteDataFlowActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties ExecuteDataFlowActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ExecuteDataFlowActivity{} + +func (s ExecuteDataFlowActivity) MarshalJSON() ([]byte, error) { + type wrapper ExecuteDataFlowActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExecuteDataFlowActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExecuteDataFlowActivity: %+v", err) + } + decoded["type"] = "ExecuteDataFlow" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExecuteDataFlowActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivitytypeproperties.go new file mode 100644 index 00000000000..3a3dca789f1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivitytypeproperties.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecuteDataFlowActivityTypeProperties struct { + Compute *ExecuteDataFlowActivityTypePropertiesCompute `json:"compute,omitempty"` + ContinueOnError *interface{} `json:"continueOnError,omitempty"` + DataFlow DataFlowReference `json:"dataFlow"` + IntegrationRuntime *IntegrationRuntimeReference `json:"integrationRuntime,omitempty"` + RunConcurrently *interface{} `json:"runConcurrently,omitempty"` + SourceStagingConcurrency *interface{} `json:"sourceStagingConcurrency,omitempty"` + Staging *DataFlowStagingInfo `json:"staging,omitempty"` + TraceLevel *interface{} `json:"traceLevel,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivitytypepropertiescompute.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivitytypepropertiescompute.go new file mode 100644 index 00000000000..1aed4781cd9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executedataflowactivitytypepropertiescompute.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecuteDataFlowActivityTypePropertiesCompute struct { + ComputeType *interface{} `json:"computeType,omitempty"` + CoreCount *interface{} `json:"coreCount,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivity.go new file mode 100644 index 00000000000..d71bf192ec3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivity.go @@ -0,0 +1,48 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ExecutePipelineActivity{} + +type ExecutePipelineActivity struct { + Policy *ExecutePipelineActivityPolicy `json:"policy,omitempty"` + TypeProperties ExecutePipelineActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ExecutePipelineActivity{} + +func (s ExecutePipelineActivity) MarshalJSON() ([]byte, error) { + type wrapper ExecutePipelineActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExecutePipelineActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExecutePipelineActivity: %+v", err) + } + decoded["type"] = "ExecutePipeline" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExecutePipelineActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivitypolicy.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivitypolicy.go new file mode 100644 index 00000000000..fca4c99e29b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivitypolicy.go @@ -0,0 +1,8 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecutePipelineActivityPolicy struct { + SecureInput *bool `json:"secureInput,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivitytypeproperties.go new file mode 100644 index 00000000000..9aad3b4d0c7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executepipelineactivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecutePipelineActivityTypeProperties struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + Pipeline PipelineReference `json:"pipeline"` + WaitOnCompletion *bool `json:"waitOnCompletion,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executepowerqueryactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executepowerqueryactivitytypeproperties.go new file mode 100644 index 00000000000..a95096fdc7e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executepowerqueryactivitytypeproperties.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecutePowerQueryActivityTypeProperties struct { + Compute *ExecuteDataFlowActivityTypePropertiesCompute `json:"compute,omitempty"` + ContinueOnError *interface{} `json:"continueOnError,omitempty"` + DataFlow DataFlowReference `json:"dataFlow"` + IntegrationRuntime *IntegrationRuntimeReference `json:"integrationRuntime,omitempty"` + Queries *[]PowerQuerySinkMapping `json:"queries,omitempty"` + RunConcurrently *interface{} `json:"runConcurrently,omitempty"` + Sinks *map[string]PowerQuerySink `json:"sinks,omitempty"` + SourceStagingConcurrency *interface{} `json:"sourceStagingConcurrency,omitempty"` + Staging *DataFlowStagingInfo `json:"staging,omitempty"` + TraceLevel *interface{} `json:"traceLevel,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivity.go new file mode 100644 index 00000000000..b4173b79989 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ExecuteSSISPackageActivity{} + +type ExecuteSSISPackageActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties ExecuteSSISPackageActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ExecuteSSISPackageActivity{} + +func (s ExecuteSSISPackageActivity) MarshalJSON() ([]byte, error) { + type wrapper ExecuteSSISPackageActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExecuteSSISPackageActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExecuteSSISPackageActivity: %+v", err) + } + decoded["type"] = "ExecuteSSISPackage" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExecuteSSISPackageActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivitytypeproperties.go new file mode 100644 index 00000000000..cc5dd4268f9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executessispackageactivitytypeproperties.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExecuteSSISPackageActivityTypeProperties struct { + ConnectVia IntegrationRuntimeReference `json:"connectVia"` + EnvironmentPath *interface{} `json:"environmentPath,omitempty"` + ExecutionCredential *SSISExecutionCredential `json:"executionCredential,omitempty"` + LogLocation *SSISLogLocation `json:"logLocation,omitempty"` + LoggingLevel *interface{} `json:"loggingLevel,omitempty"` + PackageConnectionManagers *map[string]map[string]SSISExecutionParameter `json:"packageConnectionManagers,omitempty"` + PackageLocation SSISPackageLocation `json:"packageLocation"` + PackageParameters *map[string]SSISExecutionParameter `json:"packageParameters,omitempty"` + ProjectConnectionManagers *map[string]map[string]SSISExecutionParameter `json:"projectConnectionManagers,omitempty"` + ProjectParameters *map[string]SSISExecutionParameter `json:"projectParameters,omitempty"` + PropertyOverrides *map[string]SSISPropertyOverride `json:"propertyOverrides,omitempty"` + Runtime *interface{} `json:"runtime,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executewranglingdataflowactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executewranglingdataflowactivity.go new file mode 100644 index 00000000000..c30c9d28390 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executewranglingdataflowactivity.go @@ -0,0 +1,48 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ExecuteWranglingDataflowActivity{} + +type ExecuteWranglingDataflowActivity struct { + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties ExecutePowerQueryActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ExecuteWranglingDataflowActivity{} + +func (s ExecuteWranglingDataflowActivity) MarshalJSON() ([]byte, error) { + type wrapper ExecuteWranglingDataflowActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExecuteWranglingDataflowActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExecuteWranglingDataflowActivity: %+v", err) + } + decoded["type"] = "ExecuteWranglingDataflow" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExecuteWranglingDataflowActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_executionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_executionactivity.go new file mode 100644 index 00000000000..59154f200cb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_executionactivity.go @@ -0,0 +1,48 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ExecutionActivity{} + +type ExecutionActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ExecutionActivity{} + +func (s ExecutionActivity) MarshalJSON() ([]byte, error) { + type wrapper ExecutionActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ExecutionActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ExecutionActivity: %+v", err) + } + decoded["type"] = "Execution" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ExecutionActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_expression.go b/resource-manager/datafactory/2018-06-01/pipelines/model_expression.go new file mode 100644 index 00000000000..0684b4232e5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_expression.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Expression struct { + Type ExpressionType `json:"type"` + Value string `json:"value"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_expressionv2.go b/resource-manager/datafactory/2018-06-01/pipelines/model_expressionv2.go new file mode 100644 index 00000000000..40118969be5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_expressionv2.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExpressionV2 struct { + Operands *[]ExpressionV2 `json:"operands,omitempty"` + Operator *string `json:"operator,omitempty"` + Type *ExpressionV2Type `json:"type,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_failactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_failactivity.go new file mode 100644 index 00000000000..3a432ee8037 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_failactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = FailActivity{} + +type FailActivity struct { + TypeProperties FailActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = FailActivity{} + +func (s FailActivity) MarshalJSON() ([]byte, error) { + type wrapper FailActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FailActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FailActivity: %+v", err) + } + decoded["type"] = "Fail" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FailActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_failactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_failactivitytypeproperties.go new file mode 100644 index 00000000000..c193460617e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_failactivitytypeproperties.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FailActivityTypeProperties struct { + ErrorCode interface{} `json:"errorCode"` + Message interface{} `json:"message"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverreadsettings.go new file mode 100644 index 00000000000..46ca7bbd6e8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverreadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileServerReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileFilter *interface{} `json:"fileFilter,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverwritesettings.go new file mode 100644 index 00000000000..5e93ae26a9b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_fileserverwritesettings.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileServerWriteSettings struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsink.go new file mode 100644 index 00000000000..c2f32275115 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileSystemSink struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsource.go new file mode 100644 index 00000000000..ad99061080d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_filesystemsource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FileSystemSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivity.go new file mode 100644 index 00000000000..7f4051bb33c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = FilterActivity{} + +type FilterActivity struct { + TypeProperties FilterActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = FilterActivity{} + +func (s FilterActivity) MarshalJSON() ([]byte, error) { + type wrapper FilterActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FilterActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FilterActivity: %+v", err) + } + decoded["type"] = "Filter" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FilterActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivitytypeproperties.go new file mode 100644 index 00000000000..a14c0e5be07 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_filteractivitytypeproperties.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FilterActivityTypeProperties struct { + Condition Expression `json:"condition"` + Items Expression `json:"items"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivity.go new file mode 100644 index 00000000000..873b3f11a35 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ForEachActivity{} + +type ForEachActivity struct { + TypeProperties ForEachActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ForEachActivity{} + +func (s ForEachActivity) MarshalJSON() ([]byte, error) { + type wrapper ForEachActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ForEachActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ForEachActivity: %+v", err) + } + decoded["type"] = "ForEach" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ForEachActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivitytypeproperties.go new file mode 100644 index 00000000000..def50b2d89f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_foreachactivitytypeproperties.go @@ -0,0 +1,53 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ForEachActivityTypeProperties struct { + Activities []Activity `json:"activities"` + BatchCount *int64 `json:"batchCount,omitempty"` + IsSequential *bool `json:"isSequential,omitempty"` + Items Expression `json:"items"` +} + +var _ json.Unmarshaler = &ForEachActivityTypeProperties{} + +func (s *ForEachActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias ForEachActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ForEachActivityTypeProperties: %+v", err) + } + + s.BatchCount = decoded.BatchCount + s.IsSequential = decoded.IsSequential + s.Items = decoded.Items + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ForEachActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["activities"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Activities into list []json.RawMessage: %+v", err) + } + + output := make([]Activity, 0) + for i, val := range listTemp { + impl, err := unmarshalActivityImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Activities' for 'ForEachActivityTypeProperties': %+v", i, err) + } + output = append(output, impl) + } + s.Activities = output + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_formatreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_formatreadsettings.go new file mode 100644 index 00000000000..73d0626d45e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_formatreadsettings.go @@ -0,0 +1,44 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FormatReadSettings interface { +} + +// RawFormatReadSettingsImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawFormatReadSettingsImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalFormatReadSettingsImplementation(input []byte) (FormatReadSettings, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling FormatReadSettings into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawFormatReadSettingsImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ftpreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ftpreadsettings.go new file mode 100644 index 00000000000..394fd99521f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ftpreadsettings.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FtpReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableChunking *interface{} `json:"disableChunking,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + UseBinaryTransfer *interface{} `json:"useBinaryTransfer,omitempty"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivity.go new file mode 100644 index 00000000000..9703b9cc0d2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = GetMetadataActivity{} + +type GetMetadataActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties GetMetadataActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = GetMetadataActivity{} + +func (s GetMetadataActivity) MarshalJSON() ([]byte, error) { + type wrapper GetMetadataActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling GetMetadataActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling GetMetadataActivity: %+v", err) + } + decoded["type"] = "GetMetadata" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling GetMetadataActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivitytypeproperties.go new file mode 100644 index 00000000000..332e692e235 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_getmetadataactivitytypeproperties.go @@ -0,0 +1,51 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetMetadataActivityTypeProperties struct { + Dataset DatasetReference `json:"dataset"` + FieldList *[]interface{} `json:"fieldList,omitempty"` + FormatSettings FormatReadSettings `json:"formatSettings"` + StoreSettings StoreReadSettings `json:"storeSettings"` +} + +var _ json.Unmarshaler = &GetMetadataActivityTypeProperties{} + +func (s *GetMetadataActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias GetMetadataActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into GetMetadataActivityTypeProperties: %+v", err) + } + + s.Dataset = decoded.Dataset + s.FieldList = decoded.FieldList + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling GetMetadataActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["formatSettings"]; ok { + impl, err := unmarshalFormatReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'FormatSettings' for 'GetMetadataActivityTypeProperties': %+v", err) + } + s.FormatSettings = impl + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'GetMetadataActivityTypeProperties': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googleadwordssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googleadwordssource.go new file mode 100644 index 00000000000..e8a94fbf426 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googleadwordssource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleAdWordsSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigquerysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigquerysource.go new file mode 100644 index 00000000000..283700ee017 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigquerysource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQuerySource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigqueryv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigqueryv2source.go new file mode 100644 index 00000000000..39c34fa50fb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googlebigqueryv2source.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleBigQueryV2Source struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_googlecloudstoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_googlecloudstoragereadsettings.go new file mode 100644 index 00000000000..b2808446ac5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_googlecloudstoragereadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GoogleCloudStorageReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Prefix *interface{} `json:"prefix,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_greenplumsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_greenplumsource.go new file mode 100644 index 00000000000..4e9d3629d07 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_greenplumsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GreenplumSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hbasesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hbasesource.go new file mode 100644 index 00000000000..b4f339520dd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hbasesource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HBaseSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdfsreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfsreadsettings.go new file mode 100644 index 00000000000..5dcdca5e691 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfsreadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HdfsReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + DistcpSettings *DistcpSettings `json:"distcpSettings,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdfssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfssource.go new file mode 100644 index 00000000000..b6cf0c339a3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdfssource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HdfsSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + DistcpSettings *DistcpSettings `json:"distcpSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivity.go new file mode 100644 index 00000000000..1e446fd2693 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = HDInsightHiveActivity{} + +type HDInsightHiveActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties HDInsightHiveActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = HDInsightHiveActivity{} + +func (s HDInsightHiveActivity) MarshalJSON() ([]byte, error) { + type wrapper HDInsightHiveActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HDInsightHiveActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HDInsightHiveActivity: %+v", err) + } + decoded["type"] = "HDInsightHive" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HDInsightHiveActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivitytypeproperties.go new file mode 100644 index 00000000000..32b8c348b45 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsighthiveactivitytypeproperties.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HDInsightHiveActivityTypeProperties struct { + Arguments *[]interface{} `json:"arguments,omitempty"` + Defines *map[string]interface{} `json:"defines,omitempty"` + GetDebugInfo *HDInsightActivityDebugInfoOption `json:"getDebugInfo,omitempty"` + QueryTimeout *int64 `json:"queryTimeout,omitempty"` + ScriptLinkedService *LinkedServiceReference `json:"scriptLinkedService,omitempty"` + ScriptPath *interface{} `json:"scriptPath,omitempty"` + StorageLinkedServices *[]LinkedServiceReference `json:"storageLinkedServices,omitempty"` + Variables *map[string]interface{} `json:"variables,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivity.go new file mode 100644 index 00000000000..062055a7c16 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = HDInsightMapReduceActivity{} + +type HDInsightMapReduceActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties HDInsightMapReduceActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = HDInsightMapReduceActivity{} + +func (s HDInsightMapReduceActivity) MarshalJSON() ([]byte, error) { + type wrapper HDInsightMapReduceActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HDInsightMapReduceActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HDInsightMapReduceActivity: %+v", err) + } + decoded["type"] = "HDInsightMapReduce" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HDInsightMapReduceActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivitytypeproperties.go new file mode 100644 index 00000000000..af7e9127d35 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightmapreduceactivitytypeproperties.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HDInsightMapReduceActivityTypeProperties struct { + Arguments *[]interface{} `json:"arguments,omitempty"` + ClassName interface{} `json:"className"` + Defines *map[string]interface{} `json:"defines,omitempty"` + GetDebugInfo *HDInsightActivityDebugInfoOption `json:"getDebugInfo,omitempty"` + JarFilePath interface{} `json:"jarFilePath"` + JarLibs *[]interface{} `json:"jarLibs,omitempty"` + JarLinkedService *LinkedServiceReference `json:"jarLinkedService,omitempty"` + StorageLinkedServices *[]LinkedServiceReference `json:"storageLinkedServices,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivity.go new file mode 100644 index 00000000000..cb35484a5d6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = HDInsightPigActivity{} + +type HDInsightPigActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties HDInsightPigActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = HDInsightPigActivity{} + +func (s HDInsightPigActivity) MarshalJSON() ([]byte, error) { + type wrapper HDInsightPigActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HDInsightPigActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HDInsightPigActivity: %+v", err) + } + decoded["type"] = "HDInsightPig" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HDInsightPigActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivitytypeproperties.go new file mode 100644 index 00000000000..0c4c857fd38 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightpigactivitytypeproperties.go @@ -0,0 +1,13 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HDInsightPigActivityTypeProperties struct { + Arguments *interface{} `json:"arguments,omitempty"` + Defines *map[string]interface{} `json:"defines,omitempty"` + GetDebugInfo *HDInsightActivityDebugInfoOption `json:"getDebugInfo,omitempty"` + ScriptLinkedService *LinkedServiceReference `json:"scriptLinkedService,omitempty"` + ScriptPath *interface{} `json:"scriptPath,omitempty"` + StorageLinkedServices *[]LinkedServiceReference `json:"storageLinkedServices,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivity.go new file mode 100644 index 00000000000..5c19cfc67b5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = HDInsightSparkActivity{} + +type HDInsightSparkActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties HDInsightSparkActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = HDInsightSparkActivity{} + +func (s HDInsightSparkActivity) MarshalJSON() ([]byte, error) { + type wrapper HDInsightSparkActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HDInsightSparkActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HDInsightSparkActivity: %+v", err) + } + decoded["type"] = "HDInsightSpark" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HDInsightSparkActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivitytypeproperties.go new file mode 100644 index 00000000000..15c1bc5308c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightsparkactivitytypeproperties.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HDInsightSparkActivityTypeProperties struct { + Arguments *[]interface{} `json:"arguments,omitempty"` + ClassName *string `json:"className,omitempty"` + EntryFilePath interface{} `json:"entryFilePath"` + GetDebugInfo *HDInsightActivityDebugInfoOption `json:"getDebugInfo,omitempty"` + ProxyUser *interface{} `json:"proxyUser,omitempty"` + RootPath interface{} `json:"rootPath"` + SparkConfig *map[string]interface{} `json:"sparkConfig,omitempty"` + SparkJobLinkedService *LinkedServiceReference `json:"sparkJobLinkedService,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivity.go new file mode 100644 index 00000000000..110a3c2d6c8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = HDInsightStreamingActivity{} + +type HDInsightStreamingActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties HDInsightStreamingActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = HDInsightStreamingActivity{} + +func (s HDInsightStreamingActivity) MarshalJSON() ([]byte, error) { + type wrapper HDInsightStreamingActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling HDInsightStreamingActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling HDInsightStreamingActivity: %+v", err) + } + decoded["type"] = "HDInsightStreaming" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling HDInsightStreamingActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivitytypeproperties.go new file mode 100644 index 00000000000..b3e21cc08a6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hdinsightstreamingactivitytypeproperties.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HDInsightStreamingActivityTypeProperties struct { + Arguments *[]interface{} `json:"arguments,omitempty"` + Combiner *interface{} `json:"combiner,omitempty"` + CommandEnvironment *[]interface{} `json:"commandEnvironment,omitempty"` + Defines *map[string]interface{} `json:"defines,omitempty"` + FileLinkedService *LinkedServiceReference `json:"fileLinkedService,omitempty"` + FilePaths []interface{} `json:"filePaths"` + GetDebugInfo *HDInsightActivityDebugInfoOption `json:"getDebugInfo,omitempty"` + Input interface{} `json:"input"` + Mapper interface{} `json:"mapper"` + Output interface{} `json:"output"` + Reducer interface{} `json:"reducer"` + StorageLinkedServices *[]LinkedServiceReference `json:"storageLinkedServices,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hivesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hivesource.go new file mode 100644 index 00000000000..e8e2f69fc57 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hivesource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HiveSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_httpreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_httpreadsettings.go new file mode 100644 index 00000000000..111e0c662a6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_httpreadsettings.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPReadSettings struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + AdditionalHeaders *interface{} `json:"additionalHeaders,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + RequestBody *interface{} `json:"requestBody,omitempty"` + RequestMethod *interface{} `json:"requestMethod,omitempty"` + RequestTimeout *interface{} `json:"requestTimeout,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_httpsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_httpsource.go new file mode 100644 index 00000000000..b691354859f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_httpsource.go @@ -0,0 +1,13 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HTTPSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_hubspotsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_hubspotsource.go new file mode 100644 index 00000000000..874f2ef2e8f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_hubspotsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HubspotSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivity.go new file mode 100644 index 00000000000..08a71a229df --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = IfConditionActivity{} + +type IfConditionActivity struct { + TypeProperties IfConditionActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = IfConditionActivity{} + +func (s IfConditionActivity) MarshalJSON() ([]byte, error) { + type wrapper IfConditionActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling IfConditionActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling IfConditionActivity: %+v", err) + } + decoded["type"] = "IfCondition" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling IfConditionActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivitytypeproperties.go new file mode 100644 index 00000000000..073f70bf33b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ifconditionactivitytypeproperties.go @@ -0,0 +1,67 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IfConditionActivityTypeProperties struct { + Expression Expression `json:"expression"` + IfFalseActivities *[]Activity `json:"ifFalseActivities,omitempty"` + IfTrueActivities *[]Activity `json:"ifTrueActivities,omitempty"` +} + +var _ json.Unmarshaler = &IfConditionActivityTypeProperties{} + +func (s *IfConditionActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias IfConditionActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into IfConditionActivityTypeProperties: %+v", err) + } + + s.Expression = decoded.Expression + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling IfConditionActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["ifFalseActivities"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling IfFalseActivities into list []json.RawMessage: %+v", err) + } + + output := make([]Activity, 0) + for i, val := range listTemp { + impl, err := unmarshalActivityImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'IfFalseActivities' for 'IfConditionActivityTypeProperties': %+v", i, err) + } + output = append(output, impl) + } + s.IfFalseActivities = &output + } + + if v, ok := temp["ifTrueActivities"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling IfTrueActivities into list []json.RawMessage: %+v", err) + } + + output := make([]Activity, 0) + for i, val := range listTemp { + impl, err := unmarshalActivityImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'IfTrueActivities' for 'IfConditionActivityTypeProperties': %+v", i, err) + } + output = append(output, impl) + } + s.IfTrueActivities = &output + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_impalasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_impalasource.go new file mode 100644 index 00000000000..f0af27d17f0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_impalasource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImpalaSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_informixsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsink.go new file mode 100644 index 00000000000..be881ca2c17 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InformixSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_informixsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsource.go new file mode 100644 index 00000000000..07b38187261 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_informixsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type InformixSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_integrationruntimereference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_integrationruntimereference.go new file mode 100644 index 00000000000..7ca9b264b50 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_integrationruntimereference.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type IntegrationRuntimeReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type IntegrationRuntimeReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jirasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jirasource.go new file mode 100644 index 00000000000..0af4e85504f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jirasource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JiraSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonreadsettings.go new file mode 100644 index 00000000000..c13266b5e5a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonreadsettings.go @@ -0,0 +1,40 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonReadSettings struct { + CompressionProperties CompressionReadSettings `json:"compressionProperties"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &JsonReadSettings{} + +func (s *JsonReadSettings) UnmarshalJSON(bytes []byte) error { + type alias JsonReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JsonReadSettings: %+v", err) + } + + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling JsonReadSettings into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["compressionProperties"]; ok { + impl, err := unmarshalCompressionReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'JsonReadSettings': %+v", err) + } + s.CompressionProperties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsink.go new file mode 100644 index 00000000000..7a69ea55bde --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsink.go @@ -0,0 +1,54 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *JsonWriteSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + StoreSettings StoreWriteSettings `json:"storeSettings"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} + +var _ json.Unmarshaler = &JsonSink{} + +func (s *JsonSink) UnmarshalJSON(bytes []byte) error { + type alias JsonSink + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JsonSink: %+v", err) + } + + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SinkRetryCount = decoded.SinkRetryCount + s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type + s.WriteBatchSize = decoded.WriteBatchSize + s.WriteBatchTimeout = decoded.WriteBatchTimeout + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling JsonSink into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreWriteSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'JsonSink': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsource.go new file mode 100644 index 00000000000..b2a3e3ca491 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonsource.go @@ -0,0 +1,52 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *JsonReadSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &JsonSource{} + +func (s *JsonSource) UnmarshalJSON(bytes []byte) error { + type alias JsonSource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into JsonSource: %+v", err) + } + + s.AdditionalColumns = decoded.AdditionalColumns + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling JsonSource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'JsonSource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_jsonwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonwritesettings.go new file mode 100644 index 00000000000..333fe513338 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_jsonwritesettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type JsonWriteSettings struct { + FilePattern *interface{} `json:"filePattern,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousereadsettings.go new file mode 100644 index 00000000000..24b21ce0377 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousereadsettings.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesink.go new file mode 100644 index 00000000000..e03886d18ba --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseTableSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionNameList *interface{} `json:"partitionNameList,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + TableActionOption *interface{} `json:"tableActionOption,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesource.go new file mode 100644 index 00000000000..b15d2a5a278 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousetablesource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseTableSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + TimestampAsOf *interface{} `json:"timestampAsOf,omitempty"` + Type string `json:"type"` + VersionAsOf *interface{} `json:"versionAsOf,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousewritesettings.go new file mode 100644 index 00000000000..e63e806ef11 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lakehousewritesettings.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LakeHouseWriteSettings struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_linkedservicereference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_linkedservicereference.go new file mode 100644 index 00000000000..5025f45ca85 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_linkedservicereference.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedServiceReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type Type `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_loglocationsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_loglocationsettings.go new file mode 100644 index 00000000000..90606ca653a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_loglocationsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogLocationSettings struct { + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Path *interface{} `json:"path,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_logsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_logsettings.go new file mode 100644 index 00000000000..2a506695f14 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_logsettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogSettings struct { + CopyActivityLogSettings *CopyActivityLogSettings `json:"copyActivityLogSettings,omitempty"` + EnableCopyActivityLog *interface{} `json:"enableCopyActivityLog,omitempty"` + LogLocationSettings LogLocationSettings `json:"logLocationSettings"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_logstoragesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_logstoragesettings.go new file mode 100644 index 00000000000..d65337c9691 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_logstoragesettings.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LogStorageSettings struct { + EnableReliableLogging *interface{} `json:"enableReliableLogging,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + LogLevel *interface{} `json:"logLevel,omitempty"` + Path *interface{} `json:"path,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivity.go new file mode 100644 index 00000000000..f613fb08d9d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = LookupActivity{} + +type LookupActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties LookupActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = LookupActivity{} + +func (s LookupActivity) MarshalJSON() ([]byte, error) { + type wrapper LookupActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LookupActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LookupActivity: %+v", err) + } + decoded["type"] = "Lookup" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LookupActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivitytypeproperties.go new file mode 100644 index 00000000000..7d099d48443 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_lookupactivitytypeproperties.go @@ -0,0 +1,42 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LookupActivityTypeProperties struct { + Dataset DatasetReference `json:"dataset"` + FirstRowOnly *interface{} `json:"firstRowOnly,omitempty"` + Source CopySource `json:"source"` +} + +var _ json.Unmarshaler = &LookupActivityTypeProperties{} + +func (s *LookupActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias LookupActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into LookupActivityTypeProperties: %+v", err) + } + + s.Dataset = decoded.Dataset + s.FirstRowOnly = decoded.FirstRowOnly + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling LookupActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["source"]; ok { + impl, err := unmarshalCopySourceImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Source' for 'LookupActivityTypeProperties': %+v", err) + } + s.Source = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_magentosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_magentosource.go new file mode 100644 index 00000000000..23eb81101b2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_magentosource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MagentoSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mariadbsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mariadbsource.go new file mode 100644 index 00000000000..f5dcb8fe97f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mariadbsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MariaDBSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_marketosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_marketosource.go new file mode 100644 index 00000000000..2fb9bce25f7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_marketosource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MarketoSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_metadataitem.go b/resource-manager/datafactory/2018-06-01/pipelines/model_metadataitem.go new file mode 100644 index 00000000000..6a57ede6e44 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_metadataitem.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MetadataItem struct { + Name *interface{} `json:"name,omitempty"` + Value *interface{} `json:"value,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssink.go new file mode 100644 index 00000000000..54000af7bf6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MicrosoftAccessSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssource.go new file mode 100644 index 00000000000..7312f15713b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_microsoftaccesssource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MicrosoftAccessSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassink.go new file mode 100644 index 00000000000..aea41096015 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbAtlasSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassource.go new file mode 100644 index 00000000000..caa022fdd72 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbatlassource.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbAtlasSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + BatchSize *interface{} `json:"batchSize,omitempty"` + CursorMethods *MongoDbCursorMethodsProperties `json:"cursorMethods,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + Filter *interface{} `json:"filter,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbcursormethodsproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbcursormethodsproperties.go new file mode 100644 index 00000000000..b329f6a30bc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbcursormethodsproperties.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbCursorMethodsProperties struct { + Limit *interface{} `json:"limit,omitempty"` + Project *interface{} `json:"project,omitempty"` + Skip *interface{} `json:"skip,omitempty"` + Sort *interface{} `json:"sort,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbsource.go new file mode 100644 index 00000000000..fb0f1dbe5d6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbsource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2sink.go new file mode 100644 index 00000000000..cd9ddae3fcc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2sink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbV2Sink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2source.go new file mode 100644 index 00000000000..d6c19be37f5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mongodbv2source.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MongoDbV2Source struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + BatchSize *interface{} `json:"batchSize,omitempty"` + CursorMethods *MongoDbCursorMethodsProperties `json:"cursorMethods,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + Filter *interface{} `json:"filter,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_mysqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_mysqlsource.go new file mode 100644 index 00000000000..760e5c3d20a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_mysqlsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MySqlSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_netezzapartitionsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_netezzapartitionsettings.go new file mode 100644 index 00000000000..d0c2be78730 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_netezzapartitionsettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetezzaPartitionSettings struct { + PartitionColumnName *interface{} `json:"partitionColumnName,omitempty"` + PartitionLowerBound *interface{} `json:"partitionLowerBound,omitempty"` + PartitionUpperBound *interface{} `json:"partitionUpperBound,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_netezzasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_netezzasource.go new file mode 100644 index 00000000000..4f7c1200012 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_netezzasource.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NetezzaSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *NetezzaPartitionSettings `json:"partitionSettings,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_notebookparameter.go b/resource-manager/datafactory/2018-06-01/pipelines/model_notebookparameter.go new file mode 100644 index 00000000000..995bf3883b8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_notebookparameter.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type NotebookParameter struct { + Type *NotebookParameterType `json:"type,omitempty"` + Value *interface{} `json:"value,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_odatasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_odatasource.go new file mode 100644 index 00000000000..b3e81981473 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_odatasource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ODataSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsink.go new file mode 100644 index 00000000000..f0f7534b6d1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OdbcSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsource.go new file mode 100644 index 00000000000..ee618d95976 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_odbcsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OdbcSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_office365source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_office365source.go new file mode 100644 index 00000000000..cff8e8d1b51 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_office365source.go @@ -0,0 +1,18 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Office365Source struct { + AllowedGroups *interface{} `json:"allowedGroups,omitempty"` + DateFilterColumn *interface{} `json:"dateFilterColumn,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EndTime *interface{} `json:"endTime,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + OutputColumns *interface{} `json:"outputColumns,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StartTime *interface{} `json:"startTime,omitempty"` + Type string `json:"type"` + UserScopeFilterUri *interface{} `json:"userScopeFilterUri,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclecloudstoragereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclecloudstoragereadsettings.go new file mode 100644 index 00000000000..115fc08eac6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclecloudstoragereadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleCloudStorageReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Prefix *interface{} `json:"prefix,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclepartitionsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclepartitionsettings.go new file mode 100644 index 00000000000..0f2c6a6d69b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclepartitionsettings.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OraclePartitionSettings struct { + PartitionColumnName *interface{} `json:"partitionColumnName,omitempty"` + PartitionLowerBound *interface{} `json:"partitionLowerBound,omitempty"` + PartitionNames *interface{} `json:"partitionNames,omitempty"` + PartitionUpperBound *interface{} `json:"partitionUpperBound,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oracleservicecloudsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oracleservicecloudsource.go new file mode 100644 index 00000000000..a32702cb813 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oracleservicecloudsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleServiceCloudSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesink.go new file mode 100644 index 00000000000..66695025c3d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesource.go new file mode 100644 index 00000000000..021eb804938 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_oraclesource.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OracleSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + OracleReaderQuery *interface{} `json:"oracleReaderQuery,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *OraclePartitionSettings `json:"partitionSettings,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_orcsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsink.go new file mode 100644 index 00000000000..a37c9e2cbd8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsink.go @@ -0,0 +1,54 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OrcSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *OrcWriteSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + StoreSettings StoreWriteSettings `json:"storeSettings"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} + +var _ json.Unmarshaler = &OrcSink{} + +func (s *OrcSink) UnmarshalJSON(bytes []byte) error { + type alias OrcSink + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OrcSink: %+v", err) + } + + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SinkRetryCount = decoded.SinkRetryCount + s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type + s.WriteBatchSize = decoded.WriteBatchSize + s.WriteBatchTimeout = decoded.WriteBatchTimeout + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OrcSink into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreWriteSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'OrcSink': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_orcsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsource.go new file mode 100644 index 00000000000..6613cc3e8fc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_orcsource.go @@ -0,0 +1,50 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OrcSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &OrcSource{} + +func (s *OrcSource) UnmarshalJSON(bytes []byte) error { + type alias OrcSource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into OrcSource: %+v", err) + } + + s.AdditionalColumns = decoded.AdditionalColumns + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OrcSource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'OrcSource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_orcwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_orcwritesettings.go new file mode 100644 index 00000000000..6fec42e178e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_orcwritesettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OrcWriteSettings struct { + FileNamePrefix *interface{} `json:"fileNamePrefix,omitempty"` + MaxRowsPerFile *interface{} `json:"maxRowsPerFile,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetreadsettings.go new file mode 100644 index 00000000000..37178acef35 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetreadsettings.go @@ -0,0 +1,40 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParquetReadSettings struct { + CompressionProperties CompressionReadSettings `json:"compressionProperties"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &ParquetReadSettings{} + +func (s *ParquetReadSettings) UnmarshalJSON(bytes []byte) error { + type alias ParquetReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ParquetReadSettings: %+v", err) + } + + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ParquetReadSettings into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["compressionProperties"]; ok { + impl, err := unmarshalCompressionReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'ParquetReadSettings': %+v", err) + } + s.CompressionProperties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsink.go new file mode 100644 index 00000000000..f6f5d0390c4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsink.go @@ -0,0 +1,54 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParquetSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *ParquetWriteSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + StoreSettings StoreWriteSettings `json:"storeSettings"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} + +var _ json.Unmarshaler = &ParquetSink{} + +func (s *ParquetSink) UnmarshalJSON(bytes []byte) error { + type alias ParquetSink + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ParquetSink: %+v", err) + } + + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SinkRetryCount = decoded.SinkRetryCount + s.SinkRetryWait = decoded.SinkRetryWait + s.Type = decoded.Type + s.WriteBatchSize = decoded.WriteBatchSize + s.WriteBatchTimeout = decoded.WriteBatchTimeout + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ParquetSink into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreWriteSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'ParquetSink': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsource.go new file mode 100644 index 00000000000..dc33ba73843 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetsource.go @@ -0,0 +1,52 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParquetSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *ParquetReadSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &ParquetSource{} + +func (s *ParquetSource) UnmarshalJSON(bytes []byte) error { + type alias ParquetSource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ParquetSource: %+v", err) + } + + s.AdditionalColumns = decoded.AdditionalColumns + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ParquetSource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'ParquetSource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_parquetwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetwritesettings.go new file mode 100644 index 00000000000..61d6c87f9ed --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_parquetwritesettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ParquetWriteSettings struct { + FileNamePrefix *interface{} `json:"fileNamePrefix,omitempty"` + MaxRowsPerFile *interface{} `json:"maxRowsPerFile,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_paypalsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_paypalsource.go new file mode 100644 index 00000000000..efa34157ccc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_paypalsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PaypalSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_phoenixsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_phoenixsource.go new file mode 100644 index 00000000000..cd22a335ab3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_phoenixsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PhoenixSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go b/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go index 0ed8f4ed121..98151a58888 100644 --- a/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_pipeline.go @@ -1,5 +1,10 @@ package pipelines +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -14,3 +19,45 @@ type Pipeline struct { RunDimensions *map[string]interface{} `json:"runDimensions,omitempty"` Variables *map[string]VariableSpecification `json:"variables,omitempty"` } + +var _ json.Unmarshaler = &Pipeline{} + +func (s *Pipeline) UnmarshalJSON(bytes []byte) error { + type alias Pipeline + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into Pipeline: %+v", err) + } + + s.Annotations = decoded.Annotations + s.Concurrency = decoded.Concurrency + s.Description = decoded.Description + s.Folder = decoded.Folder + s.Parameters = decoded.Parameters + s.Policy = decoded.Policy + s.RunDimensions = decoded.RunDimensions + s.Variables = decoded.Variables + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling Pipeline into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["activities"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Activities into list []json.RawMessage: %+v", err) + } + + output := make([]Activity, 0) + for i, val := range listTemp { + impl, err := unmarshalActivityImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Activities' for 'Pipeline': %+v", i, err) + } + output = append(output, impl) + } + s.Activities = &output + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_pipelinereference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_pipelinereference.go new file mode 100644 index 00000000000..d13fb57225b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_pipelinereference.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PipelineReference struct { + Name *string `json:"name,omitempty"` + ReferenceName string `json:"referenceName"` + Type PipelineReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_polybasesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_polybasesettings.go new file mode 100644 index 00000000000..618ed93d49f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_polybasesettings.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PolybaseSettings struct { + RejectSampleValue *interface{} `json:"rejectSampleValue,omitempty"` + RejectType *PolybaseSettingsRejectType `json:"rejectType,omitempty"` + RejectValue *interface{} `json:"rejectValue,omitempty"` + UseTypeDefault *interface{} `json:"useTypeDefault,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlsource.go new file mode 100644 index 00000000000..e680e13d28f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlv2source.go new file mode 100644 index 00000000000..ed8c79d4825 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_postgresqlv2source.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PostgreSqlV2Source struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_powerquerysink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_powerquerysink.go new file mode 100644 index 00000000000..66280389bed --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_powerquerysink.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PowerQuerySink struct { + Dataset *DatasetReference `json:"dataset,omitempty"` + Description *string `json:"description,omitempty"` + Flowlet *DataFlowReference `json:"flowlet,omitempty"` + LinkedService *LinkedServiceReference `json:"linkedService,omitempty"` + Name string `json:"name"` + RejectedDataLinkedService *LinkedServiceReference `json:"rejectedDataLinkedService,omitempty"` + SchemaLinkedService *LinkedServiceReference `json:"schemaLinkedService,omitempty"` + Script *string `json:"script,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_powerquerysinkmapping.go b/resource-manager/datafactory/2018-06-01/pipelines/model_powerquerysinkmapping.go new file mode 100644 index 00000000000..2530bd5872b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_powerquerysinkmapping.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PowerQuerySinkMapping struct { + DataflowSinks *[]PowerQuerySink `json:"dataflowSinks,omitempty"` + QueryName *string `json:"queryName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_prestosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_prestosource.go new file mode 100644 index 00000000000..b91faf3f732 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_prestosource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrestoSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_quickbookssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_quickbookssource.go new file mode 100644 index 00000000000..7dcb5be6c03 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_quickbookssource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type QuickBooksSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_redirectincompatiblerowsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_redirectincompatiblerowsettings.go new file mode 100644 index 00000000000..0177240f1bd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_redirectincompatiblerowsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RedirectIncompatibleRowSettings struct { + LinkedServiceName interface{} `json:"linkedServiceName"` + Path *interface{} `json:"path,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_redshiftunloadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_redshiftunloadsettings.go new file mode 100644 index 00000000000..6116ea53098 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_redshiftunloadsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RedshiftUnloadSettings struct { + BucketName interface{} `json:"bucketName"` + S3LinkedServiceName LinkedServiceReference `json:"s3LinkedServiceName"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_relationalsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_relationalsource.go new file mode 100644 index 00000000000..047adcf9abf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_relationalsource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RelationalSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_responsyssource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_responsyssource.go new file mode 100644 index 00000000000..9feddaaad91 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_responsyssource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ResponsysSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_restsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_restsink.go new file mode 100644 index 00000000000..0251d2cce30 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_restsink.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestSink struct { + AdditionalHeaders *interface{} `json:"additionalHeaders,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPCompressionType *interface{} `json:"httpCompressionType,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + RequestInterval *interface{} `json:"requestInterval,omitempty"` + RequestMethod *interface{} `json:"requestMethod,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_restsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_restsource.go new file mode 100644 index 00000000000..85794ab2de3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_restsource.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RestSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + AdditionalHeaders *interface{} `json:"additionalHeaders,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PaginationRules *interface{} `json:"paginationRules,omitempty"` + RequestBody *interface{} `json:"requestBody,omitempty"` + RequestInterval *interface{} `json:"requestInterval,omitempty"` + RequestMethod *interface{} `json:"requestMethod,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcemarketingcloudsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcemarketingcloudsource.go new file mode 100644 index 00000000000..c9c38182a98 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcemarketingcloudsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceMarketingCloudSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsink.go new file mode 100644 index 00000000000..15fa3fa9522 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExternalIdFieldName *interface{} `json:"externalIdFieldName,omitempty"` + IgnoreNullValues *interface{} `json:"ignoreNullValues,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *SalesforceSinkWriteBehavior `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsource.go new file mode 100644 index 00000000000..63b96cbcee7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + ReadBehavior *interface{} `json:"readBehavior,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2sink.go new file mode 100644 index 00000000000..a114c0805e9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2sink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudV2Sink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExternalIdFieldName *interface{} `json:"externalIdFieldName,omitempty"` + IgnoreNullValues *interface{} `json:"ignoreNullValues,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *SalesforceV2SinkWriteBehavior `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2source.go new file mode 100644 index 00000000000..46419890838 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforceservicecloudv2source.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceServiceCloudV2Source struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IncludeDeletedObjects *interface{} `json:"includeDeletedObjects,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SOQLQuery *interface{} `json:"SOQLQuery,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesink.go new file mode 100644 index 00000000000..29cd9ccdb3b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExternalIdFieldName *interface{} `json:"externalIdFieldName,omitempty"` + IgnoreNullValues *interface{} `json:"ignoreNullValues,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *SalesforceSinkWriteBehavior `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesource.go new file mode 100644 index 00000000000..0eded9370ca --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcesource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + ReadBehavior *interface{} `json:"readBehavior,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2sink.go new file mode 100644 index 00000000000..d9546a05b5e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2sink.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceV2Sink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExternalIdFieldName *interface{} `json:"externalIdFieldName,omitempty"` + IgnoreNullValues *interface{} `json:"ignoreNullValues,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *SalesforceV2SinkWriteBehavior `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2source.go new file mode 100644 index 00000000000..9d8becf37d4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_salesforcev2source.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SalesforceV2Source struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IncludeDeletedObjects *interface{} `json:"includeDeletedObjects,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SOQLQuery *interface{} `json:"SOQLQuery,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapbwsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapbwsource.go new file mode 100644 index 00000000000..ddb6045725d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapbwsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapBwSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersink.go new file mode 100644 index 00000000000..ebde55d4e47 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersink.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapCloudForCustomerSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *SapCloudForCustomerSinkWriteBehavior `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersource.go new file mode 100644 index 00000000000..18f92930f90 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapcloudforcustomersource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapCloudForCustomerSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapeccsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapeccsource.go new file mode 100644 index 00000000000..f8e7c5e915d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapeccsource.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapEccSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_saphanapartitionsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_saphanapartitionsettings.go new file mode 100644 index 00000000000..8c605cff977 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_saphanapartitionsettings.go @@ -0,0 +1,8 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapHanaPartitionSettings struct { + PartitionColumnName *interface{} `json:"partitionColumnName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_saphanasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_saphanasource.go new file mode 100644 index 00000000000..558a1448cb0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_saphanasource.go @@ -0,0 +1,18 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapHanaSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PacketSize *interface{} `json:"packetSize,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SapHanaPartitionSettings `json:"partitionSettings,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapodpsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapodpsource.go new file mode 100644 index 00000000000..608881a6065 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapodpsource.go @@ -0,0 +1,18 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOdpSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExtractionMode *interface{} `json:"extractionMode,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Projection *interface{} `json:"projection,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + Selection *interface{} `json:"selection,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SubscriberProcess *interface{} `json:"subscriberProcess,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sapopenhubsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sapopenhubsource.go new file mode 100644 index 00000000000..19d2d0c3474 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sapopenhubsource.go @@ -0,0 +1,18 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapOpenHubSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + BaseRequestId *interface{} `json:"baseRequestId,omitempty"` + CustomRfcReadTableFunctionModule *interface{} `json:"customRfcReadTableFunctionModule,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExcludeLastRequest *interface{} `json:"excludeLastRequest,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SapDataColumnDelimiter *interface{} `json:"sapDataColumnDelimiter,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_saptablepartitionsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_saptablepartitionsettings.go new file mode 100644 index 00000000000..eea9b052fff --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_saptablepartitionsettings.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapTablePartitionSettings struct { + MaxPartitionsNumber *interface{} `json:"maxPartitionsNumber,omitempty"` + PartitionColumnName *interface{} `json:"partitionColumnName,omitempty"` + PartitionLowerBound *interface{} `json:"partitionLowerBound,omitempty"` + PartitionUpperBound *interface{} `json:"partitionUpperBound,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_saptablesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_saptablesource.go new file mode 100644 index 00000000000..575b2af50fc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_saptablesource.go @@ -0,0 +1,23 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SapTableSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + BatchSize *interface{} `json:"batchSize,omitempty"` + CustomRfcReadTableFunctionModule *interface{} `json:"customRfcReadTableFunctionModule,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SapTablePartitionSettings `json:"partitionSettings,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + RfcTableFields *interface{} `json:"rfcTableFields,omitempty"` + RfcTableOptions *interface{} `json:"rfcTableOptions,omitempty"` + RowCount *interface{} `json:"rowCount,omitempty"` + RowSkips *interface{} `json:"rowSkips,omitempty"` + SapDataColumnDelimiter *interface{} `json:"sapDataColumnDelimiter,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivity.go new file mode 100644 index 00000000000..9040ca01f2a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ScriptActivity{} + +type ScriptActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties ScriptActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ScriptActivity{} + +func (s ScriptActivity) MarshalJSON() ([]byte, error) { + type wrapper ScriptActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ScriptActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ScriptActivity: %+v", err) + } + decoded["type"] = "Script" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ScriptActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivityparameter.go b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivityparameter.go new file mode 100644 index 00000000000..864319fffa5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivityparameter.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScriptActivityParameter struct { + Direction *ScriptActivityParameterDirection `json:"direction,omitempty"` + Name *interface{} `json:"name,omitempty"` + Size *int64 `json:"size,omitempty"` + Type *ScriptActivityParameterType `json:"type,omitempty"` + Value *interface{} `json:"value,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivityscriptblock.go b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivityscriptblock.go new file mode 100644 index 00000000000..96f83b7e211 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivityscriptblock.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScriptActivityScriptBlock struct { + Parameters *[]ScriptActivityParameter `json:"parameters,omitempty"` + Text interface{} `json:"text"` + Type ScriptType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypeproperties.go new file mode 100644 index 00000000000..48729aeafca --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScriptActivityTypeProperties struct { + LogSettings *ScriptActivityTypePropertiesLogSettings `json:"logSettings,omitempty"` + ScriptBlockExecutionTimeout *interface{} `json:"scriptBlockExecutionTimeout,omitempty"` + Scripts *[]ScriptActivityScriptBlock `json:"scripts,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypepropertieslogsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypepropertieslogsettings.go new file mode 100644 index 00000000000..3160744e7ec --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_scriptactivitytypepropertieslogsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScriptActivityTypePropertiesLogSettings struct { + LogDestination ScriptActivityLogDestination `json:"logDestination"` + LogLocationSettings *LogLocationSettings `json:"logLocationSettings,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_secretbase.go b/resource-manager/datafactory/2018-06-01/pipelines/model_secretbase.go new file mode 100644 index 00000000000..142309e2d0c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_secretbase.go @@ -0,0 +1,53 @@ +package pipelines + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecretBase interface { +} + +// RawSecretBaseImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawSecretBaseImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalSecretBaseImplementation(input []byte) (SecretBase, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling SecretBase into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "SecureString") { + var out SecureString + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SecureString: %+v", err) + } + return out, nil + } + + out := RawSecretBaseImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_secureinputoutputpolicy.go b/resource-manager/datafactory/2018-06-01/pipelines/model_secureinputoutputpolicy.go new file mode 100644 index 00000000000..ce5d0f9174d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_secureinputoutputpolicy.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SecureInputOutputPolicy struct { + SecureInput *bool `json:"secureInput,omitempty"` + SecureOutput *bool `json:"secureOutput,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_securestring.go b/resource-manager/datafactory/2018-06-01/pipelines/model_securestring.go new file mode 100644 index 00000000000..43405297b7b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_securestring.go @@ -0,0 +1,41 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ SecretBase = SecureString{} + +type SecureString struct { + Value string `json:"value"` + + // Fields inherited from SecretBase +} + +var _ json.Marshaler = SecureString{} + +func (s SecureString) MarshalJSON() ([]byte, error) { + type wrapper SecureString + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SecureString: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SecureString: %+v", err) + } + decoded["type"] = "SecureString" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SecureString: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowsource.go new file mode 100644 index 00000000000..fa75e488c92 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowsource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceNowSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowv2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowv2source.go new file mode 100644 index 00000000000..df4f9654bdb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_servicenowv2source.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServiceNowV2Source struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + Expression *ExpressionV2 `json:"expression,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivity.go new file mode 100644 index 00000000000..970a04ebbf1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivity.go @@ -0,0 +1,48 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = SetVariableActivity{} + +type SetVariableActivity struct { + Policy *SecureInputOutputPolicy `json:"policy,omitempty"` + TypeProperties SetVariableActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = SetVariableActivity{} + +func (s SetVariableActivity) MarshalJSON() ([]byte, error) { + type wrapper SetVariableActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SetVariableActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SetVariableActivity: %+v", err) + } + decoded["type"] = "SetVariable" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SetVariableActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivitytypeproperties.go new file mode 100644 index 00000000000..309881370e8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_setvariableactivitytypeproperties.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SetVariableActivityTypeProperties struct { + SetSystemVariable *bool `json:"setSystemVariable,omitempty"` + Value *interface{} `json:"value,omitempty"` + VariableName *string `json:"variableName,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sftpreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpreadsettings.go new file mode 100644 index 00000000000..efe9143c7c6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpreadsettings.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SftpReadSettings struct { + DeleteFilesAfterCompletion *interface{} `json:"deleteFilesAfterCompletion,omitempty"` + DisableChunking *interface{} `json:"disableChunking,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + EnablePartitionDiscovery *interface{} `json:"enablePartitionDiscovery,omitempty"` + FileListPath *interface{} `json:"fileListPath,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + ModifiedDatetimeEnd *interface{} `json:"modifiedDatetimeEnd,omitempty"` + ModifiedDatetimeStart *interface{} `json:"modifiedDatetimeStart,omitempty"` + PartitionRootPath *interface{} `json:"partitionRootPath,omitempty"` + Recursive *interface{} `json:"recursive,omitempty"` + Type string `json:"type"` + WildcardFileName *interface{} `json:"wildcardFileName,omitempty"` + WildcardFolderPath *interface{} `json:"wildcardFolderPath,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sftpwritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpwritesettings.go new file mode 100644 index 00000000000..7236cc05b5e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sftpwritesettings.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SftpWriteSettings struct { + CopyBehavior *interface{} `json:"copyBehavior,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Metadata *[]MetadataItem `json:"metadata,omitempty"` + OperationTimeout *interface{} `json:"operationTimeout,omitempty"` + Type string `json:"type"` + UseTempFileRename *interface{} `json:"useTempFileRename,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sharepointonlinelistsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sharepointonlinelistsource.go new file mode 100644 index 00000000000..099c1da41a9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sharepointonlinelistsource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SharePointOnlineListSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_shopifysource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_shopifysource.go new file mode 100644 index 00000000000..ee7abfa8d5b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_shopifysource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ShopifySource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_skiperrorfile.go b/resource-manager/datafactory/2018-06-01/pipelines/model_skiperrorfile.go new file mode 100644 index 00000000000..1437255a4c3 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_skiperrorfile.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkipErrorFile struct { + DataInconsistency *interface{} `json:"dataInconsistency,omitempty"` + FileMissing *interface{} `json:"fileMissing,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeexportcopycommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeexportcopycommand.go new file mode 100644 index 00000000000..7025881c471 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeexportcopycommand.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeExportCopyCommand struct { + AdditionalCopyOptions *map[string]interface{} `json:"additionalCopyOptions,omitempty"` + AdditionalFormatOptions *map[string]interface{} `json:"additionalFormatOptions,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeimportcopycommand.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeimportcopycommand.go new file mode 100644 index 00000000000..8831febcabd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakeimportcopycommand.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeImportCopyCommand struct { + AdditionalCopyOptions *map[string]interface{} `json:"additionalCopyOptions,omitempty"` + AdditionalFormatOptions *map[string]interface{} `json:"additionalFormatOptions,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesink.go new file mode 100644 index 00000000000..6036bf20b8f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesink.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ImportSettings *SnowflakeImportCopyCommand `json:"importSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesource.go new file mode 100644 index 00000000000..8a0183bc9f7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakesource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeSource struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExportSettings SnowflakeExportCopyCommand `json:"exportSettings"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2sink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2sink.go new file mode 100644 index 00000000000..3234b121a64 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2sink.go @@ -0,0 +1,16 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeV2Sink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ImportSettings *SnowflakeImportCopyCommand `json:"importSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2source.go b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2source.go new file mode 100644 index 00000000000..a312ef5de6a --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_snowflakev2source.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SnowflakeV2Source struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + ExportSettings SnowflakeExportCopyCommand `json:"exportSettings"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sparkconfigurationparametrizationreference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sparkconfigurationparametrizationreference.go new file mode 100644 index 00000000000..b93bd334ccd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sparkconfigurationparametrizationreference.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SparkConfigurationParametrizationReference struct { + ReferenceName interface{} `json:"referenceName"` + Type SparkConfigurationReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sparksource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sparksource.go new file mode 100644 index 00000000000..3ab9283eb2c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sparksource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SparkSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsink.go new file mode 100644 index 00000000000..a520b72d384 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsink.go @@ -0,0 +1,23 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlDWSink struct { + AllowCopyCommand *interface{} `json:"allowCopyCommand,omitempty"` + AllowPolyBase *interface{} `json:"allowPolyBase,omitempty"` + CopyCommandSettings *DWCopyCommandSettings `json:"copyCommandSettings,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PolyBaseSettings *PolybaseSettings `json:"polyBaseSettings,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + SqlWriterUseTableLock *interface{} `json:"sqlWriterUseTableLock,omitempty"` + TableOption *interface{} `json:"tableOption,omitempty"` + Type string `json:"type"` + UpsertSettings *SqlDWUpsertSettings `json:"upsertSettings,omitempty"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsource.go new file mode 100644 index 00000000000..4feb779fdd1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwsource.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlDWSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IsolationLevel *interface{} `json:"isolationLevel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SqlPartitionSettings `json:"partitionSettings,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SqlReaderQuery *interface{} `json:"sqlReaderQuery,omitempty"` + SqlReaderStoredProcedureName *interface{} `json:"sqlReaderStoredProcedureName,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwupsertsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwupsertsettings.go new file mode 100644 index 00000000000..0495e1b09c7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqldwupsertsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlDWUpsertSettings struct { + InterimSchemaName *interface{} `json:"interimSchemaName,omitempty"` + Keys *interface{} `json:"keys,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisink.go new file mode 100644 index 00000000000..e26195c2a3c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisink.go @@ -0,0 +1,23 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlMISink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + SqlWriterStoredProcedureName *interface{} `json:"sqlWriterStoredProcedureName,omitempty"` + SqlWriterTableType *interface{} `json:"sqlWriterTableType,omitempty"` + SqlWriterUseTableLock *interface{} `json:"sqlWriterUseTableLock,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + StoredProcedureTableTypeParameterName *interface{} `json:"storedProcedureTableTypeParameterName,omitempty"` + TableOption *interface{} `json:"tableOption,omitempty"` + Type string `json:"type"` + UpsertSettings *SqlUpsertSettings `json:"upsertSettings,omitempty"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisource.go new file mode 100644 index 00000000000..530c97aa248 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlmisource.go @@ -0,0 +1,21 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlMISource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IsolationLevel *interface{} `json:"isolationLevel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SqlPartitionSettings `json:"partitionSettings,omitempty"` + ProduceAdditionalTypes *interface{} `json:"produceAdditionalTypes,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SqlReaderQuery *interface{} `json:"sqlReaderQuery,omitempty"` + SqlReaderStoredProcedureName *interface{} `json:"sqlReaderStoredProcedureName,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlpartitionsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlpartitionsettings.go new file mode 100644 index 00000000000..33ff39c5fc7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlpartitionsettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlPartitionSettings struct { + PartitionColumnName *interface{} `json:"partitionColumnName,omitempty"` + PartitionLowerBound *interface{} `json:"partitionLowerBound,omitempty"` + PartitionUpperBound *interface{} `json:"partitionUpperBound,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversink.go new file mode 100644 index 00000000000..cb85cc166c9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversink.go @@ -0,0 +1,23 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlServerSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + SqlWriterStoredProcedureName *interface{} `json:"sqlWriterStoredProcedureName,omitempty"` + SqlWriterTableType *interface{} `json:"sqlWriterTableType,omitempty"` + SqlWriterUseTableLock *interface{} `json:"sqlWriterUseTableLock,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + StoredProcedureTableTypeParameterName *interface{} `json:"storedProcedureTableTypeParameterName,omitempty"` + TableOption *interface{} `json:"tableOption,omitempty"` + Type string `json:"type"` + UpsertSettings *SqlUpsertSettings `json:"upsertSettings,omitempty"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversource.go new file mode 100644 index 00000000000..ada9320b999 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserversource.go @@ -0,0 +1,21 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlServerSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IsolationLevel *interface{} `json:"isolationLevel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SqlPartitionSettings `json:"partitionSettings,omitempty"` + ProduceAdditionalTypes *interface{} `json:"produceAdditionalTypes,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SqlReaderQuery *interface{} `json:"sqlReaderQuery,omitempty"` + SqlReaderStoredProcedureName *interface{} `json:"sqlReaderStoredProcedureName,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivity.go new file mode 100644 index 00000000000..5b4e3224135 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = SqlServerStoredProcedureActivity{} + +type SqlServerStoredProcedureActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties SqlServerStoredProcedureActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = SqlServerStoredProcedureActivity{} + +func (s SqlServerStoredProcedureActivity) MarshalJSON() ([]byte, error) { + type wrapper SqlServerStoredProcedureActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SqlServerStoredProcedureActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SqlServerStoredProcedureActivity: %+v", err) + } + decoded["type"] = "SqlServerStoredProcedure" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SqlServerStoredProcedureActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivitytypeproperties.go new file mode 100644 index 00000000000..ce81eb79251 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlserverstoredprocedureactivitytypeproperties.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlServerStoredProcedureActivityTypeProperties struct { + StoredProcedureName interface{} `json:"storedProcedureName"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsink.go new file mode 100644 index 00000000000..9c56557f76f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsink.go @@ -0,0 +1,23 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlSink struct { + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + SqlWriterStoredProcedureName *interface{} `json:"sqlWriterStoredProcedureName,omitempty"` + SqlWriterTableType *interface{} `json:"sqlWriterTableType,omitempty"` + SqlWriterUseTableLock *interface{} `json:"sqlWriterUseTableLock,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + StoredProcedureTableTypeParameterName *interface{} `json:"storedProcedureTableTypeParameterName,omitempty"` + TableOption *interface{} `json:"tableOption,omitempty"` + Type string `json:"type"` + UpsertSettings *SqlUpsertSettings `json:"upsertSettings,omitempty"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsource.go new file mode 100644 index 00000000000..4bf968d2219 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlsource.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IsolationLevel *interface{} `json:"isolationLevel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SqlPartitionSettings `json:"partitionSettings,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SqlReaderQuery *interface{} `json:"sqlReaderQuery,omitempty"` + SqlReaderStoredProcedureName *interface{} `json:"sqlReaderStoredProcedureName,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sqlupsertsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlupsertsettings.go new file mode 100644 index 00000000000..ef36c2ac6f8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sqlupsertsettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SqlUpsertSettings struct { + InterimSchemaName *interface{} `json:"interimSchemaName,omitempty"` + Keys *interface{} `json:"keys,omitempty"` + UseTempDB *interface{} `json:"useTempDB,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_squaresource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_squaresource.go new file mode 100644 index 00000000000..4d58680e7a5 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_squaresource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SquareSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssisaccesscredential.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisaccesscredential.go new file mode 100644 index 00000000000..cbfac751485 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisaccesscredential.go @@ -0,0 +1,42 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISAccessCredential struct { + Domain interface{} `json:"domain"` + Password SecretBase `json:"password"` + UserName interface{} `json:"userName"` +} + +var _ json.Unmarshaler = &SSISAccessCredential{} + +func (s *SSISAccessCredential) UnmarshalJSON(bytes []byte) error { + type alias SSISAccessCredential + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SSISAccessCredential: %+v", err) + } + + s.Domain = decoded.Domain + s.UserName = decoded.UserName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SSISAccessCredential into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'SSISAccessCredential': %+v", err) + } + s.Password = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssischildpackage.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssischildpackage.go new file mode 100644 index 00000000000..b603ccfc4d2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssischildpackage.go @@ -0,0 +1,11 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISChildPackage struct { + PackageContent interface{} `json:"packageContent"` + PackageLastModifiedDate *string `json:"packageLastModifiedDate,omitempty"` + PackageName *string `json:"packageName,omitempty"` + PackagePath interface{} `json:"packagePath"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssisexecutioncredential.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisexecutioncredential.go new file mode 100644 index 00000000000..a6411c670fb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisexecutioncredential.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISExecutionCredential struct { + Domain interface{} `json:"domain"` + Password SecureString `json:"password"` + UserName interface{} `json:"userName"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssisexecutionparameter.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisexecutionparameter.go new file mode 100644 index 00000000000..049fd2b0414 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisexecutionparameter.go @@ -0,0 +1,8 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISExecutionParameter struct { + Value interface{} `json:"value"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssisloglocation.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisloglocation.go new file mode 100644 index 00000000000..09e80c2ce97 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisloglocation.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISLogLocation struct { + LogPath interface{} `json:"logPath"` + Type SsisLogLocationType `json:"type"` + TypeProperties SSISLogLocationTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssisloglocationtypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisloglocationtypeproperties.go new file mode 100644 index 00000000000..797779103f4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssisloglocationtypeproperties.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISLogLocationTypeProperties struct { + AccessCredential *SSISAccessCredential `json:"accessCredential,omitempty"` + LogRefreshInterval *interface{} `json:"logRefreshInterval,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocation.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocation.go new file mode 100644 index 00000000000..6a3f03cd1f2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocation.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISPackageLocation struct { + PackagePath *interface{} `json:"packagePath,omitempty"` + Type *SsisPackageLocationType `json:"type,omitempty"` + TypeProperties *SSISPackageLocationTypeProperties `json:"typeProperties,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocationtypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocationtypeproperties.go new file mode 100644 index 00000000000..a783180befa --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispackagelocationtypeproperties.go @@ -0,0 +1,52 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISPackageLocationTypeProperties struct { + AccessCredential *SSISAccessCredential `json:"accessCredential,omitempty"` + ChildPackages *[]SSISChildPackage `json:"childPackages,omitempty"` + ConfigurationAccessCredential *SSISAccessCredential `json:"configurationAccessCredential,omitempty"` + ConfigurationPath *interface{} `json:"configurationPath,omitempty"` + PackageContent *interface{} `json:"packageContent,omitempty"` + PackageLastModifiedDate *string `json:"packageLastModifiedDate,omitempty"` + PackageName *string `json:"packageName,omitempty"` + PackagePassword SecretBase `json:"packagePassword"` +} + +var _ json.Unmarshaler = &SSISPackageLocationTypeProperties{} + +func (s *SSISPackageLocationTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SSISPackageLocationTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SSISPackageLocationTypeProperties: %+v", err) + } + + s.AccessCredential = decoded.AccessCredential + s.ChildPackages = decoded.ChildPackages + s.ConfigurationAccessCredential = decoded.ConfigurationAccessCredential + s.ConfigurationPath = decoded.ConfigurationPath + s.PackageContent = decoded.PackageContent + s.PackageLastModifiedDate = decoded.PackageLastModifiedDate + s.PackageName = decoded.PackageName + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SSISPackageLocationTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["packagePassword"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'PackagePassword' for 'SSISPackageLocationTypeProperties': %+v", err) + } + s.PackagePassword = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_ssispropertyoverride.go b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispropertyoverride.go new file mode 100644 index 00000000000..312ce10d044 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_ssispropertyoverride.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SSISPropertyOverride struct { + IsSensitive *bool `json:"isSensitive,omitempty"` + Value interface{} `json:"value"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_stagingsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_stagingsettings.go new file mode 100644 index 00000000000..6e472bb7806 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_stagingsettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StagingSettings struct { + EnableCompression *interface{} `json:"enableCompression,omitempty"` + LinkedServiceName LinkedServiceReference `json:"linkedServiceName"` + Path *interface{} `json:"path,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_storereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_storereadsettings.go new file mode 100644 index 00000000000..26412105961 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_storereadsettings.go @@ -0,0 +1,44 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StoreReadSettings interface { +} + +// RawStoreReadSettingsImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawStoreReadSettingsImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalStoreReadSettingsImplementation(input []byte) (StoreReadSettings, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling StoreReadSettings into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawStoreReadSettingsImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_storewritesettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_storewritesettings.go new file mode 100644 index 00000000000..afc03f1aef1 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_storewritesettings.go @@ -0,0 +1,44 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StoreWriteSettings interface { +} + +// RawStoreWriteSettingsImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawStoreWriteSettingsImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalStoreWriteSettingsImplementation(input []byte) (StoreWriteSettings, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling StoreWriteSettings into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawStoreWriteSettingsImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivity.go new file mode 100644 index 00000000000..0bfdff1c675 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = SwitchActivity{} + +type SwitchActivity struct { + TypeProperties SwitchActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = SwitchActivity{} + +func (s SwitchActivity) MarshalJSON() ([]byte, error) { + type wrapper SwitchActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SwitchActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SwitchActivity: %+v", err) + } + decoded["type"] = "Switch" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SwitchActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivitytypeproperties.go new file mode 100644 index 00000000000..eb607abb743 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_switchactivitytypeproperties.go @@ -0,0 +1,51 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SwitchActivityTypeProperties struct { + Cases *[]SwitchCase `json:"cases,omitempty"` + DefaultActivities *[]Activity `json:"defaultActivities,omitempty"` + On Expression `json:"on"` +} + +var _ json.Unmarshaler = &SwitchActivityTypeProperties{} + +func (s *SwitchActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias SwitchActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SwitchActivityTypeProperties: %+v", err) + } + + s.Cases = decoded.Cases + s.On = decoded.On + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SwitchActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["defaultActivities"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling DefaultActivities into list []json.RawMessage: %+v", err) + } + + output := make([]Activity, 0) + for i, val := range listTemp { + impl, err := unmarshalActivityImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'DefaultActivities' for 'SwitchActivityTypeProperties': %+v", i, err) + } + output = append(output, impl) + } + s.DefaultActivities = &output + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_switchcase.go b/resource-manager/datafactory/2018-06-01/pipelines/model_switchcase.go new file mode 100644 index 00000000000..7d1f900a700 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_switchcase.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SwitchCase struct { + Activities *[]Activity `json:"activities,omitempty"` + Value *string `json:"value,omitempty"` +} + +var _ json.Unmarshaler = &SwitchCase{} + +func (s *SwitchCase) UnmarshalJSON(bytes []byte) error { + type alias SwitchCase + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into SwitchCase: %+v", err) + } + + s.Value = decoded.Value + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling SwitchCase into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["activities"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Activities into list []json.RawMessage: %+v", err) + } + + output := make([]Activity, 0) + for i, val := range listTemp { + impl, err := unmarshalActivityImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Activities' for 'SwitchCase': %+v", i, err) + } + output = append(output, impl) + } + s.Activities = &output + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_sybasesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_sybasesource.go new file mode 100644 index 00000000000..cb576b72fbf --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_sybasesource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SybaseSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivity.go new file mode 100644 index 00000000000..cc270352eae --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = SynapseNotebookActivity{} + +type SynapseNotebookActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties SynapseNotebookActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = SynapseNotebookActivity{} + +func (s SynapseNotebookActivity) MarshalJSON() ([]byte, error) { + type wrapper SynapseNotebookActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SynapseNotebookActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SynapseNotebookActivity: %+v", err) + } + decoded["type"] = "SynapseNotebook" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SynapseNotebookActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivitytypeproperties.go new file mode 100644 index 00000000000..5ef8c0cb8c8 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookactivitytypeproperties.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SynapseNotebookActivityTypeProperties struct { + Conf *interface{} `json:"conf,omitempty"` + ConfigurationType *ConfigurationType `json:"configurationType,omitempty"` + DriverSize *interface{} `json:"driverSize,omitempty"` + ExecutorSize *interface{} `json:"executorSize,omitempty"` + Notebook SynapseNotebookReference `json:"notebook"` + NumExecutors *interface{} `json:"numExecutors,omitempty"` + Parameters *map[string]NotebookParameter `json:"parameters,omitempty"` + SparkConfig *map[string]interface{} `json:"sparkConfig,omitempty"` + SparkPool *BigDataPoolParametrizationReference `json:"sparkPool,omitempty"` + TargetSparkConfiguration *SparkConfigurationParametrizationReference `json:"targetSparkConfiguration,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookreference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookreference.go new file mode 100644 index 00000000000..b9d0393706e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsenotebookreference.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SynapseNotebookReference struct { + ReferenceName interface{} `json:"referenceName"` + Type NotebookReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobactivitytypeproperties.go new file mode 100644 index 00000000000..01564990fd6 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobactivitytypeproperties.go @@ -0,0 +1,23 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SynapseSparkJobActivityTypeProperties struct { + Args *[]interface{} `json:"args,omitempty"` + ClassName *interface{} `json:"className,omitempty"` + Conf *interface{} `json:"conf,omitempty"` + ConfigurationType *ConfigurationType `json:"configurationType,omitempty"` + DriverSize *interface{} `json:"driverSize,omitempty"` + ExecutorSize *interface{} `json:"executorSize,omitempty"` + File *interface{} `json:"file,omitempty"` + Files *[]interface{} `json:"files,omitempty"` + FilesV2 *[]interface{} `json:"filesV2,omitempty"` + NumExecutors *interface{} `json:"numExecutors,omitempty"` + PythonCodeReference *[]interface{} `json:"pythonCodeReference,omitempty"` + ScanFolder *interface{} `json:"scanFolder,omitempty"` + SparkConfig *map[string]interface{} `json:"sparkConfig,omitempty"` + SparkJob SynapseSparkJobReference `json:"sparkJob"` + TargetBigDataPool *BigDataPoolParametrizationReference `json:"targetBigDataPool,omitempty"` + TargetSparkConfiguration *SparkConfigurationParametrizationReference `json:"targetSparkConfiguration,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobdefinitionactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobdefinitionactivity.go new file mode 100644 index 00000000000..dc5dfa1ee76 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobdefinitionactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = SynapseSparkJobDefinitionActivity{} + +type SynapseSparkJobDefinitionActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties SynapseSparkJobActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = SynapseSparkJobDefinitionActivity{} + +func (s SynapseSparkJobDefinitionActivity) MarshalJSON() ([]byte, error) { + type wrapper SynapseSparkJobDefinitionActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SynapseSparkJobDefinitionActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SynapseSparkJobDefinitionActivity: %+v", err) + } + decoded["type"] = "SparkJob" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SynapseSparkJobDefinitionActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobreference.go b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobreference.go new file mode 100644 index 00000000000..c3aeba89127 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_synapsesparkjobreference.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SynapseSparkJobReference struct { + ReferenceName interface{} `json:"referenceName"` + Type SparkJobReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_tabularsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_tabularsource.go new file mode 100644 index 00000000000..e4a3ac2de18 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_tabularsource.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TabularSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_targzipreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_targzipreadsettings.go new file mode 100644 index 00000000000..1b17fe0e297 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_targzipreadsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TarGZipReadSettings struct { + PreserveCompressionFileNameAsFolder *interface{} `json:"preserveCompressionFileNameAsFolder,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_tarreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_tarreadsettings.go new file mode 100644 index 00000000000..d28f3b4518e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_tarreadsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TarReadSettings struct { + PreserveCompressionFileNameAsFolder *interface{} `json:"preserveCompressionFileNameAsFolder,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_teradatapartitionsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_teradatapartitionsettings.go new file mode 100644 index 00000000000..815fbba23db --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_teradatapartitionsettings.go @@ -0,0 +1,10 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TeradataPartitionSettings struct { + PartitionColumnName *interface{} `json:"partitionColumnName,omitempty"` + PartitionLowerBound *interface{} `json:"partitionLowerBound,omitempty"` + PartitionUpperBound *interface{} `json:"partitionUpperBound,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_teradatasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_teradatasource.go new file mode 100644 index 00000000000..6914f8a2a4d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_teradatasource.go @@ -0,0 +1,17 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TeradataSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *TeradataPartitionSettings `json:"partitionSettings,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivity.go new file mode 100644 index 00000000000..8709e81cf71 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = UntilActivity{} + +type UntilActivity struct { + TypeProperties UntilActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = UntilActivity{} + +func (s UntilActivity) MarshalJSON() ([]byte, error) { + type wrapper UntilActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling UntilActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling UntilActivity: %+v", err) + } + decoded["type"] = "Until" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling UntilActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivitytypeproperties.go new file mode 100644 index 00000000000..bb6d0c6292d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_untilactivitytypeproperties.go @@ -0,0 +1,51 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UntilActivityTypeProperties struct { + Activities []Activity `json:"activities"` + Expression Expression `json:"expression"` + Timeout *interface{} `json:"timeout,omitempty"` +} + +var _ json.Unmarshaler = &UntilActivityTypeProperties{} + +func (s *UntilActivityTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias UntilActivityTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into UntilActivityTypeProperties: %+v", err) + } + + s.Expression = decoded.Expression + s.Timeout = decoded.Timeout + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling UntilActivityTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["activities"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling Activities into list []json.RawMessage: %+v", err) + } + + output := make([]Activity, 0) + for i, val := range listTemp { + impl, err := unmarshalActivityImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'Activities' for 'UntilActivityTypeProperties': %+v", i, err) + } + output = append(output, impl) + } + s.Activities = output + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivity.go new file mode 100644 index 00000000000..8807b7b3159 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = ValidationActivity{} + +type ValidationActivity struct { + TypeProperties ValidationActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = ValidationActivity{} + +func (s ValidationActivity) MarshalJSON() ([]byte, error) { + type wrapper ValidationActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ValidationActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ValidationActivity: %+v", err) + } + decoded["type"] = "Validation" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ValidationActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivitytypeproperties.go new file mode 100644 index 00000000000..0a21085d1e0 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_validationactivitytypeproperties.go @@ -0,0 +1,12 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidationActivityTypeProperties struct { + ChildItems *interface{} `json:"childItems,omitempty"` + Dataset DatasetReference `json:"dataset"` + MinimumSize *interface{} `json:"minimumSize,omitempty"` + Sleep *interface{} `json:"sleep,omitempty"` + Timeout *interface{} `json:"timeout,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_verticasource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_verticasource.go new file mode 100644 index 00000000000..9a1a48dcabd --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_verticasource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VerticaSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivity.go new file mode 100644 index 00000000000..556bdd891ee --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivity.go @@ -0,0 +1,47 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = WaitActivity{} + +type WaitActivity struct { + TypeProperties WaitActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = WaitActivity{} + +func (s WaitActivity) MarshalJSON() ([]byte, error) { + type wrapper WaitActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WaitActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WaitActivity: %+v", err) + } + decoded["type"] = "Wait" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WaitActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivitytypeproperties.go new file mode 100644 index 00000000000..d65134cff00 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_waitactivitytypeproperties.go @@ -0,0 +1,8 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WaitActivityTypeProperties struct { + WaitTimeInSeconds interface{} `json:"waitTimeInSeconds"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesink.go b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesink.go new file mode 100644 index 00000000000..0f747c85104 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesink.go @@ -0,0 +1,19 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WarehouseSink struct { + AllowCopyCommand *interface{} `json:"allowCopyCommand,omitempty"` + CopyCommandSettings *DWCopyCommandSettings `json:"copyCommandSettings,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PreCopyScript *interface{} `json:"preCopyScript,omitempty"` + SinkRetryCount *interface{} `json:"sinkRetryCount,omitempty"` + SinkRetryWait *interface{} `json:"sinkRetryWait,omitempty"` + TableOption *interface{} `json:"tableOption,omitempty"` + Type string `json:"type"` + WriteBatchSize *interface{} `json:"writeBatchSize,omitempty"` + WriteBatchTimeout *interface{} `json:"writeBatchTimeout,omitempty"` + WriteBehavior *interface{} `json:"writeBehavior,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesource.go new file mode 100644 index 00000000000..c49049f2563 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_warehousesource.go @@ -0,0 +1,20 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WarehouseSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + IsolationLevel *interface{} `json:"isolationLevel,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + PartitionOption *interface{} `json:"partitionOption,omitempty"` + PartitionSettings *SqlPartitionSettings `json:"partitionSettings,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + SqlReaderQuery *interface{} `json:"sqlReaderQuery,omitempty"` + SqlReaderStoredProcedureName *interface{} `json:"sqlReaderStoredProcedureName,omitempty"` + StoredProcedureParameters *interface{} `json:"storedProcedureParameters,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivity.go new file mode 100644 index 00000000000..8cfc7113636 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivity.go @@ -0,0 +1,49 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = WebActivity{} + +type WebActivity struct { + LinkedServiceName *LinkedServiceReference `json:"linkedServiceName,omitempty"` + Policy *ActivityPolicy `json:"policy,omitempty"` + TypeProperties WebActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = WebActivity{} + +func (s WebActivity) MarshalJSON() ([]byte, error) { + type wrapper WebActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebActivity: %+v", err) + } + decoded["type"] = "WebActivity" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webactivityauthentication.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivityauthentication.go new file mode 100644 index 00000000000..5e76865acc2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivityauthentication.go @@ -0,0 +1,57 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebActivityAuthentication struct { + Credential *CredentialReference `json:"credential,omitempty"` + Password SecretBase `json:"password"` + Pfx SecretBase `json:"pfx"` + Resource *interface{} `json:"resource,omitempty"` + Type *string `json:"type,omitempty"` + UserTenant *interface{} `json:"userTenant,omitempty"` + Username *interface{} `json:"username,omitempty"` +} + +var _ json.Unmarshaler = &WebActivityAuthentication{} + +func (s *WebActivityAuthentication) UnmarshalJSON(bytes []byte) error { + type alias WebActivityAuthentication + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into WebActivityAuthentication: %+v", err) + } + + s.Credential = decoded.Credential + s.Resource = decoded.Resource + s.Type = decoded.Type + s.UserTenant = decoded.UserTenant + s.Username = decoded.Username + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling WebActivityAuthentication into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["password"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Password' for 'WebActivityAuthentication': %+v", err) + } + s.Password = impl + } + + if v, ok := temp["pfx"]; ok { + impl, err := unmarshalSecretBaseImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Pfx' for 'WebActivityAuthentication': %+v", err) + } + s.Pfx = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivitytypeproperties.go new file mode 100644 index 00000000000..a69960a1b9c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webactivitytypeproperties.go @@ -0,0 +1,18 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebActivityTypeProperties struct { + Authentication *WebActivityAuthentication `json:"authentication,omitempty"` + Body *interface{} `json:"body,omitempty"` + ConnectVia *IntegrationRuntimeReference `json:"connectVia,omitempty"` + Datasets *[]DatasetReference `json:"datasets,omitempty"` + DisableCertValidation *bool `json:"disableCertValidation,omitempty"` + HTTPRequestTimeout *interface{} `json:"httpRequestTimeout,omitempty"` + Headers *map[string]interface{} `json:"headers,omitempty"` + LinkedServices *[]LinkedServiceReference `json:"linkedServices,omitempty"` + Method WebActivityMethod `json:"method"` + TurnOffAsync *bool `json:"turnOffAsync,omitempty"` + Url interface{} `json:"url"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivity.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivity.go new file mode 100644 index 00000000000..5b8ab963ca9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivity.go @@ -0,0 +1,48 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Activity = WebHookActivity{} + +type WebHookActivity struct { + Policy *SecureInputOutputPolicy `json:"policy,omitempty"` + TypeProperties WebHookActivityTypeProperties `json:"typeProperties"` + + // Fields inherited from Activity + DependsOn *[]ActivityDependency `json:"dependsOn,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + OnInactiveMarkAs *ActivityOnInactiveMarkAs `json:"onInactiveMarkAs,omitempty"` + State *ActivityState `json:"state,omitempty"` + UserProperties *[]UserProperty `json:"userProperties,omitempty"` +} + +var _ json.Marshaler = WebHookActivity{} + +func (s WebHookActivity) MarshalJSON() ([]byte, error) { + type wrapper WebHookActivity + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebHookActivity: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebHookActivity: %+v", err) + } + decoded["type"] = "WebHook" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebHookActivity: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivitytypeproperties.go b/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivitytypeproperties.go new file mode 100644 index 00000000000..616052aa34e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_webhookactivitytypeproperties.go @@ -0,0 +1,14 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebHookActivityTypeProperties struct { + Authentication *WebActivityAuthentication `json:"authentication,omitempty"` + Body *interface{} `json:"body,omitempty"` + Headers *map[string]interface{} `json:"headers,omitempty"` + Method WebHookActivityMethod `json:"method"` + ReportStatusOnCallBack *interface{} `json:"reportStatusOnCallBack,omitempty"` + Timeout *string `json:"timeout,omitempty"` + Url interface{} `json:"url"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_websource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_websource.go new file mode 100644 index 00000000000..9291c508aab --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_websource.go @@ -0,0 +1,13 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_xerosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_xerosource.go new file mode 100644 index 00000000000..acda33f5fda --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_xerosource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type XeroSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_xmlreadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlreadsettings.go new file mode 100644 index 00000000000..1d6628b03a9 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlreadsettings.go @@ -0,0 +1,48 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type XmlReadSettings struct { + CompressionProperties CompressionReadSettings `json:"compressionProperties"` + DetectDataType *interface{} `json:"detectDataType,omitempty"` + NamespacePrefixes *interface{} `json:"namespacePrefixes,omitempty"` + Namespaces *interface{} `json:"namespaces,omitempty"` + Type string `json:"type"` + ValidationMode *interface{} `json:"validationMode,omitempty"` +} + +var _ json.Unmarshaler = &XmlReadSettings{} + +func (s *XmlReadSettings) UnmarshalJSON(bytes []byte) error { + type alias XmlReadSettings + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into XmlReadSettings: %+v", err) + } + + s.DetectDataType = decoded.DetectDataType + s.NamespacePrefixes = decoded.NamespacePrefixes + s.Namespaces = decoded.Namespaces + s.Type = decoded.Type + s.ValidationMode = decoded.ValidationMode + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling XmlReadSettings into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["compressionProperties"]; ok { + impl, err := unmarshalCompressionReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'CompressionProperties' for 'XmlReadSettings': %+v", err) + } + s.CompressionProperties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_xmlsource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlsource.go new file mode 100644 index 00000000000..da8cb47c89e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_xmlsource.go @@ -0,0 +1,52 @@ +package pipelines + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type XmlSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + FormatSettings *XmlReadSettings `json:"formatSettings,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + StoreSettings StoreReadSettings `json:"storeSettings"` + Type string `json:"type"` +} + +var _ json.Unmarshaler = &XmlSource{} + +func (s *XmlSource) UnmarshalJSON(bytes []byte) error { + type alias XmlSource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into XmlSource: %+v", err) + } + + s.AdditionalColumns = decoded.AdditionalColumns + s.DisableMetricsCollection = decoded.DisableMetricsCollection + s.FormatSettings = decoded.FormatSettings + s.MaxConcurrentConnections = decoded.MaxConcurrentConnections + s.SourceRetryCount = decoded.SourceRetryCount + s.SourceRetryWait = decoded.SourceRetryWait + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling XmlSource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["storeSettings"]; ok { + impl, err := unmarshalStoreReadSettingsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'StoreSettings' for 'XmlSource': %+v", err) + } + s.StoreSettings = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_zipdeflatereadsettings.go b/resource-manager/datafactory/2018-06-01/pipelines/model_zipdeflatereadsettings.go new file mode 100644 index 00000000000..b699630a0dc --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_zipdeflatereadsettings.go @@ -0,0 +1,9 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ZipDeflateReadSettings struct { + PreserveZipFileNameAsFolder *interface{} `json:"preserveZipFileNameAsFolder,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/pipelines/model_zohosource.go b/resource-manager/datafactory/2018-06-01/pipelines/model_zohosource.go new file mode 100644 index 00000000000..3d0f60569df --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/pipelines/model_zohosource.go @@ -0,0 +1,15 @@ +package pipelines + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ZohoSource struct { + AdditionalColumns *interface{} `json:"additionalColumns,omitempty"` + DisableMetricsCollection *interface{} `json:"disableMetricsCollection,omitempty"` + MaxConcurrentConnections *interface{} `json:"maxConcurrentConnections,omitempty"` + Query *interface{} `json:"query,omitempty"` + QueryTimeout *interface{} `json:"queryTimeout,omitempty"` + SourceRetryCount *interface{} `json:"sourceRetryCount,omitempty"` + SourceRetryWait *interface{} `json:"sourceRetryWait,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/constants.go b/resource-manager/datafactory/2018-06-01/triggers/constants.go index ce16e952cba..cfbc6ce8274 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/constants.go +++ b/resource-manager/datafactory/2018-06-01/triggers/constants.go @@ -9,6 +9,159 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type BlobEventTypes string + +const ( + BlobEventTypesMicrosoftPointStoragePointBlobCreated BlobEventTypes = "Microsoft.Storage.BlobCreated" + BlobEventTypesMicrosoftPointStoragePointBlobDeleted BlobEventTypes = "Microsoft.Storage.BlobDeleted" +) + +func PossibleValuesForBlobEventTypes() []string { + return []string{ + string(BlobEventTypesMicrosoftPointStoragePointBlobCreated), + string(BlobEventTypesMicrosoftPointStoragePointBlobDeleted), + } +} + +func (s *BlobEventTypes) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBlobEventTypes(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBlobEventTypes(input string) (*BlobEventTypes, error) { + vals := map[string]BlobEventTypes{ + "microsoft.storage.blobcreated": BlobEventTypesMicrosoftPointStoragePointBlobCreated, + "microsoft.storage.blobdeleted": BlobEventTypesMicrosoftPointStoragePointBlobDeleted, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BlobEventTypes(input) + return &out, nil +} + +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +func PossibleValuesForDayOfWeek() []string { + return []string{ + string(DayOfWeekFriday), + string(DayOfWeekMonday), + string(DayOfWeekSaturday), + string(DayOfWeekSunday), + string(DayOfWeekThursday), + string(DayOfWeekTuesday), + string(DayOfWeekWednesday), + } +} + +func (s *DayOfWeek) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDayOfWeek(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDayOfWeek(input string) (*DayOfWeek, error) { + vals := map[string]DayOfWeek{ + "friday": DayOfWeekFriday, + "monday": DayOfWeekMonday, + "saturday": DayOfWeekSaturday, + "sunday": DayOfWeekSunday, + "thursday": DayOfWeekThursday, + "tuesday": DayOfWeekTuesday, + "wednesday": DayOfWeekWednesday, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DayOfWeek(input) + return &out, nil +} + +type DaysOfWeek string + +const ( + DaysOfWeekFriday DaysOfWeek = "Friday" + DaysOfWeekMonday DaysOfWeek = "Monday" + DaysOfWeekSaturday DaysOfWeek = "Saturday" + DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekThursday DaysOfWeek = "Thursday" + DaysOfWeekTuesday DaysOfWeek = "Tuesday" + DaysOfWeekWednesday DaysOfWeek = "Wednesday" +) + +func PossibleValuesForDaysOfWeek() []string { + return []string{ + string(DaysOfWeekFriday), + string(DaysOfWeekMonday), + string(DaysOfWeekSaturday), + string(DaysOfWeekSunday), + string(DaysOfWeekThursday), + string(DaysOfWeekTuesday), + string(DaysOfWeekWednesday), + } +} + +func (s *DaysOfWeek) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDaysOfWeek(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDaysOfWeek(input string) (*DaysOfWeek, error) { + vals := map[string]DaysOfWeek{ + "friday": DaysOfWeekFriday, + "monday": DaysOfWeekMonday, + "saturday": DaysOfWeekSaturday, + "sunday": DaysOfWeekSunday, + "thursday": DaysOfWeekThursday, + "tuesday": DaysOfWeekTuesday, + "wednesday": DaysOfWeekWednesday, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DaysOfWeek(input) + return &out, nil +} + type EventSubscriptionStatus string const ( @@ -59,6 +212,138 @@ func parseEventSubscriptionStatus(input string) (*EventSubscriptionStatus, error return &out, nil } +type PipelineReferenceType string + +const ( + PipelineReferenceTypePipelineReference PipelineReferenceType = "PipelineReference" +) + +func PossibleValuesForPipelineReferenceType() []string { + return []string{ + string(PipelineReferenceTypePipelineReference), + } +} + +func (s *PipelineReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePipelineReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePipelineReferenceType(input string) (*PipelineReferenceType, error) { + vals := map[string]PipelineReferenceType{ + "pipelinereference": PipelineReferenceTypePipelineReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PipelineReferenceType(input) + return &out, nil +} + +type RecurrenceFrequency string + +const ( + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" + RecurrenceFrequencyYear RecurrenceFrequency = "Year" +) + +func PossibleValuesForRecurrenceFrequency() []string { + return []string{ + string(RecurrenceFrequencyDay), + string(RecurrenceFrequencyHour), + string(RecurrenceFrequencyMinute), + string(RecurrenceFrequencyMonth), + string(RecurrenceFrequencyNotSpecified), + string(RecurrenceFrequencyWeek), + string(RecurrenceFrequencyYear), + } +} + +func (s *RecurrenceFrequency) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRecurrenceFrequency(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRecurrenceFrequency(input string) (*RecurrenceFrequency, error) { + vals := map[string]RecurrenceFrequency{ + "day": RecurrenceFrequencyDay, + "hour": RecurrenceFrequencyHour, + "minute": RecurrenceFrequencyMinute, + "month": RecurrenceFrequencyMonth, + "notspecified": RecurrenceFrequencyNotSpecified, + "week": RecurrenceFrequencyWeek, + "year": RecurrenceFrequencyYear, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RecurrenceFrequency(input) + return &out, nil +} + +type TriggerReferenceType string + +const ( + TriggerReferenceTypeTriggerReference TriggerReferenceType = "TriggerReference" +) + +func PossibleValuesForTriggerReferenceType() []string { + return []string{ + string(TriggerReferenceTypeTriggerReference), + } +} + +func (s *TriggerReferenceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTriggerReferenceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTriggerReferenceType(input string) (*TriggerReferenceType, error) { + vals := map[string]TriggerReferenceType{ + "triggerreference": TriggerReferenceTypeTriggerReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TriggerReferenceType(input) + return &out, nil +} + type TriggerRuntimeState string const ( @@ -102,3 +387,85 @@ func parseTriggerRuntimeState(input string) (*TriggerRuntimeState, error) { out := TriggerRuntimeState(input) return &out, nil } + +type TumblingWindowFrequency string + +const ( + TumblingWindowFrequencyHour TumblingWindowFrequency = "Hour" + TumblingWindowFrequencyMinute TumblingWindowFrequency = "Minute" + TumblingWindowFrequencyMonth TumblingWindowFrequency = "Month" +) + +func PossibleValuesForTumblingWindowFrequency() []string { + return []string{ + string(TumblingWindowFrequencyHour), + string(TumblingWindowFrequencyMinute), + string(TumblingWindowFrequencyMonth), + } +} + +func (s *TumblingWindowFrequency) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseTumblingWindowFrequency(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseTumblingWindowFrequency(input string) (*TumblingWindowFrequency, error) { + vals := map[string]TumblingWindowFrequency{ + "hour": TumblingWindowFrequencyHour, + "minute": TumblingWindowFrequencyMinute, + "month": TumblingWindowFrequencyMonth, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := TumblingWindowFrequency(input) + return &out, nil +} + +type Type string + +const ( + TypeLinkedServiceReference Type = "LinkedServiceReference" +) + +func PossibleValuesForType() []string { + return []string{ + string(TypeLinkedServiceReference), + } +} + +func (s *Type) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseType(input string) (*Type, error) { + vals := map[string]Type{ + "linkedservicereference": TypeLinkedServiceReference, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Type(input) + return &out, nil +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstrigger.go new file mode 100644 index 00000000000..c29aabc5058 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstrigger.go @@ -0,0 +1,13 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobEventsTrigger struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Pipelines *[]TriggerPipelineReference `json:"pipelines,omitempty"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` + TypeProperties BlobEventsTriggerTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstriggertypeproperties.go new file mode 100644 index 00000000000..d5175c56cd2 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_blobeventstriggertypeproperties.go @@ -0,0 +1,12 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobEventsTriggerTypeProperties struct { + BlobPathBeginsWith *string `json:"blobPathBeginsWith,omitempty"` + BlobPathEndsWith *string `json:"blobPathEndsWith,omitempty"` + Events []BlobEventTypes `json:"events"` + IgnoreEmptyBlobs *bool `json:"ignoreEmptyBlobs,omitempty"` + Scope string `json:"scope"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_blobtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_blobtrigger.go new file mode 100644 index 00000000000..cfb122c1142 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_blobtrigger.go @@ -0,0 +1,13 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobTrigger struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Pipelines *[]TriggerPipelineReference `json:"pipelines,omitempty"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` + TypeProperties BlobTriggerTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_blobtriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_blobtriggertypeproperties.go new file mode 100644 index 00000000000..0da9650a437 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_blobtriggertypeproperties.go @@ -0,0 +1,10 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BlobTriggerTypeProperties struct { + FolderPath string `json:"folderPath"` + LinkedService LinkedServiceReference `json:"linkedService"` + MaxConcurrency int64 `json:"maxConcurrency"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_chainingtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_chainingtrigger.go new file mode 100644 index 00000000000..6cbdd736539 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_chainingtrigger.go @@ -0,0 +1,13 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ChainingTrigger struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Pipeline TriggerPipelineReference `json:"pipeline"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` + TypeProperties ChainingTriggerTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_chainingtriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_chainingtriggertypeproperties.go new file mode 100644 index 00000000000..cc38b634f0d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_chainingtriggertypeproperties.go @@ -0,0 +1,9 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ChainingTriggerTypeProperties struct { + DependsOn []PipelineReference `json:"dependsOn"` + RunDimension string `json:"runDimension"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_customeventstrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_customeventstrigger.go new file mode 100644 index 00000000000..5eaecf3964b --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_customeventstrigger.go @@ -0,0 +1,13 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomEventsTrigger struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Pipelines *[]TriggerPipelineReference `json:"pipelines,omitempty"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` + TypeProperties CustomEventsTriggerTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_customeventstriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_customeventstriggertypeproperties.go new file mode 100644 index 00000000000..7cd0ccb9327 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_customeventstriggertypeproperties.go @@ -0,0 +1,11 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CustomEventsTriggerTypeProperties struct { + Events []interface{} `json:"events"` + Scope string `json:"scope"` + SubjectBeginsWith *string `json:"subjectBeginsWith,omitempty"` + SubjectEndsWith *string `json:"subjectEndsWith,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_dependencyreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_dependencyreference.go new file mode 100644 index 00000000000..3e32fe3ab96 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_dependencyreference.go @@ -0,0 +1,44 @@ +package triggers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DependencyReference interface { +} + +// RawDependencyReferenceImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawDependencyReferenceImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalDependencyReferenceImplementation(input []byte) (DependencyReference, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling DependencyReference into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + out := RawDependencyReferenceImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_linkedservicereference.go b/resource-manager/datafactory/2018-06-01/triggers/model_linkedservicereference.go new file mode 100644 index 00000000000..a8b093c363d --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_linkedservicereference.go @@ -0,0 +1,10 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LinkedServiceReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + ReferenceName string `json:"referenceName"` + Type Type `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_multiplepipelinetrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_multiplepipelinetrigger.go new file mode 100644 index 00000000000..51338a08321 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_multiplepipelinetrigger.go @@ -0,0 +1,44 @@ +package triggers + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Trigger = MultiplePipelineTrigger{} + +type MultiplePipelineTrigger struct { + Pipelines *[]TriggerPipelineReference `json:"pipelines,omitempty"` + + // Fields inherited from Trigger + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` +} + +var _ json.Marshaler = MultiplePipelineTrigger{} + +func (s MultiplePipelineTrigger) MarshalJSON() ([]byte, error) { + type wrapper MultiplePipelineTrigger + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MultiplePipelineTrigger: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MultiplePipelineTrigger: %+v", err) + } + decoded["type"] = "MultiplePipelineTrigger" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MultiplePipelineTrigger: %+v", err) + } + + return encoded, nil +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_pipelinereference.go b/resource-manager/datafactory/2018-06-01/triggers/model_pipelinereference.go new file mode 100644 index 00000000000..d0484491d97 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_pipelinereference.go @@ -0,0 +1,10 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PipelineReference struct { + Name *string `json:"name,omitempty"` + ReferenceName string `json:"referenceName"` + Type PipelineReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_recurrenceschedule.go b/resource-manager/datafactory/2018-06-01/triggers/model_recurrenceschedule.go new file mode 100644 index 00000000000..f2904e6a17f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_recurrenceschedule.go @@ -0,0 +1,12 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RecurrenceSchedule struct { + Hours *[]int64 `json:"hours,omitempty"` + Minutes *[]int64 `json:"minutes,omitempty"` + MonthDays *[]int64 `json:"monthDays,omitempty"` + MonthlyOccurrences *[]RecurrenceScheduleOccurrence `json:"monthlyOccurrences,omitempty"` + WeekDays *[]DaysOfWeek `json:"weekDays,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_recurrencescheduleoccurrence.go b/resource-manager/datafactory/2018-06-01/triggers/model_recurrencescheduleoccurrence.go new file mode 100644 index 00000000000..eda1d290606 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_recurrencescheduleoccurrence.go @@ -0,0 +1,9 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RecurrenceScheduleOccurrence struct { + Day *DayOfWeek `json:"day,omitempty"` + Occurrence *int64 `json:"occurrence,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtrigger.go new file mode 100644 index 00000000000..a2033001dfe --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtrigger.go @@ -0,0 +1,12 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RerunTumblingWindowTrigger struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` + TypeProperties RerunTumblingWindowTriggerTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtriggertypeproperties.go new file mode 100644 index 00000000000..85e6c92a93f --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_reruntumblingwindowtriggertypeproperties.go @@ -0,0 +1,35 @@ +package triggers + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RerunTumblingWindowTriggerTypeProperties struct { + ParentTrigger interface{} `json:"parentTrigger"` + RequestedEndTime string `json:"requestedEndTime"` + RequestedStartTime string `json:"requestedStartTime"` + RerunConcurrency int64 `json:"rerunConcurrency"` +} + +func (o *RerunTumblingWindowTriggerTypeProperties) GetRequestedEndTimeAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.RequestedEndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *RerunTumblingWindowTriggerTypeProperties) SetRequestedEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RequestedEndTime = formatted +} + +func (o *RerunTumblingWindowTriggerTypeProperties) GetRequestedStartTimeAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.RequestedStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *RerunTumblingWindowTriggerTypeProperties) SetRequestedStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RequestedStartTime = formatted +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_retrypolicy.go b/resource-manager/datafactory/2018-06-01/triggers/model_retrypolicy.go new file mode 100644 index 00000000000..1bb57a8ce57 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_retrypolicy.go @@ -0,0 +1,9 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type RetryPolicy struct { + Count *interface{} `json:"count,omitempty"` + IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_scheduletrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletrigger.go new file mode 100644 index 00000000000..5c76ff7bc0c --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletrigger.go @@ -0,0 +1,13 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScheduleTrigger struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Pipelines *[]TriggerPipelineReference `json:"pipelines,omitempty"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` + TypeProperties ScheduleTriggerTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_scheduletriggerrecurrence.go b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletriggerrecurrence.go new file mode 100644 index 00000000000..603d4f31ebb --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletriggerrecurrence.go @@ -0,0 +1,43 @@ +package triggers + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScheduleTriggerRecurrence struct { + EndTime *string `json:"endTime,omitempty"` + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` + Interval *int64 `json:"interval,omitempty"` + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` + StartTime *string `json:"startTime,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` +} + +func (o *ScheduleTriggerRecurrence) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ScheduleTriggerRecurrence) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *ScheduleTriggerRecurrence) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ScheduleTriggerRecurrence) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_scheduletriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletriggertypeproperties.go new file mode 100644 index 00000000000..543a3650b9e --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_scheduletriggertypeproperties.go @@ -0,0 +1,8 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ScheduleTriggerTypeProperties struct { + Recurrence ScheduleTriggerRecurrence `json:"recurrence"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_selfdependencytumblingwindowtriggerreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_selfdependencytumblingwindowtriggerreference.go new file mode 100644 index 00000000000..72de44e57db --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_selfdependencytumblingwindowtriggerreference.go @@ -0,0 +1,10 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SelfDependencyTumblingWindowTriggerReference struct { + Offset string `json:"offset"` + Size *string `json:"size,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go index 560bb0344b3..6aef3fcd8ae 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_trigger.go @@ -1,11 +1,53 @@ package triggers +import ( + "encoding/json" + "fmt" + "strings" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type Trigger struct { - Annotations *[]interface{} `json:"annotations,omitempty"` - Description *string `json:"description,omitempty"` - RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` - Type string `json:"type"` +type Trigger interface { +} + +// RawTriggerImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawTriggerImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalTriggerImplementation(input []byte) (Trigger, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling Trigger into map[string]interface: %+v", err) + } + + value, ok := temp["type"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "MultiplePipelineTrigger") { + var out MultiplePipelineTrigger + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MultiplePipelineTrigger: %+v", err) + } + return out, nil + } + + out := RawTriggerImpl{ + Type: value, + Values: temp, + } + return out, nil + } diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_triggerdependencyreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_triggerdependencyreference.go new file mode 100644 index 00000000000..f135780f238 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_triggerdependencyreference.go @@ -0,0 +1,9 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TriggerDependencyReference struct { + ReferenceTrigger TriggerReference `json:"referenceTrigger"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_triggerpipelinereference.go b/resource-manager/datafactory/2018-06-01/triggers/model_triggerpipelinereference.go new file mode 100644 index 00000000000..a9e34e1ebb7 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_triggerpipelinereference.go @@ -0,0 +1,9 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TriggerPipelineReference struct { + Parameters *map[string]interface{} `json:"parameters,omitempty"` + PipelineReference *PipelineReference `json:"pipelineReference,omitempty"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_triggerreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_triggerreference.go new file mode 100644 index 00000000000..08304d55760 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_triggerreference.go @@ -0,0 +1,9 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TriggerReference struct { + ReferenceName string `json:"referenceName"` + Type TriggerReferenceType `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go b/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go index 177b0d518a0..c9c0fe89895 100644 --- a/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go +++ b/resource-manager/datafactory/2018-06-01/triggers/model_triggerresource.go @@ -1,5 +1,10 @@ package triggers +import ( + "encoding/json" + "fmt" +) + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -10,3 +15,32 @@ type TriggerResource struct { Properties Trigger `json:"properties"` Type *string `json:"type,omitempty"` } + +var _ json.Unmarshaler = &TriggerResource{} + +func (s *TriggerResource) UnmarshalJSON(bytes []byte) error { + type alias TriggerResource + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into TriggerResource: %+v", err) + } + + s.Etag = decoded.Etag + s.Id = decoded.Id + s.Name = decoded.Name + s.Type = decoded.Type + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling TriggerResource into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalTriggerImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'TriggerResource': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtrigger.go b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtrigger.go new file mode 100644 index 00000000000..0ae091f3a84 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtrigger.go @@ -0,0 +1,13 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TumblingWindowTrigger struct { + Annotations *[]interface{} `json:"annotations,omitempty"` + Description *string `json:"description,omitempty"` + Pipeline TriggerPipelineReference `json:"pipeline"` + RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"` + Type string `json:"type"` + TypeProperties TumblingWindowTriggerTypeProperties `json:"typeProperties"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggerdependencyreference.go b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggerdependencyreference.go new file mode 100644 index 00000000000..0a207483377 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggerdependencyreference.go @@ -0,0 +1,11 @@ +package triggers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TumblingWindowTriggerDependencyReference struct { + Offset *string `json:"offset,omitempty"` + ReferenceTrigger TriggerReference `json:"referenceTrigger"` + Size *string `json:"size,omitempty"` + Type string `json:"type"` +} diff --git a/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggertypeproperties.go b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggertypeproperties.go new file mode 100644 index 00000000000..5c4b0a71ef4 --- /dev/null +++ b/resource-manager/datafactory/2018-06-01/triggers/model_tumblingwindowtriggertypeproperties.go @@ -0,0 +1,85 @@ +package triggers + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TumblingWindowTriggerTypeProperties struct { + Delay *interface{} `json:"delay,omitempty"` + DependsOn *[]DependencyReference `json:"dependsOn,omitempty"` + EndTime *string `json:"endTime,omitempty"` + Frequency TumblingWindowFrequency `json:"frequency"` + Interval int64 `json:"interval"` + MaxConcurrency int64 `json:"maxConcurrency"` + RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"` + StartTime string `json:"startTime"` +} + +func (o *TumblingWindowTriggerTypeProperties) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *TumblingWindowTriggerTypeProperties) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *TumblingWindowTriggerTypeProperties) GetStartTimeAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *TumblingWindowTriggerTypeProperties) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = formatted +} + +var _ json.Unmarshaler = &TumblingWindowTriggerTypeProperties{} + +func (s *TumblingWindowTriggerTypeProperties) UnmarshalJSON(bytes []byte) error { + type alias TumblingWindowTriggerTypeProperties + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into TumblingWindowTriggerTypeProperties: %+v", err) + } + + s.Delay = decoded.Delay + s.EndTime = decoded.EndTime + s.Frequency = decoded.Frequency + s.Interval = decoded.Interval + s.MaxConcurrency = decoded.MaxConcurrency + s.RetryPolicy = decoded.RetryPolicy + s.StartTime = decoded.StartTime + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling TumblingWindowTriggerTypeProperties into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["dependsOn"]; ok { + var listTemp []json.RawMessage + if err := json.Unmarshal(v, &listTemp); err != nil { + return fmt.Errorf("unmarshaling DependsOn into list []json.RawMessage: %+v", err) + } + + output := make([]DependencyReference, 0) + for i, val := range listTemp { + impl, err := unmarshalDependencyReferenceImplementation(val) + if err != nil { + return fmt.Errorf("unmarshaling index %d field 'DependsOn' for 'TumblingWindowTriggerTypeProperties': %+v", i, err) + } + output = append(output, impl) + } + s.DependsOn = &output + } + return nil +} diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/constants.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/constants.go index 5cf27d5c392..e22eae4b74d 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/constants.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/constants.go @@ -53,6 +53,44 @@ func parseAADObjectType(input string) (*AADObjectType, error) { return &out, nil } +type CheckNameAvailabilityParametersType string + +const ( + CheckNameAvailabilityParametersTypeMicrosoftPointDataLakeAnalyticsAccounts CheckNameAvailabilityParametersType = "Microsoft.DataLakeAnalytics/accounts" +) + +func PossibleValuesForCheckNameAvailabilityParametersType() []string { + return []string{ + string(CheckNameAvailabilityParametersTypeMicrosoftPointDataLakeAnalyticsAccounts), + } +} + +func (s *CheckNameAvailabilityParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityParametersType(input string) (*CheckNameAvailabilityParametersType, error) { + vals := map[string]CheckNameAvailabilityParametersType{ + "microsoft.datalakeanalytics/accounts": CheckNameAvailabilityParametersTypeMicrosoftPointDataLakeAnalyticsAccounts, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityParametersType(input) + return &out, nil +} + type DataLakeAnalyticsAccountState string const ( @@ -394,44 +432,6 @@ func parseTierType(input string) (*TierType, error) { return &out, nil } -type Type string - -const ( - TypeMicrosoftPointDataLakeAnalyticsAccounts Type = "Microsoft.DataLakeAnalytics/accounts" -) - -func PossibleValuesForType() []string { - return []string{ - string(TypeMicrosoftPointDataLakeAnalyticsAccounts), - } -} - -func (s *Type) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseType(input string) (*Type, error) { - vals := map[string]Type{ - "microsoft.datalakeanalytics/accounts": TypeMicrosoftPointDataLakeAnalyticsAccounts, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Type(input) - return &out, nil -} - type VirtualNetworkRuleState string const ( diff --git a/resource-manager/datalakeanalytics/2016-11-01/accounts/model_checknameavailabilityparameters.go b/resource-manager/datalakeanalytics/2016-11-01/accounts/model_checknameavailabilityparameters.go index f2ecfa57bc8..687a9796638 100644 --- a/resource-manager/datalakeanalytics/2016-11-01/accounts/model_checknameavailabilityparameters.go +++ b/resource-manager/datalakeanalytics/2016-11-01/accounts/model_checknameavailabilityparameters.go @@ -4,6 +4,6 @@ package accounts // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CheckNameAvailabilityParameters struct { - Name string `json:"name"` - Type Type `json:"type"` + Name string `json:"name"` + Type CheckNameAvailabilityParametersType `json:"type"` } diff --git a/resource-manager/datalakestore/2016-11-01/accounts/constants.go b/resource-manager/datalakestore/2016-11-01/accounts/constants.go index c14fb48b3f3..91b17705ccb 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/constants.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/constants.go @@ -9,6 +9,44 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type CheckNameAvailabilityParametersType string + +const ( + CheckNameAvailabilityParametersTypeMicrosoftPointDataLakeStoreAccounts CheckNameAvailabilityParametersType = "Microsoft.DataLakeStore/accounts" +) + +func PossibleValuesForCheckNameAvailabilityParametersType() []string { + return []string{ + string(CheckNameAvailabilityParametersTypeMicrosoftPointDataLakeStoreAccounts), + } +} + +func (s *CheckNameAvailabilityParametersType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityParametersType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityParametersType(input string) (*CheckNameAvailabilityParametersType, error) { + vals := map[string]CheckNameAvailabilityParametersType{ + "microsoft.datalakestore/accounts": CheckNameAvailabilityParametersTypeMicrosoftPointDataLakeStoreAccounts, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityParametersType(input) + return &out, nil +} + type DataLakeStoreAccountState string const ( @@ -419,41 +457,3 @@ func parseTrustedIdProviderState(input string) (*TrustedIdProviderState, error) out := TrustedIdProviderState(input) return &out, nil } - -type Type string - -const ( - TypeMicrosoftPointDataLakeStoreAccounts Type = "Microsoft.DataLakeStore/accounts" -) - -func PossibleValuesForType() []string { - return []string{ - string(TypeMicrosoftPointDataLakeStoreAccounts), - } -} - -func (s *Type) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseType(input string) (*Type, error) { - vals := map[string]Type{ - "microsoft.datalakestore/accounts": TypeMicrosoftPointDataLakeStoreAccounts, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Type(input) - return &out, nil -} diff --git a/resource-manager/datalakestore/2016-11-01/accounts/model_checknameavailabilityparameters.go b/resource-manager/datalakestore/2016-11-01/accounts/model_checknameavailabilityparameters.go index f2ecfa57bc8..687a9796638 100644 --- a/resource-manager/datalakestore/2016-11-01/accounts/model_checknameavailabilityparameters.go +++ b/resource-manager/datalakestore/2016-11-01/accounts/model_checknameavailabilityparameters.go @@ -4,6 +4,6 @@ package accounts // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type CheckNameAvailabilityParameters struct { - Name string `json:"name"` - Type Type `json:"type"` + Name string `json:"name"` + Type CheckNameAvailabilityParametersType `json:"type"` } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go b/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go index cdc7ce559fe..fbb80a74952 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go @@ -50,26 +50,26 @@ func parseExpand(input string) (*Expand, error) { return &out, nil } -type Type string +type ManagementGroupChildType string const ( - TypeMicrosoftPointManagementManagementGroups Type = "Microsoft.Management/managementGroups" - TypeSubscriptions Type = "/subscriptions" + ManagementGroupChildTypeMicrosoftPointManagementManagementGroups ManagementGroupChildType = "Microsoft.Management/managementGroups" + ManagementGroupChildTypeSubscriptions ManagementGroupChildType = "/subscriptions" ) -func PossibleValuesForType() []string { +func PossibleValuesForManagementGroupChildType() []string { return []string{ - string(TypeMicrosoftPointManagementManagementGroups), - string(TypeSubscriptions), + string(ManagementGroupChildTypeMicrosoftPointManagementManagementGroups), + string(ManagementGroupChildTypeSubscriptions), } } -func (s *Type) UnmarshalJSON(bytes []byte) error { +func (s *ManagementGroupChildType) UnmarshalJSON(bytes []byte) error { var decoded string if err := json.Unmarshal(bytes, &decoded); err != nil { return fmt.Errorf("unmarshaling: %+v", err) } - out, err := parseType(decoded) + out, err := parseManagementGroupChildType(decoded) if err != nil { return fmt.Errorf("parsing %q: %+v", decoded, err) } @@ -77,16 +77,16 @@ func (s *Type) UnmarshalJSON(bytes []byte) error { return nil } -func parseType(input string) (*Type, error) { - vals := map[string]Type{ - "microsoft.management/managementgroups": TypeMicrosoftPointManagementManagementGroups, - "/subscriptions": TypeSubscriptions, +func parseManagementGroupChildType(input string) (*ManagementGroupChildType, error) { + vals := map[string]ManagementGroupChildType{ + "microsoft.management/managementgroups": ManagementGroupChildTypeMicrosoftPointManagementManagementGroups, + "/subscriptions": ManagementGroupChildTypeSubscriptions, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } // otherwise presume it's an undefined value and best-effort it - out := Type(input) + out := ManagementGroupChildType(input) return &out, nil } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go b/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go index 668a9fc082f..cad7e9197be 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go @@ -8,5 +8,5 @@ type CreateManagementGroupChildInfo struct { DisplayName *string `json:"displayName,omitempty"` Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` - Type *Type `json:"type,omitempty"` + Type *ManagementGroupChildType `json:"type,omitempty"` } diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go b/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go index fea1b1aba48..9992212a850 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go +++ b/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go @@ -8,5 +8,5 @@ type ManagementGroupChildInfo struct { DisplayName *string `json:"displayName,omitempty"` Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` - Type *Type `json:"type,omitempty"` + Type *ManagementGroupChildType `json:"type,omitempty"` } diff --git a/resource-manager/security/2020-01-01/applicationwhitelistings/constants.go b/resource-manager/security/2020-01-01/applicationwhitelistings/constants.go index d4d2c969d58..5a0d0b23a27 100644 --- a/resource-manager/security/2020-01-01/applicationwhitelistings/constants.go +++ b/resource-manager/security/2020-01-01/applicationwhitelistings/constants.go @@ -520,6 +520,59 @@ func parseRecommendationStatus(input string) (*RecommendationStatus, error) { return &out, nil } +type RecommendationType string + +const ( + RecommendationTypeBinarySignature RecommendationType = "BinarySignature" + RecommendationTypeFile RecommendationType = "File" + RecommendationTypeFileHash RecommendationType = "FileHash" + RecommendationTypeProductSignature RecommendationType = "ProductSignature" + RecommendationTypePublisherSignature RecommendationType = "PublisherSignature" + RecommendationTypeVersionAndAboveSignature RecommendationType = "VersionAndAboveSignature" +) + +func PossibleValuesForRecommendationType() []string { + return []string{ + string(RecommendationTypeBinarySignature), + string(RecommendationTypeFile), + string(RecommendationTypeFileHash), + string(RecommendationTypeProductSignature), + string(RecommendationTypePublisherSignature), + string(RecommendationTypeVersionAndAboveSignature), + } +} + +func (s *RecommendationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseRecommendationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseRecommendationType(input string) (*RecommendationType, error) { + vals := map[string]RecommendationType{ + "binarysignature": RecommendationTypeBinarySignature, + "file": RecommendationTypeFile, + "filehash": RecommendationTypeFileHash, + "productsignature": RecommendationTypeProductSignature, + "publishersignature": RecommendationTypePublisherSignature, + "versionandabovesignature": RecommendationTypeVersionAndAboveSignature, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := RecommendationType(input) + return &out, nil +} + type Script string const ( @@ -613,56 +666,3 @@ func parseSourceSystem(input string) (*SourceSystem, error) { out := SourceSystem(input) return &out, nil } - -type Type string - -const ( - TypeBinarySignature Type = "BinarySignature" - TypeFile Type = "File" - TypeFileHash Type = "FileHash" - TypeProductSignature Type = "ProductSignature" - TypePublisherSignature Type = "PublisherSignature" - TypeVersionAndAboveSignature Type = "VersionAndAboveSignature" -) - -func PossibleValuesForType() []string { - return []string{ - string(TypeBinarySignature), - string(TypeFile), - string(TypeFileHash), - string(TypeProductSignature), - string(TypePublisherSignature), - string(TypeVersionAndAboveSignature), - } -} - -func (s *Type) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseType(input string) (*Type, error) { - vals := map[string]Type{ - "binarysignature": TypeBinarySignature, - "file": TypeFile, - "filehash": TypeFileHash, - "productsignature": TypeProductSignature, - "publishersignature": TypePublisherSignature, - "versionandabovesignature": TypeVersionAndAboveSignature, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Type(input) - return &out, nil -} diff --git a/resource-manager/security/2020-01-01/applicationwhitelistings/model_pathrecommendation.go b/resource-manager/security/2020-01-01/applicationwhitelistings/model_pathrecommendation.go index 6f175ddbf7b..82505338b9e 100644 --- a/resource-manager/security/2020-01-01/applicationwhitelistings/model_pathrecommendation.go +++ b/resource-manager/security/2020-01-01/applicationwhitelistings/model_pathrecommendation.go @@ -10,7 +10,7 @@ type PathRecommendation struct { FileType *FileType `json:"fileType,omitempty"` Path *string `json:"path,omitempty"` PublisherInfo *PublisherInfo `json:"publisherInfo,omitempty"` - Type *Type `json:"type,omitempty"` + Type *RecommendationType `json:"type,omitempty"` UserSids *[]string `json:"userSids,omitempty"` Usernames *[]UserRecommendation `json:"usernames,omitempty"` }