Skip to content

Commit

Permalink
build:autorest
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin Jian committed Sep 10, 2020
1 parent 58e908a commit a030080
Show file tree
Hide file tree
Showing 20 changed files with 1,723 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*/

export {
ArrowConfiguration,
ArrowField,
BlobAbortCopyFromURLHeaders,
BlobAcquireLeaseHeaders,
BlobBreakLeaseHeaders,
Expand Down
35 changes: 32 additions & 3 deletions sdk/storage/storage-blob/src/generated/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export interface BlobPropertiesInternal {
* Possible values include: 'High', 'Standard'
*/
rehydratePriority?: RehydratePriority;
lastAccessedOn?: Date;
}

/**
Expand Down Expand Up @@ -374,6 +375,23 @@ export interface JsonTextConfiguration {
recordSeparator: string;
}

/**
* field of an arrow schema
*/
export interface ArrowField {
type: string;
name?: string;
precision?: number;
scale?: number;
}

/**
* arrow configuration
*/
export interface ArrowConfiguration {
schema: ArrowField[];
}

/**
* An enumeration of containers
*/
Expand Down Expand Up @@ -542,11 +560,12 @@ export interface PageList {
*/
export interface QueryFormat {
/**
* Possible values include: 'delimited', 'json'
* Possible values include: 'delimited', 'json', 'arrow'
*/
type?: QueryFormatType;
delimitedTextConfiguration?: DelimitedTextConfiguration;
jsonTextConfiguration?: JsonTextConfiguration;
arrowConfiguration?: ArrowConfiguration;
}

/**
Expand Down Expand Up @@ -4526,6 +4545,11 @@ export interface BlobDownloadHeaders {
* If this blob has been sealed
*/
isSealed?: boolean;
/**
* UTC date/time value generated by the service that indicates the time at which the blob was
* last read or written to
*/
lastAccessed?: Date;
/**
* If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
* true, then the request returns a crc64 for the range, as long as the range size is less than
Expand Down Expand Up @@ -4771,6 +4795,11 @@ export interface BlobGetPropertiesHeaders {
* rehydrate. Possible values include: 'High', 'Standard'
*/
rehydratePriority?: RehydratePriority;
/**
* UTC date/time value generated by the service that indicates the time at which the blob was
* last read or written to
*/
lastAccessed?: Date;
errorCode?: string;
}

Expand Down Expand Up @@ -6932,11 +6961,11 @@ export type GeoReplicationStatusType = 'live' | 'bootstrap' | 'unavailable';

/**
* Defines values for QueryFormatType.
* Possible values include: 'delimited', 'json'
* Possible values include: 'delimited', 'json', 'arrow'
* @readonly
* @enum {string}
*/
export type QueryFormatType = 'delimited' | 'json';
export type QueryFormatType = 'delimited' | 'json' | 'arrow';

/**
* Defines values for BlobExpiryOptions.
Expand Down
96 changes: 95 additions & 1 deletion sdk/storage/storage-blob/src/generated/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,13 @@ export const BlobPropertiesInternal: coreHttp.CompositeMapper = {
type: {
name: "String"
}
},
lastAccessedOn: {
xmlName: "LastAccessTime",
serializedName: "LastAccessTime",
type: {
name: "DateTimeRfc1123"
}
}
}
}
Expand Down Expand Up @@ -1198,6 +1205,72 @@ export const JsonTextConfiguration: coreHttp.CompositeMapper = {
}
};

export const ArrowField: coreHttp.CompositeMapper = {
xmlName: "Field",
serializedName: "ArrowField",
type: {
name: "Composite",
className: "ArrowField",
modelProperties: {
type: {
xmlName: "Type",
required: true,
serializedName: "Type",
type: {
name: "String"
}
},
name: {
xmlName: "Name",
serializedName: "Name",
type: {
name: "String"
}
},
precision: {
xmlName: "Precision",
serializedName: "Precision",
type: {
name: "Number"
}
},
scale: {
xmlName: "Scale",
serializedName: "Scale",
type: {
name: "Number"
}
}
}
}
};

export const ArrowConfiguration: coreHttp.CompositeMapper = {
serializedName: "ArrowConfiguration",
type: {
name: "Composite",
className: "ArrowConfiguration",
modelProperties: {
schema: {
xmlIsWrapped: true,
xmlName: "Schema",
xmlElementName: "Field",
required: true,
serializedName: "Schema",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "ArrowField"
}
}
}
}
}
}
};

export const ListContainersSegmentResponse: coreHttp.CompositeMapper = {
xmlName: "EnumerationResults",
serializedName: "ListContainersSegmentResponse",
Expand Down Expand Up @@ -1649,7 +1722,8 @@ export const QueryFormat: coreHttp.CompositeMapper = {
name: "Enum",
allowedValues: [
"delimited",
"json"
"json",
"arrow"
]
}
},
Expand All @@ -1668,6 +1742,14 @@ export const QueryFormat: coreHttp.CompositeMapper = {
name: "Composite",
className: "JsonTextConfiguration"
}
},
arrowConfiguration: {
xmlName: "ArrowConfiguration",
serializedName: "ArrowConfiguration",
type: {
name: "Composite",
className: "ArrowConfiguration"
}
}
}
}
Expand Down Expand Up @@ -3902,6 +3984,12 @@ export const BlobDownloadHeaders: coreHttp.CompositeMapper = {
name: "Boolean"
}
},
lastAccessed: {
serializedName: "x-ms-last-access-time",
type: {
name: "DateTimeRfc1123"
}
},
contentCrc64: {
serializedName: "x-ms-content-crc64",
type: {
Expand Down Expand Up @@ -4232,6 +4320,12 @@ export const BlobGetPropertiesHeaders: coreHttp.CompositeMapper = {
name: "String"
}
},
lastAccessed: {
serializedName: "x-ms-last-access-time",
type: {
name: "DateTimeRfc1123"
}
},
errorCode: {
serializedName: "x-ms-error-code",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ export const version: coreHttp.OperationParameter = {
required: true,
isConstant: true,
serializedName: "x-ms-version",
defaultValue: '2019-12-12',
defaultValue: '2020-02-10',
type: {
name: "String"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class StorageClientContext extends coreHttp.ServiceClient {

super(undefined, options);

this.version = '2019-12-12';
this.version = '2020-02-10';
this.baseUri = "{url}";
this.requestContentType = "application/json; charset=utf-8";
this.url = url;
Expand Down
11 changes: 3 additions & 8 deletions sdk/storage/storage-blob/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enable-xml: true
generate-metadata: false
license-header: MICROSOFT_MIT_NO_VERSION
output-folder: ../src/generated
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2019-12-12/blob.json
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-02-10/blob.json
model-date-time-as-string: true
optional-response-headers: true
```
Expand Down Expand Up @@ -350,7 +350,6 @@ directive:
transform: >
$.Start["x-ms-client-name"] = "startsOn";
$.Expiry["x-ms-client-name"] = "expiresOn";
```

### Rename KeyInfo start -> startsOn
Expand All @@ -362,10 +361,9 @@ directive:
transform: >
$.Start["x-ms-client-name"] = "startsOn";
$.Expiry["x-ms-client-name"] = "expiresOn";
```

### Un-group encryptionScope
### Un-group encryptionScope

```yaml
directive:
Expand All @@ -376,7 +374,6 @@ directive:
if (grouping) {
delete $["x-ms-parameter-grouping"];
}
```

### Rename ContainerCpkScopeInfo -> ContainerEncryptionScope
Expand All @@ -391,7 +388,6 @@ directive:
where: $.parameters.DenyEncryptionScopeOverride
transform: >
$["x-ms-parameter-grouping"]["name"] = "container-encryption-scope";
```

### Use string union instead of string for RehydratePriority in getProperties
Expand All @@ -405,8 +401,7 @@ directive:
$["enum"] = ["High", "Standard"];
$["x-ms-enum"] = {};
$["x-ms-enum"]["name"] = "RehydratePriority";
$["x-ms-enum"]["modelAsString"] = true;
$["x-ms-enum"]["modelAsString"] = true;
```

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Fstorage-blob%2Fswagger%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,14 @@ export interface PathUpdateOptionalParams extends coreHttp.RequestOptionsBase {
* operation.
*/
continuation?: string;
/**
* Optional. Valid for "SetAccessControlRecursive" operation. If set to false, the operation will
* terminate quickly on encountering user errors (4XX). If true, the operation will ignore user
* errors and proceed with the operation on other sub-entities of the directory. Continuation
* token will only be returned when forceFlag is true in case of user errors. If not set the
* default value is false for this.
*/
forceFlag?: boolean;
/**
* This parameter allows the caller to upload data in parallel and control the order in which it
* is appended to the file. It is required when uploading data to be appended to the file and
Expand Down Expand Up @@ -787,6 +795,14 @@ export interface PathSetAccessControlRecursiveOptionalParams extends coreHttp.Re
* continue deleting the directory.
*/
continuation?: string;
/**
* Optional. Valid for "SetAccessControlRecursive" operation. If set to false, the operation will
* terminate quickly on encountering user errors (4XX). If true, the operation will ignore user
* errors and proceed with the operation on other sub-entities of the directory. Continuation
* token will only be returned when forceFlag is true in case of user errors. If not set the
* default value is false for this.
*/
forceFlag?: boolean;
/**
* Optional. It specifies the maximum number of files or directories on which the acl change will
* be applied. If omitted or greater than 2,000, the request will process up to 2,000 items
Expand Down Expand Up @@ -895,6 +911,10 @@ export interface PathAppendDataOptionalParams extends coreHttp.RequestOptionsBas
* of the request content in bytes for "Append Data".
*/
contentLength?: number;
/**
* Specify the transactional crc64 for the body, to be validated by the service.
*/
transactionalContentCrc64?: Uint8Array;
/**
* Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the
* analytics logs when storage analytics logging is enabled.
Expand Down Expand Up @@ -1668,6 +1688,26 @@ export interface PathAppendDataHeaders {
* The version of the REST protocol used to process the request.
*/
version?: string;
/**
* An HTTP entity tag associated with the file or directory.
*/
etag?: string;
/**
* If the blob has an MD5 hash and this operation is to read the full blob, this response header
* is returned so that the client can check for message content integrity.
*/
contentMD5?: Uint8Array;
/**
* This header is returned so that the client can check for message content integrity. The value
* of this header is computed by the Blob service; it is not necessarily the same value specified
* in the request headers.
*/
xMsContentCrc64?: Uint8Array;
/**
* The value of this header is set to true if the contents of the request are successfully
* encrypted using the specified algorithm, and false otherwise.
*/
isServerEncrypted?: boolean;
}

/**
Expand Down
Loading

0 comments on commit a030080

Please sign in to comment.