Skip to content

Commit

Permalink
Merge pull request hashicorp#947 from hashicorp/auto-pr/676871bf
Browse files Browse the repository at this point in the history
Auto PR: Regenerating the Go SDK (0515d69)
tombuildsstuff authored Mar 27, 2024
2 parents 604facc + 0515d69 commit be1d653
Showing 240 changed files with 9,960 additions and 1,005 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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 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"`
}
Original file line number Diff line number Diff line change
@@ -1,12 +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.

var _ DatasetLocation = AmazonS3CompatibleLocation{}

type AmazonS3CompatibleLocation struct {
BucketName *interface{} `json:"bucketName,omitempty"`
Version *interface{} `json:"version,omitempty"`

// Fields inherited from DatasetLocation
FileName *interface{} `json:"fileName,omitempty"`
FolderPath *interface{} `json:"folderPath,omitempty"`
Type string `json:"type"`
Version *interface{} `json:"version,omitempty"`
}

var _ json.Marshaler = AmazonS3CompatibleLocation{}

func (s AmazonS3CompatibleLocation) MarshalJSON() ([]byte, error) {
type wrapper AmazonS3CompatibleLocation
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling AmazonS3CompatibleLocation: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling AmazonS3CompatibleLocation: %+v", err)
}
decoded["type"] = "AmazonS3CompatibleLocation"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling AmazonS3CompatibleLocation: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -1,12 +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.

var _ DatasetLocation = AmazonS3Location{}

type AmazonS3Location struct {
BucketName *interface{} `json:"bucketName,omitempty"`
Version *interface{} `json:"version,omitempty"`

// Fields inherited from DatasetLocation
FileName *interface{} `json:"fileName,omitempty"`
FolderPath *interface{} `json:"folderPath,omitempty"`
Type string `json:"type"`
Version *interface{} `json:"version,omitempty"`
}

var _ json.Marshaler = AmazonS3Location{}

func (s AmazonS3Location) MarshalJSON() ([]byte, error) {
type wrapper AmazonS3Location
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling AmazonS3Location: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling AmazonS3Location: %+v", err)
}
decoded["type"] = "AmazonS3Location"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling AmazonS3Location: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -1,10 +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.

var _ DatasetStorageFormat = AvroFormat{}

type AvroFormat struct {

// Fields inherited from DatasetStorageFormat
Deserializer *interface{} `json:"deserializer,omitempty"`
Serializer *interface{} `json:"serializer,omitempty"`
Type string `json:"type"`
}

var _ json.Marshaler = AvroFormat{}

func (s AvroFormat) MarshalJSON() ([]byte, error) {
type wrapper AvroFormat
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling AvroFormat: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling AvroFormat: %+v", err)
}
decoded["type"] = "AvroFormat"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling AvroFormat: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
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 _ DatasetLocation = AzureBlobFSLocation{}

type AzureBlobFSLocation struct {
FileName *interface{} `json:"fileName,omitempty"`
FileSystem *interface{} `json:"fileSystem,omitempty"`

// Fields inherited from DatasetLocation
FileName *interface{} `json:"fileName,omitempty"`
FolderPath *interface{} `json:"folderPath,omitempty"`
Type string `json:"type"`
}

var _ json.Marshaler = AzureBlobFSLocation{}

func (s AzureBlobFSLocation) MarshalJSON() ([]byte, error) {
type wrapper AzureBlobFSLocation
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling AzureBlobFSLocation: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling AzureBlobFSLocation: %+v", err)
}
decoded["type"] = "AzureBlobFSLocation"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling AzureBlobFSLocation: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
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 _ DatasetLocation = AzureBlobStorageLocation{}

type AzureBlobStorageLocation struct {
Container *interface{} `json:"container,omitempty"`
Container *interface{} `json:"container,omitempty"`

// Fields inherited from DatasetLocation
FileName *interface{} `json:"fileName,omitempty"`
FolderPath *interface{} `json:"folderPath,omitempty"`
Type string `json:"type"`
}

var _ json.Marshaler = AzureBlobStorageLocation{}

func (s AzureBlobStorageLocation) MarshalJSON() ([]byte, error) {
type wrapper AzureBlobStorageLocation
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling AzureBlobStorageLocation: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling AzureBlobStorageLocation: %+v", err)
}
decoded["type"] = "AzureBlobStorageLocation"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling AzureBlobStorageLocation: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -1,10 +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.

var _ DatasetLocation = AzureDataLakeStoreLocation{}

type AzureDataLakeStoreLocation struct {

// Fields inherited from DatasetLocation
FileName *interface{} `json:"fileName,omitempty"`
FolderPath *interface{} `json:"folderPath,omitempty"`
Type string `json:"type"`
}

var _ json.Marshaler = AzureDataLakeStoreLocation{}

func (s AzureDataLakeStoreLocation) MarshalJSON() ([]byte, error) {
type wrapper AzureDataLakeStoreLocation
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling AzureDataLakeStoreLocation: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling AzureDataLakeStoreLocation: %+v", err)
}
decoded["type"] = "AzureDataLakeStoreLocation"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling AzureDataLakeStoreLocation: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -1,10 +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.

var _ DatasetLocation = AzureFileStorageLocation{}

type AzureFileStorageLocation struct {

// Fields inherited from DatasetLocation
FileName *interface{} `json:"fileName,omitempty"`
FolderPath *interface{} `json:"folderPath,omitempty"`
Type string `json:"type"`
}

var _ json.Marshaler = AzureFileStorageLocation{}

func (s AzureFileStorageLocation) MarshalJSON() ([]byte, error) {
type wrapper AzureFileStorageLocation
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling AzureFileStorageLocation: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling AzureFileStorageLocation: %+v", err)
}
decoded["type"] = "AzureFileStorageLocation"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling AzureFileStorageLocation: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -1,16 +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 = CustomDataset{}

type CustomDataset struct {
TypeProperties *interface{} `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"`
Type string `json:"type"`
TypeProperties *interface{} `json:"typeProperties,omitempty"`
}

var _ json.Marshaler = CustomDataset{}

func (s CustomDataset) MarshalJSON() ([]byte, error) {
type wrapper CustomDataset
wrapped := wrapper(s)
encoded, err := json.Marshal(wrapped)
if err != nil {
return nil, fmt.Errorf("marshaling CustomDataset: %+v", err)
}

var decoded map[string]interface{}
if err := json.Unmarshal(encoded, &decoded); err != nil {
return nil, fmt.Errorf("unmarshaling CustomDataset: %+v", err)
}
decoded["type"] = "CustomDataset"

encoded, err = json.Marshal(decoded)
if err != nil {
return nil, fmt.Errorf("re-marshaling CustomDataset: %+v", err)
}

return encoded, nil
}
Original file line number Diff line number Diff line change
@@ -244,6 +244,14 @@ func unmarshalDatasetImplementation(input []byte) (Dataset, error) {
return out, nil
}

if strings.EqualFold(value, "CustomDataset") {
var out CustomDataset
if err := json.Unmarshal(input, &out); err != nil {
return nil, fmt.Errorf("unmarshaling into CustomDataset: %+v", err)
}
return out, nil
}

if strings.EqualFold(value, "Db2Table") {
var out Db2TableDataset
if err := json.Unmarshal(input, &out); err != nil {
Loading

0 comments on commit be1d653

Please sign in to comment.