-
Notifications
You must be signed in to change notification settings - Fork 798
/
models.go
188 lines (155 loc) · 7.4 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
package service
import (
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/service"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/filesystem"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/internal/exported"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/internal/generated_blob"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/sas"
"time"
)
import blobSAS "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/sas"
// CreateFileSystemOptions contains the optional parameters for the FileSystem Create method.
type CreateFileSystemOptions = filesystem.CreateOptions
// DeleteFileSystemOptions contains the optional parameters for the FileSystem Delete method.
type DeleteFileSystemOptions = filesystem.DeleteOptions
// GetUserDelegationCredentialOptions contains optional parameters for GetUserDelegationKey method.
type GetUserDelegationCredentialOptions struct {
// placeholder for future options
}
func (o *GetUserDelegationCredentialOptions) format() *generated_blob.ServiceClientGetUserDelegationKeyOptions {
return nil
}
// GetPropertiesOptions contains the optional parameters for the Client.GetProperties method.
type GetPropertiesOptions struct {
// placeholder for future options
}
func (o *GetPropertiesOptions) format() *service.GetPropertiesOptions {
if o == nil {
return nil
}
return &service.GetPropertiesOptions{}
}
// SetPropertiesOptions provides set of options for Client.SetProperties
type SetPropertiesOptions struct {
// CORS The set of CORS rules.
CORS []*CORSRule
// DefaultServiceVersion The default version to use for requests to the Datalake service if an incoming request's version is not specified. Possible
// values include version 2008-10-27 and all more recent versions.
DefaultServiceVersion *string
// DeleteRetentionPolicy the retention policy which determines how long the associated data should persist.
DeleteRetentionPolicy *RetentionPolicy
// HourMetrics a summary of request statistics grouped by API in hour or minute aggregates
// If version is not set - we default to "1.0"
HourMetrics *Metrics
// Logging Azure Analytics Logging settings.
// If version is not set - we default to "1.0"
Logging *Logging
// MinuteMetrics a summary of request statistics grouped by API in hour or minute aggregates
// If version is not set - we default to "1.0"
MinuteMetrics *Metrics
// StaticWebsite The properties that enable an account to host a static website.
StaticWebsite *StaticWebsite
}
func (o *SetPropertiesOptions) format() *service.SetPropertiesOptions {
if o == nil {
return nil
}
return &service.SetPropertiesOptions{
CORS: o.CORS,
DefaultServiceVersion: o.DefaultServiceVersion,
DeleteRetentionPolicy: o.DeleteRetentionPolicy,
HourMetrics: o.HourMetrics,
Logging: o.Logging,
MinuteMetrics: o.MinuteMetrics,
StaticWebsite: o.StaticWebsite,
}
}
// ListFileSystemsInclude indicates what additional information the service should return with each filesystem.
type ListFileSystemsInclude struct {
// Metadata tells the service whether to return metadata for each filesystem.
Metadata *bool
// Deleted tells the service whether to return soft-deleted filesystems.
Deleted *bool
// System tells the service whether to return system filesystems.
System *bool
}
// ListFileSystemsOptions contains the optional parameters for the ListFileSystems method.
type ListFileSystemsOptions struct {
// Include tells the service whether to return filesystem metadata.
Include ListFileSystemsInclude
// Marker is the continuation token to use when continuing the operation.
Marker *string
// MaxResults sets the maximum number of paths that will be returned per page.
MaxResults *int32
// Prefix filters the results to return only filesystems whose names begin with the specified prefix.
Prefix *string
}
// GetSASURLOptions contains the optional parameters for the Client.GetSASURL method.
type GetSASURLOptions struct {
// StartTime is the time after which the SAS will become valid.
StartTime *time.Time
}
func (o *GetSASURLOptions) format(resources sas.AccountResourceTypes, permissions sas.AccountPermissions) (blobSAS.AccountResourceTypes, blobSAS.AccountPermissions, *service.GetSASURLOptions) {
res := blobSAS.AccountResourceTypes{
Service: resources.Service,
Container: resources.Container,
Object: resources.Object,
}
perms := blobSAS.AccountPermissions{
Read: permissions.Read,
Write: permissions.Write,
Delete: permissions.Delete,
List: permissions.List,
Add: permissions.Add,
Create: permissions.Create,
Update: permissions.Update,
Process: permissions.Process,
}
if o == nil {
return res, perms, nil
}
return res, perms, &service.GetSASURLOptions{
StartTime: o.StartTime,
}
}
// KeyInfo contains KeyInfo struct.
type KeyInfo = generated_blob.KeyInfo
// CORSRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another
// domain. Web browsers implement a security restriction known as same-origin policy that
// prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin
// domain) to call APIs in another domain.
type CORSRule = service.CORSRule
// RetentionPolicy - the retention policy which determines how long the associated data should persist.
type RetentionPolicy = service.RetentionPolicy
// Metrics - a summary of request statistics grouped by API in hour or minute aggregates
type Metrics = service.Metrics
// Logging - Azure Analytics Logging settings.
type Logging = service.Logging
// StaticWebsite - The properties that enable an account to host a static website.
type StaticWebsite = service.StaticWebsite
// SharedKeyCredential contains an account's name and its primary or secondary key.
type SharedKeyCredential = exported.SharedKeyCredential
// UserDelegationCredential contains an account's name and its user delegation key.
type UserDelegationCredential = exported.UserDelegationCredential
// UserDelegationKey contains UserDelegationKey.
type UserDelegationKey = exported.UserDelegationKey
// AccessConditions identifies blob-specific access conditions which you optionally set.
type AccessConditions = exported.AccessConditions
// LeaseAccessConditions contains optional parameters to access leased entity.
type LeaseAccessConditions = exported.LeaseAccessConditions
// ModifiedAccessConditions contains a group of parameters for specifying access conditions.
type ModifiedAccessConditions = exported.ModifiedAccessConditions
// CPKScopeInfo contains a group of parameters for the FileSystemClient.Create method.
type CPKScopeInfo = filesystem.CPKScopeInfo
// StorageServiceProperties - Storage Service Properties. Returned in GetServiceProperties call.
type StorageServiceProperties = service.StorageServiceProperties
// ListFileSystemsSegmentResponse contains fields from the ListFileSystems operation
type ListFileSystemsSegmentResponse = generated_blob.ListFileSystemsSegmentResponse
// FileSystemItem contains fields from the ListFileSystems operation
type FileSystemItem = generated_blob.FileSystemItem
// FileSystemProperties contains fields from the ListFileSystems operation
type FileSystemProperties = generated_blob.FileSystemProperties