Skip to content

Commit

Permalink
Generated from 1cac6227f3d809cbabebc0ca1140469c9d2a7030 (#5872)
Browse files Browse the repository at this point in the history
remove unnecessary additional property
  • Loading branch information
AutorestCI authored Sep 25, 2019
1 parent 4c3affc commit 237826d
Showing 1 changed file with 0 additions and 210 deletions.
210 changes: 0 additions & 210 deletions services/datafactory/mgmt/2018-06-01/datafactory/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -62662,170 +62662,22 @@ func (dfr *DataFlowResource) UnmarshalJSON(body []byte) error {
type DataFlowSink struct {
// Dataset - Dataset reference.
Dataset *DatasetReference `json:"dataset,omitempty"`
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
// Name - Transformation name.
Name *string `json:"name,omitempty"`
// Description - Transformation description.
Description *string `json:"description,omitempty"`
}

// MarshalJSON is the custom marshaler for DataFlowSink.
func (dfs DataFlowSink) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if dfs.Dataset != nil {
objectMap["dataset"] = dfs.Dataset
}
if dfs.Name != nil {
objectMap["name"] = dfs.Name
}
if dfs.Description != nil {
objectMap["description"] = dfs.Description
}
for k, v := range dfs.AdditionalProperties {
objectMap[k] = v
}
return json.Marshal(objectMap)
}

// UnmarshalJSON is the custom unmarshaler for DataFlowSink struct.
func (dfs *DataFlowSink) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "dataset":
if v != nil {
var dataset DatasetReference
err = json.Unmarshal(*v, &dataset)
if err != nil {
return err
}
dfs.Dataset = &dataset
}
default:
if v != nil {
var additionalProperties interface{}
err = json.Unmarshal(*v, &additionalProperties)
if err != nil {
return err
}
if dfs.AdditionalProperties == nil {
dfs.AdditionalProperties = make(map[string]interface{})
}
dfs.AdditionalProperties[k] = additionalProperties
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
dfs.Name = &name
}
case "description":
if v != nil {
var description string
err = json.Unmarshal(*v, &description)
if err != nil {
return err
}
dfs.Description = &description
}
}
}

return nil
}

// DataFlowSource transformation for data flow source.
type DataFlowSource struct {
// Dataset - Dataset reference.
Dataset *DatasetReference `json:"dataset,omitempty"`
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
// Name - Transformation name.
Name *string `json:"name,omitempty"`
// Description - Transformation description.
Description *string `json:"description,omitempty"`
}

// MarshalJSON is the custom marshaler for DataFlowSource.
func (dfs DataFlowSource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if dfs.Dataset != nil {
objectMap["dataset"] = dfs.Dataset
}
if dfs.Name != nil {
objectMap["name"] = dfs.Name
}
if dfs.Description != nil {
objectMap["description"] = dfs.Description
}
for k, v := range dfs.AdditionalProperties {
objectMap[k] = v
}
return json.Marshal(objectMap)
}

// UnmarshalJSON is the custom unmarshaler for DataFlowSource struct.
func (dfs *DataFlowSource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "dataset":
if v != nil {
var dataset DatasetReference
err = json.Unmarshal(*v, &dataset)
if err != nil {
return err
}
dfs.Dataset = &dataset
}
default:
if v != nil {
var additionalProperties interface{}
err = json.Unmarshal(*v, &additionalProperties)
if err != nil {
return err
}
if dfs.AdditionalProperties == nil {
dfs.AdditionalProperties = make(map[string]interface{})
}
dfs.AdditionalProperties[k] = additionalProperties
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
dfs.Name = &name
}
case "description":
if v != nil {
var description string
err = json.Unmarshal(*v, &description)
if err != nil {
return err
}
dfs.Description = &description
}
}
}

return nil
}

// DataFlowSourceSetting definition of data flow source setting for debug.
type DataFlowSourceSetting struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
Expand Down Expand Up @@ -203641,74 +203493,12 @@ func (tf *TextFormat) UnmarshalJSON(body []byte) error {

// Transformation a data flow transformation.
type Transformation struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
// Name - Transformation name.
Name *string `json:"name,omitempty"`
// Description - Transformation description.
Description *string `json:"description,omitempty"`
}

// MarshalJSON is the custom marshaler for Transformation.
func (t Transformation) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if t.Name != nil {
objectMap["name"] = t.Name
}
if t.Description != nil {
objectMap["description"] = t.Description
}
for k, v := range t.AdditionalProperties {
objectMap[k] = v
}
return json.Marshal(objectMap)
}

// UnmarshalJSON is the custom unmarshaler for Transformation struct.
func (t *Transformation) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
default:
if v != nil {
var additionalProperties interface{}
err = json.Unmarshal(*v, &additionalProperties)
if err != nil {
return err
}
if t.AdditionalProperties == nil {
t.AdditionalProperties = make(map[string]interface{})
}
t.AdditionalProperties[k] = additionalProperties
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
t.Name = &name
}
case "description":
if v != nil {
var description string
err = json.Unmarshal(*v, &description)
if err != nil {
return err
}
t.Description = &description
}
}
}

return nil
}

// BasicTrigger azure data factory nested object which contains information about creating pipeline run
type BasicTrigger interface {
AsRerunTumblingWindowTrigger() (*RerunTumblingWindowTrigger, bool)
Expand Down

0 comments on commit 237826d

Please sign in to comment.