Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encryption scope SAS #22099

Merged
merged 31 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a0ec874
corrected release date in changelog
tanyasethi-msft Nov 15, 2023
ec8ed2e
STG84 swagger and azcore, azidentity, azblob dependency updates
tanyasethi-msft Nov 16, 2023
91143bd
dependancy updates
tanyasethi-msft Nov 16, 2023
9ab8df7
Merge branch 'feature/azdatalake/STG78-84' into feat/swaggerUpdates
tanyasethi-msft Nov 17, 2023
8feee44
Initial changes for encryption scope sas
tanyasethi-msft Nov 17, 2023
43efa38
indirect dependancy
tanyasethi-msft Nov 17, 2023
cf0f517
Merge branch 'feat/swaggerUpdates' of github.com:tanyasethi-msft/azur…
tanyasethi-msft Nov 17, 2023
45bd1ca
update code generator version
tanyasethi-msft Nov 17, 2023
53be1ae
using STG 82 swagger, and revert code gen version
tanyasethi-msft Nov 17, 2023
90ba45e
adding transforms for missing header files
tanyasethi-msft Nov 23, 2023
190328b
re-generate zz_options.go file
tanyasethi-msft Nov 23, 2023
5391706
reverting to azblob 1.1.0
tanyasethi-msft Nov 24, 2023
8094b77
reverting to azblob 1.0.0
tanyasethi-msft Nov 27, 2023
3ef4583
Updated input file from main to latest commit id
tanyasethi-msft Nov 27, 2023
20e95d7
added tests for encryption scope sas
tanyasethi-msft Nov 30, 2023
c850172
Merge branch 'feat/swaggerUpdates' of github.com:tanyasethi-msft/azur…
tanyasethi-msft Dec 1, 2023
4cb7884
add test for user delegation sas
tanyasethi-msft Dec 5, 2023
4286586
lint error fix
tanyasethi-msft Dec 5, 2023
a7862ee
Merge remote-tracking branch 'origin/feat/encryptionScopeSAS' into fe…
tanyasethi-msft Dec 6, 2023
c926dd9
Fix lint error in test
tanyasethi-msft Dec 6, 2023
64c9999
created new datalake encryption scope var
tanyasethi-msft Dec 6, 2023
9da04c0
Merge remote-tracking branch 'origin/feat/encryptionScopeSAS' into fe…
tanyasethi-msft Dec 6, 2023
667bc2d
removed blob account encryption scope
tanyasethi-msft Dec 6, 2023
df291be
push recording
tanyasethi-msft Dec 7, 2023
a117c4d
add encryption scope in user delegation
tanyasethi-msft Dec 7, 2023
442893f
recordings
tanyasethi-msft Dec 8, 2023
86d7afb
linter error
tanyasethi-msft Dec 8, 2023
f3f0918
minor comments resolve
tanyasethi-msft Dec 11, 2023
0f0924d
arm template changes
tanyasethi-msft Dec 13, 2023
f9fb3a4
arm template changes
tanyasethi-msft Dec 13, 2023
af601f8
test fix
souravgupta-msft Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/azdatalake/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/storage/azdatalake",
"Tag": "go/storage/azdatalake_7c0fb050cb"
"Tag": "go/storage/azdatalake_b5323f920e"
}
165 changes: 165 additions & 0 deletions sdk/storage/azdatalake/file/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"context"
"crypto/md5"
"encoding/binary"
"fmt"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
"hash/crc64"
"io"
"math/rand"
Expand Down Expand Up @@ -1337,6 +1339,169 @@ func (s *UnrecordedTestSuite) TestFileDeleteWithSAS() {
_require.NoError(err)
}

func (s *UnrecordedTestSuite) TestFileEncryptionScopeSAS() {
_require := require.New(s.T())
testName := s.T().Name()
svcClient, err := testcommon.GetServiceClient(s.T(), testcommon.TestAccountDatalake, nil)
_require.NoError(err)

filesystemName := testcommon.GenerateFileSystemName(testName)
fsClient := testcommon.CreateNewFileSystem(context.Background(), _require, filesystemName, svcClient)
_require.NoError(err)
defer testcommon.DeleteFileSystem(context.Background(), _require, fsClient)

encryptionScope, err := testcommon.GetRequiredEnv(testcommon.DataLakeEncryptionScopeEnvVar)
_require.Nil(err)

cred, err := testcommon.GetGenericSharedKeyCredential(testcommon.TestAccountDatalake)
_require.NoError(err)

perms := sas.FilePermissions{Read: true, Create: true, Write: true, Move: true, Delete: true, List: true}
sasQueryParams, err := sas.DatalakeSignatureValues{
Protocol: sas.ProtocolHTTPS, // Users MUST use HTTPS (not HTTP)
ExpiryTime: time.Now().UTC().Add(48 * time.Hour), // 48-hours before expiration
FileSystemName: filesystemName,
Permissions: perms.String(),
EncryptionScope: encryptionScope,
}.SignWithSharedKey(cred)
_require.NoError(err)

sasToken := sasQueryParams.Encode()

srcFileClient, err := file.NewClientWithNoCredential(fsClient.DFSURL()+"/file?"+sasToken, nil)
_require.NoError(err)
_require.NotNil(srcFileClient)

_, err = srcFileClient.Create(context.Background(), nil)
_require.NoError(err)

response, err := srcFileClient.SetMetadata(context.Background(), testcommon.BasicMetadata, nil)
_require.NoError(err)
_require.Equal(encryptionScope, *response.EncryptionScope)

}

func (s *UnrecordedTestSuite) TestAccountEncryptionScopeSAS() {
_require := require.New(s.T())
testName := s.T().Name()
svcClient, err := testcommon.GetServiceClient(s.T(), testcommon.TestAccountDatalake, nil)
_require.NoError(err)

filesystemName := testcommon.GenerateFileSystemName(testName)
fsClient := testcommon.CreateNewFileSystem(context.Background(), _require, filesystemName, svcClient)
_require.NoError(err)
defer testcommon.DeleteFileSystem(context.Background(), _require, fsClient)

encryptionScope, err := testcommon.GetRequiredEnv(testcommon.DataLakeEncryptionScopeEnvVar)
_require.Nil(err)

credential, err := testcommon.GetGenericSharedKeyCredential(testcommon.TestAccountDatalake)
_require.Nil(err)

sasQueryParams, err := sas.AccountSignatureValues{
Protocol: sas.ProtocolHTTPS, // Users MUST use HTTPS (not HTTP)
ExpiryTime: time.Now().UTC().Add(48 * time.Hour), // 48-hours before expiration
Permissions: to.Ptr(sas.AccountPermissions{Read: true, Create: true, Write: true, Delete: true}).String(),
ResourceTypes: to.Ptr(sas.AccountResourceTypes{Service: true, Container: true, Object: true}).String(),
EncryptionScope: encryptionScope,
}.SignWithSharedKey(credential)
_require.NoError(err)

sasToken := sasQueryParams.Encode()

srcFileClient, err := file.NewClientWithNoCredential(fsClient.DFSURL()+"/file?"+sasToken, nil)
_require.NoError(err)
_require.NotNil(srcFileClient)

resp, err := srcFileClient.Create(context.Background(), nil)
_require.NoError(err)
_require.NotNil(resp)

// create local file
_, content := generateData(10 * 1024)
err = os.WriteFile("testFile", content, 0644)
handleError(err)

defer func() {
err = os.Remove("testFile")
handleError(err)
}()

fh, err := os.Open("testFile")
handleError(err)

defer func(fh *os.File) {
err := fh.Close()
handleError(err)
}(fh)

// upload the file
err = srcFileClient.UploadFile(context.Background(), fh, &file.UploadFileOptions{
Concurrency: 5,
ChunkSize: 2 * 1024,
})
handleError(err)
defer testcommon.DeleteFileSystem(context.Background(), _require, fsClient)

response, err := srcFileClient.DownloadStream(context.Background(), nil)
handleError(err)
testcommon.DeleteFileSystem(context.Background(), _require, fsClient)

_require.Equal(encryptionScope, *response.EncryptionScope)
}

func (s *UnrecordedTestSuite) TestGetUserDelegationEncryptionScopeSAS() {
_require := require.New(s.T())
testName := s.T().Name()

svcClient, err := testcommon.GetServiceClient(s.T(), testcommon.TestAccountDatalake, nil)
_require.NoError(err)

filesystemName := testcommon.GenerateFileSystemName(testName)
fsClient := testcommon.CreateNewFileSystem(context.Background(), _require, filesystemName, svcClient)

defer testcommon.DeleteFileSystem(context.Background(), _require, fsClient)

_, err = testcommon.GetRequiredEnv(testcommon.DataLakeEncryptionScopeEnvVar)
_require.Nil(err)
souravgupta-msft marked this conversation as resolved.
Show resolved Hide resolved

// Set current and past time and create key
currentTime := time.Now().UTC().Add(-10 * time.Second)
pastTime := currentTime.Add(48 * time.Hour)
info := service.KeyInfo{
Start: to.Ptr(currentTime.UTC().Format(sas.TimeFormat)),
Expiry: to.Ptr(pastTime.UTC().Format(sas.TimeFormat)),
}

udc, err := svcClient.GetUserDelegationCredential(context.Background(), info, nil)
_require.NoError(err)

// get permissions and details for sas
encryptionScope, err := testcommon.GetRequiredEnv(testcommon.DataLakeEncryptionScopeEnvVar)
_require.Nil(err)

// Create Blob Signature Values with desired permissions and sign with user delegation credential
perms := sas.FilePermissions{Read: true, Create: true, Write: true, Move: true, Delete: true, List: true}
sasQueryParams, err := sas.DatalakeSignatureValues{
Protocol: sas.ProtocolHTTPS, // Users MUST use HTTPS (not HTTP)
StartTime: time.Now().UTC().Add(time.Second * -10),
ExpiryTime: time.Now().UTC().Add(15 * time.Minute), // 15 minutes before expiration
FileSystemName: filesystemName,
Permissions: perms.String(),
EncryptionScope: encryptionScope,
}.SignWithUserDelegation(udc)
_require.Nil(err)

sasURL := fmt.Sprintf(fsClient.DFSURL() + sasQueryParams.Encode())
souravgupta-msft marked this conversation as resolved.
Show resolved Hide resolved
// This URL can be used to authenticate requests now
srcFileClient, err := file.NewClientWithNoCredential(sasURL, nil)
handleError(err)

_, err = srcFileClient.Create(context.Background(), nil)
_require.NoError(err)

}

func (s *RecordedTestSuite) TestFileGetAccessControlWithNilAccessConditions() {
_require := require.New(s.T())
testName := s.T().Name()
Expand Down
14 changes: 7 additions & 7 deletions sdk/storage/azdatalake/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ module github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake
go 1.18

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0
github.com/Azure/azure-sdk-for-go/sdk/internal v1.4.0
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0
github.com/stretchr/testify v1.8.4
)

require (
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dnaeon/go-vcr v1.2.0 // indirect
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
Expand Down
32 changes: 15 additions & 17 deletions sdk/storage/azdatalake/go.sum
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.4.0 h1:TuEMD+E+1aTjjLICGQOW6vLe8UWES7kopac9mUXL56Y=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.4.0/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 h1:d81/ng9rET2YqdVkVwkb6EXeRrLJIwyGnJcAlAWKwhs=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 h1:u/LLAOFgsMv7HmNL4Qufg58y+qElGOt5qv0z1mURkRY=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0/go.mod h1:2e8rMJtl2+2j+HXbTBwnyGpm5Nou7KhvSfxOq8JpTag=
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE=
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4=
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk=
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI=
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
Expand All @@ -31,7 +29,7 @@ golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
Expand Down
25 changes: 23 additions & 2 deletions sdk/storage/azdatalake/internal/generated/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go: true
clear-output-folder: false
version: "^3.0.0"
license-header: MICROSOFT_MIT_NO_VERSION
input-file: "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Azure.Storage.Files.DataLake/preview/2020-10-02/DataLakeStorage.json"
input-file: "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/3f3b51edf8fd0eb65004df390d6ee98e0e23c53d/specification/storage/data-plane/Azure.Storage.Files.DataLake/preview/2021-06-08/DataLakeStorage.json"
vibhansa-msft marked this conversation as resolved.
Show resolved Hide resolved
credential-scope: "https://storage.azure.com/.default"
output-folder: ../generated
file-prefix: "zz_"
Expand Down Expand Up @@ -109,6 +109,27 @@ directive:
];
```

### Add Missing Imports to zz_service_client.go

``` yaml
directive:
- from: zz_service_client.go
where: $
transform: >-
return $.
replace(/"strconv"/, `"strconv"\n\t"strings"`);
```
### Add Missing Imports to zz_models_serde.go

``` yaml
directive:
- from: zz_models_serde.go
where: $
transform: >-
return $.
replace(/"reflect"/, `"reflect"\n\t"strconv"`);
```

### Clean up some const type names so they don't stutter

``` yaml
Expand Down Expand Up @@ -276,4 +297,4 @@ directive:
return $.
replace(/err = unpopulate\((.*), "ContentLength", &p\.ContentLength\)/g, 'var rawVal string\nerr = unpopulate(val, "ContentLength", &rawVal)\nintVal, _ := strconv.ParseInt(rawVal, 10, 64)\np.ContentLength = &intVal').
replace(/err = unpopulate\((.*), "IsDirectory", &p\.IsDirectory\)/g, 'var rawVal string\nerr = unpopulate(val, "IsDirectory", &rawVal)\nboolVal, _ := strconv.ParseBool(rawVal)\np.IsDirectory = &boolVal');
```
```
19 changes: 19 additions & 0 deletions sdk/storage/azdatalake/internal/generated/zz_constants.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading