From d8639f79d02441c88b5e653f5cee8b3fecd61e50 Mon Sep 17 00:00:00 2001 From: aws-sdk-dotnet-automation Date: Mon, 7 Nov 2022 11:29:18 -0800 Subject: [PATCH] This release adds protocols attribute to workspaces properties data type. This enables customers to migrate workspaces from PC over IP (PCoIP) to WorkSpaces Streaming Protocol (WSP) using create and modify workspaces public APIs. --- .../workspaces/workspaces-2015-04-08.api.json | 14 +++++- .../workspaces-2015-04-08.docs.json | 12 +++++ .../workspaces-2015-04-08.normal.json | 15 ++++++ .../WorkspacePropertiesMarshaller.cs | 11 ++++ .../WorkspacePropertiesUnmarshaller.cs | 6 +++ .../Generated/Model/WorkspaceProperties.cs | 35 +++++++++++++ .../Generated/ServiceEnumerations.cs | 50 +++++++++++++++++++ 7 files changed, 142 insertions(+), 1 deletion(-) diff --git a/generator/ServiceModels/workspaces/workspaces-2015-04-08.api.json b/generator/ServiceModels/workspaces/workspaces-2015-04-08.api.json index 50fe48415e33..b10b4831bec6 100644 --- a/generator/ServiceModels/workspaces/workspaces-2015-04-08.api.json +++ b/generator/ServiceModels/workspaces/workspaces-2015-04-08.api.json @@ -2330,6 +2330,17 @@ "max":2048, "min":1 }, + "Protocol":{ + "type":"string", + "enum":[ + "PCOIP", + "WSP" + ] + }, + "ProtocolList":{ + "type":"list", + "member":{"shape":"Protocol"} + }, "RebootRequest":{ "type":"structure", "required":["WorkspaceId"], @@ -3024,7 +3035,8 @@ "RunningModeAutoStopTimeoutInMinutes":{"shape":"RunningModeAutoStopTimeoutInMinutes"}, "RootVolumeSizeGib":{"shape":"RootVolumeSizeGib"}, "UserVolumeSizeGib":{"shape":"UserVolumeSizeGib"}, - "ComputeTypeName":{"shape":"Compute"} + "ComputeTypeName":{"shape":"Compute"}, + "Protocols":{"shape":"ProtocolList"} } }, "WorkspaceRequest":{ diff --git a/generator/ServiceModels/workspaces/workspaces-2015-04-08.docs.json b/generator/ServiceModels/workspaces/workspaces-2015-04-08.docs.json index 7a746214fbcc..25c1b5797e81 100644 --- a/generator/ServiceModels/workspaces/workspaces-2015-04-08.docs.json +++ b/generator/ServiceModels/workspaces/workspaces-2015-04-08.docs.json @@ -1415,6 +1415,18 @@ "ListAvailableManagementCidrRangesResult$NextToken": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" } }, + "Protocol": { + "base": null, + "refs": { + "ProtocolList$member": null + } + }, + "ProtocolList": { + "base": null, + "refs": { + "WorkspaceProperties$Protocols": "

The protocol. For more information, see Protocols for Amazon WorkSpaces.

" + } + }, "RebootRequest": { "base": "

Describes the information used to reboot a WorkSpace.

", "refs": { diff --git a/generator/ServiceModels/workspaces/workspaces-2015-04-08.normal.json b/generator/ServiceModels/workspaces/workspaces-2015-04-08.normal.json index 4012a6060df3..a1622419be01 100644 --- a/generator/ServiceModels/workspaces/workspaces-2015-04-08.normal.json +++ b/generator/ServiceModels/workspaces/workspaces-2015-04-08.normal.json @@ -3188,6 +3188,17 @@ "max":2048, "min":1 }, + "Protocol":{ + "type":"string", + "enum":[ + "PCOIP", + "WSP" + ] + }, + "ProtocolList":{ + "type":"list", + "member":{"shape":"Protocol"} + }, "RebootRequest":{ "type":"structure", "required":["WorkspaceId"], @@ -4308,6 +4319,10 @@ "ComputeTypeName":{ "shape":"Compute", "documentation":"

The compute type. For more information, see Amazon WorkSpaces Bundles.

" + }, + "Protocols":{ + "shape":"ProtocolList", + "documentation":"

The protocol. For more information, see Protocols for Amazon WorkSpaces.

" } }, "documentation":"

Describes a WorkSpace.

" diff --git a/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesMarshaller.cs b/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesMarshaller.cs index 25e71a6cd8c9..463dbd1046f1 100644 --- a/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesMarshaller.cs +++ b/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesMarshaller.cs @@ -51,6 +51,17 @@ public void Marshall(WorkspaceProperties requestObject, JsonMarshallerContext co context.Writer.Write(requestObject.ComputeTypeName); } + if(requestObject.IsSetProtocols()) + { + context.Writer.WritePropertyName("Protocols"); + context.Writer.WriteArrayStart(); + foreach(var requestObjectProtocolsListValue in requestObject.Protocols) + { + context.Writer.Write(requestObjectProtocolsListValue); + } + context.Writer.WriteArrayEnd(); + } + if(requestObject.IsSetRootVolumeSizeGib()) { context.Writer.WritePropertyName("RootVolumeSizeGib"); diff --git a/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesUnmarshaller.cs b/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesUnmarshaller.cs index 6f0a85b66328..b85905062d4e 100644 --- a/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesUnmarshaller.cs +++ b/sdk/src/Services/WorkSpaces/Generated/Model/Internal/MarshallTransformations/WorkspacePropertiesUnmarshaller.cs @@ -70,6 +70,12 @@ public WorkspaceProperties Unmarshall(JsonUnmarshallerContext context) unmarshalledObject.ComputeTypeName = unmarshaller.Unmarshall(context); continue; } + if (context.TestExpression("Protocols", targetDepth)) + { + var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance); + unmarshalledObject.Protocols = unmarshaller.Unmarshall(context); + continue; + } if (context.TestExpression("RootVolumeSizeGib", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; diff --git a/sdk/src/Services/WorkSpaces/Generated/Model/WorkspaceProperties.cs b/sdk/src/Services/WorkSpaces/Generated/Model/WorkspaceProperties.cs index 9af423cc746e..251105ef7b22 100644 --- a/sdk/src/Services/WorkSpaces/Generated/Model/WorkspaceProperties.cs +++ b/sdk/src/Services/WorkSpaces/Generated/Model/WorkspaceProperties.cs @@ -34,6 +34,7 @@ namespace Amazon.WorkSpaces.Model public partial class WorkspaceProperties { private Compute _computeTypeName; + private List _protocols = new List(); private int? _rootVolumeSizeGib; private RunningMode _runningMode; private int? _runningModeAutoStopTimeoutInMinutes; @@ -58,6 +59,40 @@ internal bool IsSetComputeTypeName() return this._computeTypeName != null; } + /// + /// Gets and sets the property Protocols. + /// + /// The protocol. For more information, see + /// Protocols for Amazon WorkSpaces. + /// + ///
  • + /// + /// Only available for WorkSpaces created with PCoIP bundles. + /// + ///
  • + /// + /// The Protocols property is case sensitive. Ensure you use PCOIP + /// or WSP. + /// + ///
  • + /// + /// Unavailable for Windows 7 WorkSpaces and WorkSpaces using GPU-based bundles (Graphics, + /// GraphicsPro, Graphics.g4dn, and GraphicsPro.g4dn). + /// + ///
+ ///
+ public List Protocols + { + get { return this._protocols; } + set { this._protocols = value; } + } + + // Check to see if Protocols property is set + internal bool IsSetProtocols() + { + return this._protocols != null && this._protocols.Count > 0; + } + /// /// Gets and sets the property RootVolumeSizeGib. /// diff --git a/sdk/src/Services/WorkSpaces/Generated/ServiceEnumerations.cs b/sdk/src/Services/WorkSpaces/Generated/ServiceEnumerations.cs index 31258b42c022..400621501adc 100644 --- a/sdk/src/Services/WorkSpaces/Generated/ServiceEnumerations.cs +++ b/sdk/src/Services/WorkSpaces/Generated/ServiceEnumerations.cs @@ -892,6 +892,56 @@ public static implicit operator OperatingSystemType(string value) } + /// + /// Constants used for properties of type Protocol. + /// + public class Protocol : ConstantClass + { + + /// + /// Constant PCOIP for Protocol + /// + public static readonly Protocol PCOIP = new Protocol("PCOIP"); + /// + /// Constant WSP for Protocol + /// + public static readonly Protocol WSP = new Protocol("WSP"); + + /// + /// This constant constructor does not need to be called if the constant + /// you are attempting to use is already defined as a static instance of + /// this class. + /// This constructor should be used to construct constants that are not + /// defined as statics, for instance if attempting to use a feature that is + /// newer than the current version of the SDK. + /// + public Protocol(string value) + : base(value) + { + } + + /// + /// Finds the constant for the unique value. + /// + /// The unique value for the constant + /// The constant for the unique value + public static Protocol FindValue(string value) + { + return FindValue(value); + } + + /// + /// Utility method to convert strings to the constant class. + /// + /// The string value to convert to the constant class. + /// + public static implicit operator Protocol(string value) + { + return FindValue(value); + } + } + + /// /// Constants used for properties of type ReconnectEnum. ///