1package servicefabric 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "encoding/json" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/date" 24 "github.com/satori/go.uuid" 25) 26 27// AggregatedHealthState enumerates the values for aggregated health state. 28type AggregatedHealthState string 29 30const ( 31 // Error ... 32 Error AggregatedHealthState = "Error" 33 // Invalid ... 34 Invalid AggregatedHealthState = "Invalid" 35 // Ok ... 36 Ok AggregatedHealthState = "Ok" 37 // Unknown ... 38 Unknown AggregatedHealthState = "Unknown" 39 // Warning ... 40 Warning AggregatedHealthState = "Warning" 41) 42 43// PossibleAggregatedHealthStateValues returns an array of possible values for the AggregatedHealthState const type. 44func PossibleAggregatedHealthStateValues() []AggregatedHealthState { 45 return []AggregatedHealthState{Error, Invalid, Ok, Unknown, Warning} 46} 47 48// AggregatedHealthState1 enumerates the values for aggregated health state 1. 49type AggregatedHealthState1 string 50 51const ( 52 // AggregatedHealthState1Error ... 53 AggregatedHealthState1Error AggregatedHealthState1 = "Error" 54 // AggregatedHealthState1Invalid ... 55 AggregatedHealthState1Invalid AggregatedHealthState1 = "Invalid" 56 // AggregatedHealthState1Ok ... 57 AggregatedHealthState1Ok AggregatedHealthState1 = "Ok" 58 // AggregatedHealthState1Unknown ... 59 AggregatedHealthState1Unknown AggregatedHealthState1 = "Unknown" 60 // AggregatedHealthState1Warning ... 61 AggregatedHealthState1Warning AggregatedHealthState1 = "Warning" 62) 63 64// PossibleAggregatedHealthState1Values returns an array of possible values for the AggregatedHealthState1 const type. 65func PossibleAggregatedHealthState1Values() []AggregatedHealthState1 { 66 return []AggregatedHealthState1{AggregatedHealthState1Error, AggregatedHealthState1Invalid, AggregatedHealthState1Ok, AggregatedHealthState1Unknown, AggregatedHealthState1Warning} 67} 68 69// AggregatedHealthState2 enumerates the values for aggregated health state 2. 70type AggregatedHealthState2 string 71 72const ( 73 // AggregatedHealthState2Error ... 74 AggregatedHealthState2Error AggregatedHealthState2 = "Error" 75 // AggregatedHealthState2Invalid ... 76 AggregatedHealthState2Invalid AggregatedHealthState2 = "Invalid" 77 // AggregatedHealthState2Ok ... 78 AggregatedHealthState2Ok AggregatedHealthState2 = "Ok" 79 // AggregatedHealthState2Unknown ... 80 AggregatedHealthState2Unknown AggregatedHealthState2 = "Unknown" 81 // AggregatedHealthState2Warning ... 82 AggregatedHealthState2Warning AggregatedHealthState2 = "Warning" 83) 84 85// PossibleAggregatedHealthState2Values returns an array of possible values for the AggregatedHealthState2 const type. 86func PossibleAggregatedHealthState2Values() []AggregatedHealthState2 { 87 return []AggregatedHealthState2{AggregatedHealthState2Error, AggregatedHealthState2Invalid, AggregatedHealthState2Ok, AggregatedHealthState2Unknown, AggregatedHealthState2Warning} 88} 89 90// ApplicationDefinitionKind enumerates the values for application definition kind. 91type ApplicationDefinitionKind string 92 93const ( 94 // ApplicationDefinitionKindCompose ... 95 ApplicationDefinitionKindCompose ApplicationDefinitionKind = "Compose" 96 // ApplicationDefinitionKindInvalid ... 97 ApplicationDefinitionKindInvalid ApplicationDefinitionKind = "Invalid" 98 // ApplicationDefinitionKindServiceFabricApplicationDescription ... 99 ApplicationDefinitionKindServiceFabricApplicationDescription ApplicationDefinitionKind = "ServiceFabricApplicationDescription" 100) 101 102// PossibleApplicationDefinitionKindValues returns an array of possible values for the ApplicationDefinitionKind const type. 103func PossibleApplicationDefinitionKindValues() []ApplicationDefinitionKind { 104 return []ApplicationDefinitionKind{ApplicationDefinitionKindCompose, ApplicationDefinitionKindInvalid, ApplicationDefinitionKindServiceFabricApplicationDescription} 105} 106 107// ApplicationTypeDefinitionKind enumerates the values for application type definition kind. 108type ApplicationTypeDefinitionKind string 109 110const ( 111 // ApplicationTypeDefinitionKindCompose ... 112 ApplicationTypeDefinitionKindCompose ApplicationTypeDefinitionKind = "Compose" 113 // ApplicationTypeDefinitionKindInvalid ... 114 ApplicationTypeDefinitionKindInvalid ApplicationTypeDefinitionKind = "Invalid" 115 // ApplicationTypeDefinitionKindServiceFabricApplicationPackage ... 116 ApplicationTypeDefinitionKindServiceFabricApplicationPackage ApplicationTypeDefinitionKind = "ServiceFabricApplicationPackage" 117) 118 119// PossibleApplicationTypeDefinitionKindValues returns an array of possible values for the ApplicationTypeDefinitionKind const type. 120func PossibleApplicationTypeDefinitionKindValues() []ApplicationTypeDefinitionKind { 121 return []ApplicationTypeDefinitionKind{ApplicationTypeDefinitionKindCompose, ApplicationTypeDefinitionKindInvalid, ApplicationTypeDefinitionKindServiceFabricApplicationPackage} 122} 123 124// Code enumerates the values for code. 125type Code string 126 127const ( 128 // EABORT ... 129 EABORT Code = "E_ABORT" 130 // FABRICEAPPLICATIONALREADYEXISTS ... 131 FABRICEAPPLICATIONALREADYEXISTS Code = "FABRIC_E_APPLICATION_ALREADY_EXISTS" 132 // FABRICEAPPLICATIONALREADYINTARGETVERSION ... 133 FABRICEAPPLICATIONALREADYINTARGETVERSION Code = "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" 134 // FABRICEAPPLICATIONNOTFOUND ... 135 FABRICEAPPLICATIONNOTFOUND Code = "FABRIC_E_APPLICATION_NOT_FOUND" 136 // FABRICEAPPLICATIONNOTUPGRADING ... 137 FABRICEAPPLICATIONNOTUPGRADING Code = "FABRIC_E_APPLICATION_NOT_UPGRADING" 138 // FABRICEAPPLICATIONTYPEALREADYEXISTS ... 139 FABRICEAPPLICATIONTYPEALREADYEXISTS Code = "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" 140 // FABRICEAPPLICATIONTYPEINUSE ... 141 FABRICEAPPLICATIONTYPEINUSE Code = "FABRIC_E_APPLICATION_TYPE_IN_USE" 142 // FABRICEAPPLICATIONTYPENOTFOUND ... 143 FABRICEAPPLICATIONTYPENOTFOUND Code = "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" 144 // FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS ... 145 FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS Code = "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" 146 // FABRICEAPPLICATIONUPGRADEINPROGRESS ... 147 FABRICEAPPLICATIONUPGRADEINPROGRESS Code = "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" 148 // FABRICEAPPLICATIONUPGRADEVALIDATIONERROR ... 149 FABRICEAPPLICATIONUPGRADEVALIDATIONERROR Code = "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" 150 // FABRICECOMMUNICATIONERROR ... 151 FABRICECOMMUNICATIONERROR Code = "FABRIC_E_COMMUNICATION_ERROR" 152 // FABRICECONFIGURATIONPARAMETERNOTFOUND ... 153 FABRICECONFIGURATIONPARAMETERNOTFOUND Code = "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" 154 // FABRICECONFIGURATIONSECTIONNOTFOUND ... 155 FABRICECONFIGURATIONSECTIONNOTFOUND Code = "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" 156 // FABRICEDIRECTORYNOTFOUND ... 157 FABRICEDIRECTORYNOTFOUND Code = "FABRIC_E_DIRECTORY_NOT_FOUND" 158 // FABRICEENUMERATIONCOMPLETED ... 159 FABRICEENUMERATIONCOMPLETED Code = "FABRIC_E_ENUMERATION_COMPLETED" 160 // FABRICEFABRICALREADYINTARGETVERSION ... 161 FABRICEFABRICALREADYINTARGETVERSION Code = "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" 162 // FABRICEFABRICNOTUPGRADING ... 163 FABRICEFABRICNOTUPGRADING Code = "FABRIC_E_FABRIC_NOT_UPGRADING" 164 // FABRICEFABRICUPGRADEINPROGRESS ... 165 FABRICEFABRICUPGRADEINPROGRESS Code = "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" 166 // FABRICEFABRICUPGRADEVALIDATIONERROR ... 167 FABRICEFABRICUPGRADEVALIDATIONERROR Code = "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" 168 // FABRICEFABRICVERSIONALREADYEXISTS ... 169 FABRICEFABRICVERSIONALREADYEXISTS Code = "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" 170 // FABRICEFABRICVERSIONINUSE ... 171 FABRICEFABRICVERSIONINUSE Code = "FABRIC_E_FABRIC_VERSION_IN_USE" 172 // FABRICEFABRICVERSIONNOTFOUND ... 173 FABRICEFABRICVERSIONNOTFOUND Code = "FABRIC_E_FABRIC_VERSION_NOT_FOUND" 174 // FABRICEFILENOTFOUND ... 175 FABRICEFILENOTFOUND Code = "FABRIC_E_FILE_NOT_FOUND" 176 // FABRICEHEALTHENTITYNOTFOUND ... 177 FABRICEHEALTHENTITYNOTFOUND Code = "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" 178 // FABRICEHEALTHSTALEREPORT ... 179 FABRICEHEALTHSTALEREPORT Code = "FABRIC_E_HEALTH_STALE_REPORT" 180 // FABRICEIMAGEBUILDERVALIDATIONERROR ... 181 FABRICEIMAGEBUILDERVALIDATIONERROR Code = "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" 182 // FABRICEINSTANCEIDMISMATCH ... 183 FABRICEINSTANCEIDMISMATCH Code = "FABRIC_E_INSTANCE_ID_MISMATCH" 184 // FABRICEINVALIDADDRESS ... 185 FABRICEINVALIDADDRESS Code = "FABRIC_E_INVALID_ADDRESS" 186 // FABRICEINVALIDATOMICGROUP ... 187 FABRICEINVALIDATOMICGROUP Code = "FABRIC_E_INVALID_ATOMIC_GROUP" 188 // FABRICEINVALIDCONFIGURATION ... 189 FABRICEINVALIDCONFIGURATION Code = "FABRIC_E_INVALID_CONFIGURATION" 190 // FABRICEINVALIDNAMEURI ... 191 FABRICEINVALIDNAMEURI Code = "FABRIC_E_INVALID_NAME_URI" 192 // FABRICEINVALIDPARTITIONKEY ... 193 FABRICEINVALIDPARTITIONKEY Code = "FABRIC_E_INVALID_PARTITION_KEY" 194 // FABRICEKEYNOTFOUND ... 195 FABRICEKEYNOTFOUND Code = "FABRIC_E_KEY_NOT_FOUND" 196 // FABRICEKEYTOOLARGE ... 197 FABRICEKEYTOOLARGE Code = "FABRIC_E_KEY_TOO_LARGE" 198 // FABRICENAMEALREADYEXISTS ... 199 FABRICENAMEALREADYEXISTS Code = "FABRIC_E_NAME_ALREADY_EXISTS" 200 // FABRICENAMEDOESNOTEXIST ... 201 FABRICENAMEDOESNOTEXIST Code = "FABRIC_E_NAME_DOES_NOT_EXIST" 202 // FABRICENAMENOTEMPTY ... 203 FABRICENAMENOTEMPTY Code = "FABRIC_E_NAME_NOT_EMPTY" 204 // FABRICENODEHASNOTSTOPPEDYET ... 205 FABRICENODEHASNOTSTOPPEDYET Code = "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" 206 // FABRICENODEISUP ... 207 FABRICENODEISUP Code = "FABRIC_E_NODE_IS_UP" 208 // FABRICENODENOTFOUND ... 209 FABRICENODENOTFOUND Code = "FABRIC_E_NODE_NOT_FOUND" 210 // FABRICENOTPRIMARY ... 211 FABRICENOTPRIMARY Code = "FABRIC_E_NOT_PRIMARY" 212 // FABRICENOTREADY ... 213 FABRICENOTREADY Code = "FABRIC_E_NOT_READY" 214 // FABRICENOWRITEQUORUM ... 215 FABRICENOWRITEQUORUM Code = "FABRIC_E_NO_WRITE_QUORUM" 216 // FABRICEOPERATIONNOTCOMPLETE ... 217 FABRICEOPERATIONNOTCOMPLETE Code = "FABRIC_E_OPERATION_NOT_COMPLETE" 218 // FABRICEPARTITIONNOTFOUND ... 219 FABRICEPARTITIONNOTFOUND Code = "FABRIC_E_PARTITION_NOT_FOUND" 220 // FABRICEPATHTOOLONG ... 221 FABRICEPATHTOOLONG Code = "FABRIC_E_PATH_TOO_LONG" 222 // FABRICEPROPERTYCHECKFAILED ... 223 FABRICEPROPERTYCHECKFAILED Code = "FABRIC_E_PROPERTY_CHECK_FAILED" 224 // FABRICEPROPERTYDOESNOTEXIST ... 225 FABRICEPROPERTYDOESNOTEXIST Code = "FABRIC_E_PROPERTY_DOES_NOT_EXIST" 226 // FABRICERECONFIGURATIONPENDING ... 227 FABRICERECONFIGURATIONPENDING Code = "FABRIC_E_RECONFIGURATION_PENDING" 228 // FABRICEREPLICADOESNOTEXIST ... 229 FABRICEREPLICADOESNOTEXIST Code = "FABRIC_E_REPLICA_DOES_NOT_EXIST" 230 // FABRICESEQUENCENUMBERCHECKFAILED ... 231 FABRICESEQUENCENUMBERCHECKFAILED Code = "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" 232 // FABRICESERVICEAFFINITYCHAINNOTSUPPORTED ... 233 FABRICESERVICEAFFINITYCHAINNOTSUPPORTED Code = "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" 234 // FABRICESERVICEALREADYEXISTS ... 235 FABRICESERVICEALREADYEXISTS Code = "FABRIC_E_SERVICE_ALREADY_EXISTS" 236 // FABRICESERVICEDOESNOTEXIST ... 237 FABRICESERVICEDOESNOTEXIST Code = "FABRIC_E_SERVICE_DOES_NOT_EXIST" 238 // FABRICESERVICEGROUPALREADYEXISTS ... 239 FABRICESERVICEGROUPALREADYEXISTS Code = "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" 240 // FABRICESERVICEGROUPDOESNOTEXIST ... 241 FABRICESERVICEGROUPDOESNOTEXIST Code = "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" 242 // FABRICESERVICEMANIFESTNOTFOUND ... 243 FABRICESERVICEMANIFESTNOTFOUND Code = "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" 244 // FABRICESERVICEMETADATAMISMATCH ... 245 FABRICESERVICEMETADATAMISMATCH Code = "FABRIC_E_SERVICE_METADATA_MISMATCH" 246 // FABRICESERVICEOFFLINE ... 247 FABRICESERVICEOFFLINE Code = "FABRIC_E_SERVICE_OFFLINE" 248 // FABRICESERVICETYPEMISMATCH ... 249 FABRICESERVICETYPEMISMATCH Code = "FABRIC_E_SERVICE_TYPE_MISMATCH" 250 // FABRICESERVICETYPENOTFOUND ... 251 FABRICESERVICETYPENOTFOUND Code = "FABRIC_E_SERVICE_TYPE_NOT_FOUND" 252 // FABRICESERVICETYPETEMPLATENOTFOUND ... 253 FABRICESERVICETYPETEMPLATENOTFOUND Code = "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" 254 // FABRICETIMEOUT ... 255 FABRICETIMEOUT Code = "FABRIC_E_TIMEOUT" 256 // FABRICEVALUEEMPTY ... 257 FABRICEVALUEEMPTY Code = "FABRIC_E_VALUE_EMPTY" 258 // FABRICEVALUETOOLARGE ... 259 FABRICEVALUETOOLARGE Code = "FABRIC_E_VALUE_TOO_LARGE" 260) 261 262// PossibleCodeValues returns an array of possible values for the Code const type. 263func PossibleCodeValues() []Code { 264 return []Code{EABORT, FABRICEAPPLICATIONALREADYEXISTS, FABRICEAPPLICATIONALREADYINTARGETVERSION, FABRICEAPPLICATIONNOTFOUND, FABRICEAPPLICATIONNOTUPGRADING, FABRICEAPPLICATIONTYPEALREADYEXISTS, FABRICEAPPLICATIONTYPEINUSE, FABRICEAPPLICATIONTYPENOTFOUND, FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS, FABRICEAPPLICATIONUPGRADEINPROGRESS, FABRICEAPPLICATIONUPGRADEVALIDATIONERROR, FABRICECOMMUNICATIONERROR, FABRICECONFIGURATIONPARAMETERNOTFOUND, FABRICECONFIGURATIONSECTIONNOTFOUND, FABRICEDIRECTORYNOTFOUND, FABRICEENUMERATIONCOMPLETED, FABRICEFABRICALREADYINTARGETVERSION, FABRICEFABRICNOTUPGRADING, FABRICEFABRICUPGRADEINPROGRESS, FABRICEFABRICUPGRADEVALIDATIONERROR, FABRICEFABRICVERSIONALREADYEXISTS, FABRICEFABRICVERSIONINUSE, FABRICEFABRICVERSIONNOTFOUND, FABRICEFILENOTFOUND, FABRICEHEALTHENTITYNOTFOUND, FABRICEHEALTHSTALEREPORT, FABRICEIMAGEBUILDERVALIDATIONERROR, FABRICEINSTANCEIDMISMATCH, FABRICEINVALIDADDRESS, FABRICEINVALIDATOMICGROUP, FABRICEINVALIDCONFIGURATION, FABRICEINVALIDNAMEURI, FABRICEINVALIDPARTITIONKEY, FABRICEKEYNOTFOUND, FABRICEKEYTOOLARGE, FABRICENAMEALREADYEXISTS, FABRICENAMEDOESNOTEXIST, FABRICENAMENOTEMPTY, FABRICENODEHASNOTSTOPPEDYET, FABRICENODEISUP, FABRICENODENOTFOUND, FABRICENOTPRIMARY, FABRICENOTREADY, FABRICENOWRITEQUORUM, FABRICEOPERATIONNOTCOMPLETE, FABRICEPARTITIONNOTFOUND, FABRICEPATHTOOLONG, FABRICEPROPERTYCHECKFAILED, FABRICEPROPERTYDOESNOTEXIST, FABRICERECONFIGURATIONPENDING, FABRICEREPLICADOESNOTEXIST, FABRICESEQUENCENUMBERCHECKFAILED, FABRICESERVICEAFFINITYCHAINNOTSUPPORTED, FABRICESERVICEALREADYEXISTS, FABRICESERVICEDOESNOTEXIST, FABRICESERVICEGROUPALREADYEXISTS, FABRICESERVICEGROUPDOESNOTEXIST, FABRICESERVICEMANIFESTNOTFOUND, FABRICESERVICEMETADATAMISMATCH, FABRICESERVICEOFFLINE, FABRICESERVICETYPEMISMATCH, FABRICESERVICETYPENOTFOUND, FABRICESERVICETYPETEMPLATENOTFOUND, FABRICETIMEOUT, FABRICEVALUEEMPTY, FABRICEVALUETOOLARGE} 265} 266 267// CreateFabricDump enumerates the values for create fabric dump. 268type CreateFabricDump string 269 270const ( 271 // False ... 272 False CreateFabricDump = "False" 273 // True ... 274 True CreateFabricDump = "True" 275) 276 277// PossibleCreateFabricDumpValues returns an array of possible values for the CreateFabricDump const type. 278func PossibleCreateFabricDumpValues() []CreateFabricDump { 279 return []CreateFabricDump{False, True} 280} 281 282// CurrentReplicatorOperation enumerates the values for current replicator operation. 283type CurrentReplicatorOperation string 284 285const ( 286 // CurrentReplicatorOperationAbort ... 287 CurrentReplicatorOperationAbort CurrentReplicatorOperation = "Abort" 288 // CurrentReplicatorOperationBuild ... 289 CurrentReplicatorOperationBuild CurrentReplicatorOperation = "Build" 290 // CurrentReplicatorOperationChangeRole ... 291 CurrentReplicatorOperationChangeRole CurrentReplicatorOperation = "ChangeRole" 292 // CurrentReplicatorOperationClose ... 293 CurrentReplicatorOperationClose CurrentReplicatorOperation = "Close" 294 // CurrentReplicatorOperationInvalid ... 295 CurrentReplicatorOperationInvalid CurrentReplicatorOperation = "Invalid" 296 // CurrentReplicatorOperationNone ... 297 CurrentReplicatorOperationNone CurrentReplicatorOperation = "None" 298 // CurrentReplicatorOperationOnDataLoss ... 299 CurrentReplicatorOperationOnDataLoss CurrentReplicatorOperation = "OnDataLoss" 300 // CurrentReplicatorOperationOpen ... 301 CurrentReplicatorOperationOpen CurrentReplicatorOperation = "Open" 302 // CurrentReplicatorOperationUpdateEpoch ... 303 CurrentReplicatorOperationUpdateEpoch CurrentReplicatorOperation = "UpdateEpoch" 304 // CurrentReplicatorOperationWaitForCatchup ... 305 CurrentReplicatorOperationWaitForCatchup CurrentReplicatorOperation = "WaitForCatchup" 306) 307 308// PossibleCurrentReplicatorOperationValues returns an array of possible values for the CurrentReplicatorOperation const type. 309func PossibleCurrentReplicatorOperationValues() []CurrentReplicatorOperation { 310 return []CurrentReplicatorOperation{CurrentReplicatorOperationAbort, CurrentReplicatorOperationBuild, CurrentReplicatorOperationChangeRole, CurrentReplicatorOperationClose, CurrentReplicatorOperationInvalid, CurrentReplicatorOperationNone, CurrentReplicatorOperationOnDataLoss, CurrentReplicatorOperationOpen, CurrentReplicatorOperationUpdateEpoch, CurrentReplicatorOperationWaitForCatchup} 311} 312 313// CurrentServiceOperation enumerates the values for current service operation. 314type CurrentServiceOperation string 315 316const ( 317 // CurrentServiceOperationAbort ... 318 CurrentServiceOperationAbort CurrentServiceOperation = "Abort" 319 // CurrentServiceOperationChangeRole ... 320 CurrentServiceOperationChangeRole CurrentServiceOperation = "ChangeRole" 321 // CurrentServiceOperationClose ... 322 CurrentServiceOperationClose CurrentServiceOperation = "Close" 323 // CurrentServiceOperationNone ... 324 CurrentServiceOperationNone CurrentServiceOperation = "None" 325 // CurrentServiceOperationOpen ... 326 CurrentServiceOperationOpen CurrentServiceOperation = "Open" 327 // CurrentServiceOperationUnknown ... 328 CurrentServiceOperationUnknown CurrentServiceOperation = "Unknown" 329) 330 331// PossibleCurrentServiceOperationValues returns an array of possible values for the CurrentServiceOperation const type. 332func PossibleCurrentServiceOperationValues() []CurrentServiceOperation { 333 return []CurrentServiceOperation{CurrentServiceOperationAbort, CurrentServiceOperationChangeRole, CurrentServiceOperationClose, CurrentServiceOperationNone, CurrentServiceOperationOpen, CurrentServiceOperationUnknown} 334} 335 336// DeactivationIntent enumerates the values for deactivation intent. 337type DeactivationIntent string 338 339const ( 340 // Pause ... 341 Pause DeactivationIntent = "Pause" 342 // RemoveData ... 343 RemoveData DeactivationIntent = "RemoveData" 344 // Restart ... 345 Restart DeactivationIntent = "Restart" 346) 347 348// PossibleDeactivationIntentValues returns an array of possible values for the DeactivationIntent const type. 349func PossibleDeactivationIntentValues() []DeactivationIntent { 350 return []DeactivationIntent{Pause, RemoveData, Restart} 351} 352 353// DefaultMoveCost enumerates the values for default move cost. 354type DefaultMoveCost string 355 356const ( 357 // High ... 358 High DefaultMoveCost = "High" 359 // Low ... 360 Low DefaultMoveCost = "Low" 361 // Medium ... 362 Medium DefaultMoveCost = "Medium" 363 // Zero ... 364 Zero DefaultMoveCost = "Zero" 365) 366 367// PossibleDefaultMoveCostValues returns an array of possible values for the DefaultMoveCost const type. 368func PossibleDefaultMoveCostValues() []DefaultMoveCost { 369 return []DefaultMoveCost{High, Low, Medium, Zero} 370} 371 372// DefaultMoveCost1 enumerates the values for default move cost 1. 373type DefaultMoveCost1 string 374 375const ( 376 // DefaultMoveCost1High ... 377 DefaultMoveCost1High DefaultMoveCost1 = "High" 378 // DefaultMoveCost1Low ... 379 DefaultMoveCost1Low DefaultMoveCost1 = "Low" 380 // DefaultMoveCost1Medium ... 381 DefaultMoveCost1Medium DefaultMoveCost1 = "Medium" 382 // DefaultMoveCost1Zero ... 383 DefaultMoveCost1Zero DefaultMoveCost1 = "Zero" 384) 385 386// PossibleDefaultMoveCost1Values returns an array of possible values for the DefaultMoveCost1 const type. 387func PossibleDefaultMoveCost1Values() []DefaultMoveCost1 { 388 return []DefaultMoveCost1{DefaultMoveCost1High, DefaultMoveCost1Low, DefaultMoveCost1Medium, DefaultMoveCost1Zero} 389} 390 391// EntityKind enumerates the values for entity kind. 392type EntityKind string 393 394const ( 395 // EntityKindApplication ... 396 EntityKindApplication EntityKind = "Application" 397 // EntityKindCluster ... 398 EntityKindCluster EntityKind = "Cluster" 399 // EntityKindDeployedApplication ... 400 EntityKindDeployedApplication EntityKind = "DeployedApplication" 401 // EntityKindDeployedServicePackage ... 402 EntityKindDeployedServicePackage EntityKind = "DeployedServicePackage" 403 // EntityKindInvalid ... 404 EntityKindInvalid EntityKind = "Invalid" 405 // EntityKindNode ... 406 EntityKindNode EntityKind = "Node" 407 // EntityKindPartition ... 408 EntityKindPartition EntityKind = "Partition" 409 // EntityKindReplica ... 410 EntityKindReplica EntityKind = "Replica" 411 // EntityKindService ... 412 EntityKindService EntityKind = "Service" 413) 414 415// PossibleEntityKindValues returns an array of possible values for the EntityKind const type. 416func PossibleEntityKindValues() []EntityKind { 417 return []EntityKind{EntityKindApplication, EntityKindCluster, EntityKindDeployedApplication, EntityKindDeployedServicePackage, EntityKindInvalid, EntityKindNode, EntityKindPartition, EntityKindReplica, EntityKindService} 418} 419 420// FailureAction enumerates the values for failure action. 421type FailureAction string 422 423const ( 424 // FailureActionInvalid ... 425 FailureActionInvalid FailureAction = "Invalid" 426 // FailureActionManual ... 427 FailureActionManual FailureAction = "Manual" 428 // FailureActionRollback ... 429 FailureActionRollback FailureAction = "Rollback" 430) 431 432// PossibleFailureActionValues returns an array of possible values for the FailureAction const type. 433func PossibleFailureActionValues() []FailureAction { 434 return []FailureAction{FailureActionInvalid, FailureActionManual, FailureActionRollback} 435} 436 437// FailureAction1 enumerates the values for failure action 1. 438type FailureAction1 string 439 440const ( 441 // FailureAction1Invalid ... 442 FailureAction1Invalid FailureAction1 = "Invalid" 443 // FailureAction1Manual ... 444 FailureAction1Manual FailureAction1 = "Manual" 445 // FailureAction1Rollback ... 446 FailureAction1Rollback FailureAction1 = "Rollback" 447) 448 449// PossibleFailureAction1Values returns an array of possible values for the FailureAction1 const type. 450func PossibleFailureAction1Values() []FailureAction1 { 451 return []FailureAction1{FailureAction1Invalid, FailureAction1Manual, FailureAction1Rollback} 452} 453 454// FailureReason enumerates the values for failure reason. 455type FailureReason string 456 457const ( 458 // HealthCheck ... 459 HealthCheck FailureReason = "HealthCheck" 460 // Interrupted ... 461 Interrupted FailureReason = "Interrupted" 462 // None ... 463 None FailureReason = "None" 464 // UpgradeDomainTimeout ... 465 UpgradeDomainTimeout FailureReason = "UpgradeDomainTimeout" 466 // UpgradeTimeout ... 467 UpgradeTimeout FailureReason = "UpgradeTimeout" 468) 469 470// PossibleFailureReasonValues returns an array of possible values for the FailureReason const type. 471func PossibleFailureReasonValues() []FailureReason { 472 return []FailureReason{HealthCheck, Interrupted, None, UpgradeDomainTimeout, UpgradeTimeout} 473} 474 475// FailureReason1 enumerates the values for failure reason 1. 476type FailureReason1 string 477 478const ( 479 // FailureReason1HealthCheck ... 480 FailureReason1HealthCheck FailureReason1 = "HealthCheck" 481 // FailureReason1Interrupted ... 482 FailureReason1Interrupted FailureReason1 = "Interrupted" 483 // FailureReason1None ... 484 FailureReason1None FailureReason1 = "None" 485 // FailureReason1UpgradeDomainTimeout ... 486 FailureReason1UpgradeDomainTimeout FailureReason1 = "UpgradeDomainTimeout" 487 // FailureReason1UpgradeTimeout ... 488 FailureReason1UpgradeTimeout FailureReason1 = "UpgradeTimeout" 489) 490 491// PossibleFailureReason1Values returns an array of possible values for the FailureReason1 const type. 492func PossibleFailureReason1Values() []FailureReason1 { 493 return []FailureReason1{FailureReason1HealthCheck, FailureReason1Interrupted, FailureReason1None, FailureReason1UpgradeDomainTimeout, FailureReason1UpgradeTimeout} 494} 495 496// FailureReason2 enumerates the values for failure reason 2. 497type FailureReason2 string 498 499const ( 500 // FailureReason2HealthCheck ... 501 FailureReason2HealthCheck FailureReason2 = "HealthCheck" 502 // FailureReason2Interrupted ... 503 FailureReason2Interrupted FailureReason2 = "Interrupted" 504 // FailureReason2None ... 505 FailureReason2None FailureReason2 = "None" 506 // FailureReason2UpgradeDomainTimeout ... 507 FailureReason2UpgradeDomainTimeout FailureReason2 = "UpgradeDomainTimeout" 508 // FailureReason2UpgradeTimeout ... 509 FailureReason2UpgradeTimeout FailureReason2 = "UpgradeTimeout" 510) 511 512// PossibleFailureReason2Values returns an array of possible values for the FailureReason2 const type. 513func PossibleFailureReason2Values() []FailureReason2 { 514 return []FailureReason2{FailureReason2HealthCheck, FailureReason2Interrupted, FailureReason2None, FailureReason2UpgradeDomainTimeout, FailureReason2UpgradeTimeout} 515} 516 517// HealthState enumerates the values for health state. 518type HealthState string 519 520const ( 521 // HealthStateError ... 522 HealthStateError HealthState = "Error" 523 // HealthStateInvalid ... 524 HealthStateInvalid HealthState = "Invalid" 525 // HealthStateOk ... 526 HealthStateOk HealthState = "Ok" 527 // HealthStateUnknown ... 528 HealthStateUnknown HealthState = "Unknown" 529 // HealthStateWarning ... 530 HealthStateWarning HealthState = "Warning" 531) 532 533// PossibleHealthStateValues returns an array of possible values for the HealthState const type. 534func PossibleHealthStateValues() []HealthState { 535 return []HealthState{HealthStateError, HealthStateInvalid, HealthStateOk, HealthStateUnknown, HealthStateWarning} 536} 537 538// HealthState1 enumerates the values for health state 1. 539type HealthState1 string 540 541const ( 542 // HealthState1Error ... 543 HealthState1Error HealthState1 = "Error" 544 // HealthState1Invalid ... 545 HealthState1Invalid HealthState1 = "Invalid" 546 // HealthState1Ok ... 547 HealthState1Ok HealthState1 = "Ok" 548 // HealthState1Unknown ... 549 HealthState1Unknown HealthState1 = "Unknown" 550 // HealthState1Warning ... 551 HealthState1Warning HealthState1 = "Warning" 552) 553 554// PossibleHealthState1Values returns an array of possible values for the HealthState1 const type. 555func PossibleHealthState1Values() []HealthState1 { 556 return []HealthState1{HealthState1Error, HealthState1Invalid, HealthState1Ok, HealthState1Unknown, HealthState1Warning} 557} 558 559// HealthState2 enumerates the values for health state 2. 560type HealthState2 string 561 562const ( 563 // HealthState2Error ... 564 HealthState2Error HealthState2 = "Error" 565 // HealthState2Invalid ... 566 HealthState2Invalid HealthState2 = "Invalid" 567 // HealthState2Ok ... 568 HealthState2Ok HealthState2 = "Ok" 569 // HealthState2Unknown ... 570 HealthState2Unknown HealthState2 = "Unknown" 571 // HealthState2Warning ... 572 HealthState2Warning HealthState2 = "Warning" 573) 574 575// PossibleHealthState2Values returns an array of possible values for the HealthState2 const type. 576func PossibleHealthState2Values() []HealthState2 { 577 return []HealthState2{HealthState2Error, HealthState2Invalid, HealthState2Ok, HealthState2Unknown, HealthState2Warning} 578} 579 580// HealthState3 enumerates the values for health state 3. 581type HealthState3 string 582 583const ( 584 // HealthState3Error ... 585 HealthState3Error HealthState3 = "Error" 586 // HealthState3Invalid ... 587 HealthState3Invalid HealthState3 = "Invalid" 588 // HealthState3Ok ... 589 HealthState3Ok HealthState3 = "Ok" 590 // HealthState3Unknown ... 591 HealthState3Unknown HealthState3 = "Unknown" 592 // HealthState3Warning ... 593 HealthState3Warning HealthState3 = "Warning" 594) 595 596// PossibleHealthState3Values returns an array of possible values for the HealthState3 const type. 597func PossibleHealthState3Values() []HealthState3 { 598 return []HealthState3{HealthState3Error, HealthState3Invalid, HealthState3Ok, HealthState3Unknown, HealthState3Warning} 599} 600 601// HealthState4 enumerates the values for health state 4. 602type HealthState4 string 603 604const ( 605 // HealthState4Error ... 606 HealthState4Error HealthState4 = "Error" 607 // HealthState4Invalid ... 608 HealthState4Invalid HealthState4 = "Invalid" 609 // HealthState4Ok ... 610 HealthState4Ok HealthState4 = "Ok" 611 // HealthState4Unknown ... 612 HealthState4Unknown HealthState4 = "Unknown" 613 // HealthState4Warning ... 614 HealthState4Warning HealthState4 = "Warning" 615) 616 617// PossibleHealthState4Values returns an array of possible values for the HealthState4 const type. 618func PossibleHealthState4Values() []HealthState4 { 619 return []HealthState4{HealthState4Error, HealthState4Invalid, HealthState4Ok, HealthState4Unknown, HealthState4Warning} 620} 621 622// HealthState5 enumerates the values for health state 5. 623type HealthState5 string 624 625const ( 626 // HealthState5Error ... 627 HealthState5Error HealthState5 = "Error" 628 // HealthState5Invalid ... 629 HealthState5Invalid HealthState5 = "Invalid" 630 // HealthState5Ok ... 631 HealthState5Ok HealthState5 = "Ok" 632 // HealthState5Unknown ... 633 HealthState5Unknown HealthState5 = "Unknown" 634 // HealthState5Warning ... 635 HealthState5Warning HealthState5 = "Warning" 636) 637 638// PossibleHealthState5Values returns an array of possible values for the HealthState5 const type. 639func PossibleHealthState5Values() []HealthState5 { 640 return []HealthState5{HealthState5Error, HealthState5Invalid, HealthState5Ok, HealthState5Unknown, HealthState5Warning} 641} 642 643// HealthState6 enumerates the values for health state 6. 644type HealthState6 string 645 646const ( 647 // HealthState6Error ... 648 HealthState6Error HealthState6 = "Error" 649 // HealthState6Invalid ... 650 HealthState6Invalid HealthState6 = "Invalid" 651 // HealthState6Ok ... 652 HealthState6Ok HealthState6 = "Ok" 653 // HealthState6Unknown ... 654 HealthState6Unknown HealthState6 = "Unknown" 655 // HealthState6Warning ... 656 HealthState6Warning HealthState6 = "Warning" 657) 658 659// PossibleHealthState6Values returns an array of possible values for the HealthState6 const type. 660func PossibleHealthState6Values() []HealthState6 { 661 return []HealthState6{HealthState6Error, HealthState6Invalid, HealthState6Ok, HealthState6Unknown, HealthState6Warning} 662} 663 664// HealthState7 enumerates the values for health state 7. 665type HealthState7 string 666 667const ( 668 // HealthState7Error ... 669 HealthState7Error HealthState7 = "Error" 670 // HealthState7Invalid ... 671 HealthState7Invalid HealthState7 = "Invalid" 672 // HealthState7Ok ... 673 HealthState7Ok HealthState7 = "Ok" 674 // HealthState7Unknown ... 675 HealthState7Unknown HealthState7 = "Unknown" 676 // HealthState7Warning ... 677 HealthState7Warning HealthState7 = "Warning" 678) 679 680// PossibleHealthState7Values returns an array of possible values for the HealthState7 const type. 681func PossibleHealthState7Values() []HealthState7 { 682 return []HealthState7{HealthState7Error, HealthState7Invalid, HealthState7Ok, HealthState7Unknown, HealthState7Warning} 683} 684 685// HostIsolationMode enumerates the values for host isolation mode. 686type HostIsolationMode string 687 688const ( 689 // HostIsolationModeHyperV ... 690 HostIsolationModeHyperV HostIsolationMode = "HyperV" 691 // HostIsolationModeNone ... 692 HostIsolationModeNone HostIsolationMode = "None" 693 // HostIsolationModeProcess ... 694 HostIsolationModeProcess HostIsolationMode = "Process" 695) 696 697// PossibleHostIsolationModeValues returns an array of possible values for the HostIsolationMode const type. 698func PossibleHostIsolationModeValues() []HostIsolationMode { 699 return []HostIsolationMode{HostIsolationModeHyperV, HostIsolationModeNone, HostIsolationModeProcess} 700} 701 702// HostType enumerates the values for host type. 703type HostType string 704 705const ( 706 // HostTypeContainerHost ... 707 HostTypeContainerHost HostType = "ContainerHost" 708 // HostTypeExeHost ... 709 HostTypeExeHost HostType = "ExeHost" 710 // HostTypeInvalid ... 711 HostTypeInvalid HostType = "Invalid" 712) 713 714// PossibleHostTypeValues returns an array of possible values for the HostType const type. 715func PossibleHostTypeValues() []HostType { 716 return []HostType{HostTypeContainerHost, HostTypeExeHost, HostTypeInvalid} 717} 718 719// ImpactLevel enumerates the values for impact level. 720type ImpactLevel string 721 722const ( 723 // ImpactLevelInvalid ... 724 ImpactLevelInvalid ImpactLevel = "Invalid" 725 // ImpactLevelNone ... 726 ImpactLevelNone ImpactLevel = "None" 727 // ImpactLevelRemoveData ... 728 ImpactLevelRemoveData ImpactLevel = "RemoveData" 729 // ImpactLevelRemoveNode ... 730 ImpactLevelRemoveNode ImpactLevel = "RemoveNode" 731 // ImpactLevelRestart ... 732 ImpactLevelRestart ImpactLevel = "Restart" 733) 734 735// PossibleImpactLevelValues returns an array of possible values for the ImpactLevel const type. 736func PossibleImpactLevelValues() []ImpactLevel { 737 return []ImpactLevel{ImpactLevelInvalid, ImpactLevelNone, ImpactLevelRemoveData, ImpactLevelRemoveNode, ImpactLevelRestart} 738} 739 740// Kind enumerates the values for kind. 741type Kind string 742 743const ( 744 // KindInvalid ... 745 KindInvalid Kind = "Invalid" 746 // KindStatefulPrimary ... 747 KindStatefulPrimary Kind = "StatefulPrimary" 748 // KindStatefulSecondary ... 749 KindStatefulSecondary Kind = "StatefulSecondary" 750 // KindStateless ... 751 KindStateless Kind = "Stateless" 752) 753 754// PossibleKindValues returns an array of possible values for the Kind const type. 755func PossibleKindValues() []Kind { 756 return []Kind{KindInvalid, KindStatefulPrimary, KindStatefulSecondary, KindStateless} 757} 758 759// KindBasicChaosEvent enumerates the values for kind basic chaos event. 760type KindBasicChaosEvent string 761 762const ( 763 // KindChaosEvent ... 764 KindChaosEvent KindBasicChaosEvent = "ChaosEvent" 765 // KindExecutingFaults ... 766 KindExecutingFaults KindBasicChaosEvent = "ExecutingFaults" 767 // KindStarted ... 768 KindStarted KindBasicChaosEvent = "Started" 769 // KindStopped ... 770 KindStopped KindBasicChaosEvent = "Stopped" 771 // KindTestError ... 772 KindTestError KindBasicChaosEvent = "TestError" 773 // KindValidationFailed ... 774 KindValidationFailed KindBasicChaosEvent = "ValidationFailed" 775 // KindWaiting ... 776 KindWaiting KindBasicChaosEvent = "Waiting" 777) 778 779// PossibleKindBasicChaosEventValues returns an array of possible values for the KindBasicChaosEvent const type. 780func PossibleKindBasicChaosEventValues() []KindBasicChaosEvent { 781 return []KindBasicChaosEvent{KindChaosEvent, KindExecutingFaults, KindStarted, KindStopped, KindTestError, KindValidationFailed, KindWaiting} 782} 783 784// KindBasicHealthEvaluation enumerates the values for kind basic health evaluation. 785type KindBasicHealthEvaluation string 786 787const ( 788 // KindApplication ... 789 KindApplication KindBasicHealthEvaluation = "Application" 790 // KindApplications ... 791 KindApplications KindBasicHealthEvaluation = "Applications" 792 // KindApplicationTypeApplications ... 793 KindApplicationTypeApplications KindBasicHealthEvaluation = "ApplicationTypeApplications" 794 // KindDeltaNodesCheck ... 795 KindDeltaNodesCheck KindBasicHealthEvaluation = "DeltaNodesCheck" 796 // KindDeployedApplication ... 797 KindDeployedApplication KindBasicHealthEvaluation = "DeployedApplication" 798 // KindDeployedApplications ... 799 KindDeployedApplications KindBasicHealthEvaluation = "DeployedApplications" 800 // KindDeployedServicePackage ... 801 KindDeployedServicePackage KindBasicHealthEvaluation = "DeployedServicePackage" 802 // KindDeployedServicePackages ... 803 KindDeployedServicePackages KindBasicHealthEvaluation = "DeployedServicePackages" 804 // KindEvent ... 805 KindEvent KindBasicHealthEvaluation = "Event" 806 // KindHealthEvaluation ... 807 KindHealthEvaluation KindBasicHealthEvaluation = "HealthEvaluation" 808 // KindNode ... 809 KindNode KindBasicHealthEvaluation = "Node" 810 // KindNodes ... 811 KindNodes KindBasicHealthEvaluation = "Nodes" 812 // KindPartition ... 813 KindPartition KindBasicHealthEvaluation = "Partition" 814 // KindPartitions ... 815 KindPartitions KindBasicHealthEvaluation = "Partitions" 816 // KindReplica ... 817 KindReplica KindBasicHealthEvaluation = "Replica" 818 // KindReplicas ... 819 KindReplicas KindBasicHealthEvaluation = "Replicas" 820 // KindService ... 821 KindService KindBasicHealthEvaluation = "Service" 822 // KindServices ... 823 KindServices KindBasicHealthEvaluation = "Services" 824 // KindSystemApplication ... 825 KindSystemApplication KindBasicHealthEvaluation = "SystemApplication" 826 // KindUpgradeDomainDeltaNodesCheck ... 827 KindUpgradeDomainDeltaNodesCheck KindBasicHealthEvaluation = "UpgradeDomainDeltaNodesCheck" 828 // KindUpgradeDomainNodes ... 829 KindUpgradeDomainNodes KindBasicHealthEvaluation = "UpgradeDomainNodes" 830) 831 832// PossibleKindBasicHealthEvaluationValues returns an array of possible values for the KindBasicHealthEvaluation const type. 833func PossibleKindBasicHealthEvaluationValues() []KindBasicHealthEvaluation { 834 return []KindBasicHealthEvaluation{KindApplication, KindApplications, KindApplicationTypeApplications, KindDeltaNodesCheck, KindDeployedApplication, KindDeployedApplications, KindDeployedServicePackage, KindDeployedServicePackages, KindEvent, KindHealthEvaluation, KindNode, KindNodes, KindPartition, KindPartitions, KindReplica, KindReplicas, KindService, KindServices, KindSystemApplication, KindUpgradeDomainDeltaNodesCheck, KindUpgradeDomainNodes} 835} 836 837// KindBasicPropertyBatchInfo enumerates the values for kind basic property batch info. 838type KindBasicPropertyBatchInfo string 839 840const ( 841 // KindFailed ... 842 KindFailed KindBasicPropertyBatchInfo = "Failed" 843 // KindPropertyBatchInfo ... 844 KindPropertyBatchInfo KindBasicPropertyBatchInfo = "PropertyBatchInfo" 845 // KindSuccessful ... 846 KindSuccessful KindBasicPropertyBatchInfo = "Successful" 847) 848 849// PossibleKindBasicPropertyBatchInfoValues returns an array of possible values for the KindBasicPropertyBatchInfo const type. 850func PossibleKindBasicPropertyBatchInfoValues() []KindBasicPropertyBatchInfo { 851 return []KindBasicPropertyBatchInfo{KindFailed, KindPropertyBatchInfo, KindSuccessful} 852} 853 854// KindBasicPropertyBatchOperation enumerates the values for kind basic property batch operation. 855type KindBasicPropertyBatchOperation string 856 857const ( 858 // KindCheckExists ... 859 KindCheckExists KindBasicPropertyBatchOperation = "CheckExists" 860 // KindCheckSequence ... 861 KindCheckSequence KindBasicPropertyBatchOperation = "CheckSequence" 862 // KindCheckValue ... 863 KindCheckValue KindBasicPropertyBatchOperation = "CheckValue" 864 // KindDelete ... 865 KindDelete KindBasicPropertyBatchOperation = "Delete" 866 // KindGet ... 867 KindGet KindBasicPropertyBatchOperation = "Get" 868 // KindPropertyBatchOperation ... 869 KindPropertyBatchOperation KindBasicPropertyBatchOperation = "PropertyBatchOperation" 870 // KindPut ... 871 KindPut KindBasicPropertyBatchOperation = "Put" 872) 873 874// PossibleKindBasicPropertyBatchOperationValues returns an array of possible values for the KindBasicPropertyBatchOperation const type. 875func PossibleKindBasicPropertyBatchOperationValues() []KindBasicPropertyBatchOperation { 876 return []KindBasicPropertyBatchOperation{KindCheckExists, KindCheckSequence, KindCheckValue, KindDelete, KindGet, KindPropertyBatchOperation, KindPut} 877} 878 879// KindBasicPropertyValue enumerates the values for kind basic property value. 880type KindBasicPropertyValue string 881 882const ( 883 // KindBinary ... 884 KindBinary KindBasicPropertyValue = "Binary" 885 // KindDouble ... 886 KindDouble KindBasicPropertyValue = "Double" 887 // KindGUID ... 888 KindGUID KindBasicPropertyValue = "Guid" 889 // KindInt64 ... 890 KindInt64 KindBasicPropertyValue = "Int64" 891 // KindPropertyValue ... 892 KindPropertyValue KindBasicPropertyValue = "PropertyValue" 893 // KindString ... 894 KindString KindBasicPropertyValue = "String" 895) 896 897// PossibleKindBasicPropertyValueValues returns an array of possible values for the KindBasicPropertyValue const type. 898func PossibleKindBasicPropertyValueValues() []KindBasicPropertyValue { 899 return []KindBasicPropertyValue{KindBinary, KindDouble, KindGUID, KindInt64, KindPropertyValue, KindString} 900} 901 902// KindBasicRepairImpactDescriptionBase enumerates the values for kind basic repair impact description base. 903type KindBasicRepairImpactDescriptionBase string 904 905const ( 906 // KindBasicRepairImpactDescriptionBaseKindNode ... 907 KindBasicRepairImpactDescriptionBaseKindNode KindBasicRepairImpactDescriptionBase = "Node" 908 // KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase ... 909 KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase KindBasicRepairImpactDescriptionBase = "RepairImpactDescriptionBase" 910) 911 912// PossibleKindBasicRepairImpactDescriptionBaseValues returns an array of possible values for the KindBasicRepairImpactDescriptionBase const type. 913func PossibleKindBasicRepairImpactDescriptionBaseValues() []KindBasicRepairImpactDescriptionBase { 914 return []KindBasicRepairImpactDescriptionBase{KindBasicRepairImpactDescriptionBaseKindNode, KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase} 915} 916 917// KindBasicRepairTargetDescriptionBase enumerates the values for kind basic repair target description base. 918type KindBasicRepairTargetDescriptionBase string 919 920const ( 921 // KindBasicRepairTargetDescriptionBaseKindNode ... 922 KindBasicRepairTargetDescriptionBaseKindNode KindBasicRepairTargetDescriptionBase = "Node" 923 // KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase ... 924 KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase KindBasicRepairTargetDescriptionBase = "RepairTargetDescriptionBase" 925) 926 927// PossibleKindBasicRepairTargetDescriptionBaseValues returns an array of possible values for the KindBasicRepairTargetDescriptionBase const type. 928func PossibleKindBasicRepairTargetDescriptionBaseValues() []KindBasicRepairTargetDescriptionBase { 929 return []KindBasicRepairTargetDescriptionBase{KindBasicRepairTargetDescriptionBaseKindNode, KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase} 930} 931 932// KindBasicReplicaStatusBase enumerates the values for kind basic replica status base. 933type KindBasicReplicaStatusBase string 934 935const ( 936 // KindKeyValueStore ... 937 KindKeyValueStore KindBasicReplicaStatusBase = "KeyValueStore" 938 // KindReplicaStatusBase ... 939 KindReplicaStatusBase KindBasicReplicaStatusBase = "ReplicaStatusBase" 940) 941 942// PossibleKindBasicReplicaStatusBaseValues returns an array of possible values for the KindBasicReplicaStatusBase const type. 943func PossibleKindBasicReplicaStatusBaseValues() []KindBasicReplicaStatusBase { 944 return []KindBasicReplicaStatusBase{KindKeyValueStore, KindReplicaStatusBase} 945} 946 947// KindBasicReplicatorStatus enumerates the values for kind basic replicator status. 948type KindBasicReplicatorStatus string 949 950const ( 951 // KindActiveSecondary ... 952 KindActiveSecondary KindBasicReplicatorStatus = "ActiveSecondary" 953 // KindIdleSecondary ... 954 KindIdleSecondary KindBasicReplicatorStatus = "IdleSecondary" 955 // KindPrimary ... 956 KindPrimary KindBasicReplicatorStatus = "Primary" 957 // KindReplicatorStatus ... 958 KindReplicatorStatus KindBasicReplicatorStatus = "ReplicatorStatus" 959 // KindSecondaryReplicatorStatus ... 960 KindSecondaryReplicatorStatus KindBasicReplicatorStatus = "SecondaryReplicatorStatus" 961) 962 963// PossibleKindBasicReplicatorStatusValues returns an array of possible values for the KindBasicReplicatorStatus const type. 964func PossibleKindBasicReplicatorStatusValues() []KindBasicReplicatorStatus { 965 return []KindBasicReplicatorStatus{KindActiveSecondary, KindIdleSecondary, KindPrimary, KindReplicatorStatus, KindSecondaryReplicatorStatus} 966} 967 968// KindBasicSafetyCheck enumerates the values for kind basic safety check. 969type KindBasicSafetyCheck string 970 971const ( 972 // KindEnsureAvailability ... 973 KindEnsureAvailability KindBasicSafetyCheck = "EnsureAvailability" 974 // KindEnsurePartitionQuorum ... 975 KindEnsurePartitionQuorum KindBasicSafetyCheck = "EnsurePartitionQuorum" 976 // KindEnsureSeedNodeQuorum ... 977 KindEnsureSeedNodeQuorum KindBasicSafetyCheck = "EnsureSeedNodeQuorum" 978 // KindPartitionSafetyCheck ... 979 KindPartitionSafetyCheck KindBasicSafetyCheck = "PartitionSafetyCheck" 980 // KindSafetyCheck ... 981 KindSafetyCheck KindBasicSafetyCheck = "SafetyCheck" 982 // KindWaitForInbuildReplica ... 983 KindWaitForInbuildReplica KindBasicSafetyCheck = "WaitForInbuildReplica" 984 // KindWaitForPrimaryPlacement ... 985 KindWaitForPrimaryPlacement KindBasicSafetyCheck = "WaitForPrimaryPlacement" 986 // KindWaitForPrimarySwap ... 987 KindWaitForPrimarySwap KindBasicSafetyCheck = "WaitForPrimarySwap" 988 // KindWaitForReconfiguration ... 989 KindWaitForReconfiguration KindBasicSafetyCheck = "WaitForReconfiguration" 990) 991 992// PossibleKindBasicSafetyCheckValues returns an array of possible values for the KindBasicSafetyCheck const type. 993func PossibleKindBasicSafetyCheckValues() []KindBasicSafetyCheck { 994 return []KindBasicSafetyCheck{KindEnsureAvailability, KindEnsurePartitionQuorum, KindEnsureSeedNodeQuorum, KindPartitionSafetyCheck, KindSafetyCheck, KindWaitForInbuildReplica, KindWaitForPrimaryPlacement, KindWaitForPrimarySwap, KindWaitForReconfiguration} 995} 996 997// KindBasicServiceTypeDescription enumerates the values for kind basic service type description. 998type KindBasicServiceTypeDescription string 999 1000const ( 1001 // KindServiceTypeDescription ... 1002 KindServiceTypeDescription KindBasicServiceTypeDescription = "ServiceTypeDescription" 1003 // KindStateful ... 1004 KindStateful KindBasicServiceTypeDescription = "Stateful" 1005 // KindStateless1 ... 1006 KindStateless1 KindBasicServiceTypeDescription = "Stateless" 1007) 1008 1009// PossibleKindBasicServiceTypeDescriptionValues returns an array of possible values for the KindBasicServiceTypeDescription const type. 1010func PossibleKindBasicServiceTypeDescriptionValues() []KindBasicServiceTypeDescription { 1011 return []KindBasicServiceTypeDescription{KindServiceTypeDescription, KindStateful, KindStateless1} 1012} 1013 1014// NodeDeactivationIntent enumerates the values for node deactivation intent. 1015type NodeDeactivationIntent string 1016 1017const ( 1018 // NodeDeactivationIntentInvalid ... 1019 NodeDeactivationIntentInvalid NodeDeactivationIntent = "Invalid" 1020 // NodeDeactivationIntentPause ... 1021 NodeDeactivationIntentPause NodeDeactivationIntent = "Pause" 1022 // NodeDeactivationIntentRemoveData ... 1023 NodeDeactivationIntentRemoveData NodeDeactivationIntent = "RemoveData" 1024 // NodeDeactivationIntentRemoveNode ... 1025 NodeDeactivationIntentRemoveNode NodeDeactivationIntent = "RemoveNode" 1026 // NodeDeactivationIntentRestart ... 1027 NodeDeactivationIntentRestart NodeDeactivationIntent = "Restart" 1028) 1029 1030// PossibleNodeDeactivationIntentValues returns an array of possible values for the NodeDeactivationIntent const type. 1031func PossibleNodeDeactivationIntentValues() []NodeDeactivationIntent { 1032 return []NodeDeactivationIntent{NodeDeactivationIntentInvalid, NodeDeactivationIntentPause, NodeDeactivationIntentRemoveData, NodeDeactivationIntentRemoveNode, NodeDeactivationIntentRestart} 1033} 1034 1035// NodeDeactivationIntent1 enumerates the values for node deactivation intent 1. 1036type NodeDeactivationIntent1 string 1037 1038const ( 1039 // NodeDeactivationIntent1Invalid ... 1040 NodeDeactivationIntent1Invalid NodeDeactivationIntent1 = "Invalid" 1041 // NodeDeactivationIntent1Pause ... 1042 NodeDeactivationIntent1Pause NodeDeactivationIntent1 = "Pause" 1043 // NodeDeactivationIntent1RemoveData ... 1044 NodeDeactivationIntent1RemoveData NodeDeactivationIntent1 = "RemoveData" 1045 // NodeDeactivationIntent1RemoveNode ... 1046 NodeDeactivationIntent1RemoveNode NodeDeactivationIntent1 = "RemoveNode" 1047 // NodeDeactivationIntent1Restart ... 1048 NodeDeactivationIntent1Restart NodeDeactivationIntent1 = "Restart" 1049) 1050 1051// PossibleNodeDeactivationIntent1Values returns an array of possible values for the NodeDeactivationIntent1 const type. 1052func PossibleNodeDeactivationIntent1Values() []NodeDeactivationIntent1 { 1053 return []NodeDeactivationIntent1{NodeDeactivationIntent1Invalid, NodeDeactivationIntent1Pause, NodeDeactivationIntent1RemoveData, NodeDeactivationIntent1RemoveNode, NodeDeactivationIntent1Restart} 1054} 1055 1056// NodeDeactivationStatus enumerates the values for node deactivation status. 1057type NodeDeactivationStatus string 1058 1059const ( 1060 // NodeDeactivationStatusCompleted ... 1061 NodeDeactivationStatusCompleted NodeDeactivationStatus = "Completed" 1062 // NodeDeactivationStatusNone ... 1063 NodeDeactivationStatusNone NodeDeactivationStatus = "None" 1064 // NodeDeactivationStatusSafetyCheckComplete ... 1065 NodeDeactivationStatusSafetyCheckComplete NodeDeactivationStatus = "SafetyCheckComplete" 1066 // NodeDeactivationStatusSafetyCheckInProgress ... 1067 NodeDeactivationStatusSafetyCheckInProgress NodeDeactivationStatus = "SafetyCheckInProgress" 1068) 1069 1070// PossibleNodeDeactivationStatusValues returns an array of possible values for the NodeDeactivationStatus const type. 1071func PossibleNodeDeactivationStatusValues() []NodeDeactivationStatus { 1072 return []NodeDeactivationStatus{NodeDeactivationStatusCompleted, NodeDeactivationStatusNone, NodeDeactivationStatusSafetyCheckComplete, NodeDeactivationStatusSafetyCheckInProgress} 1073} 1074 1075// NodeDeactivationTaskType enumerates the values for node deactivation task type. 1076type NodeDeactivationTaskType string 1077 1078const ( 1079 // NodeDeactivationTaskTypeClient ... 1080 NodeDeactivationTaskTypeClient NodeDeactivationTaskType = "Client" 1081 // NodeDeactivationTaskTypeInfrastructure ... 1082 NodeDeactivationTaskTypeInfrastructure NodeDeactivationTaskType = "Infrastructure" 1083 // NodeDeactivationTaskTypeInvalid ... 1084 NodeDeactivationTaskTypeInvalid NodeDeactivationTaskType = "Invalid" 1085 // NodeDeactivationTaskTypeRepair ... 1086 NodeDeactivationTaskTypeRepair NodeDeactivationTaskType = "Repair" 1087) 1088 1089// PossibleNodeDeactivationTaskTypeValues returns an array of possible values for the NodeDeactivationTaskType const type. 1090func PossibleNodeDeactivationTaskTypeValues() []NodeDeactivationTaskType { 1091 return []NodeDeactivationTaskType{NodeDeactivationTaskTypeClient, NodeDeactivationTaskTypeInfrastructure, NodeDeactivationTaskTypeInvalid, NodeDeactivationTaskTypeRepair} 1092} 1093 1094// NodeStatus enumerates the values for node status. 1095type NodeStatus string 1096 1097const ( 1098 // NodeStatusDisabled ... 1099 NodeStatusDisabled NodeStatus = "Disabled" 1100 // NodeStatusDisabling ... 1101 NodeStatusDisabling NodeStatus = "Disabling" 1102 // NodeStatusDown ... 1103 NodeStatusDown NodeStatus = "Down" 1104 // NodeStatusEnabling ... 1105 NodeStatusEnabling NodeStatus = "Enabling" 1106 // NodeStatusInvalid ... 1107 NodeStatusInvalid NodeStatus = "Invalid" 1108 // NodeStatusRemoved ... 1109 NodeStatusRemoved NodeStatus = "Removed" 1110 // NodeStatusUnknown ... 1111 NodeStatusUnknown NodeStatus = "Unknown" 1112 // NodeStatusUp ... 1113 NodeStatusUp NodeStatus = "Up" 1114) 1115 1116// PossibleNodeStatusValues returns an array of possible values for the NodeStatus const type. 1117func PossibleNodeStatusValues() []NodeStatus { 1118 return []NodeStatus{NodeStatusDisabled, NodeStatusDisabling, NodeStatusDown, NodeStatusEnabling, NodeStatusInvalid, NodeStatusRemoved, NodeStatusUnknown, NodeStatusUp} 1119} 1120 1121// PackageSharingScope enumerates the values for package sharing scope. 1122type PackageSharingScope string 1123 1124const ( 1125 // PackageSharingScopeAll ... 1126 PackageSharingScopeAll PackageSharingScope = "All" 1127 // PackageSharingScopeCode ... 1128 PackageSharingScopeCode PackageSharingScope = "Code" 1129 // PackageSharingScopeConfig ... 1130 PackageSharingScopeConfig PackageSharingScope = "Config" 1131 // PackageSharingScopeData ... 1132 PackageSharingScopeData PackageSharingScope = "Data" 1133 // PackageSharingScopeNone ... 1134 PackageSharingScopeNone PackageSharingScope = "None" 1135) 1136 1137// PossiblePackageSharingScopeValues returns an array of possible values for the PackageSharingScope const type. 1138func PossiblePackageSharingScopeValues() []PackageSharingScope { 1139 return []PackageSharingScope{PackageSharingScopeAll, PackageSharingScopeCode, PackageSharingScopeConfig, PackageSharingScopeData, PackageSharingScopeNone} 1140} 1141 1142// PartitionScheme enumerates the values for partition scheme. 1143type PartitionScheme string 1144 1145const ( 1146 // PartitionSchemeNamed ... 1147 PartitionSchemeNamed PartitionScheme = "Named" 1148 // PartitionSchemePartitionSchemeDescription ... 1149 PartitionSchemePartitionSchemeDescription PartitionScheme = "PartitionSchemeDescription" 1150 // PartitionSchemeSingleton ... 1151 PartitionSchemeSingleton PartitionScheme = "Singleton" 1152 // PartitionSchemeUniformInt64Range ... 1153 PartitionSchemeUniformInt64Range PartitionScheme = "UniformInt64Range" 1154) 1155 1156// PossiblePartitionSchemeValues returns an array of possible values for the PartitionScheme const type. 1157func PossiblePartitionSchemeValues() []PartitionScheme { 1158 return []PartitionScheme{PartitionSchemeNamed, PartitionSchemePartitionSchemeDescription, PartitionSchemeSingleton, PartitionSchemeUniformInt64Range} 1159} 1160 1161// PartitionStatus enumerates the values for partition status. 1162type PartitionStatus string 1163 1164const ( 1165 // PartitionStatusDeleting ... 1166 PartitionStatusDeleting PartitionStatus = "Deleting" 1167 // PartitionStatusInQuorumLoss ... 1168 PartitionStatusInQuorumLoss PartitionStatus = "InQuorumLoss" 1169 // PartitionStatusInvalid ... 1170 PartitionStatusInvalid PartitionStatus = "Invalid" 1171 // PartitionStatusNotReady ... 1172 PartitionStatusNotReady PartitionStatus = "NotReady" 1173 // PartitionStatusReady ... 1174 PartitionStatusReady PartitionStatus = "Ready" 1175 // PartitionStatusReconfiguring ... 1176 PartitionStatusReconfiguring PartitionStatus = "Reconfiguring" 1177) 1178 1179// PossiblePartitionStatusValues returns an array of possible values for the PartitionStatus const type. 1180func PossiblePartitionStatusValues() []PartitionStatus { 1181 return []PartitionStatus{PartitionStatusDeleting, PartitionStatusInQuorumLoss, PartitionStatusInvalid, PartitionStatusNotReady, PartitionStatusReady, PartitionStatusReconfiguring} 1182} 1183 1184// PreparingHealthCheckState enumerates the values for preparing health check state. 1185type PreparingHealthCheckState string 1186 1187const ( 1188 // InProgress ... 1189 InProgress PreparingHealthCheckState = "InProgress" 1190 // NotStarted ... 1191 NotStarted PreparingHealthCheckState = "NotStarted" 1192 // Skipped ... 1193 Skipped PreparingHealthCheckState = "Skipped" 1194 // Succeeded ... 1195 Succeeded PreparingHealthCheckState = "Succeeded" 1196 // TimedOut ... 1197 TimedOut PreparingHealthCheckState = "TimedOut" 1198) 1199 1200// PossiblePreparingHealthCheckStateValues returns an array of possible values for the PreparingHealthCheckState const type. 1201func PossiblePreparingHealthCheckStateValues() []PreparingHealthCheckState { 1202 return []PreparingHealthCheckState{InProgress, NotStarted, Skipped, Succeeded, TimedOut} 1203} 1204 1205// PreviousConfigurationRole enumerates the values for previous configuration role. 1206type PreviousConfigurationRole string 1207 1208const ( 1209 // PreviousConfigurationRoleActiveSecondary ... 1210 PreviousConfigurationRoleActiveSecondary PreviousConfigurationRole = "ActiveSecondary" 1211 // PreviousConfigurationRoleIdleSecondary ... 1212 PreviousConfigurationRoleIdleSecondary PreviousConfigurationRole = "IdleSecondary" 1213 // PreviousConfigurationRoleNone ... 1214 PreviousConfigurationRoleNone PreviousConfigurationRole = "None" 1215 // PreviousConfigurationRolePrimary ... 1216 PreviousConfigurationRolePrimary PreviousConfigurationRole = "Primary" 1217 // PreviousConfigurationRoleUnknown ... 1218 PreviousConfigurationRoleUnknown PreviousConfigurationRole = "Unknown" 1219) 1220 1221// PossiblePreviousConfigurationRoleValues returns an array of possible values for the PreviousConfigurationRole const type. 1222func PossiblePreviousConfigurationRoleValues() []PreviousConfigurationRole { 1223 return []PreviousConfigurationRole{PreviousConfigurationRoleActiveSecondary, PreviousConfigurationRoleIdleSecondary, PreviousConfigurationRoleNone, PreviousConfigurationRolePrimary, PreviousConfigurationRoleUnknown} 1224} 1225 1226// ReadStatus enumerates the values for read status. 1227type ReadStatus string 1228 1229const ( 1230 // ReadStatusGranted ... 1231 ReadStatusGranted ReadStatus = "Granted" 1232 // ReadStatusInvalid ... 1233 ReadStatusInvalid ReadStatus = "Invalid" 1234 // ReadStatusNotPrimary ... 1235 ReadStatusNotPrimary ReadStatus = "NotPrimary" 1236 // ReadStatusNoWriteQuorum ... 1237 ReadStatusNoWriteQuorum ReadStatus = "NoWriteQuorum" 1238 // ReadStatusReconfigurationPending ... 1239 ReadStatusReconfigurationPending ReadStatus = "ReconfigurationPending" 1240) 1241 1242// PossibleReadStatusValues returns an array of possible values for the ReadStatus const type. 1243func PossibleReadStatusValues() []ReadStatus { 1244 return []ReadStatus{ReadStatusGranted, ReadStatusInvalid, ReadStatusNotPrimary, ReadStatusNoWriteQuorum, ReadStatusReconfigurationPending} 1245} 1246 1247// ReconfigurationPhase enumerates the values for reconfiguration phase. 1248type ReconfigurationPhase string 1249 1250const ( 1251 // ReconfigurationPhaseAbortPhaseZero ... 1252 ReconfigurationPhaseAbortPhaseZero ReconfigurationPhase = "AbortPhaseZero" 1253 // ReconfigurationPhaseNone ... 1254 ReconfigurationPhaseNone ReconfigurationPhase = "None" 1255 // ReconfigurationPhasePhase0 ... 1256 ReconfigurationPhasePhase0 ReconfigurationPhase = "Phase0" 1257 // ReconfigurationPhasePhase1 ... 1258 ReconfigurationPhasePhase1 ReconfigurationPhase = "Phase1" 1259 // ReconfigurationPhasePhase2 ... 1260 ReconfigurationPhasePhase2 ReconfigurationPhase = "Phase2" 1261 // ReconfigurationPhasePhase3 ... 1262 ReconfigurationPhasePhase3 ReconfigurationPhase = "Phase3" 1263 // ReconfigurationPhasePhase4 ... 1264 ReconfigurationPhasePhase4 ReconfigurationPhase = "Phase4" 1265 // ReconfigurationPhaseUnknown ... 1266 ReconfigurationPhaseUnknown ReconfigurationPhase = "Unknown" 1267) 1268 1269// PossibleReconfigurationPhaseValues returns an array of possible values for the ReconfigurationPhase const type. 1270func PossibleReconfigurationPhaseValues() []ReconfigurationPhase { 1271 return []ReconfigurationPhase{ReconfigurationPhaseAbortPhaseZero, ReconfigurationPhaseNone, ReconfigurationPhasePhase0, ReconfigurationPhasePhase1, ReconfigurationPhasePhase2, ReconfigurationPhasePhase3, ReconfigurationPhasePhase4, ReconfigurationPhaseUnknown} 1272} 1273 1274// ReconfigurationType enumerates the values for reconfiguration type. 1275type ReconfigurationType string 1276 1277const ( 1278 // ReconfigurationTypeFailover ... 1279 ReconfigurationTypeFailover ReconfigurationType = "Failover" 1280 // ReconfigurationTypeOther ... 1281 ReconfigurationTypeOther ReconfigurationType = "Other" 1282 // ReconfigurationTypeSwapPrimary ... 1283 ReconfigurationTypeSwapPrimary ReconfigurationType = "SwapPrimary" 1284 // ReconfigurationTypeUnknown ... 1285 ReconfigurationTypeUnknown ReconfigurationType = "Unknown" 1286) 1287 1288// PossibleReconfigurationTypeValues returns an array of possible values for the ReconfigurationType const type. 1289func PossibleReconfigurationTypeValues() []ReconfigurationType { 1290 return []ReconfigurationType{ReconfigurationTypeFailover, ReconfigurationTypeOther, ReconfigurationTypeSwapPrimary, ReconfigurationTypeUnknown} 1291} 1292 1293// ReplicaRole enumerates the values for replica role. 1294type ReplicaRole string 1295 1296const ( 1297 // ReplicaRoleActiveSecondary ... 1298 ReplicaRoleActiveSecondary ReplicaRole = "ActiveSecondary" 1299 // ReplicaRoleIdleSecondary ... 1300 ReplicaRoleIdleSecondary ReplicaRole = "IdleSecondary" 1301 // ReplicaRoleNone ... 1302 ReplicaRoleNone ReplicaRole = "None" 1303 // ReplicaRolePrimary ... 1304 ReplicaRolePrimary ReplicaRole = "Primary" 1305 // ReplicaRoleUnknown ... 1306 ReplicaRoleUnknown ReplicaRole = "Unknown" 1307) 1308 1309// PossibleReplicaRoleValues returns an array of possible values for the ReplicaRole const type. 1310func PossibleReplicaRoleValues() []ReplicaRole { 1311 return []ReplicaRole{ReplicaRoleActiveSecondary, ReplicaRoleIdleSecondary, ReplicaRoleNone, ReplicaRolePrimary, ReplicaRoleUnknown} 1312} 1313 1314// ReplicaRole1 enumerates the values for replica role 1. 1315type ReplicaRole1 string 1316 1317const ( 1318 // ReplicaRole1ActiveSecondary ... 1319 ReplicaRole1ActiveSecondary ReplicaRole1 = "ActiveSecondary" 1320 // ReplicaRole1IdleSecondary ... 1321 ReplicaRole1IdleSecondary ReplicaRole1 = "IdleSecondary" 1322 // ReplicaRole1None ... 1323 ReplicaRole1None ReplicaRole1 = "None" 1324 // ReplicaRole1Primary ... 1325 ReplicaRole1Primary ReplicaRole1 = "Primary" 1326 // ReplicaRole1Unknown ... 1327 ReplicaRole1Unknown ReplicaRole1 = "Unknown" 1328) 1329 1330// PossibleReplicaRole1Values returns an array of possible values for the ReplicaRole1 const type. 1331func PossibleReplicaRole1Values() []ReplicaRole1 { 1332 return []ReplicaRole1{ReplicaRole1ActiveSecondary, ReplicaRole1IdleSecondary, ReplicaRole1None, ReplicaRole1Primary, ReplicaRole1Unknown} 1333} 1334 1335// ReplicaStatus enumerates the values for replica status. 1336type ReplicaStatus string 1337 1338const ( 1339 // ReplicaStatusDown ... 1340 ReplicaStatusDown ReplicaStatus = "Down" 1341 // ReplicaStatusDropped ... 1342 ReplicaStatusDropped ReplicaStatus = "Dropped" 1343 // ReplicaStatusInBuild ... 1344 ReplicaStatusInBuild ReplicaStatus = "InBuild" 1345 // ReplicaStatusInvalid ... 1346 ReplicaStatusInvalid ReplicaStatus = "Invalid" 1347 // ReplicaStatusReady ... 1348 ReplicaStatusReady ReplicaStatus = "Ready" 1349 // ReplicaStatusStandby ... 1350 ReplicaStatusStandby ReplicaStatus = "Standby" 1351) 1352 1353// PossibleReplicaStatusValues returns an array of possible values for the ReplicaStatus const type. 1354func PossibleReplicaStatusValues() []ReplicaStatus { 1355 return []ReplicaStatus{ReplicaStatusDown, ReplicaStatusDropped, ReplicaStatusInBuild, ReplicaStatusInvalid, ReplicaStatusReady, ReplicaStatusStandby} 1356} 1357 1358// ReplicaStatus1 enumerates the values for replica status 1. 1359type ReplicaStatus1 string 1360 1361const ( 1362 // ReplicaStatus1Down ... 1363 ReplicaStatus1Down ReplicaStatus1 = "Down" 1364 // ReplicaStatus1Dropped ... 1365 ReplicaStatus1Dropped ReplicaStatus1 = "Dropped" 1366 // ReplicaStatus1InBuild ... 1367 ReplicaStatus1InBuild ReplicaStatus1 = "InBuild" 1368 // ReplicaStatus1Invalid ... 1369 ReplicaStatus1Invalid ReplicaStatus1 = "Invalid" 1370 // ReplicaStatus1Ready ... 1371 ReplicaStatus1Ready ReplicaStatus1 = "Ready" 1372 // ReplicaStatus1Standby ... 1373 ReplicaStatus1Standby ReplicaStatus1 = "Standby" 1374) 1375 1376// PossibleReplicaStatus1Values returns an array of possible values for the ReplicaStatus1 const type. 1377func PossibleReplicaStatus1Values() []ReplicaStatus1 { 1378 return []ReplicaStatus1{ReplicaStatus1Down, ReplicaStatus1Dropped, ReplicaStatus1InBuild, ReplicaStatus1Invalid, ReplicaStatus1Ready, ReplicaStatus1Standby} 1379} 1380 1381// RestoringHealthCheckState enumerates the values for restoring health check state. 1382type RestoringHealthCheckState string 1383 1384const ( 1385 // RestoringHealthCheckStateInProgress ... 1386 RestoringHealthCheckStateInProgress RestoringHealthCheckState = "InProgress" 1387 // RestoringHealthCheckStateNotStarted ... 1388 RestoringHealthCheckStateNotStarted RestoringHealthCheckState = "NotStarted" 1389 // RestoringHealthCheckStateSkipped ... 1390 RestoringHealthCheckStateSkipped RestoringHealthCheckState = "Skipped" 1391 // RestoringHealthCheckStateSucceeded ... 1392 RestoringHealthCheckStateSucceeded RestoringHealthCheckState = "Succeeded" 1393 // RestoringHealthCheckStateTimedOut ... 1394 RestoringHealthCheckStateTimedOut RestoringHealthCheckState = "TimedOut" 1395) 1396 1397// PossibleRestoringHealthCheckStateValues returns an array of possible values for the RestoringHealthCheckState const type. 1398func PossibleRestoringHealthCheckStateValues() []RestoringHealthCheckState { 1399 return []RestoringHealthCheckState{RestoringHealthCheckStateInProgress, RestoringHealthCheckStateNotStarted, RestoringHealthCheckStateSkipped, RestoringHealthCheckStateSucceeded, RestoringHealthCheckStateTimedOut} 1400} 1401 1402// ResultStatus enumerates the values for result status. 1403type ResultStatus string 1404 1405const ( 1406 // ResultStatusCancelled ... 1407 ResultStatusCancelled ResultStatus = "Cancelled" 1408 // ResultStatusFailed ... 1409 ResultStatusFailed ResultStatus = "Failed" 1410 // ResultStatusInterrupted ... 1411 ResultStatusInterrupted ResultStatus = "Interrupted" 1412 // ResultStatusInvalid ... 1413 ResultStatusInvalid ResultStatus = "Invalid" 1414 // ResultStatusPending ... 1415 ResultStatusPending ResultStatus = "Pending" 1416 // ResultStatusSucceeded ... 1417 ResultStatusSucceeded ResultStatus = "Succeeded" 1418) 1419 1420// PossibleResultStatusValues returns an array of possible values for the ResultStatus const type. 1421func PossibleResultStatusValues() []ResultStatus { 1422 return []ResultStatus{ResultStatusCancelled, ResultStatusFailed, ResultStatusInterrupted, ResultStatusInvalid, ResultStatusPending, ResultStatusSucceeded} 1423} 1424 1425// RollingUpgradeMode enumerates the values for rolling upgrade mode. 1426type RollingUpgradeMode string 1427 1428const ( 1429 // RollingUpgradeModeInvalid ... 1430 RollingUpgradeModeInvalid RollingUpgradeMode = "Invalid" 1431 // RollingUpgradeModeMonitored ... 1432 RollingUpgradeModeMonitored RollingUpgradeMode = "Monitored" 1433 // RollingUpgradeModeUnmonitoredAuto ... 1434 RollingUpgradeModeUnmonitoredAuto RollingUpgradeMode = "UnmonitoredAuto" 1435 // RollingUpgradeModeUnmonitoredManual ... 1436 RollingUpgradeModeUnmonitoredManual RollingUpgradeMode = "UnmonitoredManual" 1437) 1438 1439// PossibleRollingUpgradeModeValues returns an array of possible values for the RollingUpgradeMode const type. 1440func PossibleRollingUpgradeModeValues() []RollingUpgradeMode { 1441 return []RollingUpgradeMode{RollingUpgradeModeInvalid, RollingUpgradeModeMonitored, RollingUpgradeModeUnmonitoredAuto, RollingUpgradeModeUnmonitoredManual} 1442} 1443 1444// RollingUpgradeMode1 enumerates the values for rolling upgrade mode 1. 1445type RollingUpgradeMode1 string 1446 1447const ( 1448 // RollingUpgradeMode1Invalid ... 1449 RollingUpgradeMode1Invalid RollingUpgradeMode1 = "Invalid" 1450 // RollingUpgradeMode1Monitored ... 1451 RollingUpgradeMode1Monitored RollingUpgradeMode1 = "Monitored" 1452 // RollingUpgradeMode1UnmonitoredAuto ... 1453 RollingUpgradeMode1UnmonitoredAuto RollingUpgradeMode1 = "UnmonitoredAuto" 1454 // RollingUpgradeMode1UnmonitoredManual ... 1455 RollingUpgradeMode1UnmonitoredManual RollingUpgradeMode1 = "UnmonitoredManual" 1456) 1457 1458// PossibleRollingUpgradeMode1Values returns an array of possible values for the RollingUpgradeMode1 const type. 1459func PossibleRollingUpgradeMode1Values() []RollingUpgradeMode1 { 1460 return []RollingUpgradeMode1{RollingUpgradeMode1Invalid, RollingUpgradeMode1Monitored, RollingUpgradeMode1UnmonitoredAuto, RollingUpgradeMode1UnmonitoredManual} 1461} 1462 1463// RollingUpgradeMode2 enumerates the values for rolling upgrade mode 2. 1464type RollingUpgradeMode2 string 1465 1466const ( 1467 // RollingUpgradeMode2Invalid ... 1468 RollingUpgradeMode2Invalid RollingUpgradeMode2 = "Invalid" 1469 // RollingUpgradeMode2Monitored ... 1470 RollingUpgradeMode2Monitored RollingUpgradeMode2 = "Monitored" 1471 // RollingUpgradeMode2UnmonitoredAuto ... 1472 RollingUpgradeMode2UnmonitoredAuto RollingUpgradeMode2 = "UnmonitoredAuto" 1473 // RollingUpgradeMode2UnmonitoredManual ... 1474 RollingUpgradeMode2UnmonitoredManual RollingUpgradeMode2 = "UnmonitoredManual" 1475) 1476 1477// PossibleRollingUpgradeMode2Values returns an array of possible values for the RollingUpgradeMode2 const type. 1478func PossibleRollingUpgradeMode2Values() []RollingUpgradeMode2 { 1479 return []RollingUpgradeMode2{RollingUpgradeMode2Invalid, RollingUpgradeMode2Monitored, RollingUpgradeMode2UnmonitoredAuto, RollingUpgradeMode2UnmonitoredManual} 1480} 1481 1482// RollingUpgradeMode3 enumerates the values for rolling upgrade mode 3. 1483type RollingUpgradeMode3 string 1484 1485const ( 1486 // RollingUpgradeMode3Invalid ... 1487 RollingUpgradeMode3Invalid RollingUpgradeMode3 = "Invalid" 1488 // RollingUpgradeMode3Monitored ... 1489 RollingUpgradeMode3Monitored RollingUpgradeMode3 = "Monitored" 1490 // RollingUpgradeMode3UnmonitoredAuto ... 1491 RollingUpgradeMode3UnmonitoredAuto RollingUpgradeMode3 = "UnmonitoredAuto" 1492 // RollingUpgradeMode3UnmonitoredManual ... 1493 RollingUpgradeMode3UnmonitoredManual RollingUpgradeMode3 = "UnmonitoredManual" 1494) 1495 1496// PossibleRollingUpgradeMode3Values returns an array of possible values for the RollingUpgradeMode3 const type. 1497func PossibleRollingUpgradeMode3Values() []RollingUpgradeMode3 { 1498 return []RollingUpgradeMode3{RollingUpgradeMode3Invalid, RollingUpgradeMode3Monitored, RollingUpgradeMode3UnmonitoredAuto, RollingUpgradeMode3UnmonitoredManual} 1499} 1500 1501// RollingUpgradeMode4 enumerates the values for rolling upgrade mode 4. 1502type RollingUpgradeMode4 string 1503 1504const ( 1505 // RollingUpgradeMode4Invalid ... 1506 RollingUpgradeMode4Invalid RollingUpgradeMode4 = "Invalid" 1507 // RollingUpgradeMode4Monitored ... 1508 RollingUpgradeMode4Monitored RollingUpgradeMode4 = "Monitored" 1509 // RollingUpgradeMode4UnmonitoredAuto ... 1510 RollingUpgradeMode4UnmonitoredAuto RollingUpgradeMode4 = "UnmonitoredAuto" 1511 // RollingUpgradeMode4UnmonitoredManual ... 1512 RollingUpgradeMode4UnmonitoredManual RollingUpgradeMode4 = "UnmonitoredManual" 1513) 1514 1515// PossibleRollingUpgradeMode4Values returns an array of possible values for the RollingUpgradeMode4 const type. 1516func PossibleRollingUpgradeMode4Values() []RollingUpgradeMode4 { 1517 return []RollingUpgradeMode4{RollingUpgradeMode4Invalid, RollingUpgradeMode4Monitored, RollingUpgradeMode4UnmonitoredAuto, RollingUpgradeMode4UnmonitoredManual} 1518} 1519 1520// RollingUpgradeMode5 enumerates the values for rolling upgrade mode 5. 1521type RollingUpgradeMode5 string 1522 1523const ( 1524 // RollingUpgradeMode5Invalid ... 1525 RollingUpgradeMode5Invalid RollingUpgradeMode5 = "Invalid" 1526 // RollingUpgradeMode5Monitored ... 1527 RollingUpgradeMode5Monitored RollingUpgradeMode5 = "Monitored" 1528 // RollingUpgradeMode5UnmonitoredAuto ... 1529 RollingUpgradeMode5UnmonitoredAuto RollingUpgradeMode5 = "UnmonitoredAuto" 1530 // RollingUpgradeMode5UnmonitoredManual ... 1531 RollingUpgradeMode5UnmonitoredManual RollingUpgradeMode5 = "UnmonitoredManual" 1532) 1533 1534// PossibleRollingUpgradeMode5Values returns an array of possible values for the RollingUpgradeMode5 const type. 1535func PossibleRollingUpgradeMode5Values() []RollingUpgradeMode5 { 1536 return []RollingUpgradeMode5{RollingUpgradeMode5Invalid, RollingUpgradeMode5Monitored, RollingUpgradeMode5UnmonitoredAuto, RollingUpgradeMode5UnmonitoredManual} 1537} 1538 1539// RollingUpgradeMode6 enumerates the values for rolling upgrade mode 6. 1540type RollingUpgradeMode6 string 1541 1542const ( 1543 // RollingUpgradeMode6Invalid ... 1544 RollingUpgradeMode6Invalid RollingUpgradeMode6 = "Invalid" 1545 // RollingUpgradeMode6Monitored ... 1546 RollingUpgradeMode6Monitored RollingUpgradeMode6 = "Monitored" 1547 // RollingUpgradeMode6UnmonitoredAuto ... 1548 RollingUpgradeMode6UnmonitoredAuto RollingUpgradeMode6 = "UnmonitoredAuto" 1549 // RollingUpgradeMode6UnmonitoredManual ... 1550 RollingUpgradeMode6UnmonitoredManual RollingUpgradeMode6 = "UnmonitoredManual" 1551) 1552 1553// PossibleRollingUpgradeMode6Values returns an array of possible values for the RollingUpgradeMode6 const type. 1554func PossibleRollingUpgradeMode6Values() []RollingUpgradeMode6 { 1555 return []RollingUpgradeMode6{RollingUpgradeMode6Invalid, RollingUpgradeMode6Monitored, RollingUpgradeMode6UnmonitoredAuto, RollingUpgradeMode6UnmonitoredManual} 1556} 1557 1558// RollingUpgradeMode7 enumerates the values for rolling upgrade mode 7. 1559type RollingUpgradeMode7 string 1560 1561const ( 1562 // RollingUpgradeMode7Invalid ... 1563 RollingUpgradeMode7Invalid RollingUpgradeMode7 = "Invalid" 1564 // RollingUpgradeMode7Monitored ... 1565 RollingUpgradeMode7Monitored RollingUpgradeMode7 = "Monitored" 1566 // RollingUpgradeMode7UnmonitoredAuto ... 1567 RollingUpgradeMode7UnmonitoredAuto RollingUpgradeMode7 = "UnmonitoredAuto" 1568 // RollingUpgradeMode7UnmonitoredManual ... 1569 RollingUpgradeMode7UnmonitoredManual RollingUpgradeMode7 = "UnmonitoredManual" 1570) 1571 1572// PossibleRollingUpgradeMode7Values returns an array of possible values for the RollingUpgradeMode7 const type. 1573func PossibleRollingUpgradeMode7Values() []RollingUpgradeMode7 { 1574 return []RollingUpgradeMode7{RollingUpgradeMode7Invalid, RollingUpgradeMode7Monitored, RollingUpgradeMode7UnmonitoredAuto, RollingUpgradeMode7UnmonitoredManual} 1575} 1576 1577// Scheme enumerates the values for scheme. 1578type Scheme string 1579 1580const ( 1581 // SchemeAffinity ... 1582 SchemeAffinity Scheme = "Affinity" 1583 // SchemeAlignedAffinity ... 1584 SchemeAlignedAffinity Scheme = "AlignedAffinity" 1585 // SchemeInvalid ... 1586 SchemeInvalid Scheme = "Invalid" 1587 // SchemeNonAlignedAffinity ... 1588 SchemeNonAlignedAffinity Scheme = "NonAlignedAffinity" 1589) 1590 1591// PossibleSchemeValues returns an array of possible values for the Scheme const type. 1592func PossibleSchemeValues() []Scheme { 1593 return []Scheme{SchemeAffinity, SchemeAlignedAffinity, SchemeInvalid, SchemeNonAlignedAffinity} 1594} 1595 1596// ServiceKind enumerates the values for service kind. 1597type ServiceKind string 1598 1599const ( 1600 // ServiceKindDeployedServiceReplicaInfo ... 1601 ServiceKindDeployedServiceReplicaInfo ServiceKind = "DeployedServiceReplicaInfo" 1602 // ServiceKindStateful ... 1603 ServiceKindStateful ServiceKind = "Stateful" 1604 // ServiceKindStateless ... 1605 ServiceKindStateless ServiceKind = "Stateless" 1606) 1607 1608// PossibleServiceKindValues returns an array of possible values for the ServiceKind const type. 1609func PossibleServiceKindValues() []ServiceKind { 1610 return []ServiceKind{ServiceKindDeployedServiceReplicaInfo, ServiceKindStateful, ServiceKindStateless} 1611} 1612 1613// ServiceKindBasicDeployedServiceReplicaDetailInfo enumerates the values for service kind basic deployed 1614// service replica detail info. 1615type ServiceKindBasicDeployedServiceReplicaDetailInfo string 1616 1617const ( 1618 // ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindDeployedServiceReplicaDetailInfo ... 1619 ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindDeployedServiceReplicaDetailInfo ServiceKindBasicDeployedServiceReplicaDetailInfo = "DeployedServiceReplicaDetailInfo" 1620 // ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful ... 1621 ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful ServiceKindBasicDeployedServiceReplicaDetailInfo = "Stateful" 1622 // ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless ... 1623 ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless ServiceKindBasicDeployedServiceReplicaDetailInfo = "Stateless" 1624) 1625 1626// PossibleServiceKindBasicDeployedServiceReplicaDetailInfoValues returns an array of possible values for the ServiceKindBasicDeployedServiceReplicaDetailInfo const type. 1627func PossibleServiceKindBasicDeployedServiceReplicaDetailInfoValues() []ServiceKindBasicDeployedServiceReplicaDetailInfo { 1628 return []ServiceKindBasicDeployedServiceReplicaDetailInfo{ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindDeployedServiceReplicaDetailInfo, ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful, ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless} 1629} 1630 1631// ServiceKindBasicReplicaHealth enumerates the values for service kind basic replica health. 1632type ServiceKindBasicReplicaHealth string 1633 1634const ( 1635 // ServiceKindBasicReplicaHealthServiceKindReplicaHealth ... 1636 ServiceKindBasicReplicaHealthServiceKindReplicaHealth ServiceKindBasicReplicaHealth = "ReplicaHealth" 1637 // ServiceKindBasicReplicaHealthServiceKindStateful ... 1638 ServiceKindBasicReplicaHealthServiceKindStateful ServiceKindBasicReplicaHealth = "Stateful" 1639 // ServiceKindBasicReplicaHealthServiceKindStateless ... 1640 ServiceKindBasicReplicaHealthServiceKindStateless ServiceKindBasicReplicaHealth = "Stateless" 1641) 1642 1643// PossibleServiceKindBasicReplicaHealthValues returns an array of possible values for the ServiceKindBasicReplicaHealth const type. 1644func PossibleServiceKindBasicReplicaHealthValues() []ServiceKindBasicReplicaHealth { 1645 return []ServiceKindBasicReplicaHealth{ServiceKindBasicReplicaHealthServiceKindReplicaHealth, ServiceKindBasicReplicaHealthServiceKindStateful, ServiceKindBasicReplicaHealthServiceKindStateless} 1646} 1647 1648// ServiceKindBasicReplicaHealthState enumerates the values for service kind basic replica health state. 1649type ServiceKindBasicReplicaHealthState string 1650 1651const ( 1652 // ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState ... 1653 ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState ServiceKindBasicReplicaHealthState = "ReplicaHealthState" 1654 // ServiceKindBasicReplicaHealthStateServiceKindStateful ... 1655 ServiceKindBasicReplicaHealthStateServiceKindStateful ServiceKindBasicReplicaHealthState = "Stateful" 1656 // ServiceKindBasicReplicaHealthStateServiceKindStateless ... 1657 ServiceKindBasicReplicaHealthStateServiceKindStateless ServiceKindBasicReplicaHealthState = "Stateless" 1658) 1659 1660// PossibleServiceKindBasicReplicaHealthStateValues returns an array of possible values for the ServiceKindBasicReplicaHealthState const type. 1661func PossibleServiceKindBasicReplicaHealthStateValues() []ServiceKindBasicReplicaHealthState { 1662 return []ServiceKindBasicReplicaHealthState{ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState, ServiceKindBasicReplicaHealthStateServiceKindStateful, ServiceKindBasicReplicaHealthStateServiceKindStateless} 1663} 1664 1665// ServiceKindBasicReplicaInfo enumerates the values for service kind basic replica info. 1666type ServiceKindBasicReplicaInfo string 1667 1668const ( 1669 // ServiceKindBasicReplicaInfoServiceKindReplicaInfo ... 1670 ServiceKindBasicReplicaInfoServiceKindReplicaInfo ServiceKindBasicReplicaInfo = "ReplicaInfo" 1671 // ServiceKindBasicReplicaInfoServiceKindStateful ... 1672 ServiceKindBasicReplicaInfoServiceKindStateful ServiceKindBasicReplicaInfo = "Stateful" 1673 // ServiceKindBasicReplicaInfoServiceKindStateless ... 1674 ServiceKindBasicReplicaInfoServiceKindStateless ServiceKindBasicReplicaInfo = "Stateless" 1675) 1676 1677// PossibleServiceKindBasicReplicaInfoValues returns an array of possible values for the ServiceKindBasicReplicaInfo const type. 1678func PossibleServiceKindBasicReplicaInfoValues() []ServiceKindBasicReplicaInfo { 1679 return []ServiceKindBasicReplicaInfo{ServiceKindBasicReplicaInfoServiceKindReplicaInfo, ServiceKindBasicReplicaInfoServiceKindStateful, ServiceKindBasicReplicaInfoServiceKindStateless} 1680} 1681 1682// ServiceKindBasicServiceDescription enumerates the values for service kind basic service description. 1683type ServiceKindBasicServiceDescription string 1684 1685const ( 1686 // ServiceKindBasicServiceDescriptionServiceKindServiceDescription ... 1687 ServiceKindBasicServiceDescriptionServiceKindServiceDescription ServiceKindBasicServiceDescription = "ServiceDescription" 1688 // ServiceKindBasicServiceDescriptionServiceKindStateful ... 1689 ServiceKindBasicServiceDescriptionServiceKindStateful ServiceKindBasicServiceDescription = "Stateful" 1690 // ServiceKindBasicServiceDescriptionServiceKindStateless ... 1691 ServiceKindBasicServiceDescriptionServiceKindStateless ServiceKindBasicServiceDescription = "Stateless" 1692) 1693 1694// PossibleServiceKindBasicServiceDescriptionValues returns an array of possible values for the ServiceKindBasicServiceDescription const type. 1695func PossibleServiceKindBasicServiceDescriptionValues() []ServiceKindBasicServiceDescription { 1696 return []ServiceKindBasicServiceDescription{ServiceKindBasicServiceDescriptionServiceKindServiceDescription, ServiceKindBasicServiceDescriptionServiceKindStateful, ServiceKindBasicServiceDescriptionServiceKindStateless} 1697} 1698 1699// ServiceKindBasicServiceInfo enumerates the values for service kind basic service info. 1700type ServiceKindBasicServiceInfo string 1701 1702const ( 1703 // ServiceKindBasicServiceInfoServiceKindServiceInfo ... 1704 ServiceKindBasicServiceInfoServiceKindServiceInfo ServiceKindBasicServiceInfo = "ServiceInfo" 1705 // ServiceKindBasicServiceInfoServiceKindStateful ... 1706 ServiceKindBasicServiceInfoServiceKindStateful ServiceKindBasicServiceInfo = "Stateful" 1707 // ServiceKindBasicServiceInfoServiceKindStateless ... 1708 ServiceKindBasicServiceInfoServiceKindStateless ServiceKindBasicServiceInfo = "Stateless" 1709) 1710 1711// PossibleServiceKindBasicServiceInfoValues returns an array of possible values for the ServiceKindBasicServiceInfo const type. 1712func PossibleServiceKindBasicServiceInfoValues() []ServiceKindBasicServiceInfo { 1713 return []ServiceKindBasicServiceInfo{ServiceKindBasicServiceInfoServiceKindServiceInfo, ServiceKindBasicServiceInfoServiceKindStateful, ServiceKindBasicServiceInfoServiceKindStateless} 1714} 1715 1716// ServiceKindBasicServicePartitionInfo enumerates the values for service kind basic service partition info. 1717type ServiceKindBasicServicePartitionInfo string 1718 1719const ( 1720 // ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo ... 1721 ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo ServiceKindBasicServicePartitionInfo = "ServicePartitionInfo" 1722 // ServiceKindBasicServicePartitionInfoServiceKindStateful ... 1723 ServiceKindBasicServicePartitionInfoServiceKindStateful ServiceKindBasicServicePartitionInfo = "Stateful" 1724 // ServiceKindBasicServicePartitionInfoServiceKindStateless ... 1725 ServiceKindBasicServicePartitionInfoServiceKindStateless ServiceKindBasicServicePartitionInfo = "Stateless" 1726) 1727 1728// PossibleServiceKindBasicServicePartitionInfoValues returns an array of possible values for the ServiceKindBasicServicePartitionInfo const type. 1729func PossibleServiceKindBasicServicePartitionInfoValues() []ServiceKindBasicServicePartitionInfo { 1730 return []ServiceKindBasicServicePartitionInfo{ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo, ServiceKindBasicServicePartitionInfoServiceKindStateful, ServiceKindBasicServicePartitionInfoServiceKindStateless} 1731} 1732 1733// ServiceKindBasicServiceUpdateDescription enumerates the values for service kind basic service update 1734// description. 1735type ServiceKindBasicServiceUpdateDescription string 1736 1737const ( 1738 // ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription ... 1739 ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription ServiceKindBasicServiceUpdateDescription = "ServiceUpdateDescription" 1740 // ServiceKindBasicServiceUpdateDescriptionServiceKindStateful ... 1741 ServiceKindBasicServiceUpdateDescriptionServiceKindStateful ServiceKindBasicServiceUpdateDescription = "Stateful" 1742 // ServiceKindBasicServiceUpdateDescriptionServiceKindStateless ... 1743 ServiceKindBasicServiceUpdateDescriptionServiceKindStateless ServiceKindBasicServiceUpdateDescription = "Stateless" 1744) 1745 1746// PossibleServiceKindBasicServiceUpdateDescriptionValues returns an array of possible values for the ServiceKindBasicServiceUpdateDescription const type. 1747func PossibleServiceKindBasicServiceUpdateDescriptionValues() []ServiceKindBasicServiceUpdateDescription { 1748 return []ServiceKindBasicServiceUpdateDescription{ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription, ServiceKindBasicServiceUpdateDescriptionServiceKindStateful, ServiceKindBasicServiceUpdateDescriptionServiceKindStateless} 1749} 1750 1751// ServicePackageActivationMode enumerates the values for service package activation mode. 1752type ServicePackageActivationMode string 1753 1754const ( 1755 // ExclusiveProcess ... 1756 ExclusiveProcess ServicePackageActivationMode = "ExclusiveProcess" 1757 // SharedProcess ... 1758 SharedProcess ServicePackageActivationMode = "SharedProcess" 1759) 1760 1761// PossibleServicePackageActivationModeValues returns an array of possible values for the ServicePackageActivationMode const type. 1762func PossibleServicePackageActivationModeValues() []ServicePackageActivationMode { 1763 return []ServicePackageActivationMode{ExclusiveProcess, SharedProcess} 1764} 1765 1766// ServicePackageActivationMode1 enumerates the values for service package activation mode 1. 1767type ServicePackageActivationMode1 string 1768 1769const ( 1770 // ServicePackageActivationMode1ExclusiveProcess ... 1771 ServicePackageActivationMode1ExclusiveProcess ServicePackageActivationMode1 = "ExclusiveProcess" 1772 // ServicePackageActivationMode1SharedProcess ... 1773 ServicePackageActivationMode1SharedProcess ServicePackageActivationMode1 = "SharedProcess" 1774) 1775 1776// PossibleServicePackageActivationMode1Values returns an array of possible values for the ServicePackageActivationMode1 const type. 1777func PossibleServicePackageActivationMode1Values() []ServicePackageActivationMode1 { 1778 return []ServicePackageActivationMode1{ServicePackageActivationMode1ExclusiveProcess, ServicePackageActivationMode1SharedProcess} 1779} 1780 1781// ServicePartitionKind enumerates the values for service partition kind. 1782type ServicePartitionKind string 1783 1784const ( 1785 // ServicePartitionKindInt64Range ... 1786 ServicePartitionKindInt64Range ServicePartitionKind = "Int64Range" 1787 // ServicePartitionKindNamed ... 1788 ServicePartitionKindNamed ServicePartitionKind = "Named" 1789 // ServicePartitionKindPartitionInformation ... 1790 ServicePartitionKindPartitionInformation ServicePartitionKind = "PartitionInformation" 1791 // ServicePartitionKindSingleton ... 1792 ServicePartitionKindSingleton ServicePartitionKind = "Singleton" 1793) 1794 1795// PossibleServicePartitionKindValues returns an array of possible values for the ServicePartitionKind const type. 1796func PossibleServicePartitionKindValues() []ServicePartitionKind { 1797 return []ServicePartitionKind{ServicePartitionKindInt64Range, ServicePartitionKindNamed, ServicePartitionKindPartitionInformation, ServicePartitionKindSingleton} 1798} 1799 1800// ServiceStatus enumerates the values for service status. 1801type ServiceStatus string 1802 1803const ( 1804 // ServiceStatusActive ... 1805 ServiceStatusActive ServiceStatus = "Active" 1806 // ServiceStatusCreating ... 1807 ServiceStatusCreating ServiceStatus = "Creating" 1808 // ServiceStatusDeleting ... 1809 ServiceStatusDeleting ServiceStatus = "Deleting" 1810 // ServiceStatusFailed ... 1811 ServiceStatusFailed ServiceStatus = "Failed" 1812 // ServiceStatusUnknown ... 1813 ServiceStatusUnknown ServiceStatus = "Unknown" 1814 // ServiceStatusUpgrading ... 1815 ServiceStatusUpgrading ServiceStatus = "Upgrading" 1816) 1817 1818// PossibleServiceStatusValues returns an array of possible values for the ServiceStatus const type. 1819func PossibleServiceStatusValues() []ServiceStatus { 1820 return []ServiceStatus{ServiceStatusActive, ServiceStatusCreating, ServiceStatusDeleting, ServiceStatusFailed, ServiceStatusUnknown, ServiceStatusUpgrading} 1821} 1822 1823// State enumerates the values for state. 1824type State string 1825 1826const ( 1827 // StateCompleted ... 1828 StateCompleted State = "Completed" 1829 // StateInProgress ... 1830 StateInProgress State = "InProgress" 1831 // StateInvalid ... 1832 StateInvalid State = "Invalid" 1833 // StatePending ... 1834 StatePending State = "Pending" 1835) 1836 1837// PossibleStateValues returns an array of possible values for the State const type. 1838func PossibleStateValues() []State { 1839 return []State{StateCompleted, StateInProgress, StateInvalid, StatePending} 1840} 1841 1842// State1 enumerates the values for state 1. 1843type State1 string 1844 1845const ( 1846 // State1Cancelled ... 1847 State1Cancelled State1 = "Cancelled" 1848 // State1Completed ... 1849 State1Completed State1 = "Completed" 1850 // State1Faulted ... 1851 State1Faulted State1 = "Faulted" 1852 // State1ForceCancelled ... 1853 State1ForceCancelled State1 = "ForceCancelled" 1854 // State1Invalid ... 1855 State1Invalid State1 = "Invalid" 1856 // State1RollingBack ... 1857 State1RollingBack State1 = "RollingBack" 1858 // State1Running ... 1859 State1Running State1 = "Running" 1860) 1861 1862// PossibleState1Values returns an array of possible values for the State1 const type. 1863func PossibleState1Values() []State1 { 1864 return []State1{State1Cancelled, State1Completed, State1Faulted, State1ForceCancelled, State1Invalid, State1RollingBack, State1Running} 1865} 1866 1867// State2 enumerates the values for state 2. 1868type State2 string 1869 1870const ( 1871 // State2Cancelled ... 1872 State2Cancelled State2 = "Cancelled" 1873 // State2Completed ... 1874 State2Completed State2 = "Completed" 1875 // State2Faulted ... 1876 State2Faulted State2 = "Faulted" 1877 // State2ForceCancelled ... 1878 State2ForceCancelled State2 = "ForceCancelled" 1879 // State2Invalid ... 1880 State2Invalid State2 = "Invalid" 1881 // State2RollingBack ... 1882 State2RollingBack State2 = "RollingBack" 1883 // State2Running ... 1884 State2Running State2 = "Running" 1885) 1886 1887// PossibleState2Values returns an array of possible values for the State2 const type. 1888func PossibleState2Values() []State2 { 1889 return []State2{State2Cancelled, State2Completed, State2Faulted, State2ForceCancelled, State2Invalid, State2RollingBack, State2Running} 1890} 1891 1892// State3 enumerates the values for state 3. 1893type State3 string 1894 1895const ( 1896 // State3Cancelled ... 1897 State3Cancelled State3 = "Cancelled" 1898 // State3Completed ... 1899 State3Completed State3 = "Completed" 1900 // State3Faulted ... 1901 State3Faulted State3 = "Faulted" 1902 // State3ForceCancelled ... 1903 State3ForceCancelled State3 = "ForceCancelled" 1904 // State3Invalid ... 1905 State3Invalid State3 = "Invalid" 1906 // State3RollingBack ... 1907 State3RollingBack State3 = "RollingBack" 1908 // State3Running ... 1909 State3Running State3 = "Running" 1910) 1911 1912// PossibleState3Values returns an array of possible values for the State3 const type. 1913func PossibleState3Values() []State3 { 1914 return []State3{State3Cancelled, State3Completed, State3Faulted, State3ForceCancelled, State3Invalid, State3RollingBack, State3Running} 1915} 1916 1917// State4 enumerates the values for state 4. 1918type State4 string 1919 1920const ( 1921 // State4Cancelled ... 1922 State4Cancelled State4 = "Cancelled" 1923 // State4Completed ... 1924 State4Completed State4 = "Completed" 1925 // State4Faulted ... 1926 State4Faulted State4 = "Faulted" 1927 // State4ForceCancelled ... 1928 State4ForceCancelled State4 = "ForceCancelled" 1929 // State4Invalid ... 1930 State4Invalid State4 = "Invalid" 1931 // State4RollingBack ... 1932 State4RollingBack State4 = "RollingBack" 1933 // State4Running ... 1934 State4Running State4 = "Running" 1935) 1936 1937// PossibleState4Values returns an array of possible values for the State4 const type. 1938func PossibleState4Values() []State4 { 1939 return []State4{State4Cancelled, State4Completed, State4Faulted, State4ForceCancelled, State4Invalid, State4RollingBack, State4Running} 1940} 1941 1942// State5 enumerates the values for state 5. 1943type State5 string 1944 1945const ( 1946 // State5Cancelled ... 1947 State5Cancelled State5 = "Cancelled" 1948 // State5Completed ... 1949 State5Completed State5 = "Completed" 1950 // State5Faulted ... 1951 State5Faulted State5 = "Faulted" 1952 // State5ForceCancelled ... 1953 State5ForceCancelled State5 = "ForceCancelled" 1954 // State5Invalid ... 1955 State5Invalid State5 = "Invalid" 1956 // State5RollingBack ... 1957 State5RollingBack State5 = "RollingBack" 1958 // State5Running ... 1959 State5Running State5 = "Running" 1960) 1961 1962// PossibleState5Values returns an array of possible values for the State5 const type. 1963func PossibleState5Values() []State5 { 1964 return []State5{State5Cancelled, State5Completed, State5Faulted, State5ForceCancelled, State5Invalid, State5RollingBack, State5Running} 1965} 1966 1967// State6 enumerates the values for state 6. 1968type State6 string 1969 1970const ( 1971 // State6Approved ... 1972 State6Approved State6 = "Approved" 1973 // State6Claimed ... 1974 State6Claimed State6 = "Claimed" 1975 // State6Completed ... 1976 State6Completed State6 = "Completed" 1977 // State6Created ... 1978 State6Created State6 = "Created" 1979 // State6Executing ... 1980 State6Executing State6 = "Executing" 1981 // State6Invalid ... 1982 State6Invalid State6 = "Invalid" 1983 // State6Preparing ... 1984 State6Preparing State6 = "Preparing" 1985 // State6Restoring ... 1986 State6Restoring State6 = "Restoring" 1987) 1988 1989// PossibleState6Values returns an array of possible values for the State6 const type. 1990func PossibleState6Values() []State6 { 1991 return []State6{State6Approved, State6Claimed, State6Completed, State6Created, State6Executing, State6Invalid, State6Preparing, State6Restoring} 1992} 1993 1994// Status enumerates the values for status. 1995type Status string 1996 1997const ( 1998 // StatusCreating ... 1999 StatusCreating Status = "Creating" 2000 // StatusDeleting ... 2001 StatusDeleting Status = "Deleting" 2002 // StatusFailed ... 2003 StatusFailed Status = "Failed" 2004 // StatusInvalid ... 2005 StatusInvalid Status = "Invalid" 2006 // StatusReady ... 2007 StatusReady Status = "Ready" 2008 // StatusUpgrading ... 2009 StatusUpgrading Status = "Upgrading" 2010) 2011 2012// PossibleStatusValues returns an array of possible values for the Status const type. 2013func PossibleStatusValues() []Status { 2014 return []Status{StatusCreating, StatusDeleting, StatusFailed, StatusInvalid, StatusReady, StatusUpgrading} 2015} 2016 2017// Status1 enumerates the values for status 1. 2018type Status1 string 2019 2020const ( 2021 // Status1Available ... 2022 Status1Available Status1 = "Available" 2023 // Status1Failed ... 2024 Status1Failed Status1 = "Failed" 2025 // Status1Invalid ... 2026 Status1Invalid Status1 = "Invalid" 2027 // Status1Provisioning ... 2028 Status1Provisioning Status1 = "Provisioning" 2029 // Status1Unprovisioning ... 2030 Status1Unprovisioning Status1 = "Unprovisioning" 2031) 2032 2033// PossibleStatus1Values returns an array of possible values for the Status1 const type. 2034func PossibleStatus1Values() []Status1 { 2035 return []Status1{Status1Available, Status1Failed, Status1Invalid, Status1Provisioning, Status1Unprovisioning} 2036} 2037 2038// Status2 enumerates the values for status 2. 2039type Status2 string 2040 2041const ( 2042 // Status2Activating ... 2043 Status2Activating Status2 = "Activating" 2044 // Status2Active ... 2045 Status2Active Status2 = "Active" 2046 // Status2Deactivating ... 2047 Status2Deactivating Status2 = "Deactivating" 2048 // Status2Downloading ... 2049 Status2Downloading Status2 = "Downloading" 2050 // Status2Invalid ... 2051 Status2Invalid Status2 = "Invalid" 2052 // Status2Upgrading ... 2053 Status2Upgrading Status2 = "Upgrading" 2054) 2055 2056// PossibleStatus2Values returns an array of possible values for the Status2 const type. 2057func PossibleStatus2Values() []Status2 { 2058 return []Status2{Status2Activating, Status2Active, Status2Deactivating, Status2Downloading, Status2Invalid, Status2Upgrading} 2059} 2060 2061// Status3 enumerates the values for status 3. 2062type Status3 string 2063 2064const ( 2065 // Status3Invalid ... 2066 Status3Invalid Status3 = "Invalid" 2067 // Status3Pending ... 2068 Status3Pending Status3 = "Pending" 2069 // Status3Started ... 2070 Status3Started Status3 = "Started" 2071 // Status3Starting ... 2072 Status3Starting Status3 = "Starting" 2073 // Status3Stopped ... 2074 Status3Stopped Status3 = "Stopped" 2075 // Status3Stopping ... 2076 Status3Stopping Status3 = "Stopping" 2077) 2078 2079// PossibleStatus3Values returns an array of possible values for the Status3 const type. 2080func PossibleStatus3Values() []Status3 { 2081 return []Status3{Status3Invalid, Status3Pending, Status3Started, Status3Starting, Status3Stopped, Status3Stopping} 2082} 2083 2084// Status4 enumerates the values for status 4. 2085type Status4 string 2086 2087const ( 2088 // Status4Activating ... 2089 Status4Activating Status4 = "Activating" 2090 // Status4Active ... 2091 Status4Active Status4 = "Active" 2092 // Status4Deactivating ... 2093 Status4Deactivating Status4 = "Deactivating" 2094 // Status4Downloading ... 2095 Status4Downloading Status4 = "Downloading" 2096 // Status4Invalid ... 2097 Status4Invalid Status4 = "Invalid" 2098 // Status4Upgrading ... 2099 Status4Upgrading Status4 = "Upgrading" 2100) 2101 2102// PossibleStatus4Values returns an array of possible values for the Status4 const type. 2103func PossibleStatus4Values() []Status4 { 2104 return []Status4{Status4Activating, Status4Active, Status4Deactivating, Status4Downloading, Status4Invalid, Status4Upgrading} 2105} 2106 2107// Status5 enumerates the values for status 5. 2108type Status5 string 2109 2110const ( 2111 // Status5Invalid ... 2112 Status5Invalid Status5 = "Invalid" 2113 // Status5Running ... 2114 Status5Running Status5 = "Running" 2115 // Status5Stopped ... 2116 Status5Stopped Status5 = "Stopped" 2117) 2118 2119// PossibleStatus5Values returns an array of possible values for the Status5 const type. 2120func PossibleStatus5Values() []Status5 { 2121 return []Status5{Status5Invalid, Status5Running, Status5Stopped} 2122} 2123 2124// Status6 enumerates the values for status 6. 2125type Status6 string 2126 2127const ( 2128 // Status6Creating ... 2129 Status6Creating Status6 = "Creating" 2130 // Status6Deleting ... 2131 Status6Deleting Status6 = "Deleting" 2132 // Status6Failed ... 2133 Status6Failed Status6 = "Failed" 2134 // Status6Invalid ... 2135 Status6Invalid Status6 = "Invalid" 2136 // Status6Provisioning ... 2137 Status6Provisioning Status6 = "Provisioning" 2138 // Status6Ready ... 2139 Status6Ready Status6 = "Ready" 2140 // Status6Unprovisioning ... 2141 Status6Unprovisioning Status6 = "Unprovisioning" 2142 // Status6Upgrading ... 2143 Status6Upgrading Status6 = "Upgrading" 2144) 2145 2146// PossibleStatus6Values returns an array of possible values for the Status6 const type. 2147func PossibleStatus6Values() []Status6 { 2148 return []Status6{Status6Creating, Status6Deleting, Status6Failed, Status6Invalid, Status6Provisioning, Status6Ready, Status6Unprovisioning, Status6Upgrading} 2149} 2150 2151// Status7 enumerates the values for status 7. 2152type Status7 string 2153 2154const ( 2155 // Status7Activating ... 2156 Status7Activating Status7 = "Activating" 2157 // Status7Active ... 2158 Status7Active Status7 = "Active" 2159 // Status7Deactivating ... 2160 Status7Deactivating Status7 = "Deactivating" 2161 // Status7Downloading ... 2162 Status7Downloading Status7 = "Downloading" 2163 // Status7Invalid ... 2164 Status7Invalid Status7 = "Invalid" 2165 // Status7Upgrading ... 2166 Status7Upgrading Status7 = "Upgrading" 2167) 2168 2169// PossibleStatus7Values returns an array of possible values for the Status7 const type. 2170func PossibleStatus7Values() []Status7 { 2171 return []Status7{Status7Activating, Status7Active, Status7Deactivating, Status7Downloading, Status7Invalid, Status7Upgrading} 2172} 2173 2174// Status8 enumerates the values for status 8. 2175type Status8 string 2176 2177const ( 2178 // Status8Disabled ... 2179 Status8Disabled Status8 = "Disabled" 2180 // Status8Enabled ... 2181 Status8Enabled Status8 = "Enabled" 2182 // Status8Invalid ... 2183 Status8Invalid Status8 = "Invalid" 2184 // Status8Registered ... 2185 Status8Registered Status8 = "Registered" 2186) 2187 2188// PossibleStatus8Values returns an array of possible values for the Status8 const type. 2189func PossibleStatus8Values() []Status8 { 2190 return []Status8{Status8Disabled, Status8Enabled, Status8Invalid, Status8Registered} 2191} 2192 2193// Type enumerates the values for type. 2194type Type string 2195 2196const ( 2197 // TypeInvalid ... 2198 TypeInvalid Type = "Invalid" 2199 // TypeNodeTransition ... 2200 TypeNodeTransition Type = "NodeTransition" 2201 // TypePartitionDataLoss ... 2202 TypePartitionDataLoss Type = "PartitionDataLoss" 2203 // TypePartitionQuorumLoss ... 2204 TypePartitionQuorumLoss Type = "PartitionQuorumLoss" 2205 // TypePartitionRestart ... 2206 TypePartitionRestart Type = "PartitionRestart" 2207) 2208 2209// PossibleTypeValues returns an array of possible values for the Type const type. 2210func PossibleTypeValues() []Type { 2211 return []Type{TypeInvalid, TypeNodeTransition, TypePartitionDataLoss, TypePartitionQuorumLoss, TypePartitionRestart} 2212} 2213 2214// TypeBasicServicePlacementPolicyDescription enumerates the values for type basic service placement policy 2215// description. 2216type TypeBasicServicePlacementPolicyDescription string 2217 2218const ( 2219 // TypeInvalidDomain ... 2220 TypeInvalidDomain TypeBasicServicePlacementPolicyDescription = "InvalidDomain" 2221 // TypeNonPartiallyPlaceService ... 2222 TypeNonPartiallyPlaceService TypeBasicServicePlacementPolicyDescription = "NonPartiallyPlaceService" 2223 // TypePreferPrimaryDomain ... 2224 TypePreferPrimaryDomain TypeBasicServicePlacementPolicyDescription = "PreferPrimaryDomain" 2225 // TypeRequireDomain ... 2226 TypeRequireDomain TypeBasicServicePlacementPolicyDescription = "RequireDomain" 2227 // TypeRequireDomainDistribution ... 2228 TypeRequireDomainDistribution TypeBasicServicePlacementPolicyDescription = "RequireDomainDistribution" 2229 // TypeServicePlacementPolicyDescription ... 2230 TypeServicePlacementPolicyDescription TypeBasicServicePlacementPolicyDescription = "ServicePlacementPolicyDescription" 2231) 2232 2233// PossibleTypeBasicServicePlacementPolicyDescriptionValues returns an array of possible values for the TypeBasicServicePlacementPolicyDescription const type. 2234func PossibleTypeBasicServicePlacementPolicyDescriptionValues() []TypeBasicServicePlacementPolicyDescription { 2235 return []TypeBasicServicePlacementPolicyDescription{TypeInvalidDomain, TypeNonPartiallyPlaceService, TypePreferPrimaryDomain, TypeRequireDomain, TypeRequireDomainDistribution, TypeServicePlacementPolicyDescription} 2236} 2237 2238// TypeID enumerates the values for type id. 2239type TypeID string 2240 2241const ( 2242 // TypeIDBinary ... 2243 TypeIDBinary TypeID = "Binary" 2244 // TypeIDDouble ... 2245 TypeIDDouble TypeID = "Double" 2246 // TypeIDGUID ... 2247 TypeIDGUID TypeID = "Guid" 2248 // TypeIDInt64 ... 2249 TypeIDInt64 TypeID = "Int64" 2250 // TypeIDInvalid ... 2251 TypeIDInvalid TypeID = "Invalid" 2252 // TypeIDString ... 2253 TypeIDString TypeID = "String" 2254) 2255 2256// PossibleTypeIDValues returns an array of possible values for the TypeID const type. 2257func PossibleTypeIDValues() []TypeID { 2258 return []TypeID{TypeIDBinary, TypeIDDouble, TypeIDGUID, TypeIDInt64, TypeIDInvalid, TypeIDString} 2259} 2260 2261// UpgradeKind enumerates the values for upgrade kind. 2262type UpgradeKind string 2263 2264const ( 2265 // UpgradeKindInvalid ... 2266 UpgradeKindInvalid UpgradeKind = "Invalid" 2267 // UpgradeKindRolling ... 2268 UpgradeKindRolling UpgradeKind = "Rolling" 2269) 2270 2271// PossibleUpgradeKindValues returns an array of possible values for the UpgradeKind const type. 2272func PossibleUpgradeKindValues() []UpgradeKind { 2273 return []UpgradeKind{UpgradeKindInvalid, UpgradeKindRolling} 2274} 2275 2276// UpgradeKind1 enumerates the values for upgrade kind 1. 2277type UpgradeKind1 string 2278 2279const ( 2280 // UpgradeKind1Invalid ... 2281 UpgradeKind1Invalid UpgradeKind1 = "Invalid" 2282 // UpgradeKind1Rolling ... 2283 UpgradeKind1Rolling UpgradeKind1 = "Rolling" 2284) 2285 2286// PossibleUpgradeKind1Values returns an array of possible values for the UpgradeKind1 const type. 2287func PossibleUpgradeKind1Values() []UpgradeKind1 { 2288 return []UpgradeKind1{UpgradeKind1Invalid, UpgradeKind1Rolling} 2289} 2290 2291// UpgradeKind2 enumerates the values for upgrade kind 2. 2292type UpgradeKind2 string 2293 2294const ( 2295 // UpgradeKind2Invalid ... 2296 UpgradeKind2Invalid UpgradeKind2 = "Invalid" 2297 // UpgradeKind2Rolling ... 2298 UpgradeKind2Rolling UpgradeKind2 = "Rolling" 2299 // UpgradeKind2RollingForceRestart ... 2300 UpgradeKind2RollingForceRestart UpgradeKind2 = "Rolling_ForceRestart" 2301) 2302 2303// PossibleUpgradeKind2Values returns an array of possible values for the UpgradeKind2 const type. 2304func PossibleUpgradeKind2Values() []UpgradeKind2 { 2305 return []UpgradeKind2{UpgradeKind2Invalid, UpgradeKind2Rolling, UpgradeKind2RollingForceRestart} 2306} 2307 2308// UpgradeKind3 enumerates the values for upgrade kind 3. 2309type UpgradeKind3 string 2310 2311const ( 2312 // UpgradeKind3Invalid ... 2313 UpgradeKind3Invalid UpgradeKind3 = "Invalid" 2314 // UpgradeKind3Rolling ... 2315 UpgradeKind3Rolling UpgradeKind3 = "Rolling" 2316) 2317 2318// PossibleUpgradeKind3Values returns an array of possible values for the UpgradeKind3 const type. 2319func PossibleUpgradeKind3Values() []UpgradeKind3 { 2320 return []UpgradeKind3{UpgradeKind3Invalid, UpgradeKind3Rolling} 2321} 2322 2323// UpgradeKind4 enumerates the values for upgrade kind 4. 2324type UpgradeKind4 string 2325 2326const ( 2327 // UpgradeKind4Invalid ... 2328 UpgradeKind4Invalid UpgradeKind4 = "Invalid" 2329 // UpgradeKind4Rolling ... 2330 UpgradeKind4Rolling UpgradeKind4 = "Rolling" 2331) 2332 2333// PossibleUpgradeKind4Values returns an array of possible values for the UpgradeKind4 const type. 2334func PossibleUpgradeKind4Values() []UpgradeKind4 { 2335 return []UpgradeKind4{UpgradeKind4Invalid, UpgradeKind4Rolling} 2336} 2337 2338// UpgradeKind5 enumerates the values for upgrade kind 5. 2339type UpgradeKind5 string 2340 2341const ( 2342 // UpgradeKind5Invalid ... 2343 UpgradeKind5Invalid UpgradeKind5 = "Invalid" 2344 // UpgradeKind5Rolling ... 2345 UpgradeKind5Rolling UpgradeKind5 = "Rolling" 2346) 2347 2348// PossibleUpgradeKind5Values returns an array of possible values for the UpgradeKind5 const type. 2349func PossibleUpgradeKind5Values() []UpgradeKind5 { 2350 return []UpgradeKind5{UpgradeKind5Invalid, UpgradeKind5Rolling} 2351} 2352 2353// UpgradeKind6 enumerates the values for upgrade kind 6. 2354type UpgradeKind6 string 2355 2356const ( 2357 // UpgradeKind6Invalid ... 2358 UpgradeKind6Invalid UpgradeKind6 = "Invalid" 2359 // UpgradeKind6Rolling ... 2360 UpgradeKind6Rolling UpgradeKind6 = "Rolling" 2361) 2362 2363// PossibleUpgradeKind6Values returns an array of possible values for the UpgradeKind6 const type. 2364func PossibleUpgradeKind6Values() []UpgradeKind6 { 2365 return []UpgradeKind6{UpgradeKind6Invalid, UpgradeKind6Rolling} 2366} 2367 2368// UpgradePhase enumerates the values for upgrade phase. 2369type UpgradePhase string 2370 2371const ( 2372 // UpgradePhaseInvalid ... 2373 UpgradePhaseInvalid UpgradePhase = "Invalid" 2374 // UpgradePhasePostUpgradeSafetyCheck ... 2375 UpgradePhasePostUpgradeSafetyCheck UpgradePhase = "PostUpgradeSafetyCheck" 2376 // UpgradePhasePreUpgradeSafetyCheck ... 2377 UpgradePhasePreUpgradeSafetyCheck UpgradePhase = "PreUpgradeSafetyCheck" 2378 // UpgradePhaseUpgrading ... 2379 UpgradePhaseUpgrading UpgradePhase = "Upgrading" 2380) 2381 2382// PossibleUpgradePhaseValues returns an array of possible values for the UpgradePhase const type. 2383func PossibleUpgradePhaseValues() []UpgradePhase { 2384 return []UpgradePhase{UpgradePhaseInvalid, UpgradePhasePostUpgradeSafetyCheck, UpgradePhasePreUpgradeSafetyCheck, UpgradePhaseUpgrading} 2385} 2386 2387// UpgradeState enumerates the values for upgrade state. 2388type UpgradeState string 2389 2390const ( 2391 // UpgradeStateFailed ... 2392 UpgradeStateFailed UpgradeState = "Failed" 2393 // UpgradeStateInvalid ... 2394 UpgradeStateInvalid UpgradeState = "Invalid" 2395 // UpgradeStateRollingBackCompleted ... 2396 UpgradeStateRollingBackCompleted UpgradeState = "RollingBackCompleted" 2397 // UpgradeStateRollingBackInProgress ... 2398 UpgradeStateRollingBackInProgress UpgradeState = "RollingBackInProgress" 2399 // UpgradeStateRollingForwardCompleted ... 2400 UpgradeStateRollingForwardCompleted UpgradeState = "RollingForwardCompleted" 2401 // UpgradeStateRollingForwardInProgress ... 2402 UpgradeStateRollingForwardInProgress UpgradeState = "RollingForwardInProgress" 2403 // UpgradeStateRollingForwardPending ... 2404 UpgradeStateRollingForwardPending UpgradeState = "RollingForwardPending" 2405) 2406 2407// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type. 2408func PossibleUpgradeStateValues() []UpgradeState { 2409 return []UpgradeState{UpgradeStateFailed, UpgradeStateInvalid, UpgradeStateRollingBackCompleted, UpgradeStateRollingBackInProgress, UpgradeStateRollingForwardCompleted, UpgradeStateRollingForwardInProgress, UpgradeStateRollingForwardPending} 2410} 2411 2412// UpgradeState1 enumerates the values for upgrade state 1. 2413type UpgradeState1 string 2414 2415const ( 2416 // UpgradeState1Failed ... 2417 UpgradeState1Failed UpgradeState1 = "Failed" 2418 // UpgradeState1Invalid ... 2419 UpgradeState1Invalid UpgradeState1 = "Invalid" 2420 // UpgradeState1RollingBackCompleted ... 2421 UpgradeState1RollingBackCompleted UpgradeState1 = "RollingBackCompleted" 2422 // UpgradeState1RollingBackInProgress ... 2423 UpgradeState1RollingBackInProgress UpgradeState1 = "RollingBackInProgress" 2424 // UpgradeState1RollingForwardCompleted ... 2425 UpgradeState1RollingForwardCompleted UpgradeState1 = "RollingForwardCompleted" 2426 // UpgradeState1RollingForwardInProgress ... 2427 UpgradeState1RollingForwardInProgress UpgradeState1 = "RollingForwardInProgress" 2428 // UpgradeState1RollingForwardPending ... 2429 UpgradeState1RollingForwardPending UpgradeState1 = "RollingForwardPending" 2430) 2431 2432// PossibleUpgradeState1Values returns an array of possible values for the UpgradeState1 const type. 2433func PossibleUpgradeState1Values() []UpgradeState1 { 2434 return []UpgradeState1{UpgradeState1Failed, UpgradeState1Invalid, UpgradeState1RollingBackCompleted, UpgradeState1RollingBackInProgress, UpgradeState1RollingForwardCompleted, UpgradeState1RollingForwardInProgress, UpgradeState1RollingForwardPending} 2435} 2436 2437// UpgradeState2 enumerates the values for upgrade state 2. 2438type UpgradeState2 string 2439 2440const ( 2441 // UpgradeState2Failed ... 2442 UpgradeState2Failed UpgradeState2 = "Failed" 2443 // UpgradeState2Invalid ... 2444 UpgradeState2Invalid UpgradeState2 = "Invalid" 2445 // UpgradeState2RollingBackCompleted ... 2446 UpgradeState2RollingBackCompleted UpgradeState2 = "RollingBackCompleted" 2447 // UpgradeState2RollingBackInProgress ... 2448 UpgradeState2RollingBackInProgress UpgradeState2 = "RollingBackInProgress" 2449 // UpgradeState2RollingForwardCompleted ... 2450 UpgradeState2RollingForwardCompleted UpgradeState2 = "RollingForwardCompleted" 2451 // UpgradeState2RollingForwardInProgress ... 2452 UpgradeState2RollingForwardInProgress UpgradeState2 = "RollingForwardInProgress" 2453 // UpgradeState2RollingForwardPending ... 2454 UpgradeState2RollingForwardPending UpgradeState2 = "RollingForwardPending" 2455) 2456 2457// PossibleUpgradeState2Values returns an array of possible values for the UpgradeState2 const type. 2458func PossibleUpgradeState2Values() []UpgradeState2 { 2459 return []UpgradeState2{UpgradeState2Failed, UpgradeState2Invalid, UpgradeState2RollingBackCompleted, UpgradeState2RollingBackInProgress, UpgradeState2RollingForwardCompleted, UpgradeState2RollingForwardInProgress, UpgradeState2RollingForwardPending} 2460} 2461 2462// UpgradeState3 enumerates the values for upgrade state 3. 2463type UpgradeState3 string 2464 2465const ( 2466 // UpgradeState3Failed ... 2467 UpgradeState3Failed UpgradeState3 = "Failed" 2468 // UpgradeState3Invalid ... 2469 UpgradeState3Invalid UpgradeState3 = "Invalid" 2470 // UpgradeState3ProvisioningTarget ... 2471 UpgradeState3ProvisioningTarget UpgradeState3 = "ProvisioningTarget" 2472 // UpgradeState3RollingBackCompleted ... 2473 UpgradeState3RollingBackCompleted UpgradeState3 = "RollingBackCompleted" 2474 // UpgradeState3RollingBackInProgress ... 2475 UpgradeState3RollingBackInProgress UpgradeState3 = "RollingBackInProgress" 2476 // UpgradeState3RollingForwardCompleted ... 2477 UpgradeState3RollingForwardCompleted UpgradeState3 = "RollingForwardCompleted" 2478 // UpgradeState3RollingForwardInProgress ... 2479 UpgradeState3RollingForwardInProgress UpgradeState3 = "RollingForwardInProgress" 2480 // UpgradeState3RollingForwardPending ... 2481 UpgradeState3RollingForwardPending UpgradeState3 = "RollingForwardPending" 2482 // UpgradeState3UnprovisioningCurrent ... 2483 UpgradeState3UnprovisioningCurrent UpgradeState3 = "UnprovisioningCurrent" 2484 // UpgradeState3UnprovisioningTarget ... 2485 UpgradeState3UnprovisioningTarget UpgradeState3 = "UnprovisioningTarget" 2486) 2487 2488// PossibleUpgradeState3Values returns an array of possible values for the UpgradeState3 const type. 2489func PossibleUpgradeState3Values() []UpgradeState3 { 2490 return []UpgradeState3{UpgradeState3Failed, UpgradeState3Invalid, UpgradeState3ProvisioningTarget, UpgradeState3RollingBackCompleted, UpgradeState3RollingBackInProgress, UpgradeState3RollingForwardCompleted, UpgradeState3RollingForwardInProgress, UpgradeState3RollingForwardPending, UpgradeState3UnprovisioningCurrent, UpgradeState3UnprovisioningTarget} 2491} 2492 2493// Weight enumerates the values for weight. 2494type Weight string 2495 2496const ( 2497 // WeightHigh ... 2498 WeightHigh Weight = "High" 2499 // WeightLow ... 2500 WeightLow Weight = "Low" 2501 // WeightMedium ... 2502 WeightMedium Weight = "Medium" 2503 // WeightZero ... 2504 WeightZero Weight = "Zero" 2505) 2506 2507// PossibleWeightValues returns an array of possible values for the Weight const type. 2508func PossibleWeightValues() []Weight { 2509 return []Weight{WeightHigh, WeightLow, WeightMedium, WeightZero} 2510} 2511 2512// WriteStatus enumerates the values for write status. 2513type WriteStatus string 2514 2515const ( 2516 // WriteStatusGranted ... 2517 WriteStatusGranted WriteStatus = "Granted" 2518 // WriteStatusInvalid ... 2519 WriteStatusInvalid WriteStatus = "Invalid" 2520 // WriteStatusNotPrimary ... 2521 WriteStatusNotPrimary WriteStatus = "NotPrimary" 2522 // WriteStatusNoWriteQuorum ... 2523 WriteStatusNoWriteQuorum WriteStatus = "NoWriteQuorum" 2524 // WriteStatusReconfigurationPending ... 2525 WriteStatusReconfigurationPending WriteStatus = "ReconfigurationPending" 2526) 2527 2528// PossibleWriteStatusValues returns an array of possible values for the WriteStatus const type. 2529func PossibleWriteStatusValues() []WriteStatus { 2530 return []WriteStatus{WriteStatusGranted, WriteStatusInvalid, WriteStatusNotPrimary, WriteStatusNoWriteQuorum, WriteStatusReconfigurationPending} 2531} 2532 2533// AadMetadata azure Active Directory metadata used for secured connection to cluster. 2534type AadMetadata struct { 2535 // Authority - The AAD authority url. 2536 Authority *string `json:"authority,omitempty"` 2537 // Client - The AAD client application Id. 2538 Client *string `json:"client,omitempty"` 2539 // Cluster - The AAD cluster application Id. 2540 Cluster *string `json:"cluster,omitempty"` 2541 // Login - The AAD login url. 2542 Login *string `json:"login,omitempty"` 2543 // Redirect - The client application redirect address. 2544 Redirect *string `json:"redirect,omitempty"` 2545 // Tenant - The AAD tenant Id. 2546 Tenant *string `json:"tenant,omitempty"` 2547} 2548 2549// AadMetadataObject azure Active Directory metadata object used for secured connection to cluster. 2550type AadMetadataObject struct { 2551 autorest.Response `json:"-"` 2552 // Type - The client authentication method. 2553 Type *string `json:"type,omitempty"` 2554 Metadata *AadMetadata `json:"metadata,omitempty"` 2555} 2556 2557// ApplicationCapacityDescription describes capacity information for services of this application. This description 2558// can be used for describing the following. 2559// - Reserving the capacity for the services on the nodes 2560// - Limiting the total number of nodes that services of this application can run on 2561// - Limiting the custom capacity metrics to limit the total consumption of this metric by the services of this 2562// application 2563type ApplicationCapacityDescription struct { 2564 // MinimumNodes - The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property. 2565 MinimumNodes *int64 `json:"MinimumNodes,omitempty"` 2566 // MaximumNodes - The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node. 2567 MaximumNodes *int64 `json:"MaximumNodes,omitempty"` 2568 ApplicationMetrics *[]ApplicationMetricDescription `json:"ApplicationMetrics,omitempty"` 2569} 2570 2571// ApplicationDescription describes a Service Fabric application. 2572type ApplicationDescription struct { 2573 Name *string `json:"Name,omitempty"` 2574 TypeName *string `json:"TypeName,omitempty"` 2575 TypeVersion *string `json:"TypeVersion,omitempty"` 2576 ParameterList *[]ApplicationParameter `json:"ParameterList,omitempty"` 2577 ApplicationCapacity *ApplicationCapacityDescription `json:"ApplicationCapacity,omitempty"` 2578} 2579 2580// ApplicationHealth represents the health of the application. Contains the application aggregated health state and 2581// the service and deployed application health states. 2582type ApplicationHealth struct { 2583 autorest.Response `json:"-"` 2584 Name *string `json:"Name,omitempty"` 2585 // ServiceHealthStates - Service health states as found in the health store. 2586 ServiceHealthStates *[]ServiceHealthState `json:"ServiceHealthStates,omitempty"` 2587 // DeployedApplicationHealthStates - Deployed application health states as found in the health store. 2588 DeployedApplicationHealthStates *[]DeployedApplicationHealthState `json:"DeployedApplicationHealthStates,omitempty"` 2589 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 2590 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 2591 // HealthEvents - The list of health events reported on the entity. 2592 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 2593 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 2594 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 2595} 2596 2597// ApplicationHealthEvaluation represents health evaluation for an application, containing information about the 2598// data and the algorithm used by the health store to evaluate health. 2599type ApplicationHealthEvaluation struct { 2600 ApplicationName *string `json:"ApplicationName,omitempty"` 2601 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 2602 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 2603 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 2604 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 2605 Description *string `json:"Description,omitempty"` 2606 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 2607 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 2608} 2609 2610// MarshalJSON is the custom marshaler for ApplicationHealthEvaluation. 2611func (ahe ApplicationHealthEvaluation) MarshalJSON() ([]byte, error) { 2612 ahe.Kind = KindApplication 2613 objectMap := make(map[string]interface{}) 2614 if ahe.ApplicationName != nil { 2615 objectMap["ApplicationName"] = ahe.ApplicationName 2616 } 2617 if ahe.UnhealthyEvaluations != nil { 2618 objectMap["UnhealthyEvaluations"] = ahe.UnhealthyEvaluations 2619 } 2620 if ahe.AggregatedHealthState != "" { 2621 objectMap["AggregatedHealthState"] = ahe.AggregatedHealthState 2622 } 2623 if ahe.Description != nil { 2624 objectMap["Description"] = ahe.Description 2625 } 2626 if ahe.Kind != "" { 2627 objectMap["Kind"] = ahe.Kind 2628 } 2629 return json.Marshal(objectMap) 2630} 2631 2632// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2633func (ahe ApplicationHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 2634 return &ahe, true 2635} 2636 2637// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2638func (ahe ApplicationHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 2639 return nil, false 2640} 2641 2642// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2643func (ahe ApplicationHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 2644 return nil, false 2645} 2646 2647// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2648func (ahe ApplicationHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 2649 return nil, false 2650} 2651 2652// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2653func (ahe ApplicationHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 2654 return nil, false 2655} 2656 2657// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2658func (ahe ApplicationHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 2659 return nil, false 2660} 2661 2662// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2663func (ahe ApplicationHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 2664 return nil, false 2665} 2666 2667// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2668func (ahe ApplicationHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 2669 return nil, false 2670} 2671 2672// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2673func (ahe ApplicationHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 2674 return nil, false 2675} 2676 2677// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2678func (ahe ApplicationHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 2679 return nil, false 2680} 2681 2682// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2683func (ahe ApplicationHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 2684 return nil, false 2685} 2686 2687// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2688func (ahe ApplicationHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 2689 return nil, false 2690} 2691 2692// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2693func (ahe ApplicationHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 2694 return nil, false 2695} 2696 2697// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2698func (ahe ApplicationHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 2699 return nil, false 2700} 2701 2702// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2703func (ahe ApplicationHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 2704 return nil, false 2705} 2706 2707// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2708func (ahe ApplicationHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 2709 return nil, false 2710} 2711 2712// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2713func (ahe ApplicationHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 2714 return nil, false 2715} 2716 2717// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2718func (ahe ApplicationHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 2719 return nil, false 2720} 2721 2722// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2723func (ahe ApplicationHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 2724 return nil, false 2725} 2726 2727// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2728func (ahe ApplicationHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 2729 return nil, false 2730} 2731 2732// AsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2733func (ahe ApplicationHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 2734 return nil, false 2735} 2736 2737// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. 2738func (ahe ApplicationHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 2739 return &ahe, true 2740} 2741 2742// ApplicationHealthPolicies defines the application health policy map used to evaluate the health of an 2743// application or one of its children entities. 2744type ApplicationHealthPolicies struct { 2745 ApplicationHealthPolicyMap *[]ApplicationHealthPolicyMapItem `json:"ApplicationHealthPolicyMap,omitempty"` 2746} 2747 2748// ApplicationHealthPolicy defines a health policy used to evaluate the health of an application or one of its 2749// children entities. 2750type ApplicationHealthPolicy struct { 2751 // ConsiderWarningAsError - Indicates whether warnings are treated with the same severity as errors. 2752 ConsiderWarningAsError *bool `json:"ConsiderWarningAsError,omitempty"` 2753 // MaxPercentUnhealthyDeployedApplications - The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. 2754 // The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. 2755 // This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. 2756 // The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. 2757 MaxPercentUnhealthyDeployedApplications *int32 `json:"MaxPercentUnhealthyDeployedApplications,omitempty"` 2758 DefaultServiceTypeHealthPolicy *ServiceTypeHealthPolicy `json:"DefaultServiceTypeHealthPolicy,omitempty"` 2759 ServiceTypeHealthPolicyMap *[]ServiceTypeHealthPolicyMapItem `json:"ServiceTypeHealthPolicyMap,omitempty"` 2760} 2761 2762// ApplicationHealthPolicyMapItem defines an item in ApplicationHealthPolicyMap. 2763type ApplicationHealthPolicyMapItem struct { 2764 Key *string `json:"Key,omitempty"` 2765 Value *ApplicationHealthPolicy `json:"Value,omitempty"` 2766} 2767 2768// ApplicationHealthState represents the health state of an application, which contains the application identifier 2769// and the aggregated health state. 2770type ApplicationHealthState struct { 2771 Name *string `json:"Name,omitempty"` 2772 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 2773 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 2774} 2775 2776// ApplicationHealthStateChunk represents the health state chunk of a application. 2777// The application health state chunk contains the application name, its aggregated health state and any children 2778// services and deployed applications that respect the filters in cluster health chunk query description. 2779type ApplicationHealthStateChunk struct { 2780 ApplicationName *string `json:"ApplicationName,omitempty"` 2781 ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` 2782 ServiceHealthStateChunks *ServiceHealthStateChunkList `json:"ServiceHealthStateChunks,omitempty"` 2783 DeployedApplicationHealthStateChunks *DeployedApplicationHealthStateChunkList `json:"DeployedApplicationHealthStateChunks,omitempty"` 2784 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 2785 HealthState HealthState2 `json:"HealthState,omitempty"` 2786} 2787 2788// ApplicationHealthStateChunkList the list of application health state chunks in the cluster that respect the 2789// input filters in the chunk query. Returned by get cluster health state chunks query. 2790type ApplicationHealthStateChunkList struct { 2791 // Items - The list of application health state chunks that respect the input filters in the chunk query. 2792 Items *[]ApplicationHealthStateChunk `json:"Items,omitempty"` 2793 // TotalCount - Total number of entity health state objects that match the specified filters from the cluster health chunk query description. 2794 TotalCount *int64 `json:"TotalCount,omitempty"` 2795} 2796 2797// ApplicationHealthStateFilter defines matching criteria to determine whether a application should be included in 2798// the cluster health chunk. 2799// One filter can match zero, one or multiple applications, depending on its properties. 2800type ApplicationHealthStateFilter struct { 2801 // ApplicationNameFilter - The name of the application that matches the filter, as a fabric uri. The filter is applied only to the specified application, if it exists. 2802 // If the application doesn't exist, no application is returned in the cluster health chunk based on this filter. 2803 // If the application exists, it is included in the cluster health chunk if it respects the other filter properties. 2804 // If not specified, all applications are matched against the other filter members, like health state filter. 2805 ApplicationNameFilter *string `json:"ApplicationNameFilter,omitempty"` 2806 // ApplicationTypeNameFilter - The name of the application type that matches the filter. 2807 // If specified, the filter is applied only to applications of the selected application type, if any exists. 2808 // If no applications of the specified application type exists, no application is returned in the cluster health chunk based on this filter. 2809 // Each application of the specified application type is included in the cluster health chunk if it respects the other filter properties. 2810 // If not specified, all applications are matched against the other filter members, like health state filter. 2811 ApplicationTypeNameFilter *string `json:"ApplicationTypeNameFilter,omitempty"` 2812 // HealthStateFilter - The filter for the health state of the applications. It allows selecting applications if they match the desired health states. 2813 // The possible values are integer value of one of the following health states. Only applications that match the filter are returned. All applications are used to evaluate the cluster aggregated health state. 2814 // If not specified, default value is None, unless the application name or the application type name are specified. If the filter has default value and application name is specified, the matching application is returned. 2815 // The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. 2816 // For example, if the provided value is 6, it matches applications with HealthState value of OK (2) and Warning (4). 2817 // - Default - Default value. Matches any HealthState. The value is zero. 2818 // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. 2819 // - Ok - Filter that matches input with HealthState value Ok. The value is 2. 2820 // - Warning - Filter that matches input with HealthState value Warning. The value is 4. 2821 // - Error - Filter that matches input with HealthState value Error. The value is 8. 2822 // - All - Filter that matches input with any HealthState value. The value is 65535. 2823 HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` 2824 // ServiceFilters - Defines a list of filters that specify which services to be included in the returned cluster health chunk as children of the application. The services are returned only if the parent application matches a filter. 2825 // If the list is empty, no services are returned. All the services are used to evaluate the parent application aggregated health state, regardless of the input filters. 2826 // The application filter may specify multiple service filters. 2827 // For example, it can specify a filter to return all services with health state Error and another filter to always include a service identified by its service name. 2828 ServiceFilters *[]ServiceHealthStateFilter `json:"ServiceFilters,omitempty"` 2829 // DeployedApplicationFilters - Defines a list of filters that specify which deployed applications to be included in the returned cluster health chunk as children of the application. The deployed applications are returned only if the parent application matches a filter. 2830 // If the list is empty, no deployed applications are returned. All the deployed applications are used to evaluate the parent application aggregated health state, regardless of the input filters. 2831 // The application filter may specify multiple deployed application filters. 2832 // For example, it can specify a filter to return all deployed applications with health state Error and another filter to always include a deployed application on a specified node. 2833 DeployedApplicationFilters *[]DeployedApplicationHealthStateFilter `json:"DeployedApplicationFilters,omitempty"` 2834} 2835 2836// ApplicationInfo information about a Service Fabric application. 2837type ApplicationInfo struct { 2838 autorest.Response `json:"-"` 2839 ID *string `json:"Id,omitempty"` 2840 Name *string `json:"Name,omitempty"` 2841 TypeName *string `json:"TypeName,omitempty"` 2842 TypeVersion *string `json:"TypeVersion,omitempty"` 2843 // Status - Possible values include: 'StatusInvalid', 'StatusReady', 'StatusUpgrading', 'StatusCreating', 'StatusDeleting', 'StatusFailed' 2844 Status Status `json:"Status,omitempty"` 2845 Parameters *[]ApplicationParameter `json:"Parameters,omitempty"` 2846 // HealthState - Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' 2847 HealthState HealthState `json:"HealthState,omitempty"` 2848 // ApplicationDefinitionKind - Possible values include: 'ApplicationDefinitionKindInvalid', 'ApplicationDefinitionKindServiceFabricApplicationDescription', 'ApplicationDefinitionKindCompose' 2849 ApplicationDefinitionKind ApplicationDefinitionKind `json:"ApplicationDefinitionKind,omitempty"` 2850} 2851 2852// ApplicationLoadInfo load Information about a Service Fabric application. 2853type ApplicationLoadInfo struct { 2854 autorest.Response `json:"-"` 2855 ID *string `json:"Id,omitempty"` 2856 // MinimumNodes - The minimum number of nodes for this application. 2857 // It is the number of nodes where Service Fabric will reserve Capacity in the cluster which equals to ReservedLoad * MinimumNodes for this Application instance. 2858 // For applications that do not have application capacity defined this value will be zero. 2859 MinimumNodes *int64 `json:"MinimumNodes,omitempty"` 2860 // MaximumNodes - The maximum number of nodes where this application can be instantiated. 2861 // It is the number of nodes this application is allowed to span. 2862 // For applications that do not have application capacity defined this value will be zero. 2863 MaximumNodes *int64 `json:"MaximumNodes,omitempty"` 2864 // NodeCount - The number of nodes on which this application is instantiated. 2865 // For applications that do not have application capacity defined this value will be zero. 2866 NodeCount *int64 `json:"NodeCount,omitempty"` 2867 ApplicationLoadMetricInformation *[]ApplicationMetricDescription `json:"ApplicationLoadMetricInformation,omitempty"` 2868} 2869 2870// ApplicationMetricDescription describes capacity information for a custom resource balancing metric. This can be 2871// used to limit the total consumption of this metric by the services of this application. 2872type ApplicationMetricDescription struct { 2873 // Name - The name of the metric. 2874 Name *string `json:"Name,omitempty"` 2875 // MaximumCapacity - The maximum node capacity for Service Fabric application. 2876 // This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value. 2877 // If set to zero, capacity for this metric is unlimited on each node. 2878 // When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity. 2879 // When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity. 2880 MaximumCapacity *int64 `json:"MaximumCapacity,omitempty"` 2881 // ReservationCapacity - The node reservation capacity for Service Fabric application. 2882 // This is the amount of load which is reserved on nodes which have instances of this application. 2883 // If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application. 2884 // If set to zero, no capacity is reserved for this metric. 2885 // When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric. 2886 ReservationCapacity *int64 `json:"ReservationCapacity,omitempty"` 2887 // TotalApplicationCapacity - The total metric capacity for Service Fabric application. 2888 // This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value. 2889 // When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value. 2890 TotalApplicationCapacity *int64 `json:"TotalApplicationCapacity,omitempty"` 2891} 2892 2893// ApplicationNameInfo information about the application name. 2894type ApplicationNameInfo struct { 2895 autorest.Response `json:"-"` 2896 ID *string `json:"Id,omitempty"` 2897 Name *string `json:"Name,omitempty"` 2898} 2899 2900// ApplicationParameter describes an application parameter override to be applied when creating or upgrading an 2901// application. 2902type ApplicationParameter struct { 2903 // Key - The name of the parameter. 2904 Key *string `json:"Key,omitempty"` 2905 // Value - The value of the parameter. 2906 Value *string `json:"Value,omitempty"` 2907} 2908 2909// ApplicationsHealthEvaluation represents health evaluation for applications, containing health evaluations for 2910// each unhealthy application that impacted current aggregated health state. 2911type ApplicationsHealthEvaluation struct { 2912 // MaxPercentUnhealthyApplications - Maximum allowed percentage of unhealthy applications from the ClusterHealthPolicy. 2913 MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` 2914 // TotalCount - Total number of applications from the health store. 2915 TotalCount *int64 `json:"TotalCount,omitempty"` 2916 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 2917 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 2918 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 2919 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 2920 Description *string `json:"Description,omitempty"` 2921 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 2922 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 2923} 2924 2925// MarshalJSON is the custom marshaler for ApplicationsHealthEvaluation. 2926func (ahe ApplicationsHealthEvaluation) MarshalJSON() ([]byte, error) { 2927 ahe.Kind = KindApplications 2928 objectMap := make(map[string]interface{}) 2929 if ahe.MaxPercentUnhealthyApplications != nil { 2930 objectMap["MaxPercentUnhealthyApplications"] = ahe.MaxPercentUnhealthyApplications 2931 } 2932 if ahe.TotalCount != nil { 2933 objectMap["TotalCount"] = ahe.TotalCount 2934 } 2935 if ahe.UnhealthyEvaluations != nil { 2936 objectMap["UnhealthyEvaluations"] = ahe.UnhealthyEvaluations 2937 } 2938 if ahe.AggregatedHealthState != "" { 2939 objectMap["AggregatedHealthState"] = ahe.AggregatedHealthState 2940 } 2941 if ahe.Description != nil { 2942 objectMap["Description"] = ahe.Description 2943 } 2944 if ahe.Kind != "" { 2945 objectMap["Kind"] = ahe.Kind 2946 } 2947 return json.Marshal(objectMap) 2948} 2949 2950// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2951func (ahe ApplicationsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 2952 return nil, false 2953} 2954 2955// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2956func (ahe ApplicationsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 2957 return &ahe, true 2958} 2959 2960// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2961func (ahe ApplicationsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 2962 return nil, false 2963} 2964 2965// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2966func (ahe ApplicationsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 2967 return nil, false 2968} 2969 2970// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2971func (ahe ApplicationsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 2972 return nil, false 2973} 2974 2975// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2976func (ahe ApplicationsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 2977 return nil, false 2978} 2979 2980// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2981func (ahe ApplicationsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 2982 return nil, false 2983} 2984 2985// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2986func (ahe ApplicationsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 2987 return nil, false 2988} 2989 2990// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2991func (ahe ApplicationsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 2992 return nil, false 2993} 2994 2995// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 2996func (ahe ApplicationsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 2997 return nil, false 2998} 2999 3000// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3001func (ahe ApplicationsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 3002 return nil, false 3003} 3004 3005// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3006func (ahe ApplicationsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 3007 return nil, false 3008} 3009 3010// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3011func (ahe ApplicationsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 3012 return nil, false 3013} 3014 3015// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3016func (ahe ApplicationsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 3017 return nil, false 3018} 3019 3020// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3021func (ahe ApplicationsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 3022 return nil, false 3023} 3024 3025// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3026func (ahe ApplicationsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 3027 return nil, false 3028} 3029 3030// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3031func (ahe ApplicationsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 3032 return nil, false 3033} 3034 3035// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3036func (ahe ApplicationsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 3037 return nil, false 3038} 3039 3040// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3041func (ahe ApplicationsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 3042 return nil, false 3043} 3044 3045// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3046func (ahe ApplicationsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 3047 return nil, false 3048} 3049 3050// AsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3051func (ahe ApplicationsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 3052 return nil, false 3053} 3054 3055// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. 3056func (ahe ApplicationsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 3057 return &ahe, true 3058} 3059 3060// ApplicationTypeApplicationsHealthEvaluation represents health evaluation for applications of a particular 3061// application type. The application type applications evaluation can be returned when cluster health evaluation 3062// returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each 3063// unhealthy application of the included application type that impacted current aggregated health state. 3064type ApplicationTypeApplicationsHealthEvaluation struct { 3065 ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` 3066 // MaxPercentUnhealthyApplications - Maximum allowed percentage of unhealthy applications for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. 3067 MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` 3068 // TotalCount - Total number of applications of the application type found in the health store. 3069 TotalCount *int64 `json:"TotalCount,omitempty"` 3070 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 3071 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 3072 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 3073 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 3074 Description *string `json:"Description,omitempty"` 3075 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 3076 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 3077} 3078 3079// MarshalJSON is the custom marshaler for ApplicationTypeApplicationsHealthEvaluation. 3080func (atahe ApplicationTypeApplicationsHealthEvaluation) MarshalJSON() ([]byte, error) { 3081 atahe.Kind = KindApplicationTypeApplications 3082 objectMap := make(map[string]interface{}) 3083 if atahe.ApplicationTypeName != nil { 3084 objectMap["ApplicationTypeName"] = atahe.ApplicationTypeName 3085 } 3086 if atahe.MaxPercentUnhealthyApplications != nil { 3087 objectMap["MaxPercentUnhealthyApplications"] = atahe.MaxPercentUnhealthyApplications 3088 } 3089 if atahe.TotalCount != nil { 3090 objectMap["TotalCount"] = atahe.TotalCount 3091 } 3092 if atahe.UnhealthyEvaluations != nil { 3093 objectMap["UnhealthyEvaluations"] = atahe.UnhealthyEvaluations 3094 } 3095 if atahe.AggregatedHealthState != "" { 3096 objectMap["AggregatedHealthState"] = atahe.AggregatedHealthState 3097 } 3098 if atahe.Description != nil { 3099 objectMap["Description"] = atahe.Description 3100 } 3101 if atahe.Kind != "" { 3102 objectMap["Kind"] = atahe.Kind 3103 } 3104 return json.Marshal(objectMap) 3105} 3106 3107// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3108func (atahe ApplicationTypeApplicationsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 3109 return nil, false 3110} 3111 3112// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3113func (atahe ApplicationTypeApplicationsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 3114 return nil, false 3115} 3116 3117// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3118func (atahe ApplicationTypeApplicationsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 3119 return &atahe, true 3120} 3121 3122// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3123func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 3124 return nil, false 3125} 3126 3127// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3128func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 3129 return nil, false 3130} 3131 3132// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3133func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 3134 return nil, false 3135} 3136 3137// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3138func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 3139 return nil, false 3140} 3141 3142// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3143func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 3144 return nil, false 3145} 3146 3147// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3148func (atahe ApplicationTypeApplicationsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 3149 return nil, false 3150} 3151 3152// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3153func (atahe ApplicationTypeApplicationsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 3154 return nil, false 3155} 3156 3157// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3158func (atahe ApplicationTypeApplicationsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 3159 return nil, false 3160} 3161 3162// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3163func (atahe ApplicationTypeApplicationsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 3164 return nil, false 3165} 3166 3167// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3168func (atahe ApplicationTypeApplicationsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 3169 return nil, false 3170} 3171 3172// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3173func (atahe ApplicationTypeApplicationsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 3174 return nil, false 3175} 3176 3177// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3178func (atahe ApplicationTypeApplicationsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 3179 return nil, false 3180} 3181 3182// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3183func (atahe ApplicationTypeApplicationsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 3184 return nil, false 3185} 3186 3187// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3188func (atahe ApplicationTypeApplicationsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 3189 return nil, false 3190} 3191 3192// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3193func (atahe ApplicationTypeApplicationsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 3194 return nil, false 3195} 3196 3197// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3198func (atahe ApplicationTypeApplicationsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 3199 return nil, false 3200} 3201 3202// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3203func (atahe ApplicationTypeApplicationsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 3204 return nil, false 3205} 3206 3207// AsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3208func (atahe ApplicationTypeApplicationsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 3209 return nil, false 3210} 3211 3212// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. 3213func (atahe ApplicationTypeApplicationsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 3214 return &atahe, true 3215} 3216 3217// ApplicationTypeHealthPolicyMapItem defines an item in ApplicationTypeHealthPolicyMap. 3218type ApplicationTypeHealthPolicyMapItem struct { 3219 // Key - The key of the application type health policy map item. This is the name of the application type. 3220 Key *string `json:"Key,omitempty"` 3221 // Value - The value of the application type health policy map item. 3222 // The max percent unhealthy applications allowed for the application type. Must be between zero and 100. 3223 Value *int32 `json:"Value,omitempty"` 3224} 3225 3226// ApplicationTypeImageStorePath path description for the application package in the image store specified during 3227// the prior copy operation. 3228type ApplicationTypeImageStorePath struct { 3229 // ApplicationTypeBuildPath - The relative image store path to the application package. 3230 ApplicationTypeBuildPath *string `json:"ApplicationTypeBuildPath,omitempty"` 3231} 3232 3233// ApplicationTypeImageStoreVersion a version description for the application type 3234type ApplicationTypeImageStoreVersion struct { 3235 ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` 3236} 3237 3238// ApplicationTypeInfo information about an application type. 3239type ApplicationTypeInfo struct { 3240 Name *string `json:"Name,omitempty"` 3241 Version *string `json:"Version,omitempty"` 3242 DefaultParameterList *[]ApplicationParameter `json:"DefaultParameterList,omitempty"` 3243 // Status - Possible values include: 'Status1Invalid', 'Status1Provisioning', 'Status1Available', 'Status1Unprovisioning', 'Status1Failed' 3244 Status Status1 `json:"Status,omitempty"` 3245 StatusDetails *string `json:"StatusDetails,omitempty"` 3246 // ApplicationTypeDefinitionKind - Possible values include: 'ApplicationTypeDefinitionKindInvalid', 'ApplicationTypeDefinitionKindServiceFabricApplicationPackage', 'ApplicationTypeDefinitionKindCompose' 3247 ApplicationTypeDefinitionKind ApplicationTypeDefinitionKind `json:"ApplicationTypeDefinitionKind,omitempty"` 3248} 3249 3250// ApplicationTypeManifest contains the manifest describing an application type registered in a Service Fabric 3251// cluster. 3252type ApplicationTypeManifest struct { 3253 autorest.Response `json:"-"` 3254 // Manifest - The XML manifest as a string. 3255 Manifest *string `json:"Manifest,omitempty"` 3256} 3257 3258// ApplicationUpgradeDescription describes the parameters for an application upgrade. Please note that upgrade 3259// description replaces the existing application description. This means that if the parameters are not specified, 3260// the existing parameters on the applications will be overwritten with the empty parameters list. This would 3261// results in application using the default value of the parameters from the application manifest. If you do not 3262// want to change any existing parameter values, please get the application parameters first using the 3263// GetApplicationInfo query and then supply those values as Parameters in this ApplicationUpgradeDescription. 3264type ApplicationUpgradeDescription struct { 3265 Name *string `json:"Name,omitempty"` 3266 TargetApplicationTypeVersion *string `json:"TargetApplicationTypeVersion,omitempty"` 3267 Parameters *[]ApplicationParameter `json:"Parameters,omitempty"` 3268 // UpgradeKind - Possible values include: 'UpgradeKindInvalid', 'UpgradeKindRolling' 3269 UpgradeKind UpgradeKind `json:"UpgradeKind,omitempty"` 3270 // RollingUpgradeMode - Possible values include: 'RollingUpgradeModeInvalid', 'RollingUpgradeModeUnmonitoredAuto', 'RollingUpgradeModeUnmonitoredManual', 'RollingUpgradeModeMonitored' 3271 RollingUpgradeMode RollingUpgradeMode `json:"RollingUpgradeMode,omitempty"` 3272 UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` 3273 ForceRestart *bool `json:"ForceRestart,omitempty"` 3274 MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` 3275 ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` 3276} 3277 3278// ApplicationUpgradeProgressInfo describes the parameters for an application upgrade. 3279type ApplicationUpgradeProgressInfo struct { 3280 autorest.Response `json:"-"` 3281 Name *string `json:"Name,omitempty"` 3282 TypeName *string `json:"TypeName,omitempty"` 3283 TargetApplicationTypeVersion *string `json:"TargetApplicationTypeVersion,omitempty"` 3284 UpgradeDomains *[]UpgradeDomainInfo `json:"UpgradeDomains,omitempty"` 3285 // UpgradeState - Possible values include: 'UpgradeStateInvalid', 'UpgradeStateRollingBackInProgress', 'UpgradeStateRollingBackCompleted', 'UpgradeStateRollingForwardPending', 'UpgradeStateRollingForwardInProgress', 'UpgradeStateRollingForwardCompleted', 'UpgradeStateFailed' 3286 UpgradeState UpgradeState `json:"UpgradeState,omitempty"` 3287 NextUpgradeDomain *string `json:"NextUpgradeDomain,omitempty"` 3288 // RollingUpgradeMode - Possible values include: 'RollingUpgradeMode1Invalid', 'RollingUpgradeMode1UnmonitoredAuto', 'RollingUpgradeMode1UnmonitoredManual', 'RollingUpgradeMode1Monitored' 3289 RollingUpgradeMode RollingUpgradeMode1 `json:"RollingUpgradeMode,omitempty"` 3290 UpgradeDescription *ApplicationUpgradeDescription `json:"UpgradeDescription,omitempty"` 3291 // UpgradeDurationInMilliseconds - The estimated total amount of time spent processing the overall upgrade. 3292 UpgradeDurationInMilliseconds *string `json:"UpgradeDurationInMilliseconds,omitempty"` 3293 // UpgradeDomainDurationInMilliseconds - The estimated total amount of time spent processing the current upgrade domain. 3294 UpgradeDomainDurationInMilliseconds *string `json:"UpgradeDomainDurationInMilliseconds,omitempty"` 3295 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 3296 CurrentUpgradeDomainProgress *CurrentUpgradeDomainProgressInfo `json:"CurrentUpgradeDomainProgress,omitempty"` 3297 // StartTimestampUtc - The estimated UTC datetime when the upgrade started. 3298 StartTimestampUtc *string `json:"StartTimestampUtc,omitempty"` 3299 // FailureTimestampUtc - The estimated UTC datetime when the upgrade failed and FailureAction was executed. 3300 FailureTimestampUtc *string `json:"FailureTimestampUtc,omitempty"` 3301 // FailureReason - Possible values include: 'None', 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'UpgradeTimeout' 3302 FailureReason FailureReason `json:"FailureReason,omitempty"` 3303 UpgradeDomainProgressAtFailure *FailureUpgradeDomainProgressInfo `json:"UpgradeDomainProgressAtFailure,omitempty"` 3304 // UpgradeStatusDetails - Additional detailed information about the status of the pending upgrade. 3305 UpgradeStatusDetails *string `json:"UpgradeStatusDetails,omitempty"` 3306} 3307 3308// ApplicationUpgradeUpdateDescription describes the parameters for updating an ongoing application upgrade. 3309type ApplicationUpgradeUpdateDescription struct { 3310 Name *string `json:"Name,omitempty"` 3311 // UpgradeKind - Possible values include: 'UpgradeKind6Invalid', 'UpgradeKind6Rolling' 3312 UpgradeKind UpgradeKind6 `json:"UpgradeKind,omitempty"` 3313 ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` 3314 UpdateDescription *RollingUpgradeUpdateDescription `json:"UpdateDescription,omitempty"` 3315} 3316 3317// BinaryPropertyValue describes a Service Fabric property value of type Binary. 3318type BinaryPropertyValue struct { 3319 Data *[]int32 `json:"Data,omitempty"` 3320 // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' 3321 Kind KindBasicPropertyValue `json:"Kind,omitempty"` 3322} 3323 3324// MarshalJSON is the custom marshaler for BinaryPropertyValue. 3325func (bpv BinaryPropertyValue) MarshalJSON() ([]byte, error) { 3326 bpv.Kind = KindBinary 3327 objectMap := make(map[string]interface{}) 3328 if bpv.Data != nil { 3329 objectMap["Data"] = bpv.Data 3330 } 3331 if bpv.Kind != "" { 3332 objectMap["Kind"] = bpv.Kind 3333 } 3334 return json.Marshal(objectMap) 3335} 3336 3337// AsBinaryPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. 3338func (bpv BinaryPropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { 3339 return &bpv, true 3340} 3341 3342// AsInt64PropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. 3343func (bpv BinaryPropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { 3344 return nil, false 3345} 3346 3347// AsDoublePropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. 3348func (bpv BinaryPropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { 3349 return nil, false 3350} 3351 3352// AsStringPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. 3353func (bpv BinaryPropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { 3354 return nil, false 3355} 3356 3357// AsGUIDPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. 3358func (bpv BinaryPropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { 3359 return nil, false 3360} 3361 3362// AsPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. 3363func (bpv BinaryPropertyValue) AsPropertyValue() (*PropertyValue, bool) { 3364 return nil, false 3365} 3366 3367// AsBasicPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. 3368func (bpv BinaryPropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { 3369 return &bpv, true 3370} 3371 3372// ChaosContext describes a map, which is a collection of (string, string) type key-value pairs. The map can be 3373// used to record information about 3374// the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 3375// characters long. 3376// This map is set by the starter of the Chaos run to optionally store the context about the specific run. 3377type ChaosContext struct { 3378 Map interface{} `json:"Map,omitempty"` 3379} 3380 3381// ChaosContextMapItem describes an item in the ChaosContextMap in ChaosParameters. 3382type ChaosContextMapItem struct { 3383 // Key - The key for a ChaosContextMapItem. 3384 Key *string `json:"Key,omitempty"` 3385 // Value - The value for a ChaosContextMapItem. 3386 Value *string `json:"Value,omitempty"` 3387} 3388 3389// BasicChaosEvent represents an event generated during a Chaos run. 3390type BasicChaosEvent interface { 3391 AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) 3392 AsStartedChaosEvent() (*StartedChaosEvent, bool) 3393 AsStoppedChaosEvent() (*StoppedChaosEvent, bool) 3394 AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) 3395 AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) 3396 AsWaitingChaosEvent() (*WaitingChaosEvent, bool) 3397 AsChaosEvent() (*ChaosEvent, bool) 3398} 3399 3400// ChaosEvent represents an event generated during a Chaos run. 3401type ChaosEvent struct { 3402 TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` 3403 // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' 3404 Kind KindBasicChaosEvent `json:"Kind,omitempty"` 3405} 3406 3407func unmarshalBasicChaosEvent(body []byte) (BasicChaosEvent, error) { 3408 var m map[string]interface{} 3409 err := json.Unmarshal(body, &m) 3410 if err != nil { 3411 return nil, err 3412 } 3413 3414 switch m["Kind"] { 3415 case string(KindExecutingFaults): 3416 var efce ExecutingFaultsChaosEvent 3417 err := json.Unmarshal(body, &efce) 3418 return efce, err 3419 case string(KindStarted): 3420 var sce StartedChaosEvent 3421 err := json.Unmarshal(body, &sce) 3422 return sce, err 3423 case string(KindStopped): 3424 var sce StoppedChaosEvent 3425 err := json.Unmarshal(body, &sce) 3426 return sce, err 3427 case string(KindTestError): 3428 var tece TestErrorChaosEvent 3429 err := json.Unmarshal(body, &tece) 3430 return tece, err 3431 case string(KindValidationFailed): 3432 var vfce ValidationFailedChaosEvent 3433 err := json.Unmarshal(body, &vfce) 3434 return vfce, err 3435 case string(KindWaiting): 3436 var wce WaitingChaosEvent 3437 err := json.Unmarshal(body, &wce) 3438 return wce, err 3439 default: 3440 var ce ChaosEvent 3441 err := json.Unmarshal(body, &ce) 3442 return ce, err 3443 } 3444} 3445func unmarshalBasicChaosEventArray(body []byte) ([]BasicChaosEvent, error) { 3446 var rawMessages []*json.RawMessage 3447 err := json.Unmarshal(body, &rawMessages) 3448 if err != nil { 3449 return nil, err 3450 } 3451 3452 ceArray := make([]BasicChaosEvent, len(rawMessages)) 3453 3454 for index, rawMessage := range rawMessages { 3455 ce, err := unmarshalBasicChaosEvent(*rawMessage) 3456 if err != nil { 3457 return nil, err 3458 } 3459 ceArray[index] = ce 3460 } 3461 return ceArray, nil 3462} 3463 3464// MarshalJSON is the custom marshaler for ChaosEvent. 3465func (ce ChaosEvent) MarshalJSON() ([]byte, error) { 3466 ce.Kind = KindChaosEvent 3467 objectMap := make(map[string]interface{}) 3468 if ce.TimeStampUtc != nil { 3469 objectMap["TimeStampUtc"] = ce.TimeStampUtc 3470 } 3471 if ce.Kind != "" { 3472 objectMap["Kind"] = ce.Kind 3473 } 3474 return json.Marshal(objectMap) 3475} 3476 3477// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3478func (ce ChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { 3479 return nil, false 3480} 3481 3482// AsStartedChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3483func (ce ChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { 3484 return nil, false 3485} 3486 3487// AsStoppedChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3488func (ce ChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { 3489 return nil, false 3490} 3491 3492// AsTestErrorChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3493func (ce ChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { 3494 return nil, false 3495} 3496 3497// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3498func (ce ChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { 3499 return nil, false 3500} 3501 3502// AsWaitingChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3503func (ce ChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { 3504 return nil, false 3505} 3506 3507// AsChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3508func (ce ChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { 3509 return &ce, true 3510} 3511 3512// AsBasicChaosEvent is the BasicChaosEvent implementation for ChaosEvent. 3513func (ce ChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { 3514 return &ce, true 3515} 3516 3517// ChaosEventWrapper wrapper object for Chaos event. 3518type ChaosEventWrapper struct { 3519 ChaosEvent BasicChaosEvent `json:"ChaosEvent,omitempty"` 3520} 3521 3522// UnmarshalJSON is the custom unmarshaler for ChaosEventWrapper struct. 3523func (cew *ChaosEventWrapper) UnmarshalJSON(body []byte) error { 3524 var m map[string]*json.RawMessage 3525 err := json.Unmarshal(body, &m) 3526 if err != nil { 3527 return err 3528 } 3529 for k, v := range m { 3530 switch k { 3531 case "ChaosEvent": 3532 if v != nil { 3533 chaosEvent, err := unmarshalBasicChaosEvent(*v) 3534 if err != nil { 3535 return err 3536 } 3537 cew.ChaosEvent = chaosEvent 3538 } 3539 } 3540 } 3541 3542 return nil 3543} 3544 3545// ChaosParameters defines all the parameters to configure a Chaos run. 3546type ChaosParameters struct { 3547 // TimeToRunInSeconds - Total time (in seconds) for which Chaos will run before automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). 3548 TimeToRunInSeconds *string `json:"TimeToRunInSeconds,omitempty"` 3549 // MaxClusterStabilizationTimeoutInSeconds - The maximum amount of time to wait for all cluster entities to become stable and healthy. Chaos executes in iterations and at the start of each iteration it validates the health of cluster entities. 3550 // During validation if a cluster entity is not stable and healthy within MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. 3551 MaxClusterStabilizationTimeoutInSeconds *int64 `json:"MaxClusterStabilizationTimeoutInSeconds,omitempty"` 3552 // MaxConcurrentFaults - MaxConcurrentFaults is the maximum number of concurrent faults induced per iteration. 3553 // Chaos executes in iterations and two consecutive iterations are separated by a validation phase. 3554 // The higher the concurrency, the more aggressive the injection of faults -- inducing more complex series of states to uncover bugs. 3555 // The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. 3556 MaxConcurrentFaults *int64 `json:"MaxConcurrentFaults,omitempty"` 3557 // EnableMoveReplicaFaults - Enables or disables the move primary and move secondary faults. 3558 EnableMoveReplicaFaults *bool `json:"EnableMoveReplicaFaults,omitempty"` 3559 // WaitTimeBetweenFaultsInSeconds - Wait time (in seconds) between consecutive faults within a single iteration. 3560 // The larger the value, the lower the overlapping between faults and the simpler the sequence of state transitions that the cluster goes through. 3561 // The recommendation is to start with a value between 1 and 5 and exercise caution while moving up. 3562 WaitTimeBetweenFaultsInSeconds *int64 `json:"WaitTimeBetweenFaultsInSeconds,omitempty"` 3563 // WaitTimeBetweenIterationsInSeconds - Time-separation (in seconds) between two consecutive iterations of Chaos. 3564 // The larger the value, the lower the fault injection rate. 3565 WaitTimeBetweenIterationsInSeconds *int64 `json:"WaitTimeBetweenIterationsInSeconds,omitempty"` 3566 ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` 3567 Context *ChaosContext `json:"Context,omitempty"` 3568} 3569 3570// ChaosReport contains detailed Chaos report. 3571type ChaosReport struct { 3572 autorest.Response `json:"-"` 3573 ChaosParameters *ChaosParameters `json:"ChaosParameters,omitempty"` 3574 // Status - Current status of the Chaos run. 3575 // - Invalid - Indicates an invalid Chaos status. All Service Fabric enumerations have the invalid type. 3576 // The valus is zero. 3577 // - Running - Indicates that Chaos is not stopped. 3578 // - Stopped - Indicates that Chaos is not scheduling futher faults. Possible values include: 'Status5Invalid', 'Status5Running', 'Status5Stopped' 3579 Status Status5 `json:"Status,omitempty"` 3580 ContinuationToken *string `json:"ContinuationToken,omitempty"` 3581 History *[]ChaosEventWrapper `json:"History,omitempty"` 3582} 3583 3584// CheckExistsPropertyBatchOperation represents a PropertyBatchOperation that compares the Boolean existence of a 3585// property with the Exists argument. The PropertyBatchOperation operation fails if the property's existence is 3586// not equal to the Exists argument. The CheckExistsPropertyBatchOperation is generally used as a precondition for 3587// the write operations in the batch. Note that if one PropertyBatchOperation in a PropertyBatch fails, the 3588// entire batch fails and cannot be committed in a transactional manner. 3589type CheckExistsPropertyBatchOperation struct { 3590 // Exists - Whether or not the property should exist for the operation to pass. 3591 Exists *bool `json:"Exists,omitempty"` 3592 PropertyName *string `json:"PropertyName,omitempty"` 3593 // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' 3594 Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` 3595} 3596 3597// MarshalJSON is the custom marshaler for CheckExistsPropertyBatchOperation. 3598func (cepbo CheckExistsPropertyBatchOperation) MarshalJSON() ([]byte, error) { 3599 cepbo.Kind = KindCheckExists 3600 objectMap := make(map[string]interface{}) 3601 if cepbo.Exists != nil { 3602 objectMap["Exists"] = cepbo.Exists 3603 } 3604 if cepbo.PropertyName != nil { 3605 objectMap["PropertyName"] = cepbo.PropertyName 3606 } 3607 if cepbo.Kind != "" { 3608 objectMap["Kind"] = cepbo.Kind 3609 } 3610 return json.Marshal(objectMap) 3611} 3612 3613// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3614func (cepbo CheckExistsPropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { 3615 return &cepbo, true 3616} 3617 3618// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3619func (cepbo CheckExistsPropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { 3620 return nil, false 3621} 3622 3623// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3624func (cepbo CheckExistsPropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { 3625 return nil, false 3626} 3627 3628// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3629func (cepbo CheckExistsPropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { 3630 return nil, false 3631} 3632 3633// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3634func (cepbo CheckExistsPropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { 3635 return nil, false 3636} 3637 3638// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3639func (cepbo CheckExistsPropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { 3640 return nil, false 3641} 3642 3643// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3644func (cepbo CheckExistsPropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { 3645 return nil, false 3646} 3647 3648// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. 3649func (cepbo CheckExistsPropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { 3650 return &cepbo, true 3651} 3652 3653// CheckSequencePropertyBatchOperation compares the Sequence Number of a property with the SequenceNumber argument. 3654// A property's sequence number can be thought of as that property's version. Every time the property is modified, 3655// its sequence number is increased. The sequence number can be found in a property's metadata. The comparison 3656// fails if the sequence numbers are not equal. CheckSequencePropertyBatchOperation is generally used as a 3657// precondition for the write operations in the batch. Note that if one PropertyBatchOperation in a PropertyBatch 3658// fails, the entire batch fails and cannot be committed in a transactional manner. 3659type CheckSequencePropertyBatchOperation struct { 3660 // SequenceNumber - The expected sequence number. 3661 SequenceNumber *string `json:"SequenceNumber,omitempty"` 3662 PropertyName *string `json:"PropertyName,omitempty"` 3663 // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' 3664 Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` 3665} 3666 3667// MarshalJSON is the custom marshaler for CheckSequencePropertyBatchOperation. 3668func (cspbo CheckSequencePropertyBatchOperation) MarshalJSON() ([]byte, error) { 3669 cspbo.Kind = KindCheckSequence 3670 objectMap := make(map[string]interface{}) 3671 if cspbo.SequenceNumber != nil { 3672 objectMap["SequenceNumber"] = cspbo.SequenceNumber 3673 } 3674 if cspbo.PropertyName != nil { 3675 objectMap["PropertyName"] = cspbo.PropertyName 3676 } 3677 if cspbo.Kind != "" { 3678 objectMap["Kind"] = cspbo.Kind 3679 } 3680 return json.Marshal(objectMap) 3681} 3682 3683// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3684func (cspbo CheckSequencePropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { 3685 return nil, false 3686} 3687 3688// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3689func (cspbo CheckSequencePropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { 3690 return &cspbo, true 3691} 3692 3693// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3694func (cspbo CheckSequencePropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { 3695 return nil, false 3696} 3697 3698// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3699func (cspbo CheckSequencePropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { 3700 return nil, false 3701} 3702 3703// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3704func (cspbo CheckSequencePropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { 3705 return nil, false 3706} 3707 3708// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3709func (cspbo CheckSequencePropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { 3710 return nil, false 3711} 3712 3713// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3714func (cspbo CheckSequencePropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { 3715 return nil, false 3716} 3717 3718// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. 3719func (cspbo CheckSequencePropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { 3720 return &cspbo, true 3721} 3722 3723// CheckValuePropertyBatchOperation represents a PropertyBatchOperation that compares the value of the property 3724// with the expected value. The CheckValuePropertyBatchOperation is generally used as a precondition for the write 3725// operations in the batch. Note that if one PropertyBatchOperation in a PropertyBatch fails, the entire batch 3726// fails and cannot be committed in a transactional manner. 3727type CheckValuePropertyBatchOperation struct { 3728 Value BasicPropertyValue `json:"Value,omitempty"` 3729 PropertyName *string `json:"PropertyName,omitempty"` 3730 // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' 3731 Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` 3732} 3733 3734// MarshalJSON is the custom marshaler for CheckValuePropertyBatchOperation. 3735func (cvpbo CheckValuePropertyBatchOperation) MarshalJSON() ([]byte, error) { 3736 cvpbo.Kind = KindCheckValue 3737 objectMap := make(map[string]interface{}) 3738 objectMap["Value"] = cvpbo.Value 3739 if cvpbo.PropertyName != nil { 3740 objectMap["PropertyName"] = cvpbo.PropertyName 3741 } 3742 if cvpbo.Kind != "" { 3743 objectMap["Kind"] = cvpbo.Kind 3744 } 3745 return json.Marshal(objectMap) 3746} 3747 3748// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3749func (cvpbo CheckValuePropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { 3750 return nil, false 3751} 3752 3753// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3754func (cvpbo CheckValuePropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { 3755 return nil, false 3756} 3757 3758// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3759func (cvpbo CheckValuePropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { 3760 return &cvpbo, true 3761} 3762 3763// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3764func (cvpbo CheckValuePropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { 3765 return nil, false 3766} 3767 3768// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3769func (cvpbo CheckValuePropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { 3770 return nil, false 3771} 3772 3773// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3774func (cvpbo CheckValuePropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { 3775 return nil, false 3776} 3777 3778// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3779func (cvpbo CheckValuePropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { 3780 return nil, false 3781} 3782 3783// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. 3784func (cvpbo CheckValuePropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { 3785 return &cvpbo, true 3786} 3787 3788// UnmarshalJSON is the custom unmarshaler for CheckValuePropertyBatchOperation struct. 3789func (cvpbo *CheckValuePropertyBatchOperation) UnmarshalJSON(body []byte) error { 3790 var m map[string]*json.RawMessage 3791 err := json.Unmarshal(body, &m) 3792 if err != nil { 3793 return err 3794 } 3795 for k, v := range m { 3796 switch k { 3797 case "Value": 3798 if v != nil { 3799 value, err := unmarshalBasicPropertyValue(*v) 3800 if err != nil { 3801 return err 3802 } 3803 cvpbo.Value = value 3804 } 3805 case "PropertyName": 3806 if v != nil { 3807 var propertyName string 3808 err = json.Unmarshal(*v, &propertyName) 3809 if err != nil { 3810 return err 3811 } 3812 cvpbo.PropertyName = &propertyName 3813 } 3814 case "Kind": 3815 if v != nil { 3816 var kind KindBasicPropertyBatchOperation 3817 err = json.Unmarshal(*v, &kind) 3818 if err != nil { 3819 return err 3820 } 3821 cvpbo.Kind = kind 3822 } 3823 } 3824 } 3825 3826 return nil 3827} 3828 3829// ClusterConfiguration information about the standalone cluster configuration. 3830type ClusterConfiguration struct { 3831 autorest.Response `json:"-"` 3832 // ClusterConfiguration - The contents of the cluster configuration file. 3833 ClusterConfiguration *string `json:"ClusterConfiguration,omitempty"` 3834} 3835 3836// ClusterConfigurationUpgradeDescription describes the parameters for a standalone cluster configuration upgrade. 3837type ClusterConfigurationUpgradeDescription struct { 3838 // ClusterConfig - The cluster configuration. 3839 ClusterConfig *string `json:"ClusterConfig,omitempty"` 3840 // HealthCheckRetryTimeout - The length of time between attempts to perform a health checks if the application or cluster is not healthy. 3841 HealthCheckRetryTimeout *string `json:"HealthCheckRetryTimeout,omitempty"` 3842 // HealthCheckWaitDurationInSeconds - The length of time to wait after completing an upgrade domain before starting the health checks process. 3843 HealthCheckWaitDurationInSeconds *string `json:"HealthCheckWaitDurationInSeconds,omitempty"` 3844 // HealthCheckStableDurationInSeconds - The length of time that the application or cluster must remain healthy. 3845 HealthCheckStableDurationInSeconds *string `json:"HealthCheckStableDurationInSeconds,omitempty"` 3846 // UpgradeDomainTimeoutInSeconds - The timeout for the upgrade domain. 3847 UpgradeDomainTimeoutInSeconds *string `json:"UpgradeDomainTimeoutInSeconds,omitempty"` 3848 // UpgradeTimeoutInSeconds - The upgrade timeout. 3849 UpgradeTimeoutInSeconds *string `json:"UpgradeTimeoutInSeconds,omitempty"` 3850 // MaxPercentUnhealthyApplications - The maximum allowed percentage of unhealthy applications during the upgrade. Allowed values are integer values from zero to 100. 3851 MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` 3852 // MaxPercentUnhealthyNodes - The maximum allowed percentage of unhealthy nodes during the upgrade. Allowed values are integer values from zero to 100. 3853 MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` 3854 // MaxPercentDeltaUnhealthyNodes - The maximum allowed percentage of delta health degradation during the upgrade. Allowed values are integer values from zero to 100. 3855 MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` 3856 // MaxPercentUpgradeDomainDeltaUnhealthyNodes - The maximum allowed percentage of upgrade domain delta health degradation during the upgrade. Allowed values are integer values from zero to 100. 3857 MaxPercentUpgradeDomainDeltaUnhealthyNodes *int32 `json:"MaxPercentUpgradeDomainDeltaUnhealthyNodes,omitempty"` 3858} 3859 3860// ClusterConfigurationUpgradeStatusInfo information about a standalone cluster configuration upgrade status. 3861type ClusterConfigurationUpgradeStatusInfo struct { 3862 autorest.Response `json:"-"` 3863 // UpgradeState - Possible values include: 'UpgradeState1Invalid', 'UpgradeState1RollingBackInProgress', 'UpgradeState1RollingBackCompleted', 'UpgradeState1RollingForwardPending', 'UpgradeState1RollingForwardInProgress', 'UpgradeState1RollingForwardCompleted', 'UpgradeState1Failed' 3864 UpgradeState UpgradeState1 `json:"UpgradeState,omitempty"` 3865 // ProgressStatus - The cluster manifest version. 3866 ProgressStatus *int32 `json:"ProgressStatus,omitempty"` 3867 // ConfigVersion - The cluster configuration version. 3868 ConfigVersion *string `json:"ConfigVersion,omitempty"` 3869 // Details - The cluster upgrade status details. 3870 Details *string `json:"Details,omitempty"` 3871} 3872 3873// ClusterHealth represents the health of the cluster. 3874// Contains the cluster aggregated health state, the cluster application and node health states as well as the 3875// health events and the unhealthy evaluations. 3876type ClusterHealth struct { 3877 autorest.Response `json:"-"` 3878 // NodeHealthStates - Cluster node health states as found in the health store. 3879 NodeHealthStates *[]NodeHealthState `json:"NodeHealthStates,omitempty"` 3880 // ApplicationHealthStates - Cluster application health states as found in the health store. 3881 ApplicationHealthStates *[]ApplicationHealthState `json:"ApplicationHealthStates,omitempty"` 3882 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 3883 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 3884 // HealthEvents - The list of health events reported on the entity. 3885 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 3886 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 3887 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 3888} 3889 3890// ClusterHealthChunk represents the health chunk of the cluster. 3891// Contains the cluster aggregated health state, and the cluster entities that respect the input filter. 3892type ClusterHealthChunk struct { 3893 autorest.Response `json:"-"` 3894 // HealthState - Possible values include: 'HealthState1Invalid', 'HealthState1Ok', 'HealthState1Warning', 'HealthState1Error', 'HealthState1Unknown' 3895 HealthState HealthState1 `json:"HealthState,omitempty"` 3896 NodeHealthStateChunks *NodeHealthStateChunkList `json:"NodeHealthStateChunks,omitempty"` 3897 ApplicationHealthStateChunks *ApplicationHealthStateChunkList `json:"ApplicationHealthStateChunks,omitempty"` 3898} 3899 3900// ClusterHealthChunkQueryDescription the cluster health chunk query description, which can specify the health 3901// policies to evaluate cluster health and very expressive filters to select which cluster entities to include in 3902// response. 3903type ClusterHealthChunkQueryDescription struct { 3904 // NodeFilters - Defines a list of filters that specify which nodes to be included in the returned cluster health chunk. 3905 // If no filters are specified, no nodes are returned. All the nodes are used to evaluate the cluster's aggregated health state, regardless of the input filters. 3906 // The cluster health chunk query may specify multiple node filters. 3907 // For example, it can specify a filter to return all nodes with health state Error and another filter to always include a node identified by its NodeName. 3908 NodeFilters *[]NodeHealthStateFilter `json:"NodeFilters,omitempty"` 3909 // ApplicationFilters - Defines a list of filters that specify which applications to be included in the returned cluster health chunk. 3910 // If no filters are specified, no applications are returned. All the applications are used to evaluate the cluster's aggregated health state, regardless of the input filters. 3911 // The cluster health chunk query may specify multiple application filters. 3912 // For example, it can specify a filter to return all applications with health state Error and another filter to always include applications of a specified application type. 3913 ApplicationFilters *[]ApplicationHealthStateFilter `json:"ApplicationFilters,omitempty"` 3914 ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` 3915 ApplicationHealthPolicies *ApplicationHealthPolicies `json:"ApplicationHealthPolicies,omitempty"` 3916} 3917 3918// ClusterHealthPolicies health policies to evaluate cluster health. 3919type ClusterHealthPolicies struct { 3920 ApplicationHealthPolicyMap *[]ApplicationHealthPolicyMapItem `json:"ApplicationHealthPolicyMap,omitempty"` 3921 ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` 3922} 3923 3924// ClusterHealthPolicy defines a health policy used to evaluate the health of the cluster or of a cluster node. 3925type ClusterHealthPolicy struct { 3926 // ConsiderWarningAsError - Indicates whether warnings are treated with the same severity as errors. 3927 ConsiderWarningAsError *bool `json:"ConsiderWarningAsError,omitempty"` 3928 // MaxPercentUnhealthyNodes - The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. 3929 // The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error. 3930 // If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. 3931 // The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster. 3932 // The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. 3933 // In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. 3934 MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` 3935 // MaxPercentUnhealthyApplications - The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. 3936 // The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. 3937 // If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. 3938 // This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. 3939 // The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. 3940 MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` 3941 ApplicationTypeHealthPolicyMap *[]ApplicationTypeHealthPolicyMapItem `json:"ApplicationTypeHealthPolicyMap,omitempty"` 3942} 3943 3944// ClusterManifest information about the cluster manifest. 3945type ClusterManifest struct { 3946 autorest.Response `json:"-"` 3947 // Manifest - The contents of the cluster manifest file. 3948 Manifest *string `json:"Manifest,omitempty"` 3949} 3950 3951// ClusterUpgradeDescriptionObject represents a ServiceFabric cluster upgrade 3952type ClusterUpgradeDescriptionObject struct { 3953 ConfigVersion *string `json:"ConfigVersion,omitempty"` 3954 CodeVersion *string `json:"CodeVersion,omitempty"` 3955 // UpgradeKind - Possible values include: 'UpgradeKind3Invalid', 'UpgradeKind3Rolling' 3956 UpgradeKind UpgradeKind3 `json:"UpgradeKind,omitempty"` 3957 // RollingUpgradeMode - Possible values include: 'RollingUpgradeMode4Invalid', 'RollingUpgradeMode4UnmonitoredAuto', 'RollingUpgradeMode4UnmonitoredManual', 'RollingUpgradeMode4Monitored' 3958 RollingUpgradeMode RollingUpgradeMode4 `json:"RollingUpgradeMode,omitempty"` 3959 UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` 3960 ForceRestart *bool `json:"ForceRestart,omitempty"` 3961 EnableDeltaHealthEvaluation *bool `json:"EnableDeltaHealthEvaluation,omitempty"` 3962 MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` 3963 ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` 3964 ClusterUpgradeHealthPolicy *ClusterUpgradeHealthPolicyObject `json:"ClusterUpgradeHealthPolicy,omitempty"` 3965 ApplicationHealthPolicyMap *[]ApplicationHealthPolicyMapItem `json:"ApplicationHealthPolicyMap,omitempty"` 3966} 3967 3968// ClusterUpgradeHealthPolicyObject defines a health policy used to evaluate the health of the cluster during a 3969// cluster upgrade. 3970type ClusterUpgradeHealthPolicyObject struct { 3971 // MaxPercentDeltaUnhealthyNodes - The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. The default value is 10%. 3972 MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` 3973 // MaxPercentUpgradeDomainDeltaUnhealthyNodes - The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. The default value is 15%. 3974 MaxPercentUpgradeDomainDeltaUnhealthyNodes *int32 `json:"MaxPercentUpgradeDomainDeltaUnhealthyNodes,omitempty"` 3975} 3976 3977// ClusterUpgradeProgressObject information about a cluster upgrade. 3978type ClusterUpgradeProgressObject struct { 3979 autorest.Response `json:"-"` 3980 CodeVersion *string `json:"CodeVersion,omitempty"` 3981 ConfigVersion *string `json:"ConfigVersion,omitempty"` 3982 UpgradeDomains *[]UpgradeDomainInfo `json:"UpgradeDomains,omitempty"` 3983 // UpgradeState - Possible values include: 'UpgradeState2Invalid', 'UpgradeState2RollingBackInProgress', 'UpgradeState2RollingBackCompleted', 'UpgradeState2RollingForwardPending', 'UpgradeState2RollingForwardInProgress', 'UpgradeState2RollingForwardCompleted', 'UpgradeState2Failed' 3984 UpgradeState UpgradeState2 `json:"UpgradeState,omitempty"` 3985 NextUpgradeDomain *string `json:"NextUpgradeDomain,omitempty"` 3986 // RollingUpgradeMode - Possible values include: 'RollingUpgradeMode5Invalid', 'RollingUpgradeMode5UnmonitoredAuto', 'RollingUpgradeMode5UnmonitoredManual', 'RollingUpgradeMode5Monitored' 3987 RollingUpgradeMode RollingUpgradeMode5 `json:"RollingUpgradeMode,omitempty"` 3988 UpgradeDescription *ClusterUpgradeDescriptionObject `json:"UpgradeDescription,omitempty"` 3989 UpgradeDurationInMilliseconds *string `json:"UpgradeDurationInMilliseconds,omitempty"` 3990 UpgradeDomainDurationInMilliseconds *string `json:"UpgradeDomainDurationInMilliseconds,omitempty"` 3991 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 3992 CurrentUpgradeDomainProgress *CurrentUpgradeDomainProgressInfo `json:"CurrentUpgradeDomainProgress,omitempty"` 3993 StartTimestampUtc *string `json:"StartTimestampUtc,omitempty"` 3994 FailureTimestampUtc *string `json:"FailureTimestampUtc,omitempty"` 3995 // FailureReason - Possible values include: 'FailureReason1None', 'FailureReason1Interrupted', 'FailureReason1HealthCheck', 'FailureReason1UpgradeDomainTimeout', 'FailureReason1UpgradeTimeout' 3996 FailureReason FailureReason1 `json:"FailureReason,omitempty"` 3997 UpgradeDomainProgressAtFailure *FailedUpgradeDomainProgressObject `json:"UpgradeDomainProgressAtFailure,omitempty"` 3998} 3999 4000// CodePackageEntryPoint information about setup or main entry point of a code package deployed on a Service Fabric 4001// node. 4002type CodePackageEntryPoint struct { 4003 // EntryPointLocation - The location of entry point executable on the node. 4004 EntryPointLocation *string `json:"EntryPointLocation,omitempty"` 4005 // ProcessID - The process id of the entry point. 4006 ProcessID *string `json:"ProcessId,omitempty"` 4007 // RunAsUserName - The user name under which entry point executable is run on the node. 4008 RunAsUserName *string `json:"RunAsUserName,omitempty"` 4009 CodePackageEntryPointStatistics *CodePackageEntryPointStatistics `json:"CodePackageEntryPointStatistics,omitempty"` 4010 // Status - Possible values include: 'Status3Invalid', 'Status3Pending', 'Status3Starting', 'Status3Started', 'Status3Stopping', 'Status3Stopped' 4011 Status Status3 `json:"Status,omitempty"` 4012 // NextActivationTime - The time (in UTC) when the entry point executable will be run next. 4013 NextActivationTime *date.Time `json:"NextActivationTime,omitempty"` 4014 InstanceID *string `json:"InstanceId,omitempty"` 4015} 4016 4017// CodePackageEntryPointStatistics statistics about setup or main entry point of a code package deployed on a 4018// Service Fabric node. 4019type CodePackageEntryPointStatistics struct { 4020 // LastExitCode - The last exit code of the entry point. 4021 LastExitCode *string `json:"LastExitCode,omitempty"` 4022 // LastActivationTime - The last time (in UTC) when Service Fabric attempted to run the entry point. 4023 LastActivationTime *date.Time `json:"LastActivationTime,omitempty"` 4024 // LastExitTime - The last time (in UTC) when the entry point finished running. 4025 LastExitTime *date.Time `json:"LastExitTime,omitempty"` 4026 // LastSuccessfulActivationTime - The last time (in UTC) when the entry point ran successfully. 4027 LastSuccessfulActivationTime *date.Time `json:"LastSuccessfulActivationTime,omitempty"` 4028 // LastSuccessfulExitTime - The last time (in UTC) when the entry point finished running gracefully. 4029 LastSuccessfulExitTime *date.Time `json:"LastSuccessfulExitTime,omitempty"` 4030 // ActivationCount - Number of times the entry point has run. 4031 ActivationCount *string `json:"ActivationCount,omitempty"` 4032 // ActivationFailureCount - Number of times the entry point failed to run. 4033 ActivationFailureCount *string `json:"ActivationFailureCount,omitempty"` 4034 // ContinuousActivationFailureCount - Number of times the entry point continuously failed to run. 4035 ContinuousActivationFailureCount *string `json:"ContinuousActivationFailureCount,omitempty"` 4036 // ExitCount - Number of times the entry point finished running. 4037 ExitCount *string `json:"ExitCount,omitempty"` 4038 // ExitFailureCount - Number of times the entry point failed to exit gracefully. 4039 ExitFailureCount *string `json:"ExitFailureCount,omitempty"` 4040 // ContinuousExitFailureCount - Number of times the entry point continuously failed to exit gracefully. 4041 ContinuousExitFailureCount *string `json:"ContinuousExitFailureCount,omitempty"` 4042} 4043 4044// ComposeDeploymentStatusInfo information about a Service Fabric compose deployment. 4045type ComposeDeploymentStatusInfo struct { 4046 autorest.Response `json:"-"` 4047 Name *string `json:"Name,omitempty"` 4048 ApplicationName *string `json:"ApplicationName,omitempty"` 4049 // Status - Possible values include: 'Status6Invalid', 'Status6Provisioning', 'Status6Creating', 'Status6Ready', 'Status6Unprovisioning', 'Status6Deleting', 'Status6Failed', 'Status6Upgrading' 4050 Status Status6 `json:"Status,omitempty"` 4051 // StatusDetails - The status details of compose deployment including failure message. 4052 StatusDetails *string `json:"StatusDetails,omitempty"` 4053} 4054 4055// ComposeDeploymentUpgradeDescription describes the parameters for a compose deployment upgrade. 4056type ComposeDeploymentUpgradeDescription struct { 4057 DeploymentName *string `json:"DeploymentName,omitempty"` 4058 // ComposeFileContent - The content of the compose file that describes the deployment to create. 4059 ComposeFileContent *string `json:"ComposeFileContent,omitempty"` 4060 RegistryCredential *RegistryCredential `json:"RegistryCredential,omitempty"` 4061 // UpgradeKind - Possible values include: 'UpgradeKind4Invalid', 'UpgradeKind4Rolling' 4062 UpgradeKind UpgradeKind4 `json:"UpgradeKind,omitempty"` 4063 // RollingUpgradeMode - Possible values include: 'RollingUpgradeMode6Invalid', 'RollingUpgradeMode6UnmonitoredAuto', 'RollingUpgradeMode6UnmonitoredManual', 'RollingUpgradeMode6Monitored' 4064 RollingUpgradeMode RollingUpgradeMode6 `json:"RollingUpgradeMode,omitempty"` 4065 UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` 4066 ForceRestart *bool `json:"ForceRestart,omitempty"` 4067 MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` 4068 ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` 4069} 4070 4071// ComposeDeploymentUpgradeProgressInfo describes the parameters for a compose deployment upgrade. 4072type ComposeDeploymentUpgradeProgressInfo struct { 4073 autorest.Response `json:"-"` 4074 DeploymentName *string `json:"DeploymentName,omitempty"` 4075 ApplicationName *string `json:"ApplicationName,omitempty"` 4076 // UpgradeState - Possible values include: 'UpgradeState3Invalid', 'UpgradeState3ProvisioningTarget', 'UpgradeState3RollingForwardInProgress', 'UpgradeState3RollingForwardPending', 'UpgradeState3UnprovisioningCurrent', 'UpgradeState3RollingForwardCompleted', 'UpgradeState3RollingBackInProgress', 'UpgradeState3UnprovisioningTarget', 'UpgradeState3RollingBackCompleted', 'UpgradeState3Failed' 4077 UpgradeState UpgradeState3 `json:"UpgradeState,omitempty"` 4078 UpgradeStatusDetails *string `json:"UpgradeStatusDetails,omitempty"` 4079 // UpgradeKind - Possible values include: 'UpgradeKind5Invalid', 'UpgradeKind5Rolling' 4080 UpgradeKind UpgradeKind5 `json:"UpgradeKind,omitempty"` 4081 // RollingUpgradeMode - Possible values include: 'RollingUpgradeMode7Invalid', 'RollingUpgradeMode7UnmonitoredAuto', 'RollingUpgradeMode7UnmonitoredManual', 'RollingUpgradeMode7Monitored' 4082 RollingUpgradeMode RollingUpgradeMode7 `json:"RollingUpgradeMode,omitempty"` 4083 ForceRestart *bool `json:"ForceRestart,omitempty"` 4084 UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` 4085 MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` 4086 ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` 4087 TargetApplicationTypeVersion *string `json:"TargetApplicationTypeVersion,omitempty"` 4088 UpgradeDuration *string `json:"UpgradeDuration,omitempty"` 4089 CurrentUpgradeDomainDuration *string `json:"CurrentUpgradeDomainDuration,omitempty"` 4090 ApplicationUnhealthyEvaluations *[]HealthEvaluationWrapper `json:"ApplicationUnhealthyEvaluations,omitempty"` 4091 CurrentUpgradeDomainProgress *CurrentUpgradeDomainProgressInfo `json:"CurrentUpgradeDomainProgress,omitempty"` 4092 StartTimestampUtc *string `json:"StartTimestampUtc,omitempty"` 4093 FailureTimestampUtc *string `json:"FailureTimestampUtc,omitempty"` 4094 // FailureReason - Possible values include: 'FailureReason2None', 'FailureReason2Interrupted', 'FailureReason2HealthCheck', 'FailureReason2UpgradeDomainTimeout', 'FailureReason2UpgradeTimeout' 4095 FailureReason FailureReason2 `json:"FailureReason,omitempty"` 4096 UpgradeDomainProgressAtFailure *FailureUpgradeDomainProgressInfo `json:"UpgradeDomainProgressAtFailure,omitempty"` 4097 ApplicationUpgradeStatusDetails *string `json:"ApplicationUpgradeStatusDetails,omitempty"` 4098} 4099 4100// CreateComposeDeploymentDescription defines description for creating a Service Fabric compose deployment. 4101type CreateComposeDeploymentDescription struct { 4102 DeploymentName *string `json:"DeploymentName,omitempty"` 4103 // ComposeFileContent - The content of the compose file that describes the deployment to create. 4104 ComposeFileContent *string `json:"ComposeFileContent,omitempty"` 4105 RegistryCredential *RegistryCredential `json:"RegistryCredential,omitempty"` 4106} 4107 4108// CurrentUpgradeDomainProgressInfo information about the current in-progress upgrade domain. 4109type CurrentUpgradeDomainProgressInfo struct { 4110 DomainName *string `json:"DomainName,omitempty"` 4111 NodeUpgradeProgressList *[]NodeUpgradeProgressInfo `json:"NodeUpgradeProgressList,omitempty"` 4112} 4113 4114// DeactivationIntentDescription describes the intent or reason for deactivating the node. 4115type DeactivationIntentDescription struct { 4116 // DeactivationIntent - Describes the intent or reason for deactivating the node. The possible values are following. 4117 // - Pause - Indicates that the node should be paused. The value is 1. 4118 // - Restart - Indicates that the intent is for the node to be restarted after a short period of time. The value is 2. 4119 // - RemoveData - Indicates the intent is for the node to remove data. The value is 3. 4120 // . Possible values include: 'Pause', 'Restart', 'RemoveData' 4121 DeactivationIntent DeactivationIntent `json:"DeactivationIntent,omitempty"` 4122} 4123 4124// DeletePropertyBatchOperation represents a PropertyBatchOperation that deletes a specified property if it exists. 4125// Note that if one PropertyBatchOperation in a PropertyBatch fails, the entire batch fails and cannot be 4126// committed in a transactional manner. 4127type DeletePropertyBatchOperation struct { 4128 PropertyName *string `json:"PropertyName,omitempty"` 4129 // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' 4130 Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` 4131} 4132 4133// MarshalJSON is the custom marshaler for DeletePropertyBatchOperation. 4134func (dpbo DeletePropertyBatchOperation) MarshalJSON() ([]byte, error) { 4135 dpbo.Kind = KindDelete 4136 objectMap := make(map[string]interface{}) 4137 if dpbo.PropertyName != nil { 4138 objectMap["PropertyName"] = dpbo.PropertyName 4139 } 4140 if dpbo.Kind != "" { 4141 objectMap["Kind"] = dpbo.Kind 4142 } 4143 return json.Marshal(objectMap) 4144} 4145 4146// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4147func (dpbo DeletePropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { 4148 return nil, false 4149} 4150 4151// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4152func (dpbo DeletePropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { 4153 return nil, false 4154} 4155 4156// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4157func (dpbo DeletePropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { 4158 return nil, false 4159} 4160 4161// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4162func (dpbo DeletePropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { 4163 return &dpbo, true 4164} 4165 4166// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4167func (dpbo DeletePropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { 4168 return nil, false 4169} 4170 4171// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4172func (dpbo DeletePropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { 4173 return nil, false 4174} 4175 4176// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4177func (dpbo DeletePropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { 4178 return nil, false 4179} 4180 4181// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. 4182func (dpbo DeletePropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { 4183 return &dpbo, true 4184} 4185 4186// DeltaNodesCheckHealthEvaluation represents health evaluation for delta nodes, containing health evaluations for 4187// each unhealthy node that impacted current aggregated health state. 4188// Can be returned during cluster upgrade when the aggregated health state of the cluster is Warning or Error. 4189type DeltaNodesCheckHealthEvaluation struct { 4190 // BaselineErrorCount - Number of nodes with aggregated heath state Error in the health store at the beginning of the cluster upgrade. 4191 BaselineErrorCount *int64 `json:"BaselineErrorCount,omitempty"` 4192 // BaselineTotalCount - Total number of nodes in the health store at the beginning of the cluster upgrade. 4193 BaselineTotalCount *int64 `json:"BaselineTotalCount,omitempty"` 4194 // MaxPercentDeltaUnhealthyNodes - Maximum allowed percentage of delta unhealthy nodes from the ClusterUpgradeHealthPolicy. 4195 MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` 4196 // TotalCount - Total number of nodes in the health store. 4197 TotalCount *int64 `json:"TotalCount,omitempty"` 4198 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 4199 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 4200 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 4201 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 4202 Description *string `json:"Description,omitempty"` 4203 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 4204 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 4205} 4206 4207// MarshalJSON is the custom marshaler for DeltaNodesCheckHealthEvaluation. 4208func (dnche DeltaNodesCheckHealthEvaluation) MarshalJSON() ([]byte, error) { 4209 dnche.Kind = KindDeltaNodesCheck 4210 objectMap := make(map[string]interface{}) 4211 if dnche.BaselineErrorCount != nil { 4212 objectMap["BaselineErrorCount"] = dnche.BaselineErrorCount 4213 } 4214 if dnche.BaselineTotalCount != nil { 4215 objectMap["BaselineTotalCount"] = dnche.BaselineTotalCount 4216 } 4217 if dnche.MaxPercentDeltaUnhealthyNodes != nil { 4218 objectMap["MaxPercentDeltaUnhealthyNodes"] = dnche.MaxPercentDeltaUnhealthyNodes 4219 } 4220 if dnche.TotalCount != nil { 4221 objectMap["TotalCount"] = dnche.TotalCount 4222 } 4223 if dnche.UnhealthyEvaluations != nil { 4224 objectMap["UnhealthyEvaluations"] = dnche.UnhealthyEvaluations 4225 } 4226 if dnche.AggregatedHealthState != "" { 4227 objectMap["AggregatedHealthState"] = dnche.AggregatedHealthState 4228 } 4229 if dnche.Description != nil { 4230 objectMap["Description"] = dnche.Description 4231 } 4232 if dnche.Kind != "" { 4233 objectMap["Kind"] = dnche.Kind 4234 } 4235 return json.Marshal(objectMap) 4236} 4237 4238// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4239func (dnche DeltaNodesCheckHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 4240 return nil, false 4241} 4242 4243// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4244func (dnche DeltaNodesCheckHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 4245 return nil, false 4246} 4247 4248// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4249func (dnche DeltaNodesCheckHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 4250 return nil, false 4251} 4252 4253// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4254func (dnche DeltaNodesCheckHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 4255 return &dnche, true 4256} 4257 4258// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4259func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 4260 return nil, false 4261} 4262 4263// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4264func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 4265 return nil, false 4266} 4267 4268// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4269func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 4270 return nil, false 4271} 4272 4273// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4274func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 4275 return nil, false 4276} 4277 4278// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4279func (dnche DeltaNodesCheckHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 4280 return nil, false 4281} 4282 4283// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4284func (dnche DeltaNodesCheckHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 4285 return nil, false 4286} 4287 4288// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4289func (dnche DeltaNodesCheckHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 4290 return nil, false 4291} 4292 4293// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4294func (dnche DeltaNodesCheckHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 4295 return nil, false 4296} 4297 4298// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4299func (dnche DeltaNodesCheckHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 4300 return nil, false 4301} 4302 4303// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4304func (dnche DeltaNodesCheckHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 4305 return nil, false 4306} 4307 4308// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4309func (dnche DeltaNodesCheckHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 4310 return nil, false 4311} 4312 4313// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4314func (dnche DeltaNodesCheckHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 4315 return nil, false 4316} 4317 4318// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4319func (dnche DeltaNodesCheckHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 4320 return nil, false 4321} 4322 4323// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4324func (dnche DeltaNodesCheckHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 4325 return nil, false 4326} 4327 4328// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4329func (dnche DeltaNodesCheckHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 4330 return nil, false 4331} 4332 4333// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4334func (dnche DeltaNodesCheckHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 4335 return nil, false 4336} 4337 4338// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4339func (dnche DeltaNodesCheckHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 4340 return nil, false 4341} 4342 4343// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. 4344func (dnche DeltaNodesCheckHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 4345 return &dnche, true 4346} 4347 4348// DeployedApplicationHealth information about the health of an application deployed on a Service Fabric node. 4349type DeployedApplicationHealth struct { 4350 autorest.Response `json:"-"` 4351 Name *string `json:"Name,omitempty"` 4352 NodeName *string `json:"NodeName,omitempty"` 4353 DeployedServicePackageHealthStates *[]DeployedServicePackageHealthState `json:"DeployedServicePackageHealthStates,omitempty"` 4354 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 4355 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 4356 // HealthEvents - The list of health events reported on the entity. 4357 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 4358 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 4359 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 4360} 4361 4362// DeployedApplicationHealthEvaluation represents health evaluation for a deployed application, containing 4363// information about the data and the algorithm used by the health store to evaluate health. 4364type DeployedApplicationHealthEvaluation struct { 4365 NodeName *string `json:"NodeName,omitempty"` 4366 ApplicationName *string `json:"ApplicationName,omitempty"` 4367 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 4368 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 4369 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 4370 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 4371 Description *string `json:"Description,omitempty"` 4372 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 4373 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 4374} 4375 4376// MarshalJSON is the custom marshaler for DeployedApplicationHealthEvaluation. 4377func (dahe DeployedApplicationHealthEvaluation) MarshalJSON() ([]byte, error) { 4378 dahe.Kind = KindDeployedApplication 4379 objectMap := make(map[string]interface{}) 4380 if dahe.NodeName != nil { 4381 objectMap["NodeName"] = dahe.NodeName 4382 } 4383 if dahe.ApplicationName != nil { 4384 objectMap["ApplicationName"] = dahe.ApplicationName 4385 } 4386 if dahe.UnhealthyEvaluations != nil { 4387 objectMap["UnhealthyEvaluations"] = dahe.UnhealthyEvaluations 4388 } 4389 if dahe.AggregatedHealthState != "" { 4390 objectMap["AggregatedHealthState"] = dahe.AggregatedHealthState 4391 } 4392 if dahe.Description != nil { 4393 objectMap["Description"] = dahe.Description 4394 } 4395 if dahe.Kind != "" { 4396 objectMap["Kind"] = dahe.Kind 4397 } 4398 return json.Marshal(objectMap) 4399} 4400 4401// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4402func (dahe DeployedApplicationHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 4403 return nil, false 4404} 4405 4406// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4407func (dahe DeployedApplicationHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 4408 return nil, false 4409} 4410 4411// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4412func (dahe DeployedApplicationHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 4413 return nil, false 4414} 4415 4416// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4417func (dahe DeployedApplicationHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 4418 return nil, false 4419} 4420 4421// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4422func (dahe DeployedApplicationHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 4423 return &dahe, true 4424} 4425 4426// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4427func (dahe DeployedApplicationHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 4428 return nil, false 4429} 4430 4431// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4432func (dahe DeployedApplicationHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 4433 return nil, false 4434} 4435 4436// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4437func (dahe DeployedApplicationHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 4438 return nil, false 4439} 4440 4441// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4442func (dahe DeployedApplicationHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 4443 return nil, false 4444} 4445 4446// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4447func (dahe DeployedApplicationHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 4448 return nil, false 4449} 4450 4451// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4452func (dahe DeployedApplicationHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 4453 return nil, false 4454} 4455 4456// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4457func (dahe DeployedApplicationHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 4458 return nil, false 4459} 4460 4461// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4462func (dahe DeployedApplicationHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 4463 return nil, false 4464} 4465 4466// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4467func (dahe DeployedApplicationHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 4468 return nil, false 4469} 4470 4471// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4472func (dahe DeployedApplicationHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 4473 return nil, false 4474} 4475 4476// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4477func (dahe DeployedApplicationHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 4478 return nil, false 4479} 4480 4481// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4482func (dahe DeployedApplicationHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 4483 return nil, false 4484} 4485 4486// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4487func (dahe DeployedApplicationHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 4488 return nil, false 4489} 4490 4491// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4492func (dahe DeployedApplicationHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 4493 return nil, false 4494} 4495 4496// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4497func (dahe DeployedApplicationHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 4498 return nil, false 4499} 4500 4501// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4502func (dahe DeployedApplicationHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 4503 return nil, false 4504} 4505 4506// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. 4507func (dahe DeployedApplicationHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 4508 return &dahe, true 4509} 4510 4511// DeployedApplicationHealthState represents the health state of a deployed application, which contains the entity 4512// identifier and the aggregated health state. 4513type DeployedApplicationHealthState struct { 4514 NodeName *string `json:"NodeName,omitempty"` 4515 ApplicationName *string `json:"ApplicationName,omitempty"` 4516 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 4517 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 4518} 4519 4520// DeployedApplicationHealthStateChunk represents the health state chunk of a deployed application, which contains 4521// the node where the application is deployed, the aggregated health state and any deployed service packages that 4522// respect the chunk query description filters. 4523type DeployedApplicationHealthStateChunk struct { 4524 // NodeName - The name of node where the application is deployed. 4525 NodeName *string `json:"NodeName,omitempty"` 4526 DeployedServicePackageHealthStateChunks *DeployedServicePackageHealthStateChunkList `json:"DeployedServicePackageHealthStateChunks,omitempty"` 4527 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 4528 HealthState HealthState2 `json:"HealthState,omitempty"` 4529} 4530 4531// DeployedApplicationHealthStateChunkList the list of deployed application health state chunks that respect the 4532// input filters in the chunk query. Returned by get cluster health state chunks query. 4533type DeployedApplicationHealthStateChunkList struct { 4534 // Items - The list of deployed application health state chunks that respect the input filters in the chunk query. 4535 Items *[]DeployedApplicationHealthStateChunk `json:"Items,omitempty"` 4536} 4537 4538// DeployedApplicationHealthStateFilter defines matching criteria to determine whether a deployed application 4539// should be included as a child of an application in the cluster health chunk. 4540// The deployed applications are only returned if the parent application matches a filter specified in the cluster 4541// health chunk query description. 4542// One filter can match zero, one or multiple deployed applications, depending on its properties. 4543type DeployedApplicationHealthStateFilter struct { 4544 // NodeNameFilter - The name of the node where the application is deployed in order to match the filter. 4545 // If specified, the filter is applied only to the application deployed on the specified node. 4546 // If the application is not deployed on the node with the specified name, no deployed application is returned in the cluster health chunk based on this filter. 4547 // Otherwise, the deployed application is included in the cluster health chunk if it respects the other filter properties. 4548 // If not specified, all deployed applications that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. 4549 NodeNameFilter *string `json:"NodeNameFilter,omitempty"` 4550 // HealthStateFilter - The filter for the health state of the deployed applications. It allows selecting deployed applications if they match the desired health states. 4551 // The possible values are integer value of one of the following health states. Only deployed applications that match the filter are returned. All deployed applications are used to evaluate the cluster aggregated health state. 4552 // If not specified, default value is None, unless the node name is specified. If the filter has default value and node name is specified, the matching deployed application is returned. 4553 // The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. 4554 // For example, if the provided value is 6, it matches deployed applications with HealthState value of OK (2) and Warning (4). 4555 // - Default - Default value. Matches any HealthState. The value is zero. 4556 // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. 4557 // - Ok - Filter that matches input with HealthState value Ok. The value is 2. 4558 // - Warning - Filter that matches input with HealthState value Warning. The value is 4. 4559 // - Error - Filter that matches input with HealthState value Error. The value is 8. 4560 // - All - Filter that matches input with any HealthState value. The value is 65535. 4561 HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` 4562 // DeployedServicePackageFilters - Defines a list of filters that specify which deployed service packages to be included in the returned cluster health chunk as children of the parent deployed application. The deployed service packages are returned only if the parent deployed application matches a filter. 4563 // If the list is empty, no deployed service packages are returned. All the deployed service packages are used to evaluate the parent deployed application aggregated health state, regardless of the input filters. 4564 // The deployed application filter may specify multiple deployed service package filters. 4565 // For example, it can specify a filter to return all deployed service packages with health state Error and another filter to always include a deployed service package on a node. 4566 DeployedServicePackageFilters *[]DeployedServicePackageHealthStateFilter `json:"DeployedServicePackageFilters,omitempty"` 4567} 4568 4569// DeployedApplicationInfo information about application deployed on the node. 4570type DeployedApplicationInfo struct { 4571 autorest.Response `json:"-"` 4572 ID *string `json:"Id,omitempty"` 4573 Name *string `json:"Name,omitempty"` 4574 TypeName *string `json:"TypeName,omitempty"` 4575 // Status - Possible values include: 'Status2Invalid', 'Status2Downloading', 'Status2Activating', 'Status2Active', 'Status2Upgrading', 'Status2Deactivating' 4576 Status Status2 `json:"Status,omitempty"` 4577 // WorkDirectory - The work directory of the application on the node. The work directory can be used to store application data. 4578 WorkDirectory *string `json:"WorkDirectory,omitempty"` 4579 // LogDirectory - The log directory of the application on the node. The log directory can be used to store application logs. 4580 LogDirectory *string `json:"LogDirectory,omitempty"` 4581 // TempDirectory - The temp directory of the application on the node. The code packages belonging to the application are forked with this directory set as their temporary directory. 4582 TempDirectory *string `json:"TempDirectory,omitempty"` 4583} 4584 4585// DeployedApplicationsHealthEvaluation represents health evaluation for deployed applications, containing health 4586// evaluations for each unhealthy deployed application that impacted current aggregated health state. 4587// Can be returned when evaluating application health and the aggregated health state is either Error or Warning. 4588type DeployedApplicationsHealthEvaluation struct { 4589 // MaxPercentUnhealthyDeployedApplications - Maximum allowed percentage of unhealthy deployed applications from the ApplicationHealthPolicy. 4590 MaxPercentUnhealthyDeployedApplications *int32 `json:"MaxPercentUnhealthyDeployedApplications,omitempty"` 4591 // TotalCount - Total number of deployed applications of the application in the health store. 4592 TotalCount *int64 `json:"TotalCount,omitempty"` 4593 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 4594 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 4595 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 4596 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 4597 Description *string `json:"Description,omitempty"` 4598 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 4599 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 4600} 4601 4602// MarshalJSON is the custom marshaler for DeployedApplicationsHealthEvaluation. 4603func (dahe DeployedApplicationsHealthEvaluation) MarshalJSON() ([]byte, error) { 4604 dahe.Kind = KindDeployedApplications 4605 objectMap := make(map[string]interface{}) 4606 if dahe.MaxPercentUnhealthyDeployedApplications != nil { 4607 objectMap["MaxPercentUnhealthyDeployedApplications"] = dahe.MaxPercentUnhealthyDeployedApplications 4608 } 4609 if dahe.TotalCount != nil { 4610 objectMap["TotalCount"] = dahe.TotalCount 4611 } 4612 if dahe.UnhealthyEvaluations != nil { 4613 objectMap["UnhealthyEvaluations"] = dahe.UnhealthyEvaluations 4614 } 4615 if dahe.AggregatedHealthState != "" { 4616 objectMap["AggregatedHealthState"] = dahe.AggregatedHealthState 4617 } 4618 if dahe.Description != nil { 4619 objectMap["Description"] = dahe.Description 4620 } 4621 if dahe.Kind != "" { 4622 objectMap["Kind"] = dahe.Kind 4623 } 4624 return json.Marshal(objectMap) 4625} 4626 4627// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4628func (dahe DeployedApplicationsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 4629 return nil, false 4630} 4631 4632// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4633func (dahe DeployedApplicationsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 4634 return nil, false 4635} 4636 4637// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4638func (dahe DeployedApplicationsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 4639 return nil, false 4640} 4641 4642// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4643func (dahe DeployedApplicationsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 4644 return nil, false 4645} 4646 4647// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4648func (dahe DeployedApplicationsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 4649 return nil, false 4650} 4651 4652// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4653func (dahe DeployedApplicationsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 4654 return &dahe, true 4655} 4656 4657// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4658func (dahe DeployedApplicationsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 4659 return nil, false 4660} 4661 4662// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4663func (dahe DeployedApplicationsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 4664 return nil, false 4665} 4666 4667// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4668func (dahe DeployedApplicationsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 4669 return nil, false 4670} 4671 4672// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4673func (dahe DeployedApplicationsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 4674 return nil, false 4675} 4676 4677// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4678func (dahe DeployedApplicationsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 4679 return nil, false 4680} 4681 4682// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4683func (dahe DeployedApplicationsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 4684 return nil, false 4685} 4686 4687// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4688func (dahe DeployedApplicationsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 4689 return nil, false 4690} 4691 4692// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4693func (dahe DeployedApplicationsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 4694 return nil, false 4695} 4696 4697// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4698func (dahe DeployedApplicationsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 4699 return nil, false 4700} 4701 4702// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4703func (dahe DeployedApplicationsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 4704 return nil, false 4705} 4706 4707// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4708func (dahe DeployedApplicationsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 4709 return nil, false 4710} 4711 4712// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4713func (dahe DeployedApplicationsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 4714 return nil, false 4715} 4716 4717// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4718func (dahe DeployedApplicationsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 4719 return nil, false 4720} 4721 4722// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4723func (dahe DeployedApplicationsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 4724 return nil, false 4725} 4726 4727// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4728func (dahe DeployedApplicationsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 4729 return nil, false 4730} 4731 4732// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. 4733func (dahe DeployedApplicationsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 4734 return &dahe, true 4735} 4736 4737// DeployedCodePackageInfo information about code package deployed on a Service Fabric node. 4738type DeployedCodePackageInfo struct { 4739 Name *string `json:"Name,omitempty"` 4740 // Version - The version of the code package specified in service manifest. 4741 Version *string `json:"Version,omitempty"` 4742 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 4743 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 4744 // HostType - Possible values include: 'HostTypeInvalid', 'HostTypeExeHost', 'HostTypeContainerHost' 4745 HostType HostType `json:"HostType,omitempty"` 4746 // HostIsolationMode - Possible values include: 'HostIsolationModeNone', 'HostIsolationModeProcess', 'HostIsolationModeHyperV' 4747 HostIsolationMode HostIsolationMode `json:"HostIsolationMode,omitempty"` 4748 // Status - Possible values include: 'Status4Invalid', 'Status4Downloading', 'Status4Activating', 'Status4Active', 'Status4Upgrading', 'Status4Deactivating' 4749 Status Status4 `json:"Status,omitempty"` 4750 // RunFrequencyInterval - The interval at which code package is run. This is used for periodic code package. 4751 RunFrequencyInterval *string `json:"RunFrequencyInterval,omitempty"` 4752 SetupEntryPoint *CodePackageEntryPoint `json:"SetupEntryPoint,omitempty"` 4753 MainEntryPoint *CodePackageEntryPoint `json:"MainEntryPoint,omitempty"` 4754} 4755 4756// DeployedServicePackageHealth information about the health of a service package for a specific application 4757// deployed on a Service Fabric node. 4758type DeployedServicePackageHealth struct { 4759 autorest.Response `json:"-"` 4760 ApplicationName *string `json:"ApplicationName,omitempty"` 4761 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 4762 NodeName *string `json:"NodeName,omitempty"` 4763 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 4764 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 4765 // HealthEvents - The list of health events reported on the entity. 4766 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 4767 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 4768 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 4769} 4770 4771// DeployedServicePackageHealthEvaluation represents health evaluation for a deployed service package, containing 4772// information about the data and the algorithm used by health store to evaluate health. The evaluation is returned 4773// only when the aggregated health state is either Error or Warning. 4774type DeployedServicePackageHealthEvaluation struct { 4775 NodeName *string `json:"NodeName,omitempty"` 4776 ApplicationName *string `json:"ApplicationName,omitempty"` 4777 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 4778 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 4779 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 4780 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 4781 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 4782 Description *string `json:"Description,omitempty"` 4783 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 4784 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 4785} 4786 4787// MarshalJSON is the custom marshaler for DeployedServicePackageHealthEvaluation. 4788func (dsphe DeployedServicePackageHealthEvaluation) MarshalJSON() ([]byte, error) { 4789 dsphe.Kind = KindDeployedServicePackage 4790 objectMap := make(map[string]interface{}) 4791 if dsphe.NodeName != nil { 4792 objectMap["NodeName"] = dsphe.NodeName 4793 } 4794 if dsphe.ApplicationName != nil { 4795 objectMap["ApplicationName"] = dsphe.ApplicationName 4796 } 4797 if dsphe.ServiceManifestName != nil { 4798 objectMap["ServiceManifestName"] = dsphe.ServiceManifestName 4799 } 4800 if dsphe.UnhealthyEvaluations != nil { 4801 objectMap["UnhealthyEvaluations"] = dsphe.UnhealthyEvaluations 4802 } 4803 if dsphe.AggregatedHealthState != "" { 4804 objectMap["AggregatedHealthState"] = dsphe.AggregatedHealthState 4805 } 4806 if dsphe.Description != nil { 4807 objectMap["Description"] = dsphe.Description 4808 } 4809 if dsphe.Kind != "" { 4810 objectMap["Kind"] = dsphe.Kind 4811 } 4812 return json.Marshal(objectMap) 4813} 4814 4815// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4816func (dsphe DeployedServicePackageHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 4817 return nil, false 4818} 4819 4820// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4821func (dsphe DeployedServicePackageHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 4822 return nil, false 4823} 4824 4825// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4826func (dsphe DeployedServicePackageHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 4827 return nil, false 4828} 4829 4830// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4831func (dsphe DeployedServicePackageHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 4832 return nil, false 4833} 4834 4835// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4836func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 4837 return nil, false 4838} 4839 4840// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4841func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 4842 return nil, false 4843} 4844 4845// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4846func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 4847 return &dsphe, true 4848} 4849 4850// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4851func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 4852 return nil, false 4853} 4854 4855// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4856func (dsphe DeployedServicePackageHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 4857 return nil, false 4858} 4859 4860// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4861func (dsphe DeployedServicePackageHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 4862 return nil, false 4863} 4864 4865// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4866func (dsphe DeployedServicePackageHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 4867 return nil, false 4868} 4869 4870// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4871func (dsphe DeployedServicePackageHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 4872 return nil, false 4873} 4874 4875// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4876func (dsphe DeployedServicePackageHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 4877 return nil, false 4878} 4879 4880// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4881func (dsphe DeployedServicePackageHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 4882 return nil, false 4883} 4884 4885// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4886func (dsphe DeployedServicePackageHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 4887 return nil, false 4888} 4889 4890// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4891func (dsphe DeployedServicePackageHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 4892 return nil, false 4893} 4894 4895// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4896func (dsphe DeployedServicePackageHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 4897 return nil, false 4898} 4899 4900// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4901func (dsphe DeployedServicePackageHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 4902 return nil, false 4903} 4904 4905// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4906func (dsphe DeployedServicePackageHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 4907 return nil, false 4908} 4909 4910// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4911func (dsphe DeployedServicePackageHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 4912 return nil, false 4913} 4914 4915// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4916func (dsphe DeployedServicePackageHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 4917 return nil, false 4918} 4919 4920// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. 4921func (dsphe DeployedServicePackageHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 4922 return &dsphe, true 4923} 4924 4925// DeployedServicePackageHealthState represents the health state of a deployed service package, containing the 4926// entity identifier and the aggregated health state. 4927type DeployedServicePackageHealthState struct { 4928 NodeName *string `json:"NodeName,omitempty"` 4929 ApplicationName *string `json:"ApplicationName,omitempty"` 4930 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 4931 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 4932 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 4933 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 4934} 4935 4936// DeployedServicePackageHealthStateChunk represents the health state chunk of a deployed service package, which 4937// contains the service manifest name and the service package aggregated health state. 4938type DeployedServicePackageHealthStateChunk struct { 4939 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 4940 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 4941 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 4942 HealthState HealthState2 `json:"HealthState,omitempty"` 4943} 4944 4945// DeployedServicePackageHealthStateChunkList the list of deployed service package health state chunks that respect 4946// the input filters in the chunk query. Returned by get cluster health state chunks query. 4947type DeployedServicePackageHealthStateChunkList struct { 4948 // Items - The list of deployed service package health state chunks that respect the input filters in the chunk query. 4949 Items *[]DeployedServicePackageHealthStateChunk `json:"Items,omitempty"` 4950} 4951 4952// DeployedServicePackageHealthStateFilter defines matching criteria to determine whether a deployed service 4953// package should be included as a child of a deployed application in the cluster health chunk. 4954// The deployed service packages are only returned if the parent entities match a filter specified in the cluster 4955// health chunk query description. The parent deployed application and its parent application must be included in 4956// the cluster health chunk. 4957// One filter can match zero, one or multiple deployed service packages, depending on its properties. 4958type DeployedServicePackageHealthStateFilter struct { 4959 // ServiceManifestNameFilter - The name of the service manifest which identifies the deployed service packages that matches the filter. 4960 // If specified, the filter is applied only to the specified deployed service packages, if any. 4961 // If no deployed service packages with specified manifest name exist, nothing is returned in the cluster health chunk based on this filter. 4962 // If any deployed service package exists, they are included in the cluster health chunk if it respects the other filter properties. 4963 // If not specified, all deployed service packages that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. 4964 ServiceManifestNameFilter *string `json:"ServiceManifestNameFilter,omitempty"` 4965 // ServicePackageActivationIDFilter - The activation ID of a deployed service package that matches the filter. 4966 // If not specified, the filter applies to all deployed service packages that match the other parameters. 4967 // If specified, the filter matches only the deployed service package with the specified activation ID. 4968 ServicePackageActivationIDFilter *string `json:"ServicePackageActivationIdFilter,omitempty"` 4969 // HealthStateFilter - The filter for the health state of the deployed service packages. It allows selecting deployed service packages if they match the desired health states. 4970 // The possible values are integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the parent deployed application aggregated health state. 4971 // If not specified, default value is None, unless the deployed service package id is specified. If the filter has default value and deployed service package id is specified, the matching deployed service package is returned. 4972 // The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. 4973 // For example, if the provided value is 6, it matches deployed service packages with HealthState value of OK (2) and Warning (4). 4974 // - Default - Default value. Matches any HealthState. The value is zero. 4975 // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. 4976 // - Ok - Filter that matches input with HealthState value Ok. The value is 2. 4977 // - Warning - Filter that matches input with HealthState value Warning. The value is 4. 4978 // - Error - Filter that matches input with HealthState value Error. The value is 8. 4979 // - All - Filter that matches input with any HealthState value. The value is 65535. 4980 HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` 4981} 4982 4983// DeployedServicePackageInfo information about service package deployed on a Service Fabric node. 4984type DeployedServicePackageInfo struct { 4985 Name *string `json:"Name,omitempty"` 4986 // Version - The version of the service package specified in service manifest. 4987 Version *string `json:"Version,omitempty"` 4988 // Status - Possible values include: 'Status7Invalid', 'Status7Downloading', 'Status7Activating', 'Status7Active', 'Status7Upgrading', 'Status7Deactivating' 4989 Status Status7 `json:"Status,omitempty"` 4990 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 4991} 4992 4993// DeployedServicePackagesHealthEvaluation represents health evaluation for deployed service packages, containing 4994// health evaluations for each unhealthy deployed service package that impacted current aggregated health state. 4995// Can be returned when evaluating deployed application health and the aggregated health state is either Error or 4996// Warning. 4997type DeployedServicePackagesHealthEvaluation struct { 4998 // TotalCount - Total number of deployed service packages of the deployed application in the health store. 4999 TotalCount *int64 `json:"TotalCount,omitempty"` 5000 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 5001 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 5002 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 5003 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 5004 Description *string `json:"Description,omitempty"` 5005 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 5006 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 5007} 5008 5009// MarshalJSON is the custom marshaler for DeployedServicePackagesHealthEvaluation. 5010func (dsphe DeployedServicePackagesHealthEvaluation) MarshalJSON() ([]byte, error) { 5011 dsphe.Kind = KindDeployedServicePackages 5012 objectMap := make(map[string]interface{}) 5013 if dsphe.TotalCount != nil { 5014 objectMap["TotalCount"] = dsphe.TotalCount 5015 } 5016 if dsphe.UnhealthyEvaluations != nil { 5017 objectMap["UnhealthyEvaluations"] = dsphe.UnhealthyEvaluations 5018 } 5019 if dsphe.AggregatedHealthState != "" { 5020 objectMap["AggregatedHealthState"] = dsphe.AggregatedHealthState 5021 } 5022 if dsphe.Description != nil { 5023 objectMap["Description"] = dsphe.Description 5024 } 5025 if dsphe.Kind != "" { 5026 objectMap["Kind"] = dsphe.Kind 5027 } 5028 return json.Marshal(objectMap) 5029} 5030 5031// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5032func (dsphe DeployedServicePackagesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 5033 return nil, false 5034} 5035 5036// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5037func (dsphe DeployedServicePackagesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 5038 return nil, false 5039} 5040 5041// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5042func (dsphe DeployedServicePackagesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 5043 return nil, false 5044} 5045 5046// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5047func (dsphe DeployedServicePackagesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 5048 return nil, false 5049} 5050 5051// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5052func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 5053 return nil, false 5054} 5055 5056// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5057func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 5058 return nil, false 5059} 5060 5061// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5062func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 5063 return nil, false 5064} 5065 5066// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5067func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 5068 return &dsphe, true 5069} 5070 5071// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5072func (dsphe DeployedServicePackagesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 5073 return nil, false 5074} 5075 5076// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5077func (dsphe DeployedServicePackagesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 5078 return nil, false 5079} 5080 5081// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5082func (dsphe DeployedServicePackagesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 5083 return nil, false 5084} 5085 5086// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5087func (dsphe DeployedServicePackagesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 5088 return nil, false 5089} 5090 5091// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5092func (dsphe DeployedServicePackagesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 5093 return nil, false 5094} 5095 5096// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5097func (dsphe DeployedServicePackagesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 5098 return nil, false 5099} 5100 5101// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5102func (dsphe DeployedServicePackagesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 5103 return nil, false 5104} 5105 5106// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5107func (dsphe DeployedServicePackagesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 5108 return nil, false 5109} 5110 5111// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5112func (dsphe DeployedServicePackagesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 5113 return nil, false 5114} 5115 5116// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5117func (dsphe DeployedServicePackagesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 5118 return nil, false 5119} 5120 5121// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5122func (dsphe DeployedServicePackagesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 5123 return nil, false 5124} 5125 5126// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5127func (dsphe DeployedServicePackagesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 5128 return nil, false 5129} 5130 5131// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5132func (dsphe DeployedServicePackagesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 5133 return nil, false 5134} 5135 5136// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. 5137func (dsphe DeployedServicePackagesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 5138 return &dsphe, true 5139} 5140 5141// BasicDeployedServiceReplicaDetailInfo information about a Service Fabric service replica deployed on a node. 5142type BasicDeployedServiceReplicaDetailInfo interface { 5143 AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) 5144 AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) 5145 AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) 5146} 5147 5148// DeployedServiceReplicaDetailInfo information about a Service Fabric service replica deployed on a node. 5149type DeployedServiceReplicaDetailInfo struct { 5150 autorest.Response `json:"-"` 5151 ServiceName *string `json:"ServiceName,omitempty"` 5152 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 5153 // CurrentServiceOperation - Possible values include: 'CurrentServiceOperationUnknown', 'CurrentServiceOperationNone', 'CurrentServiceOperationOpen', 'CurrentServiceOperationChangeRole', 'CurrentServiceOperationClose', 'CurrentServiceOperationAbort' 5154 CurrentServiceOperation CurrentServiceOperation `json:"CurrentServiceOperation,omitempty"` 5155 // CurrentServiceOperationStartTimeUtc - The start time of the current service operation in UTC format. 5156 CurrentServiceOperationStartTimeUtc *date.Time `json:"CurrentServiceOperationStartTimeUtc,omitempty"` 5157 ReportedLoad *[]LoadMetricReportInfo `json:"ReportedLoad,omitempty"` 5158 // ServiceKind - Possible values include: 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindDeployedServiceReplicaDetailInfo', 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful', 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless' 5159 ServiceKind ServiceKindBasicDeployedServiceReplicaDetailInfo `json:"ServiceKind,omitempty"` 5160} 5161 5162func unmarshalBasicDeployedServiceReplicaDetailInfo(body []byte) (BasicDeployedServiceReplicaDetailInfo, error) { 5163 var m map[string]interface{} 5164 err := json.Unmarshal(body, &m) 5165 if err != nil { 5166 return nil, err 5167 } 5168 5169 switch m["ServiceKind"] { 5170 case string(ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful): 5171 var dssrdi DeployedStatefulServiceReplicaDetailInfo 5172 err := json.Unmarshal(body, &dssrdi) 5173 return dssrdi, err 5174 case string(ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless): 5175 var dssidi DeployedStatelessServiceInstanceDetailInfo 5176 err := json.Unmarshal(body, &dssidi) 5177 return dssidi, err 5178 default: 5179 var dsrdi DeployedServiceReplicaDetailInfo 5180 err := json.Unmarshal(body, &dsrdi) 5181 return dsrdi, err 5182 } 5183} 5184func unmarshalBasicDeployedServiceReplicaDetailInfoArray(body []byte) ([]BasicDeployedServiceReplicaDetailInfo, error) { 5185 var rawMessages []*json.RawMessage 5186 err := json.Unmarshal(body, &rawMessages) 5187 if err != nil { 5188 return nil, err 5189 } 5190 5191 dsrdiArray := make([]BasicDeployedServiceReplicaDetailInfo, len(rawMessages)) 5192 5193 for index, rawMessage := range rawMessages { 5194 dsrdi, err := unmarshalBasicDeployedServiceReplicaDetailInfo(*rawMessage) 5195 if err != nil { 5196 return nil, err 5197 } 5198 dsrdiArray[index] = dsrdi 5199 } 5200 return dsrdiArray, nil 5201} 5202 5203// MarshalJSON is the custom marshaler for DeployedServiceReplicaDetailInfo. 5204func (dsrdi DeployedServiceReplicaDetailInfo) MarshalJSON() ([]byte, error) { 5205 dsrdi.ServiceKind = ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindDeployedServiceReplicaDetailInfo 5206 objectMap := make(map[string]interface{}) 5207 if dsrdi.ServiceName != nil { 5208 objectMap["ServiceName"] = dsrdi.ServiceName 5209 } 5210 if dsrdi.PartitionID != nil { 5211 objectMap["PartitionId"] = dsrdi.PartitionID 5212 } 5213 if dsrdi.CurrentServiceOperation != "" { 5214 objectMap["CurrentServiceOperation"] = dsrdi.CurrentServiceOperation 5215 } 5216 if dsrdi.CurrentServiceOperationStartTimeUtc != nil { 5217 objectMap["CurrentServiceOperationStartTimeUtc"] = dsrdi.CurrentServiceOperationStartTimeUtc 5218 } 5219 if dsrdi.ReportedLoad != nil { 5220 objectMap["ReportedLoad"] = dsrdi.ReportedLoad 5221 } 5222 if dsrdi.ServiceKind != "" { 5223 objectMap["ServiceKind"] = dsrdi.ServiceKind 5224 } 5225 return json.Marshal(objectMap) 5226} 5227 5228// AsDeployedStatefulServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. 5229func (dsrdi DeployedServiceReplicaDetailInfo) AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) { 5230 return nil, false 5231} 5232 5233// AsDeployedStatelessServiceInstanceDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. 5234func (dsrdi DeployedServiceReplicaDetailInfo) AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) { 5235 return nil, false 5236} 5237 5238// AsDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. 5239func (dsrdi DeployedServiceReplicaDetailInfo) AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) { 5240 return &dsrdi, true 5241} 5242 5243// AsBasicDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. 5244func (dsrdi DeployedServiceReplicaDetailInfo) AsBasicDeployedServiceReplicaDetailInfo() (BasicDeployedServiceReplicaDetailInfo, bool) { 5245 return &dsrdi, true 5246} 5247 5248// DeployedServiceReplicaDetailInfoModel ... 5249type DeployedServiceReplicaDetailInfoModel struct { 5250 autorest.Response `json:"-"` 5251 Value BasicDeployedServiceReplicaDetailInfo `json:"value,omitempty"` 5252} 5253 5254// UnmarshalJSON is the custom unmarshaler for DeployedServiceReplicaDetailInfoModel struct. 5255func (dsrdim *DeployedServiceReplicaDetailInfoModel) UnmarshalJSON(body []byte) error { 5256 dsrdi, err := unmarshalBasicDeployedServiceReplicaDetailInfo(body) 5257 if err != nil { 5258 return err 5259 } 5260 dsrdim.Value = dsrdi 5261 5262 return nil 5263} 5264 5265// BasicDeployedServiceReplicaInfo information about a Service Fabric service replica deployed on a node. 5266type BasicDeployedServiceReplicaInfo interface { 5267 AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) 5268 AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) 5269 AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) 5270} 5271 5272// DeployedServiceReplicaInfo information about a Service Fabric service replica deployed on a node. 5273type DeployedServiceReplicaInfo struct { 5274 ServiceName *string `json:"ServiceName,omitempty"` 5275 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 5276 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 5277 CodePackageName *string `json:"CodePackageName,omitempty"` 5278 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 5279 // ReplicaStatus - Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' 5280 ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` 5281 // Address - The last address returned by the replica in Open or ChangeRole. 5282 Address *string `json:"Address,omitempty"` 5283 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 5284 // HostProcessID - Host process id of the process that is hosting the replica. This will be zero if the replica is down. In hyper-v containers this host process id will be from different kernel. 5285 HostProcessID *string `json:"HostProcessId,omitempty"` 5286 // ServiceKind - Possible values include: 'ServiceKindDeployedServiceReplicaInfo', 'ServiceKindStateful', 'ServiceKindStateless' 5287 ServiceKind ServiceKind `json:"ServiceKind,omitempty"` 5288} 5289 5290func unmarshalBasicDeployedServiceReplicaInfo(body []byte) (BasicDeployedServiceReplicaInfo, error) { 5291 var m map[string]interface{} 5292 err := json.Unmarshal(body, &m) 5293 if err != nil { 5294 return nil, err 5295 } 5296 5297 switch m["ServiceKind"] { 5298 case string(ServiceKindStateful): 5299 var dssri DeployedStatefulServiceReplicaInfo 5300 err := json.Unmarshal(body, &dssri) 5301 return dssri, err 5302 case string(ServiceKindStateless): 5303 var dssii DeployedStatelessServiceInstanceInfo 5304 err := json.Unmarshal(body, &dssii) 5305 return dssii, err 5306 default: 5307 var dsri DeployedServiceReplicaInfo 5308 err := json.Unmarshal(body, &dsri) 5309 return dsri, err 5310 } 5311} 5312func unmarshalBasicDeployedServiceReplicaInfoArray(body []byte) ([]BasicDeployedServiceReplicaInfo, error) { 5313 var rawMessages []*json.RawMessage 5314 err := json.Unmarshal(body, &rawMessages) 5315 if err != nil { 5316 return nil, err 5317 } 5318 5319 dsriArray := make([]BasicDeployedServiceReplicaInfo, len(rawMessages)) 5320 5321 for index, rawMessage := range rawMessages { 5322 dsri, err := unmarshalBasicDeployedServiceReplicaInfo(*rawMessage) 5323 if err != nil { 5324 return nil, err 5325 } 5326 dsriArray[index] = dsri 5327 } 5328 return dsriArray, nil 5329} 5330 5331// MarshalJSON is the custom marshaler for DeployedServiceReplicaInfo. 5332func (dsri DeployedServiceReplicaInfo) MarshalJSON() ([]byte, error) { 5333 dsri.ServiceKind = ServiceKindDeployedServiceReplicaInfo 5334 objectMap := make(map[string]interface{}) 5335 if dsri.ServiceName != nil { 5336 objectMap["ServiceName"] = dsri.ServiceName 5337 } 5338 if dsri.ServiceTypeName != nil { 5339 objectMap["ServiceTypeName"] = dsri.ServiceTypeName 5340 } 5341 if dsri.ServiceManifestName != nil { 5342 objectMap["ServiceManifestName"] = dsri.ServiceManifestName 5343 } 5344 if dsri.CodePackageName != nil { 5345 objectMap["CodePackageName"] = dsri.CodePackageName 5346 } 5347 if dsri.PartitionID != nil { 5348 objectMap["PartitionId"] = dsri.PartitionID 5349 } 5350 if dsri.ReplicaStatus != "" { 5351 objectMap["ReplicaStatus"] = dsri.ReplicaStatus 5352 } 5353 if dsri.Address != nil { 5354 objectMap["Address"] = dsri.Address 5355 } 5356 if dsri.ServicePackageActivationID != nil { 5357 objectMap["ServicePackageActivationId"] = dsri.ServicePackageActivationID 5358 } 5359 if dsri.HostProcessID != nil { 5360 objectMap["HostProcessId"] = dsri.HostProcessID 5361 } 5362 if dsri.ServiceKind != "" { 5363 objectMap["ServiceKind"] = dsri.ServiceKind 5364 } 5365 return json.Marshal(objectMap) 5366} 5367 5368// AsDeployedStatefulServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. 5369func (dsri DeployedServiceReplicaInfo) AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) { 5370 return nil, false 5371} 5372 5373// AsDeployedStatelessServiceInstanceInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. 5374func (dsri DeployedServiceReplicaInfo) AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) { 5375 return nil, false 5376} 5377 5378// AsDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. 5379func (dsri DeployedServiceReplicaInfo) AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) { 5380 return &dsri, true 5381} 5382 5383// AsBasicDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. 5384func (dsri DeployedServiceReplicaInfo) AsBasicDeployedServiceReplicaInfo() (BasicDeployedServiceReplicaInfo, bool) { 5385 return &dsri, true 5386} 5387 5388// DeployedServiceTypeInfo information about service type deployed on a node, information such as the status of the 5389// service type registration on a node. 5390type DeployedServiceTypeInfo struct { 5391 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 5392 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 5393 CodePackageName *string `json:"CodePackageName,omitempty"` 5394 // Status - Possible values include: 'Status8Invalid', 'Status8Disabled', 'Status8Enabled', 'Status8Registered' 5395 Status Status8 `json:"Status,omitempty"` 5396 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 5397} 5398 5399// DeployedStatefulServiceReplicaDetailInfo information about a stateful replica running in a code package. Please 5400// note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId 5401// and replicaId. 5402type DeployedStatefulServiceReplicaDetailInfo struct { 5403 ReplicaID *string `json:"ReplicaId,omitempty"` 5404 // CurrentReplicatorOperation - Possible values include: 'CurrentReplicatorOperationInvalid', 'CurrentReplicatorOperationNone', 'CurrentReplicatorOperationOpen', 'CurrentReplicatorOperationChangeRole', 'CurrentReplicatorOperationUpdateEpoch', 'CurrentReplicatorOperationClose', 'CurrentReplicatorOperationAbort', 'CurrentReplicatorOperationOnDataLoss', 'CurrentReplicatorOperationWaitForCatchup', 'CurrentReplicatorOperationBuild' 5405 CurrentReplicatorOperation CurrentReplicatorOperation `json:"CurrentReplicatorOperation,omitempty"` 5406 // ReadStatus - Possible values include: 'ReadStatusInvalid', 'ReadStatusGranted', 'ReadStatusReconfigurationPending', 'ReadStatusNotPrimary', 'ReadStatusNoWriteQuorum' 5407 ReadStatus ReadStatus `json:"ReadStatus,omitempty"` 5408 // WriteStatus - Possible values include: 'WriteStatusInvalid', 'WriteStatusGranted', 'WriteStatusReconfigurationPending', 'WriteStatusNotPrimary', 'WriteStatusNoWriteQuorum' 5409 WriteStatus WriteStatus `json:"WriteStatus,omitempty"` 5410 ReplicatorStatus BasicReplicatorStatus `json:"ReplicatorStatus,omitempty"` 5411 ReplicaStatus *KeyValueStoreReplicaStatus `json:"ReplicaStatus,omitempty"` 5412 DeployedServiceReplicaQueryResult *DeployedStatefulServiceReplicaInfo `json:"DeployedServiceReplicaQueryResult,omitempty"` 5413 ServiceName *string `json:"ServiceName,omitempty"` 5414 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 5415 // CurrentServiceOperation - Possible values include: 'CurrentServiceOperationUnknown', 'CurrentServiceOperationNone', 'CurrentServiceOperationOpen', 'CurrentServiceOperationChangeRole', 'CurrentServiceOperationClose', 'CurrentServiceOperationAbort' 5416 CurrentServiceOperation CurrentServiceOperation `json:"CurrentServiceOperation,omitempty"` 5417 // CurrentServiceOperationStartTimeUtc - The start time of the current service operation in UTC format. 5418 CurrentServiceOperationStartTimeUtc *date.Time `json:"CurrentServiceOperationStartTimeUtc,omitempty"` 5419 ReportedLoad *[]LoadMetricReportInfo `json:"ReportedLoad,omitempty"` 5420 // ServiceKind - Possible values include: 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindDeployedServiceReplicaDetailInfo', 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful', 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless' 5421 ServiceKind ServiceKindBasicDeployedServiceReplicaDetailInfo `json:"ServiceKind,omitempty"` 5422} 5423 5424// MarshalJSON is the custom marshaler for DeployedStatefulServiceReplicaDetailInfo. 5425func (dssrdi DeployedStatefulServiceReplicaDetailInfo) MarshalJSON() ([]byte, error) { 5426 dssrdi.ServiceKind = ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful 5427 objectMap := make(map[string]interface{}) 5428 if dssrdi.ReplicaID != nil { 5429 objectMap["ReplicaId"] = dssrdi.ReplicaID 5430 } 5431 if dssrdi.CurrentReplicatorOperation != "" { 5432 objectMap["CurrentReplicatorOperation"] = dssrdi.CurrentReplicatorOperation 5433 } 5434 if dssrdi.ReadStatus != "" { 5435 objectMap["ReadStatus"] = dssrdi.ReadStatus 5436 } 5437 if dssrdi.WriteStatus != "" { 5438 objectMap["WriteStatus"] = dssrdi.WriteStatus 5439 } 5440 objectMap["ReplicatorStatus"] = dssrdi.ReplicatorStatus 5441 if dssrdi.ReplicaStatus != nil { 5442 objectMap["ReplicaStatus"] = dssrdi.ReplicaStatus 5443 } 5444 if dssrdi.DeployedServiceReplicaQueryResult != nil { 5445 objectMap["DeployedServiceReplicaQueryResult"] = dssrdi.DeployedServiceReplicaQueryResult 5446 } 5447 if dssrdi.ServiceName != nil { 5448 objectMap["ServiceName"] = dssrdi.ServiceName 5449 } 5450 if dssrdi.PartitionID != nil { 5451 objectMap["PartitionId"] = dssrdi.PartitionID 5452 } 5453 if dssrdi.CurrentServiceOperation != "" { 5454 objectMap["CurrentServiceOperation"] = dssrdi.CurrentServiceOperation 5455 } 5456 if dssrdi.CurrentServiceOperationStartTimeUtc != nil { 5457 objectMap["CurrentServiceOperationStartTimeUtc"] = dssrdi.CurrentServiceOperationStartTimeUtc 5458 } 5459 if dssrdi.ReportedLoad != nil { 5460 objectMap["ReportedLoad"] = dssrdi.ReportedLoad 5461 } 5462 if dssrdi.ServiceKind != "" { 5463 objectMap["ServiceKind"] = dssrdi.ServiceKind 5464 } 5465 return json.Marshal(objectMap) 5466} 5467 5468// AsDeployedStatefulServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. 5469func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) { 5470 return &dssrdi, true 5471} 5472 5473// AsDeployedStatelessServiceInstanceDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. 5474func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) { 5475 return nil, false 5476} 5477 5478// AsDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. 5479func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) { 5480 return nil, false 5481} 5482 5483// AsBasicDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. 5484func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsBasicDeployedServiceReplicaDetailInfo() (BasicDeployedServiceReplicaDetailInfo, bool) { 5485 return &dssrdi, true 5486} 5487 5488// UnmarshalJSON is the custom unmarshaler for DeployedStatefulServiceReplicaDetailInfo struct. 5489func (dssrdi *DeployedStatefulServiceReplicaDetailInfo) UnmarshalJSON(body []byte) error { 5490 var m map[string]*json.RawMessage 5491 err := json.Unmarshal(body, &m) 5492 if err != nil { 5493 return err 5494 } 5495 for k, v := range m { 5496 switch k { 5497 case "ReplicaId": 5498 if v != nil { 5499 var replicaID string 5500 err = json.Unmarshal(*v, &replicaID) 5501 if err != nil { 5502 return err 5503 } 5504 dssrdi.ReplicaID = &replicaID 5505 } 5506 case "CurrentReplicatorOperation": 5507 if v != nil { 5508 var currentReplicatorOperation CurrentReplicatorOperation 5509 err = json.Unmarshal(*v, ¤tReplicatorOperation) 5510 if err != nil { 5511 return err 5512 } 5513 dssrdi.CurrentReplicatorOperation = currentReplicatorOperation 5514 } 5515 case "ReadStatus": 5516 if v != nil { 5517 var readStatus ReadStatus 5518 err = json.Unmarshal(*v, &readStatus) 5519 if err != nil { 5520 return err 5521 } 5522 dssrdi.ReadStatus = readStatus 5523 } 5524 case "WriteStatus": 5525 if v != nil { 5526 var writeStatus WriteStatus 5527 err = json.Unmarshal(*v, &writeStatus) 5528 if err != nil { 5529 return err 5530 } 5531 dssrdi.WriteStatus = writeStatus 5532 } 5533 case "ReplicatorStatus": 5534 if v != nil { 5535 replicatorStatus, err := unmarshalBasicReplicatorStatus(*v) 5536 if err != nil { 5537 return err 5538 } 5539 dssrdi.ReplicatorStatus = replicatorStatus 5540 } 5541 case "ReplicaStatus": 5542 if v != nil { 5543 var replicaStatus KeyValueStoreReplicaStatus 5544 err = json.Unmarshal(*v, &replicaStatus) 5545 if err != nil { 5546 return err 5547 } 5548 dssrdi.ReplicaStatus = &replicaStatus 5549 } 5550 case "DeployedServiceReplicaQueryResult": 5551 if v != nil { 5552 var deployedServiceReplicaQueryResult DeployedStatefulServiceReplicaInfo 5553 err = json.Unmarshal(*v, &deployedServiceReplicaQueryResult) 5554 if err != nil { 5555 return err 5556 } 5557 dssrdi.DeployedServiceReplicaQueryResult = &deployedServiceReplicaQueryResult 5558 } 5559 case "ServiceName": 5560 if v != nil { 5561 var serviceName string 5562 err = json.Unmarshal(*v, &serviceName) 5563 if err != nil { 5564 return err 5565 } 5566 dssrdi.ServiceName = &serviceName 5567 } 5568 case "PartitionId": 5569 if v != nil { 5570 var partitionID uuid.UUID 5571 err = json.Unmarshal(*v, &partitionID) 5572 if err != nil { 5573 return err 5574 } 5575 dssrdi.PartitionID = &partitionID 5576 } 5577 case "CurrentServiceOperation": 5578 if v != nil { 5579 var currentServiceOperation CurrentServiceOperation 5580 err = json.Unmarshal(*v, ¤tServiceOperation) 5581 if err != nil { 5582 return err 5583 } 5584 dssrdi.CurrentServiceOperation = currentServiceOperation 5585 } 5586 case "CurrentServiceOperationStartTimeUtc": 5587 if v != nil { 5588 var currentServiceOperationStartTimeUtc date.Time 5589 err = json.Unmarshal(*v, ¤tServiceOperationStartTimeUtc) 5590 if err != nil { 5591 return err 5592 } 5593 dssrdi.CurrentServiceOperationStartTimeUtc = ¤tServiceOperationStartTimeUtc 5594 } 5595 case "ReportedLoad": 5596 if v != nil { 5597 var reportedLoad []LoadMetricReportInfo 5598 err = json.Unmarshal(*v, &reportedLoad) 5599 if err != nil { 5600 return err 5601 } 5602 dssrdi.ReportedLoad = &reportedLoad 5603 } 5604 case "ServiceKind": 5605 if v != nil { 5606 var serviceKind ServiceKindBasicDeployedServiceReplicaDetailInfo 5607 err = json.Unmarshal(*v, &serviceKind) 5608 if err != nil { 5609 return err 5610 } 5611 dssrdi.ServiceKind = serviceKind 5612 } 5613 } 5614 } 5615 5616 return nil 5617} 5618 5619// DeployedStatefulServiceReplicaInfo information about a stateful service replica deployed on a node. 5620type DeployedStatefulServiceReplicaInfo struct { 5621 ReplicaID *string `json:"ReplicaId,omitempty"` 5622 // ReplicaRole - Possible values include: 'ReplicaRoleUnknown', 'ReplicaRoleNone', 'ReplicaRolePrimary', 'ReplicaRoleIdleSecondary', 'ReplicaRoleActiveSecondary' 5623 ReplicaRole ReplicaRole `json:"ReplicaRole,omitempty"` 5624 ReconfigurationInformation *ReconfigurationInformation `json:"ReconfigurationInformation,omitempty"` 5625 ServiceName *string `json:"ServiceName,omitempty"` 5626 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 5627 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 5628 CodePackageName *string `json:"CodePackageName,omitempty"` 5629 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 5630 // ReplicaStatus - Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' 5631 ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` 5632 // Address - The last address returned by the replica in Open or ChangeRole. 5633 Address *string `json:"Address,omitempty"` 5634 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 5635 // HostProcessID - Host process id of the process that is hosting the replica. This will be zero if the replica is down. In hyper-v containers this host process id will be from different kernel. 5636 HostProcessID *string `json:"HostProcessId,omitempty"` 5637 // ServiceKind - Possible values include: 'ServiceKindDeployedServiceReplicaInfo', 'ServiceKindStateful', 'ServiceKindStateless' 5638 ServiceKind ServiceKind `json:"ServiceKind,omitempty"` 5639} 5640 5641// MarshalJSON is the custom marshaler for DeployedStatefulServiceReplicaInfo. 5642func (dssri DeployedStatefulServiceReplicaInfo) MarshalJSON() ([]byte, error) { 5643 dssri.ServiceKind = ServiceKindStateful 5644 objectMap := make(map[string]interface{}) 5645 if dssri.ReplicaID != nil { 5646 objectMap["ReplicaId"] = dssri.ReplicaID 5647 } 5648 if dssri.ReplicaRole != "" { 5649 objectMap["ReplicaRole"] = dssri.ReplicaRole 5650 } 5651 if dssri.ReconfigurationInformation != nil { 5652 objectMap["ReconfigurationInformation"] = dssri.ReconfigurationInformation 5653 } 5654 if dssri.ServiceName != nil { 5655 objectMap["ServiceName"] = dssri.ServiceName 5656 } 5657 if dssri.ServiceTypeName != nil { 5658 objectMap["ServiceTypeName"] = dssri.ServiceTypeName 5659 } 5660 if dssri.ServiceManifestName != nil { 5661 objectMap["ServiceManifestName"] = dssri.ServiceManifestName 5662 } 5663 if dssri.CodePackageName != nil { 5664 objectMap["CodePackageName"] = dssri.CodePackageName 5665 } 5666 if dssri.PartitionID != nil { 5667 objectMap["PartitionId"] = dssri.PartitionID 5668 } 5669 if dssri.ReplicaStatus != "" { 5670 objectMap["ReplicaStatus"] = dssri.ReplicaStatus 5671 } 5672 if dssri.Address != nil { 5673 objectMap["Address"] = dssri.Address 5674 } 5675 if dssri.ServicePackageActivationID != nil { 5676 objectMap["ServicePackageActivationId"] = dssri.ServicePackageActivationID 5677 } 5678 if dssri.HostProcessID != nil { 5679 objectMap["HostProcessId"] = dssri.HostProcessID 5680 } 5681 if dssri.ServiceKind != "" { 5682 objectMap["ServiceKind"] = dssri.ServiceKind 5683 } 5684 return json.Marshal(objectMap) 5685} 5686 5687// AsDeployedStatefulServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. 5688func (dssri DeployedStatefulServiceReplicaInfo) AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) { 5689 return &dssri, true 5690} 5691 5692// AsDeployedStatelessServiceInstanceInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. 5693func (dssri DeployedStatefulServiceReplicaInfo) AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) { 5694 return nil, false 5695} 5696 5697// AsDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. 5698func (dssri DeployedStatefulServiceReplicaInfo) AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) { 5699 return nil, false 5700} 5701 5702// AsBasicDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. 5703func (dssri DeployedStatefulServiceReplicaInfo) AsBasicDeployedServiceReplicaInfo() (BasicDeployedServiceReplicaInfo, bool) { 5704 return &dssri, true 5705} 5706 5707// DeployedStatelessServiceInstanceDetailInfo information about a stateless instance running in a code package. 5708// Please note that DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, 5709// PartitionId and InstanceId. 5710type DeployedStatelessServiceInstanceDetailInfo struct { 5711 InstanceID *string `json:"InstanceId,omitempty"` 5712 DeployedServiceReplicaQueryResult *DeployedStatelessServiceInstanceInfo `json:"DeployedServiceReplicaQueryResult,omitempty"` 5713 ServiceName *string `json:"ServiceName,omitempty"` 5714 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 5715 // CurrentServiceOperation - Possible values include: 'CurrentServiceOperationUnknown', 'CurrentServiceOperationNone', 'CurrentServiceOperationOpen', 'CurrentServiceOperationChangeRole', 'CurrentServiceOperationClose', 'CurrentServiceOperationAbort' 5716 CurrentServiceOperation CurrentServiceOperation `json:"CurrentServiceOperation,omitempty"` 5717 // CurrentServiceOperationStartTimeUtc - The start time of the current service operation in UTC format. 5718 CurrentServiceOperationStartTimeUtc *date.Time `json:"CurrentServiceOperationStartTimeUtc,omitempty"` 5719 ReportedLoad *[]LoadMetricReportInfo `json:"ReportedLoad,omitempty"` 5720 // ServiceKind - Possible values include: 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindDeployedServiceReplicaDetailInfo', 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateful', 'ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless' 5721 ServiceKind ServiceKindBasicDeployedServiceReplicaDetailInfo `json:"ServiceKind,omitempty"` 5722} 5723 5724// MarshalJSON is the custom marshaler for DeployedStatelessServiceInstanceDetailInfo. 5725func (dssidi DeployedStatelessServiceInstanceDetailInfo) MarshalJSON() ([]byte, error) { 5726 dssidi.ServiceKind = ServiceKindBasicDeployedServiceReplicaDetailInfoServiceKindStateless 5727 objectMap := make(map[string]interface{}) 5728 if dssidi.InstanceID != nil { 5729 objectMap["InstanceId"] = dssidi.InstanceID 5730 } 5731 if dssidi.DeployedServiceReplicaQueryResult != nil { 5732 objectMap["DeployedServiceReplicaQueryResult"] = dssidi.DeployedServiceReplicaQueryResult 5733 } 5734 if dssidi.ServiceName != nil { 5735 objectMap["ServiceName"] = dssidi.ServiceName 5736 } 5737 if dssidi.PartitionID != nil { 5738 objectMap["PartitionId"] = dssidi.PartitionID 5739 } 5740 if dssidi.CurrentServiceOperation != "" { 5741 objectMap["CurrentServiceOperation"] = dssidi.CurrentServiceOperation 5742 } 5743 if dssidi.CurrentServiceOperationStartTimeUtc != nil { 5744 objectMap["CurrentServiceOperationStartTimeUtc"] = dssidi.CurrentServiceOperationStartTimeUtc 5745 } 5746 if dssidi.ReportedLoad != nil { 5747 objectMap["ReportedLoad"] = dssidi.ReportedLoad 5748 } 5749 if dssidi.ServiceKind != "" { 5750 objectMap["ServiceKind"] = dssidi.ServiceKind 5751 } 5752 return json.Marshal(objectMap) 5753} 5754 5755// AsDeployedStatefulServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. 5756func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) { 5757 return nil, false 5758} 5759 5760// AsDeployedStatelessServiceInstanceDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. 5761func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) { 5762 return &dssidi, true 5763} 5764 5765// AsDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. 5766func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) { 5767 return nil, false 5768} 5769 5770// AsBasicDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. 5771func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsBasicDeployedServiceReplicaDetailInfo() (BasicDeployedServiceReplicaDetailInfo, bool) { 5772 return &dssidi, true 5773} 5774 5775// DeployedStatelessServiceInstanceInfo information about a stateless service instance deployed on a node. 5776type DeployedStatelessServiceInstanceInfo struct { 5777 InstanceID *string `json:"InstanceId,omitempty"` 5778 ServiceName *string `json:"ServiceName,omitempty"` 5779 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 5780 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 5781 CodePackageName *string `json:"CodePackageName,omitempty"` 5782 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 5783 // ReplicaStatus - Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' 5784 ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` 5785 // Address - The last address returned by the replica in Open or ChangeRole. 5786 Address *string `json:"Address,omitempty"` 5787 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 5788 // HostProcessID - Host process id of the process that is hosting the replica. This will be zero if the replica is down. In hyper-v containers this host process id will be from different kernel. 5789 HostProcessID *string `json:"HostProcessId,omitempty"` 5790 // ServiceKind - Possible values include: 'ServiceKindDeployedServiceReplicaInfo', 'ServiceKindStateful', 'ServiceKindStateless' 5791 ServiceKind ServiceKind `json:"ServiceKind,omitempty"` 5792} 5793 5794// MarshalJSON is the custom marshaler for DeployedStatelessServiceInstanceInfo. 5795func (dssii DeployedStatelessServiceInstanceInfo) MarshalJSON() ([]byte, error) { 5796 dssii.ServiceKind = ServiceKindStateless 5797 objectMap := make(map[string]interface{}) 5798 if dssii.InstanceID != nil { 5799 objectMap["InstanceId"] = dssii.InstanceID 5800 } 5801 if dssii.ServiceName != nil { 5802 objectMap["ServiceName"] = dssii.ServiceName 5803 } 5804 if dssii.ServiceTypeName != nil { 5805 objectMap["ServiceTypeName"] = dssii.ServiceTypeName 5806 } 5807 if dssii.ServiceManifestName != nil { 5808 objectMap["ServiceManifestName"] = dssii.ServiceManifestName 5809 } 5810 if dssii.CodePackageName != nil { 5811 objectMap["CodePackageName"] = dssii.CodePackageName 5812 } 5813 if dssii.PartitionID != nil { 5814 objectMap["PartitionId"] = dssii.PartitionID 5815 } 5816 if dssii.ReplicaStatus != "" { 5817 objectMap["ReplicaStatus"] = dssii.ReplicaStatus 5818 } 5819 if dssii.Address != nil { 5820 objectMap["Address"] = dssii.Address 5821 } 5822 if dssii.ServicePackageActivationID != nil { 5823 objectMap["ServicePackageActivationId"] = dssii.ServicePackageActivationID 5824 } 5825 if dssii.HostProcessID != nil { 5826 objectMap["HostProcessId"] = dssii.HostProcessID 5827 } 5828 if dssii.ServiceKind != "" { 5829 objectMap["ServiceKind"] = dssii.ServiceKind 5830 } 5831 return json.Marshal(objectMap) 5832} 5833 5834// AsDeployedStatefulServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. 5835func (dssii DeployedStatelessServiceInstanceInfo) AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) { 5836 return nil, false 5837} 5838 5839// AsDeployedStatelessServiceInstanceInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. 5840func (dssii DeployedStatelessServiceInstanceInfo) AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) { 5841 return &dssii, true 5842} 5843 5844// AsDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. 5845func (dssii DeployedStatelessServiceInstanceInfo) AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) { 5846 return nil, false 5847} 5848 5849// AsBasicDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. 5850func (dssii DeployedStatelessServiceInstanceInfo) AsBasicDeployedServiceReplicaInfo() (BasicDeployedServiceReplicaInfo, bool) { 5851 return &dssii, true 5852} 5853 5854// DeployServicePackageToNodeDescription defines description for downloading packages associated with a service 5855// manifest to image cache on a Service Fabric node. 5856type DeployServicePackageToNodeDescription struct { 5857 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 5858 ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` 5859 ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` 5860 NodeName *string `json:"NodeName,omitempty"` 5861 PackageSharingPolicy *[]PackageSharingPolicyInfo `json:"PackageSharingPolicy,omitempty"` 5862} 5863 5864// DoublePropertyValue describes a Service Fabric property value of type Double. 5865type DoublePropertyValue struct { 5866 // Data - The data of the property value. 5867 Data *float64 `json:"Data,omitempty"` 5868 // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' 5869 Kind KindBasicPropertyValue `json:"Kind,omitempty"` 5870} 5871 5872// MarshalJSON is the custom marshaler for DoublePropertyValue. 5873func (dpv DoublePropertyValue) MarshalJSON() ([]byte, error) { 5874 dpv.Kind = KindDouble 5875 objectMap := make(map[string]interface{}) 5876 if dpv.Data != nil { 5877 objectMap["Data"] = dpv.Data 5878 } 5879 if dpv.Kind != "" { 5880 objectMap["Kind"] = dpv.Kind 5881 } 5882 return json.Marshal(objectMap) 5883} 5884 5885// AsBinaryPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. 5886func (dpv DoublePropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { 5887 return nil, false 5888} 5889 5890// AsInt64PropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. 5891func (dpv DoublePropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { 5892 return nil, false 5893} 5894 5895// AsDoublePropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. 5896func (dpv DoublePropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { 5897 return &dpv, true 5898} 5899 5900// AsStringPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. 5901func (dpv DoublePropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { 5902 return nil, false 5903} 5904 5905// AsGUIDPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. 5906func (dpv DoublePropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { 5907 return nil, false 5908} 5909 5910// AsPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. 5911func (dpv DoublePropertyValue) AsPropertyValue() (*PropertyValue, bool) { 5912 return nil, false 5913} 5914 5915// AsBasicPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. 5916func (dpv DoublePropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { 5917 return &dpv, true 5918} 5919 5920// EnsureAvailabilitySafetyCheck safety check that waits to ensure the availability of the partition. It waits 5921// until there are replicas available such that bringing down this replica will not cause availability loss for the 5922// partition. 5923type EnsureAvailabilitySafetyCheck struct { 5924 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 5925 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 5926 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 5927} 5928 5929// MarshalJSON is the custom marshaler for EnsureAvailabilitySafetyCheck. 5930func (easc EnsureAvailabilitySafetyCheck) MarshalJSON() ([]byte, error) { 5931 easc.Kind = KindEnsureAvailability 5932 objectMap := make(map[string]interface{}) 5933 if easc.PartitionID != nil { 5934 objectMap["PartitionId"] = easc.PartitionID 5935 } 5936 if easc.Kind != "" { 5937 objectMap["Kind"] = easc.Kind 5938 } 5939 return json.Marshal(objectMap) 5940} 5941 5942// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5943func (easc EnsureAvailabilitySafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 5944 return nil, false 5945} 5946 5947// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5948func (easc EnsureAvailabilitySafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 5949 return &easc, true 5950} 5951 5952// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5953func (easc EnsureAvailabilitySafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 5954 return &easc, true 5955} 5956 5957// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5958func (easc EnsureAvailabilitySafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 5959 return nil, false 5960} 5961 5962// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5963func (easc EnsureAvailabilitySafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 5964 return nil, false 5965} 5966 5967// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5968func (easc EnsureAvailabilitySafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 5969 return nil, false 5970} 5971 5972// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5973func (easc EnsureAvailabilitySafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 5974 return nil, false 5975} 5976 5977// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5978func (easc EnsureAvailabilitySafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 5979 return nil, false 5980} 5981 5982// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5983func (easc EnsureAvailabilitySafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 5984 return nil, false 5985} 5986 5987// AsSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5988func (easc EnsureAvailabilitySafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 5989 return nil, false 5990} 5991 5992// AsBasicSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. 5993func (easc EnsureAvailabilitySafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 5994 return &easc, true 5995} 5996 5997// EnsurePartitionQurumSafetyCheck safety check that ensures that a quorum of replicas are not lost for a 5998// partition. 5999type EnsurePartitionQurumSafetyCheck struct { 6000 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 6001 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 6002 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 6003} 6004 6005// MarshalJSON is the custom marshaler for EnsurePartitionQurumSafetyCheck. 6006func (epqsc EnsurePartitionQurumSafetyCheck) MarshalJSON() ([]byte, error) { 6007 epqsc.Kind = KindEnsurePartitionQuorum 6008 objectMap := make(map[string]interface{}) 6009 if epqsc.PartitionID != nil { 6010 objectMap["PartitionId"] = epqsc.PartitionID 6011 } 6012 if epqsc.Kind != "" { 6013 objectMap["Kind"] = epqsc.Kind 6014 } 6015 return json.Marshal(objectMap) 6016} 6017 6018// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6019func (epqsc EnsurePartitionQurumSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 6020 return nil, false 6021} 6022 6023// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6024func (epqsc EnsurePartitionQurumSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 6025 return &epqsc, true 6026} 6027 6028// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6029func (epqsc EnsurePartitionQurumSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 6030 return nil, false 6031} 6032 6033// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6034func (epqsc EnsurePartitionQurumSafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 6035 return &epqsc, true 6036} 6037 6038// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6039func (epqsc EnsurePartitionQurumSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 6040 return nil, false 6041} 6042 6043// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6044func (epqsc EnsurePartitionQurumSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 6045 return nil, false 6046} 6047 6048// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6049func (epqsc EnsurePartitionQurumSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 6050 return nil, false 6051} 6052 6053// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6054func (epqsc EnsurePartitionQurumSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 6055 return nil, false 6056} 6057 6058// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6059func (epqsc EnsurePartitionQurumSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 6060 return nil, false 6061} 6062 6063// AsSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6064func (epqsc EnsurePartitionQurumSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 6065 return nil, false 6066} 6067 6068// AsBasicSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQurumSafetyCheck. 6069func (epqsc EnsurePartitionQurumSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 6070 return &epqsc, true 6071} 6072 6073// EntityHealth health information common to all entities in the cluster. It contains the aggregated health state, 6074// health events and unhealthy evaluation. 6075type EntityHealth struct { 6076 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 6077 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 6078 // HealthEvents - The list of health events reported on the entity. 6079 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 6080 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 6081 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 6082} 6083 6084// EntityHealthState a base type for the health state of various entities in the cluster. It contains the 6085// aggregated health state. 6086type EntityHealthState struct { 6087 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 6088 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 6089} 6090 6091// EntityHealthStateChunk a base type for the health state chunk of various entities in the cluster. It contains 6092// the aggregated health state. 6093type EntityHealthStateChunk struct { 6094 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 6095 HealthState HealthState2 `json:"HealthState,omitempty"` 6096} 6097 6098// EntityHealthStateChunkList a base type for the list of health state chunks found in the cluster. It contains the 6099// total number of health states that match the input filters. 6100type EntityHealthStateChunkList struct { 6101 // TotalCount - Total number of entity health state objects that match the specified filters from the cluster health chunk query description. 6102 TotalCount *int64 `json:"TotalCount,omitempty"` 6103} 6104 6105// EntityKindHealthStateCount represents health state count for entities of the specified entity kind. 6106type EntityKindHealthStateCount struct { 6107 // EntityKind - Possible values include: 'EntityKindInvalid', 'EntityKindNode', 'EntityKindPartition', 'EntityKindService', 'EntityKindApplication', 'EntityKindReplica', 'EntityKindDeployedApplication', 'EntityKindDeployedServicePackage', 'EntityKindCluster' 6108 EntityKind EntityKind `json:"EntityKind,omitempty"` 6109 HealthStateCount *HealthStateCount `json:"HealthStateCount,omitempty"` 6110} 6111 6112// Epoch an Epoch is a configuration number for the partition as a whole. When the configuration of the replica set 6113// changes, for example when the Primary replica changes, the operations that are replicated from the new Primary 6114// replica are said to be a new Epoch from the ones which were sent by the old Primary replica. 6115type Epoch struct { 6116 // ConfigurationVersion - The current configuration number of this Epoch. The configuration number is an increasing value that is updated whenever the configuration of this replica set changes. 6117 ConfigurationVersion *string `json:"ConfigurationVersion,omitempty"` 6118 // DataLossVersion - The current dataloss number of this Epoch. The data loss number property is an increasing value which is updated whenever data loss is suspected, as when loss of a quorum of replicas in the replica set that includes the Primary replica. 6119 DataLossVersion *string `json:"DataLossVersion,omitempty"` 6120} 6121 6122// EventHealthEvaluation represents health evaluation of a HealthEvent that was reported on the entity. 6123// The health evaluation is returned when evaluating health of an entity results in Error or Warning. 6124type EventHealthEvaluation struct { 6125 // ConsiderWarningAsError - Indicates whether warnings are treated with the same severity as errors. The field is specified in the health policy used to evaluate the entity. 6126 ConsiderWarningAsError *bool `json:"ConsiderWarningAsError,omitempty"` 6127 UnhealthyEvent *HealthEvent `json:"UnhealthyEvent,omitempty"` 6128 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 6129 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 6130 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 6131 Description *string `json:"Description,omitempty"` 6132 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 6133 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 6134} 6135 6136// MarshalJSON is the custom marshaler for EventHealthEvaluation. 6137func (ehe EventHealthEvaluation) MarshalJSON() ([]byte, error) { 6138 ehe.Kind = KindEvent 6139 objectMap := make(map[string]interface{}) 6140 if ehe.ConsiderWarningAsError != nil { 6141 objectMap["ConsiderWarningAsError"] = ehe.ConsiderWarningAsError 6142 } 6143 if ehe.UnhealthyEvent != nil { 6144 objectMap["UnhealthyEvent"] = ehe.UnhealthyEvent 6145 } 6146 if ehe.AggregatedHealthState != "" { 6147 objectMap["AggregatedHealthState"] = ehe.AggregatedHealthState 6148 } 6149 if ehe.Description != nil { 6150 objectMap["Description"] = ehe.Description 6151 } 6152 if ehe.Kind != "" { 6153 objectMap["Kind"] = ehe.Kind 6154 } 6155 return json.Marshal(objectMap) 6156} 6157 6158// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6159func (ehe EventHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 6160 return nil, false 6161} 6162 6163// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6164func (ehe EventHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 6165 return nil, false 6166} 6167 6168// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6169func (ehe EventHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 6170 return nil, false 6171} 6172 6173// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6174func (ehe EventHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 6175 return nil, false 6176} 6177 6178// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6179func (ehe EventHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 6180 return nil, false 6181} 6182 6183// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6184func (ehe EventHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 6185 return nil, false 6186} 6187 6188// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6189func (ehe EventHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 6190 return nil, false 6191} 6192 6193// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6194func (ehe EventHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 6195 return nil, false 6196} 6197 6198// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6199func (ehe EventHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 6200 return &ehe, true 6201} 6202 6203// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6204func (ehe EventHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 6205 return nil, false 6206} 6207 6208// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6209func (ehe EventHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 6210 return nil, false 6211} 6212 6213// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6214func (ehe EventHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 6215 return nil, false 6216} 6217 6218// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6219func (ehe EventHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 6220 return nil, false 6221} 6222 6223// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6224func (ehe EventHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 6225 return nil, false 6226} 6227 6228// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6229func (ehe EventHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 6230 return nil, false 6231} 6232 6233// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6234func (ehe EventHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 6235 return nil, false 6236} 6237 6238// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6239func (ehe EventHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 6240 return nil, false 6241} 6242 6243// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6244func (ehe EventHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 6245 return nil, false 6246} 6247 6248// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6249func (ehe EventHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 6250 return nil, false 6251} 6252 6253// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6254func (ehe EventHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 6255 return nil, false 6256} 6257 6258// AsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6259func (ehe EventHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 6260 return nil, false 6261} 6262 6263// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. 6264func (ehe EventHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 6265 return &ehe, true 6266} 6267 6268// ExecutingFaultsChaosEvent describes a Chaos event that gets generated when Chaos has decided on the faults for 6269// an iteration. This Chaos event contains the details of the faults as a list of strings. 6270type ExecutingFaultsChaosEvent struct { 6271 Faults *[]string `json:"Faults,omitempty"` 6272 TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` 6273 // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' 6274 Kind KindBasicChaosEvent `json:"Kind,omitempty"` 6275} 6276 6277// MarshalJSON is the custom marshaler for ExecutingFaultsChaosEvent. 6278func (efce ExecutingFaultsChaosEvent) MarshalJSON() ([]byte, error) { 6279 efce.Kind = KindExecutingFaults 6280 objectMap := make(map[string]interface{}) 6281 if efce.Faults != nil { 6282 objectMap["Faults"] = efce.Faults 6283 } 6284 if efce.TimeStampUtc != nil { 6285 objectMap["TimeStampUtc"] = efce.TimeStampUtc 6286 } 6287 if efce.Kind != "" { 6288 objectMap["Kind"] = efce.Kind 6289 } 6290 return json.Marshal(objectMap) 6291} 6292 6293// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6294func (efce ExecutingFaultsChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { 6295 return &efce, true 6296} 6297 6298// AsStartedChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6299func (efce ExecutingFaultsChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { 6300 return nil, false 6301} 6302 6303// AsStoppedChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6304func (efce ExecutingFaultsChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { 6305 return nil, false 6306} 6307 6308// AsTestErrorChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6309func (efce ExecutingFaultsChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { 6310 return nil, false 6311} 6312 6313// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6314func (efce ExecutingFaultsChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { 6315 return nil, false 6316} 6317 6318// AsWaitingChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6319func (efce ExecutingFaultsChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { 6320 return nil, false 6321} 6322 6323// AsChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6324func (efce ExecutingFaultsChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { 6325 return nil, false 6326} 6327 6328// AsBasicChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. 6329func (efce ExecutingFaultsChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { 6330 return &efce, true 6331} 6332 6333// FabricCodeVersionInfo information about a Service Fabric code version. 6334type FabricCodeVersionInfo struct { 6335 // CodeVersion - The product version of Service Fabric. 6336 CodeVersion *string `json:"CodeVersion,omitempty"` 6337} 6338 6339// FabricConfigVersionInfo information about a Service Fabric config version. 6340type FabricConfigVersionInfo struct { 6341 // ConfigVersion - The config version of Service Fabric. 6342 ConfigVersion *string `json:"ConfigVersion,omitempty"` 6343} 6344 6345// FabricError the REST API operations for Service Fabric return standard HTTP status codes. This type defines the 6346// additional information returned from the Service Fabric API operations that are not successful. 6347type FabricError struct { 6348 Error *FabricErrorError `json:"Error,omitempty"` 6349} 6350 6351// FabricErrorError error object containing error code and error message. 6352type FabricErrorError struct { 6353 // Code - Possible values include: 'FABRICEINVALIDPARTITIONKEY', 'FABRICEIMAGEBUILDERVALIDATIONERROR', 'FABRICEINVALIDADDRESS', 'FABRICEAPPLICATIONNOTUPGRADING', 'FABRICEAPPLICATIONUPGRADEVALIDATIONERROR', 'FABRICEFABRICNOTUPGRADING', 'FABRICEFABRICUPGRADEVALIDATIONERROR', 'FABRICEINVALIDCONFIGURATION', 'FABRICEINVALIDNAMEURI', 'FABRICEPATHTOOLONG', 'FABRICEKEYTOOLARGE', 'FABRICESERVICEAFFINITYCHAINNOTSUPPORTED', 'FABRICEINVALIDATOMICGROUP', 'FABRICEVALUEEMPTY', 'FABRICENODENOTFOUND', 'FABRICEAPPLICATIONTYPENOTFOUND', 'FABRICEAPPLICATIONNOTFOUND', 'FABRICESERVICETYPENOTFOUND', 'FABRICESERVICEDOESNOTEXIST', 'FABRICESERVICETYPETEMPLATENOTFOUND', 'FABRICECONFIGURATIONSECTIONNOTFOUND', 'FABRICEPARTITIONNOTFOUND', 'FABRICEREPLICADOESNOTEXIST', 'FABRICESERVICEGROUPDOESNOTEXIST', 'FABRICECONFIGURATIONPARAMETERNOTFOUND', 'FABRICEDIRECTORYNOTFOUND', 'FABRICEFABRICVERSIONNOTFOUND', 'FABRICEFILENOTFOUND', 'FABRICENAMEDOESNOTEXIST', 'FABRICEPROPERTYDOESNOTEXIST', 'FABRICEENUMERATIONCOMPLETED', 'FABRICESERVICEMANIFESTNOTFOUND', 'FABRICEKEYNOTFOUND', 'FABRICEHEALTHENTITYNOTFOUND', 'FABRICEAPPLICATIONTYPEALREADYEXISTS', 'FABRICEAPPLICATIONALREADYEXISTS', 'FABRICEAPPLICATIONALREADYINTARGETVERSION', 'FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS', 'FABRICEAPPLICATIONUPGRADEINPROGRESS', 'FABRICESERVICEALREADYEXISTS', 'FABRICESERVICEGROUPALREADYEXISTS', 'FABRICEAPPLICATIONTYPEINUSE', 'FABRICEFABRICALREADYINTARGETVERSION', 'FABRICEFABRICVERSIONALREADYEXISTS', 'FABRICEFABRICVERSIONINUSE', 'FABRICEFABRICUPGRADEINPROGRESS', 'FABRICENAMEALREADYEXISTS', 'FABRICENAMENOTEMPTY', 'FABRICEPROPERTYCHECKFAILED', 'FABRICESERVICEMETADATAMISMATCH', 'FABRICESERVICETYPEMISMATCH', 'FABRICEHEALTHSTALEREPORT', 'FABRICESEQUENCENUMBERCHECKFAILED', 'FABRICENODEHASNOTSTOPPEDYET', 'FABRICEINSTANCEIDMISMATCH', 'FABRICEVALUETOOLARGE', 'FABRICENOWRITEQUORUM', 'FABRICENOTPRIMARY', 'FABRICENOTREADY', 'FABRICERECONFIGURATIONPENDING', 'FABRICESERVICEOFFLINE', 'EABORT', 'FABRICECOMMUNICATIONERROR', 'FABRICEOPERATIONNOTCOMPLETE', 'FABRICETIMEOUT', 'FABRICENODEISUP' 6354 Code Code `json:"Code,omitempty"` 6355 // Message - Error message. 6356 Message *string `json:"Message,omitempty"` 6357} 6358 6359// FailedPropertyBatchInfo derived from PropertyBatchInfo. Represents the property batch failing. Contains 6360// information about the specific batch failure. 6361type FailedPropertyBatchInfo struct { 6362 // ErrorMessage - The error message of the failed operation. Describes the exception thrown due to the first unsuccessful operation in the property batch. 6363 ErrorMessage *string `json:"ErrorMessage,omitempty"` 6364 // OperationIndex - The index of the unsuccessful operation in the property batch. 6365 OperationIndex *int32 `json:"OperationIndex,omitempty"` 6366 // Kind - Possible values include: 'KindPropertyBatchInfo', 'KindSuccessful', 'KindFailed' 6367 Kind KindBasicPropertyBatchInfo `json:"Kind,omitempty"` 6368} 6369 6370// MarshalJSON is the custom marshaler for FailedPropertyBatchInfo. 6371func (fpbi FailedPropertyBatchInfo) MarshalJSON() ([]byte, error) { 6372 fpbi.Kind = KindFailed 6373 objectMap := make(map[string]interface{}) 6374 if fpbi.ErrorMessage != nil { 6375 objectMap["ErrorMessage"] = fpbi.ErrorMessage 6376 } 6377 if fpbi.OperationIndex != nil { 6378 objectMap["OperationIndex"] = fpbi.OperationIndex 6379 } 6380 if fpbi.Kind != "" { 6381 objectMap["Kind"] = fpbi.Kind 6382 } 6383 return json.Marshal(objectMap) 6384} 6385 6386// AsSuccessfulPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. 6387func (fpbi FailedPropertyBatchInfo) AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) { 6388 return nil, false 6389} 6390 6391// AsFailedPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. 6392func (fpbi FailedPropertyBatchInfo) AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) { 6393 return &fpbi, true 6394} 6395 6396// AsPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. 6397func (fpbi FailedPropertyBatchInfo) AsPropertyBatchInfo() (*PropertyBatchInfo, bool) { 6398 return nil, false 6399} 6400 6401// AsBasicPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. 6402func (fpbi FailedPropertyBatchInfo) AsBasicPropertyBatchInfo() (BasicPropertyBatchInfo, bool) { 6403 return &fpbi, true 6404} 6405 6406// FailedUpgradeDomainProgressObject the detailed upgrade progress for nodes in the current upgrade domain at the 6407// point of failure. 6408type FailedUpgradeDomainProgressObject struct { 6409 DomainName *string `json:"DomainName,omitempty"` 6410 NodeUpgradeProgressList *[]NodeUpgradeProgressInfo `json:"NodeUpgradeProgressList,omitempty"` 6411} 6412 6413// FailureUpgradeDomainProgressInfo information about the upgrade domain progress at the time of upgrade failure. 6414type FailureUpgradeDomainProgressInfo struct { 6415 DomainName *string `json:"DomainName,omitempty"` 6416 NodeUpgradeProgressList *[]NodeUpgradeProgressInfo `json:"NodeUpgradeProgressList,omitempty"` 6417} 6418 6419// FileInfo information about a image store file. 6420type FileInfo struct { 6421 // FileSize - The size of file in bytes. 6422 FileSize *string `json:"FileSize,omitempty"` 6423 FileVersion *FileVersion `json:"FileVersion,omitempty"` 6424 // ModifiedDate - The date and time when the image store file was last modified. 6425 ModifiedDate *date.Time `json:"ModifiedDate,omitempty"` 6426 // StoreRelativePath - The file path relative to the image store root path. 6427 StoreRelativePath *string `json:"StoreRelativePath,omitempty"` 6428} 6429 6430// FileVersion information about the version of image store file. 6431type FileVersion struct { 6432 // VersionNumber - The current iamge store version number for the file is used in image store for checking whether it need to be updated. 6433 VersionNumber *string `json:"VersionNumber,omitempty"` 6434 // EpochDataLossNumber - The epoch data loss number of image store file is used to indicate the status of data loss. 6435 EpochDataLossNumber *string `json:"EpochDataLossNumber,omitempty"` 6436} 6437 6438// FolderInfo information about a image store folder. It inclues how many files this folder contains and its image 6439// store relative path. 6440type FolderInfo struct { 6441 StoreRelativePath *string `json:"StoreRelativePath,omitempty"` 6442 // FileCount - The number of files from within the image store folder. 6443 FileCount *uuid.UUID `json:"FileCount,omitempty"` 6444} 6445 6446// GetPropertyBatchOperation represents a PropertyBatchOperation that gets the specified property if it exists. 6447// Note that if one PropertyBatchOperation in a PropertyBatch fails, the entire batch fails and cannot be 6448// committed in a transactional manner. 6449type GetPropertyBatchOperation struct { 6450 // IncludeValue - Whether or not to return the property value with the metadata. True if values should be returned with the metadata; False to return only property metadata. 6451 IncludeValue *bool `json:"IncludeValue,omitempty"` 6452 PropertyName *string `json:"PropertyName,omitempty"` 6453 // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' 6454 Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` 6455} 6456 6457// MarshalJSON is the custom marshaler for GetPropertyBatchOperation. 6458func (gpbo GetPropertyBatchOperation) MarshalJSON() ([]byte, error) { 6459 gpbo.Kind = KindGet 6460 objectMap := make(map[string]interface{}) 6461 if gpbo.IncludeValue != nil { 6462 objectMap["IncludeValue"] = gpbo.IncludeValue 6463 } 6464 if gpbo.PropertyName != nil { 6465 objectMap["PropertyName"] = gpbo.PropertyName 6466 } 6467 if gpbo.Kind != "" { 6468 objectMap["Kind"] = gpbo.Kind 6469 } 6470 return json.Marshal(objectMap) 6471} 6472 6473// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6474func (gpbo GetPropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { 6475 return nil, false 6476} 6477 6478// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6479func (gpbo GetPropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { 6480 return nil, false 6481} 6482 6483// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6484func (gpbo GetPropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { 6485 return nil, false 6486} 6487 6488// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6489func (gpbo GetPropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { 6490 return nil, false 6491} 6492 6493// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6494func (gpbo GetPropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { 6495 return &gpbo, true 6496} 6497 6498// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6499func (gpbo GetPropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { 6500 return nil, false 6501} 6502 6503// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6504func (gpbo GetPropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { 6505 return nil, false 6506} 6507 6508// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. 6509func (gpbo GetPropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { 6510 return &gpbo, true 6511} 6512 6513// GUIDPropertyValue describes a Service Fabric property value of type Guid. 6514type GUIDPropertyValue struct { 6515 // Data - The data of the property value. 6516 Data *uuid.UUID `json:"Data,omitempty"` 6517 // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' 6518 Kind KindBasicPropertyValue `json:"Kind,omitempty"` 6519} 6520 6521// MarshalJSON is the custom marshaler for GUIDPropertyValue. 6522func (gpv GUIDPropertyValue) MarshalJSON() ([]byte, error) { 6523 gpv.Kind = KindGUID 6524 objectMap := make(map[string]interface{}) 6525 if gpv.Data != nil { 6526 objectMap["Data"] = gpv.Data 6527 } 6528 if gpv.Kind != "" { 6529 objectMap["Kind"] = gpv.Kind 6530 } 6531 return json.Marshal(objectMap) 6532} 6533 6534// AsBinaryPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. 6535func (gpv GUIDPropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { 6536 return nil, false 6537} 6538 6539// AsInt64PropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. 6540func (gpv GUIDPropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { 6541 return nil, false 6542} 6543 6544// AsDoublePropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. 6545func (gpv GUIDPropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { 6546 return nil, false 6547} 6548 6549// AsStringPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. 6550func (gpv GUIDPropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { 6551 return nil, false 6552} 6553 6554// AsGUIDPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. 6555func (gpv GUIDPropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { 6556 return &gpv, true 6557} 6558 6559// AsPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. 6560func (gpv GUIDPropertyValue) AsPropertyValue() (*PropertyValue, bool) { 6561 return nil, false 6562} 6563 6564// AsBasicPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. 6565func (gpv GUIDPropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { 6566 return &gpv, true 6567} 6568 6569// BasicHealthEvaluation represents a health evaluation which describes the data and the algorithm used by health 6570// manager to evaluate the health of an entity. 6571type BasicHealthEvaluation interface { 6572 AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) 6573 AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) 6574 AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) 6575 AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) 6576 AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) 6577 AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) 6578 AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) 6579 AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) 6580 AsEventHealthEvaluation() (*EventHealthEvaluation, bool) 6581 AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) 6582 AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) 6583 AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) 6584 AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) 6585 AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) 6586 AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) 6587 AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) 6588 AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) 6589 AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) 6590 AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) 6591 AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) 6592 AsHealthEvaluation() (*HealthEvaluation, bool) 6593} 6594 6595// HealthEvaluation represents a health evaluation which describes the data and the algorithm used by health 6596// manager to evaluate the health of an entity. 6597type HealthEvaluation struct { 6598 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 6599 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 6600 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 6601 Description *string `json:"Description,omitempty"` 6602 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 6603 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 6604} 6605 6606func unmarshalBasicHealthEvaluation(body []byte) (BasicHealthEvaluation, error) { 6607 var m map[string]interface{} 6608 err := json.Unmarshal(body, &m) 6609 if err != nil { 6610 return nil, err 6611 } 6612 6613 switch m["Kind"] { 6614 case string(KindApplication): 6615 var ahe ApplicationHealthEvaluation 6616 err := json.Unmarshal(body, &ahe) 6617 return ahe, err 6618 case string(KindApplications): 6619 var ahe ApplicationsHealthEvaluation 6620 err := json.Unmarshal(body, &ahe) 6621 return ahe, err 6622 case string(KindApplicationTypeApplications): 6623 var atahe ApplicationTypeApplicationsHealthEvaluation 6624 err := json.Unmarshal(body, &atahe) 6625 return atahe, err 6626 case string(KindDeltaNodesCheck): 6627 var dnche DeltaNodesCheckHealthEvaluation 6628 err := json.Unmarshal(body, &dnche) 6629 return dnche, err 6630 case string(KindDeployedApplication): 6631 var dahe DeployedApplicationHealthEvaluation 6632 err := json.Unmarshal(body, &dahe) 6633 return dahe, err 6634 case string(KindDeployedApplications): 6635 var dahe DeployedApplicationsHealthEvaluation 6636 err := json.Unmarshal(body, &dahe) 6637 return dahe, err 6638 case string(KindDeployedServicePackage): 6639 var dsphe DeployedServicePackageHealthEvaluation 6640 err := json.Unmarshal(body, &dsphe) 6641 return dsphe, err 6642 case string(KindDeployedServicePackages): 6643 var dsphe DeployedServicePackagesHealthEvaluation 6644 err := json.Unmarshal(body, &dsphe) 6645 return dsphe, err 6646 case string(KindEvent): 6647 var ehe EventHealthEvaluation 6648 err := json.Unmarshal(body, &ehe) 6649 return ehe, err 6650 case string(KindNode): 6651 var nhe NodeHealthEvaluation 6652 err := json.Unmarshal(body, &nhe) 6653 return nhe, err 6654 case string(KindNodes): 6655 var nhe NodesHealthEvaluation 6656 err := json.Unmarshal(body, &nhe) 6657 return nhe, err 6658 case string(KindPartition): 6659 var phe PartitionHealthEvaluation 6660 err := json.Unmarshal(body, &phe) 6661 return phe, err 6662 case string(KindPartitions): 6663 var phe PartitionsHealthEvaluation 6664 err := json.Unmarshal(body, &phe) 6665 return phe, err 6666 case string(KindReplica): 6667 var rhe ReplicaHealthEvaluation 6668 err := json.Unmarshal(body, &rhe) 6669 return rhe, err 6670 case string(KindReplicas): 6671 var rhe ReplicasHealthEvaluation 6672 err := json.Unmarshal(body, &rhe) 6673 return rhe, err 6674 case string(KindService): 6675 var she ServiceHealthEvaluation 6676 err := json.Unmarshal(body, &she) 6677 return she, err 6678 case string(KindServices): 6679 var she ServicesHealthEvaluation 6680 err := json.Unmarshal(body, &she) 6681 return she, err 6682 case string(KindSystemApplication): 6683 var sahe SystemApplicationHealthEvaluation 6684 err := json.Unmarshal(body, &sahe) 6685 return sahe, err 6686 case string(KindUpgradeDomainDeltaNodesCheck): 6687 var uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation 6688 err := json.Unmarshal(body, &uddnche) 6689 return uddnche, err 6690 case string(KindUpgradeDomainNodes): 6691 var udnhe UpgradeDomainNodesHealthEvaluation 6692 err := json.Unmarshal(body, &udnhe) 6693 return udnhe, err 6694 default: 6695 var he HealthEvaluation 6696 err := json.Unmarshal(body, &he) 6697 return he, err 6698 } 6699} 6700func unmarshalBasicHealthEvaluationArray(body []byte) ([]BasicHealthEvaluation, error) { 6701 var rawMessages []*json.RawMessage 6702 err := json.Unmarshal(body, &rawMessages) 6703 if err != nil { 6704 return nil, err 6705 } 6706 6707 heArray := make([]BasicHealthEvaluation, len(rawMessages)) 6708 6709 for index, rawMessage := range rawMessages { 6710 he, err := unmarshalBasicHealthEvaluation(*rawMessage) 6711 if err != nil { 6712 return nil, err 6713 } 6714 heArray[index] = he 6715 } 6716 return heArray, nil 6717} 6718 6719// MarshalJSON is the custom marshaler for HealthEvaluation. 6720func (he HealthEvaluation) MarshalJSON() ([]byte, error) { 6721 he.Kind = KindHealthEvaluation 6722 objectMap := make(map[string]interface{}) 6723 if he.AggregatedHealthState != "" { 6724 objectMap["AggregatedHealthState"] = he.AggregatedHealthState 6725 } 6726 if he.Description != nil { 6727 objectMap["Description"] = he.Description 6728 } 6729 if he.Kind != "" { 6730 objectMap["Kind"] = he.Kind 6731 } 6732 return json.Marshal(objectMap) 6733} 6734 6735// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6736func (he HealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 6737 return nil, false 6738} 6739 6740// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6741func (he HealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 6742 return nil, false 6743} 6744 6745// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6746func (he HealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 6747 return nil, false 6748} 6749 6750// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6751func (he HealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 6752 return nil, false 6753} 6754 6755// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6756func (he HealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 6757 return nil, false 6758} 6759 6760// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6761func (he HealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 6762 return nil, false 6763} 6764 6765// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6766func (he HealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 6767 return nil, false 6768} 6769 6770// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6771func (he HealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 6772 return nil, false 6773} 6774 6775// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6776func (he HealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 6777 return nil, false 6778} 6779 6780// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6781func (he HealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 6782 return nil, false 6783} 6784 6785// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6786func (he HealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 6787 return nil, false 6788} 6789 6790// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6791func (he HealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 6792 return nil, false 6793} 6794 6795// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6796func (he HealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 6797 return nil, false 6798} 6799 6800// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6801func (he HealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 6802 return nil, false 6803} 6804 6805// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6806func (he HealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 6807 return nil, false 6808} 6809 6810// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6811func (he HealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 6812 return nil, false 6813} 6814 6815// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6816func (he HealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 6817 return nil, false 6818} 6819 6820// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6821func (he HealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 6822 return nil, false 6823} 6824 6825// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6826func (he HealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 6827 return nil, false 6828} 6829 6830// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6831func (he HealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 6832 return nil, false 6833} 6834 6835// AsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6836func (he HealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 6837 return &he, true 6838} 6839 6840// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. 6841func (he HealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 6842 return &he, true 6843} 6844 6845// HealthEvaluationWrapper wrapper object for health evaluation. 6846type HealthEvaluationWrapper struct { 6847 HealthEvaluation BasicHealthEvaluation `json:"HealthEvaluation,omitempty"` 6848} 6849 6850// UnmarshalJSON is the custom unmarshaler for HealthEvaluationWrapper struct. 6851func (hew *HealthEvaluationWrapper) UnmarshalJSON(body []byte) error { 6852 var m map[string]*json.RawMessage 6853 err := json.Unmarshal(body, &m) 6854 if err != nil { 6855 return err 6856 } 6857 for k, v := range m { 6858 switch k { 6859 case "HealthEvaluation": 6860 if v != nil { 6861 healthEvaluation, err := unmarshalBasicHealthEvaluation(*v) 6862 if err != nil { 6863 return err 6864 } 6865 hew.HealthEvaluation = healthEvaluation 6866 } 6867 } 6868 } 6869 6870 return nil 6871} 6872 6873// HealthEvent represents health information reported on a health entity, such as cluster, application or node, 6874// with additional metadata added by the Health Manager. 6875type HealthEvent struct { 6876 // IsExpired - Returns true if the health event is expired, otherwise false. 6877 IsExpired *bool `json:"IsExpired,omitempty"` 6878 // SourceUtcTimestamp - The date and time when the health report was sent by the source. 6879 SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` 6880 // LastModifiedUtcTimestamp - The date and time when the health report was last modified by the health store. 6881 LastModifiedUtcTimestamp *date.Time `json:"LastModifiedUtcTimestamp,omitempty"` 6882 // LastOkTransitionAt - If the current health state is 'Ok', this property returns the time at which the health report was first reported with 'Ok'. 6883 // For periodic reporting, many reports with the same state may have been generated. 6884 // This property returns the date and time when the first 'Ok' health report was received. 6885 // If the current health state is 'Error' or 'Warning', returns the date and time at which the health state was last in 'Ok', before transitioning to a different state. 6886 // If the health state was never 'Ok', the value will be zero date-time. 6887 LastOkTransitionAt *date.Time `json:"LastOkTransitionAt,omitempty"` 6888 // LastWarningTransitionAt - If the current health state is 'Warning', this property returns the time at which the health report was first reported with 'Warning'. For periodic reporting, many reports with the same state may have been generated however, this property returns only the date and time at the first 'Warning' health report was received. 6889 // If the current health state is 'Ok' or 'Error', returns the date and time at which the health state was last in 'Warning', before transitioning to a different state. 6890 // If the health state was never 'Warning', the value will be zero date-time. 6891 LastWarningTransitionAt *date.Time `json:"LastWarningTransitionAt,omitempty"` 6892 // LastErrorTransitionAt - If the current health state is 'Error', this property returns the time at which the health report was first reported with 'Error'. For periodic reporting, many reports with the same state may have been generated however, this property returns only the date and time at the first 'Error' health report was received. 6893 // If the current health state is 'Ok' or 'Warning', returns the date and time at which the health state was last in 'Error', before transitioning to a different state. 6894 // If the health state was never 'Error', the value will be zero date-time. 6895 LastErrorTransitionAt *date.Time `json:"LastErrorTransitionAt,omitempty"` 6896 // SourceID - The source name which identifies the client/watchdog/system component which generated the health information. 6897 SourceID *string `json:"SourceId,omitempty"` 6898 // Property - The property of the health information. An entity can have health reports for different properties. 6899 // The property is a string and not a fixed enumeration to allow the reporter flexibility to categorize the state condition that triggers the report. 6900 // For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available disk on a node, 6901 // so it can report "AvailableDisk" property on that node. 6902 // The same reporter can monitor the node connectivity, so it can report a property "Connectivity" on the same node. 6903 // In the health store, these reports are treated as separate health events for the specified node. 6904 // Together with the SourceId, the property uniquely identifies the health information. 6905 Property *string `json:"Property,omitempty"` 6906 // HealthState - Possible values include: 'HealthState3Invalid', 'HealthState3Ok', 'HealthState3Warning', 'HealthState3Error', 'HealthState3Unknown' 6907 HealthState HealthState3 `json:"HealthState,omitempty"` 6908 // TimeToLiveInMilliSeconds - The duration for which this health report is valid. This field is using ISO8601 format for specifying the duration. 6909 // When clients report periodically, they should send reports with higher frequency than time to live. 6910 // If clients report on transition, they can set the time to live to infinite. 6911 // When time to live expires, the health event that contains the health information 6912 // is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired false. 6913 // If not specified, time to live defaults to infinite value. 6914 TimeToLiveInMilliSeconds *string `json:"TimeToLiveInMilliSeconds,omitempty"` 6915 // Description - The description of the health information. It represents free text used to add human readable information about the report. 6916 // The maximum string length for the description is 4096 characters. 6917 // If the provided string is longer, it will be automatically truncated. 6918 // When truncated, the last characters of the description contain a marker "[Truncated]", and total string size is 4096 characters. 6919 // The presence of the marker indicates to users that truncation occurred. 6920 // Note that when truncated, the description has less than 4096 characters from the original string. 6921 Description *string `json:"Description,omitempty"` 6922 // SequenceNumber - The sequence number for this health report as a numeric string. 6923 // The report sequence number is used by the health store to detect stale reports. 6924 // If not specified, a sequence number is auto-generated by the health client when a report is added. 6925 SequenceNumber *string `json:"SequenceNumber,omitempty"` 6926 // RemoveWhenExpired - Value that indicates whether the report is removed from health store when it expires. 6927 // If set to true, the report is remopved from the health store after it expires. 6928 // If set to false, the report is treated as an error when expired. The value of this property is false by default. 6929 // When clients report periodically, they should set RemoveWhenExpired false (default). 6930 // This way, is the reporter has issues (eg. deadlock) and can't report, the entity is evaluated at error when the health report expires. 6931 // This flags the entity as being in Error health state. 6932 RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` 6933} 6934 6935// HealthInformation represents common health report information. It is included in all health reports sent to 6936// health store and in all health events returned by health queries. 6937type HealthInformation struct { 6938 // SourceID - The source name which identifies the client/watchdog/system component which generated the health information. 6939 SourceID *string `json:"SourceId,omitempty"` 6940 // Property - The property of the health information. An entity can have health reports for different properties. 6941 // The property is a string and not a fixed enumeration to allow the reporter flexibility to categorize the state condition that triggers the report. 6942 // For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available disk on a node, 6943 // so it can report "AvailableDisk" property on that node. 6944 // The same reporter can monitor the node connectivity, so it can report a property "Connectivity" on the same node. 6945 // In the health store, these reports are treated as separate health events for the specified node. 6946 // Together with the SourceId, the property uniquely identifies the health information. 6947 Property *string `json:"Property,omitempty"` 6948 // HealthState - Possible values include: 'HealthState3Invalid', 'HealthState3Ok', 'HealthState3Warning', 'HealthState3Error', 'HealthState3Unknown' 6949 HealthState HealthState3 `json:"HealthState,omitempty"` 6950 // TimeToLiveInMilliSeconds - The duration for which this health report is valid. This field is using ISO8601 format for specifying the duration. 6951 // When clients report periodically, they should send reports with higher frequency than time to live. 6952 // If clients report on transition, they can set the time to live to infinite. 6953 // When time to live expires, the health event that contains the health information 6954 // is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired false. 6955 // If not specified, time to live defaults to infinite value. 6956 TimeToLiveInMilliSeconds *string `json:"TimeToLiveInMilliSeconds,omitempty"` 6957 // Description - The description of the health information. It represents free text used to add human readable information about the report. 6958 // The maximum string length for the description is 4096 characters. 6959 // If the provided string is longer, it will be automatically truncated. 6960 // When truncated, the last characters of the description contain a marker "[Truncated]", and total string size is 4096 characters. 6961 // The presence of the marker indicates to users that truncation occurred. 6962 // Note that when truncated, the description has less than 4096 characters from the original string. 6963 Description *string `json:"Description,omitempty"` 6964 // SequenceNumber - The sequence number for this health report as a numeric string. 6965 // The report sequence number is used by the health store to detect stale reports. 6966 // If not specified, a sequence number is auto-generated by the health client when a report is added. 6967 SequenceNumber *string `json:"SequenceNumber,omitempty"` 6968 // RemoveWhenExpired - Value that indicates whether the report is removed from health store when it expires. 6969 // If set to true, the report is remopved from the health store after it expires. 6970 // If set to false, the report is treated as an error when expired. The value of this property is false by default. 6971 // When clients report periodically, they should set RemoveWhenExpired false (default). 6972 // This way, is the reporter has issues (eg. deadlock) and can't report, the entity is evaluated at error when the health report expires. 6973 // This flags the entity as being in Error health state. 6974 RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` 6975} 6976 6977// HealthStateCount represents information about how many health entities are in Ok, Warning and Error health 6978// state. 6979type HealthStateCount struct { 6980 // OkCount - The number of health entities with aggregated health state Ok. 6981 OkCount *int64 `json:"OkCount,omitempty"` 6982 // WarningCount - The number of health entities with aggregated health state Warning. 6983 WarningCount *int64 `json:"WarningCount,omitempty"` 6984 // ErrorCount - The number of health entities with aggregated health state Error. 6985 ErrorCount *int64 `json:"ErrorCount,omitempty"` 6986} 6987 6988// HealthStatistics the health statistics of an entity, returned as part of the health query result when the query 6989// description is configured to include statistics. 6990// The statistics include health state counts for all children types of the current entity. 6991// For example, for cluster, the health statistics include health state counts for nodes, applications, services, 6992// partitions, replicas, deployed applications and deployed service packages. 6993// For partition, the health statistics include health counts for replicas. 6994type HealthStatistics struct { 6995 // HealthStateCountList - List of health state counts per entity kind, which keeps track of how many children of the queried entity are in Ok, Warning and Error state. 6996 HealthStateCountList *[]EntityKindHealthStateCount `json:"HealthStateCountList,omitempty"` 6997} 6998 6999// ImageStoreContent information about the image store content. 7000type ImageStoreContent struct { 7001 autorest.Response `json:"-"` 7002 // StoreFiles - The list of image store file info objects represents files found under the given image store relative path. 7003 StoreFiles *[]FileInfo `json:"StoreFiles,omitempty"` 7004 // StoreFolders - The list of image store folder info objectes represents subfolders found under the given image store relative path. 7005 StoreFolders *[]FolderInfo `json:"StoreFolders,omitempty"` 7006} 7007 7008// ImageStoreCopyDescription information about how to copy image store content from one image store relative path 7009// to another image store relative path. 7010type ImageStoreCopyDescription struct { 7011 // RemoteSource - The relative path of source image store content to be copied from. 7012 RemoteSource *string `json:"RemoteSource,omitempty"` 7013 // RemoteDestination - The relative path of destination image store content to be copied to. 7014 RemoteDestination *string `json:"RemoteDestination,omitempty"` 7015 // SkipFiles - The list of the file names to be skipped for copying. 7016 SkipFiles *[]string `json:"SkipFiles,omitempty"` 7017 // CheckMarkFile - Indicates whether to check mark file during copying. The property is true if checking mark file is required, false otherwise. The mark file is used to check whether the folder is well constructed. If the property is true and mark file does not exist, the copy is skipped. 7018 CheckMarkFile *bool `json:"CheckMarkFile,omitempty"` 7019} 7020 7021// Int64PropertyValue describes a Service Fabric property value of type Int64. 7022type Int64PropertyValue struct { 7023 // Data - The data of the property value. 7024 Data *string `json:"Data,omitempty"` 7025 // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' 7026 Kind KindBasicPropertyValue `json:"Kind,omitempty"` 7027} 7028 7029// MarshalJSON is the custom marshaler for Int64PropertyValue. 7030func (i6pv Int64PropertyValue) MarshalJSON() ([]byte, error) { 7031 i6pv.Kind = KindInt64 7032 objectMap := make(map[string]interface{}) 7033 if i6pv.Data != nil { 7034 objectMap["Data"] = i6pv.Data 7035 } 7036 if i6pv.Kind != "" { 7037 objectMap["Kind"] = i6pv.Kind 7038 } 7039 return json.Marshal(objectMap) 7040} 7041 7042// AsBinaryPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. 7043func (i6pv Int64PropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { 7044 return nil, false 7045} 7046 7047// AsInt64PropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. 7048func (i6pv Int64PropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { 7049 return &i6pv, true 7050} 7051 7052// AsDoublePropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. 7053func (i6pv Int64PropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { 7054 return nil, false 7055} 7056 7057// AsStringPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. 7058func (i6pv Int64PropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { 7059 return nil, false 7060} 7061 7062// AsGUIDPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. 7063func (i6pv Int64PropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { 7064 return nil, false 7065} 7066 7067// AsPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. 7068func (i6pv Int64PropertyValue) AsPropertyValue() (*PropertyValue, bool) { 7069 return nil, false 7070} 7071 7072// AsBasicPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. 7073func (i6pv Int64PropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { 7074 return &i6pv, true 7075} 7076 7077// Int64RangePartitionInformation describes the partition information for the integer range that is based on 7078// partition schemes. 7079type Int64RangePartitionInformation struct { 7080 // LowKey - Specifies the minimum key value handled by this partition. 7081 LowKey *string `json:"LowKey,omitempty"` 7082 // HighKey - Specifies the maximum key value handled by this partition. 7083 HighKey *string `json:"HighKey,omitempty"` 7084 ID *uuid.UUID `json:"Id,omitempty"` 7085 // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range', 'ServicePartitionKindNamed', 'ServicePartitionKindSingleton' 7086 ServicePartitionKind ServicePartitionKind `json:"ServicePartitionKind,omitempty"` 7087} 7088 7089// MarshalJSON is the custom marshaler for Int64RangePartitionInformation. 7090func (i6rpi Int64RangePartitionInformation) MarshalJSON() ([]byte, error) { 7091 i6rpi.ServicePartitionKind = ServicePartitionKindInt64Range 7092 objectMap := make(map[string]interface{}) 7093 if i6rpi.LowKey != nil { 7094 objectMap["LowKey"] = i6rpi.LowKey 7095 } 7096 if i6rpi.HighKey != nil { 7097 objectMap["HighKey"] = i6rpi.HighKey 7098 } 7099 if i6rpi.ID != nil { 7100 objectMap["Id"] = i6rpi.ID 7101 } 7102 if i6rpi.ServicePartitionKind != "" { 7103 objectMap["ServicePartitionKind"] = i6rpi.ServicePartitionKind 7104 } 7105 return json.Marshal(objectMap) 7106} 7107 7108// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. 7109func (i6rpi Int64RangePartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { 7110 return &i6rpi, true 7111} 7112 7113// AsNamedPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. 7114func (i6rpi Int64RangePartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { 7115 return nil, false 7116} 7117 7118// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. 7119func (i6rpi Int64RangePartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { 7120 return nil, false 7121} 7122 7123// AsPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. 7124func (i6rpi Int64RangePartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { 7125 return nil, false 7126} 7127 7128// AsBasicPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. 7129func (i6rpi Int64RangePartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { 7130 return &i6rpi, true 7131} 7132 7133// InvokeDataLossResult represents information about an operation in a terminal state (Completed or Faulted). 7134type InvokeDataLossResult struct { 7135 // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. 7136 ErrorCode *int32 `json:"ErrorCode,omitempty"` 7137 SelectedPartition *SelectedPartition `json:"SelectedPartition,omitempty"` 7138} 7139 7140// InvokeQuorumLossResult represents information about an operation in a terminal state (Completed or Faulted). 7141type InvokeQuorumLossResult struct { 7142 // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. 7143 ErrorCode *int32 `json:"ErrorCode,omitempty"` 7144 SelectedPartition *SelectedPartition `json:"SelectedPartition,omitempty"` 7145} 7146 7147// KeyValueStoreReplicaStatus key value store related information for the replica. 7148type KeyValueStoreReplicaStatus struct { 7149 // DatabaseRowCountEstimate - Value indicating the estimated number of rows in the underlying database. 7150 DatabaseRowCountEstimate *string `json:"DatabaseRowCountEstimate,omitempty"` 7151 // DatabaseLogicalSizeEstimate - Value indicating the estimated size of the underlying database. 7152 DatabaseLogicalSizeEstimate *string `json:"DatabaseLogicalSizeEstimate,omitempty"` 7153 // CopyNotificationCurrentKeyFilter - Value indicating the latest key-prefix filter applied to enumeration during the callback. Null if there is no pending callback. 7154 CopyNotificationCurrentKeyFilter *string `json:"CopyNotificationCurrentKeyFilter,omitempty"` 7155 // CopyNotificationCurrentProgress - Value indicating the latest number of keys enumerated during the callback. 0 if there is no pending callback. 7156 CopyNotificationCurrentProgress *string `json:"CopyNotificationCurrentProgress,omitempty"` 7157 // StatusDetails - Value indicating the current status details of the replica. 7158 StatusDetails *string `json:"StatusDetails,omitempty"` 7159 // Kind - Possible values include: 'KindReplicaStatusBase', 'KindKeyValueStore' 7160 Kind KindBasicReplicaStatusBase `json:"Kind,omitempty"` 7161} 7162 7163// MarshalJSON is the custom marshaler for KeyValueStoreReplicaStatus. 7164func (kvsrs KeyValueStoreReplicaStatus) MarshalJSON() ([]byte, error) { 7165 kvsrs.Kind = KindKeyValueStore 7166 objectMap := make(map[string]interface{}) 7167 if kvsrs.DatabaseRowCountEstimate != nil { 7168 objectMap["DatabaseRowCountEstimate"] = kvsrs.DatabaseRowCountEstimate 7169 } 7170 if kvsrs.DatabaseLogicalSizeEstimate != nil { 7171 objectMap["DatabaseLogicalSizeEstimate"] = kvsrs.DatabaseLogicalSizeEstimate 7172 } 7173 if kvsrs.CopyNotificationCurrentKeyFilter != nil { 7174 objectMap["CopyNotificationCurrentKeyFilter"] = kvsrs.CopyNotificationCurrentKeyFilter 7175 } 7176 if kvsrs.CopyNotificationCurrentProgress != nil { 7177 objectMap["CopyNotificationCurrentProgress"] = kvsrs.CopyNotificationCurrentProgress 7178 } 7179 if kvsrs.StatusDetails != nil { 7180 objectMap["StatusDetails"] = kvsrs.StatusDetails 7181 } 7182 if kvsrs.Kind != "" { 7183 objectMap["Kind"] = kvsrs.Kind 7184 } 7185 return json.Marshal(objectMap) 7186} 7187 7188// AsKeyValueStoreReplicaStatus is the BasicReplicaStatusBase implementation for KeyValueStoreReplicaStatus. 7189func (kvsrs KeyValueStoreReplicaStatus) AsKeyValueStoreReplicaStatus() (*KeyValueStoreReplicaStatus, bool) { 7190 return &kvsrs, true 7191} 7192 7193// AsReplicaStatusBase is the BasicReplicaStatusBase implementation for KeyValueStoreReplicaStatus. 7194func (kvsrs KeyValueStoreReplicaStatus) AsReplicaStatusBase() (*ReplicaStatusBase, bool) { 7195 return nil, false 7196} 7197 7198// AsBasicReplicaStatusBase is the BasicReplicaStatusBase implementation for KeyValueStoreReplicaStatus. 7199func (kvsrs KeyValueStoreReplicaStatus) AsBasicReplicaStatusBase() (BasicReplicaStatusBase, bool) { 7200 return &kvsrs, true 7201} 7202 7203// ListDeployedApplicationInfo ... 7204type ListDeployedApplicationInfo struct { 7205 autorest.Response `json:"-"` 7206 Value *[]DeployedApplicationInfo `json:"value,omitempty"` 7207} 7208 7209// ListDeployedCodePackageInfo ... 7210type ListDeployedCodePackageInfo struct { 7211 autorest.Response `json:"-"` 7212 Value *[]DeployedCodePackageInfo `json:"value,omitempty"` 7213} 7214 7215// ListDeployedServicePackageInfo ... 7216type ListDeployedServicePackageInfo struct { 7217 autorest.Response `json:"-"` 7218 Value *[]DeployedServicePackageInfo `json:"value,omitempty"` 7219} 7220 7221// ListDeployedServiceReplicaInfo ... 7222type ListDeployedServiceReplicaInfo struct { 7223 autorest.Response `json:"-"` 7224 Value *[]BasicDeployedServiceReplicaInfo `json:"value,omitempty"` 7225} 7226 7227// UnmarshalJSON is the custom unmarshaler for ListDeployedServiceReplicaInfo struct. 7228func (ldsri *ListDeployedServiceReplicaInfo) UnmarshalJSON(body []byte) error { 7229 dsri, err := unmarshalBasicDeployedServiceReplicaInfoArray(body) 7230 if err != nil { 7231 return err 7232 } 7233 ldsri.Value = &dsri 7234 7235 return nil 7236} 7237 7238// ListDeployedServiceTypeInfo ... 7239type ListDeployedServiceTypeInfo struct { 7240 autorest.Response `json:"-"` 7241 Value *[]DeployedServiceTypeInfo `json:"value,omitempty"` 7242} 7243 7244// ListFabricCodeVersionInfo ... 7245type ListFabricCodeVersionInfo struct { 7246 autorest.Response `json:"-"` 7247 Value *[]FabricCodeVersionInfo `json:"value,omitempty"` 7248} 7249 7250// ListFabricConfigVersionInfo ... 7251type ListFabricConfigVersionInfo struct { 7252 autorest.Response `json:"-"` 7253 Value *[]FabricConfigVersionInfo `json:"value,omitempty"` 7254} 7255 7256// ListOperationStatus ... 7257type ListOperationStatus struct { 7258 autorest.Response `json:"-"` 7259 Value *[]OperationStatus `json:"value,omitempty"` 7260} 7261 7262// ListRepairTask ... 7263type ListRepairTask struct { 7264 autorest.Response `json:"-"` 7265 Value *[]RepairTask `json:"value,omitempty"` 7266} 7267 7268// ListServiceTypeInfo ... 7269type ListServiceTypeInfo struct { 7270 autorest.Response `json:"-"` 7271 Value *[]ServiceTypeInfo `json:"value,omitempty"` 7272} 7273 7274// LoadMetricReport represents the load metric report which contains the time metric was reported, its name and 7275// value. 7276type LoadMetricReport struct { 7277 // LastReportedUtc - Gets the UTC time when the load was reported. 7278 LastReportedUtc *date.Time `json:"LastReportedUtc,omitempty"` 7279 // Name - The name of the load metric. 7280 Name *string `json:"Name,omitempty"` 7281 // Value - The value of the load metric. 7282 Value *string `json:"Value,omitempty"` 7283} 7284 7285// LoadMetricReportInfo information about load reported by replica. 7286type LoadMetricReportInfo struct { 7287 // Name - The name of the metric. 7288 Name *string `json:"Name,omitempty"` 7289 // Value - The value of the load for the metric.. 7290 Value *int32 `json:"Value,omitempty"` 7291 // LastReportedUtc - The UTC time when the load is reported. 7292 LastReportedUtc *date.Time `json:"LastReportedUtc,omitempty"` 7293} 7294 7295// MonitoringPolicyDescription describes the parameters for monitoring an upgrade in Monitored mode. 7296type MonitoringPolicyDescription struct { 7297 // FailureAction - Possible values include: 'FailureActionInvalid', 'FailureActionRollback', 'FailureActionManual' 7298 FailureAction FailureAction `json:"FailureAction,omitempty"` 7299 HealthCheckWaitDurationInMilliseconds *string `json:"HealthCheckWaitDurationInMilliseconds,omitempty"` 7300 HealthCheckStableDurationInMilliseconds *string `json:"HealthCheckStableDurationInMilliseconds,omitempty"` 7301 HealthCheckRetryTimeoutInMilliseconds *string `json:"HealthCheckRetryTimeoutInMilliseconds,omitempty"` 7302 UpgradeTimeoutInMilliseconds *string `json:"UpgradeTimeoutInMilliseconds,omitempty"` 7303 UpgradeDomainTimeoutInMilliseconds *string `json:"UpgradeDomainTimeoutInMilliseconds,omitempty"` 7304} 7305 7306// NameDescription describes a Service Fabric name. 7307type NameDescription struct { 7308 Name *string `json:"Name,omitempty"` 7309} 7310 7311// NamedPartitionInformation describes the partition information for the name as a string that is based on 7312// partition schemes. 7313type NamedPartitionInformation struct { 7314 // Name - Name of the partition. 7315 Name *string `json:"Name,omitempty"` 7316 ID *uuid.UUID `json:"Id,omitempty"` 7317 // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range', 'ServicePartitionKindNamed', 'ServicePartitionKindSingleton' 7318 ServicePartitionKind ServicePartitionKind `json:"ServicePartitionKind,omitempty"` 7319} 7320 7321// MarshalJSON is the custom marshaler for NamedPartitionInformation. 7322func (npi NamedPartitionInformation) MarshalJSON() ([]byte, error) { 7323 npi.ServicePartitionKind = ServicePartitionKindNamed 7324 objectMap := make(map[string]interface{}) 7325 if npi.Name != nil { 7326 objectMap["Name"] = npi.Name 7327 } 7328 if npi.ID != nil { 7329 objectMap["Id"] = npi.ID 7330 } 7331 if npi.ServicePartitionKind != "" { 7332 objectMap["ServicePartitionKind"] = npi.ServicePartitionKind 7333 } 7334 return json.Marshal(objectMap) 7335} 7336 7337// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. 7338func (npi NamedPartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { 7339 return nil, false 7340} 7341 7342// AsNamedPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. 7343func (npi NamedPartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { 7344 return &npi, true 7345} 7346 7347// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. 7348func (npi NamedPartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { 7349 return nil, false 7350} 7351 7352// AsPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. 7353func (npi NamedPartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { 7354 return nil, false 7355} 7356 7357// AsBasicPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. 7358func (npi NamedPartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { 7359 return &npi, true 7360} 7361 7362// NamedPartitionSchemeDescription describes the named partition scheme of the service. 7363type NamedPartitionSchemeDescription struct { 7364 // Count - The number of partitions. 7365 Count *int32 `json:"Count,omitempty"` 7366 // Names - Array of size specified by the ‘Count’ parameter, for the names of the partitions. 7367 Names *[]string `json:"Names,omitempty"` 7368 // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range' 7369 PartitionScheme PartitionScheme `json:"PartitionScheme,omitempty"` 7370} 7371 7372// MarshalJSON is the custom marshaler for NamedPartitionSchemeDescription. 7373func (npsd NamedPartitionSchemeDescription) MarshalJSON() ([]byte, error) { 7374 npsd.PartitionScheme = PartitionSchemeNamed 7375 objectMap := make(map[string]interface{}) 7376 if npsd.Count != nil { 7377 objectMap["Count"] = npsd.Count 7378 } 7379 if npsd.Names != nil { 7380 objectMap["Names"] = npsd.Names 7381 } 7382 if npsd.PartitionScheme != "" { 7383 objectMap["PartitionScheme"] = npsd.PartitionScheme 7384 } 7385 return json.Marshal(objectMap) 7386} 7387 7388// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. 7389func (npsd NamedPartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { 7390 return &npsd, true 7391} 7392 7393// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. 7394func (npsd NamedPartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { 7395 return nil, false 7396} 7397 7398// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. 7399func (npsd NamedPartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { 7400 return nil, false 7401} 7402 7403// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. 7404func (npsd NamedPartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { 7405 return nil, false 7406} 7407 7408// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. 7409func (npsd NamedPartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { 7410 return &npsd, true 7411} 7412 7413// NodeDeactivationInfo information about the node deactivation. This information is valid for a node that is 7414// undergoing deactivation or has already been deactivated. 7415type NodeDeactivationInfo struct { 7416 // NodeDeactivationIntent - Possible values include: 'NodeDeactivationIntent1Invalid', 'NodeDeactivationIntent1Pause', 'NodeDeactivationIntent1Restart', 'NodeDeactivationIntent1RemoveData', 'NodeDeactivationIntent1RemoveNode' 7417 NodeDeactivationIntent NodeDeactivationIntent1 `json:"NodeDeactivationIntent,omitempty"` 7418 // NodeDeactivationStatus - Possible values include: 'NodeDeactivationStatusNone', 'NodeDeactivationStatusSafetyCheckInProgress', 'NodeDeactivationStatusSafetyCheckComplete', 'NodeDeactivationStatusCompleted' 7419 NodeDeactivationStatus NodeDeactivationStatus `json:"NodeDeactivationStatus,omitempty"` 7420 NodeDeactivationTask *[]NodeDeactivationTask `json:"NodeDeactivationTask,omitempty"` 7421 PendingSafetyChecks *[]SafetyCheckWrapper `json:"PendingSafetyChecks,omitempty"` 7422} 7423 7424// NodeDeactivationTask the task representing the deactivation operation on the node. 7425type NodeDeactivationTask struct { 7426 NodeDeactivationTaskID *NodeDeactivationTaskID `json:"NodeDeactivationTaskId,omitempty"` 7427 // NodeDeactivationIntent - Possible values include: 'NodeDeactivationIntentInvalid', 'NodeDeactivationIntentPause', 'NodeDeactivationIntentRestart', 'NodeDeactivationIntentRemoveData', 'NodeDeactivationIntentRemoveNode' 7428 NodeDeactivationIntent NodeDeactivationIntent `json:"NodeDeactivationIntent,omitempty"` 7429} 7430 7431// NodeDeactivationTaskID identity of the task related to deactivation operation on the node. 7432type NodeDeactivationTaskID struct { 7433 // ID - Value of the task id. 7434 ID *string `json:"Id,omitempty"` 7435 // NodeDeactivationTaskType - Possible values include: 'NodeDeactivationTaskTypeInvalid', 'NodeDeactivationTaskTypeInfrastructure', 'NodeDeactivationTaskTypeRepair', 'NodeDeactivationTaskTypeClient' 7436 NodeDeactivationTaskType NodeDeactivationTaskType `json:"NodeDeactivationTaskType,omitempty"` 7437} 7438 7439// NodeHealth information about the health of a Service Fabric node. 7440type NodeHealth struct { 7441 autorest.Response `json:"-"` 7442 Name *string `json:"Name,omitempty"` 7443 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 7444 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 7445 // HealthEvents - The list of health events reported on the entity. 7446 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 7447 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 7448 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 7449} 7450 7451// NodeHealthEvaluation represents health evaluation for a node, containing information about the data and the 7452// algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health 7453// state is either Error or Warning. 7454type NodeHealthEvaluation struct { 7455 NodeName *string `json:"NodeName,omitempty"` 7456 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 7457 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 7458 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 7459 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 7460 Description *string `json:"Description,omitempty"` 7461 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 7462 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 7463} 7464 7465// MarshalJSON is the custom marshaler for NodeHealthEvaluation. 7466func (nhe NodeHealthEvaluation) MarshalJSON() ([]byte, error) { 7467 nhe.Kind = KindNode 7468 objectMap := make(map[string]interface{}) 7469 if nhe.NodeName != nil { 7470 objectMap["NodeName"] = nhe.NodeName 7471 } 7472 if nhe.UnhealthyEvaluations != nil { 7473 objectMap["UnhealthyEvaluations"] = nhe.UnhealthyEvaluations 7474 } 7475 if nhe.AggregatedHealthState != "" { 7476 objectMap["AggregatedHealthState"] = nhe.AggregatedHealthState 7477 } 7478 if nhe.Description != nil { 7479 objectMap["Description"] = nhe.Description 7480 } 7481 if nhe.Kind != "" { 7482 objectMap["Kind"] = nhe.Kind 7483 } 7484 return json.Marshal(objectMap) 7485} 7486 7487// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7488func (nhe NodeHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 7489 return nil, false 7490} 7491 7492// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7493func (nhe NodeHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 7494 return nil, false 7495} 7496 7497// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7498func (nhe NodeHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 7499 return nil, false 7500} 7501 7502// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7503func (nhe NodeHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 7504 return nil, false 7505} 7506 7507// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7508func (nhe NodeHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 7509 return nil, false 7510} 7511 7512// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7513func (nhe NodeHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 7514 return nil, false 7515} 7516 7517// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7518func (nhe NodeHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 7519 return nil, false 7520} 7521 7522// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7523func (nhe NodeHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 7524 return nil, false 7525} 7526 7527// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7528func (nhe NodeHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 7529 return nil, false 7530} 7531 7532// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7533func (nhe NodeHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 7534 return &nhe, true 7535} 7536 7537// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7538func (nhe NodeHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 7539 return nil, false 7540} 7541 7542// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7543func (nhe NodeHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 7544 return nil, false 7545} 7546 7547// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7548func (nhe NodeHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 7549 return nil, false 7550} 7551 7552// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7553func (nhe NodeHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 7554 return nil, false 7555} 7556 7557// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7558func (nhe NodeHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 7559 return nil, false 7560} 7561 7562// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7563func (nhe NodeHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 7564 return nil, false 7565} 7566 7567// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7568func (nhe NodeHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 7569 return nil, false 7570} 7571 7572// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7573func (nhe NodeHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 7574 return nil, false 7575} 7576 7577// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7578func (nhe NodeHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 7579 return nil, false 7580} 7581 7582// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7583func (nhe NodeHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 7584 return nil, false 7585} 7586 7587// AsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7588func (nhe NodeHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 7589 return nil, false 7590} 7591 7592// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. 7593func (nhe NodeHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 7594 return &nhe, true 7595} 7596 7597// NodeHealthState represents the health state of a node, which contains the node identifier and its aggregated 7598// health state. 7599type NodeHealthState struct { 7600 Name *string `json:"Name,omitempty"` 7601 ID *NodeID `json:"Id,omitempty"` 7602 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 7603 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 7604} 7605 7606// NodeHealthStateChunk represents the health state chunk of a node, which contains the node name and its 7607// aggregated health state. 7608type NodeHealthStateChunk struct { 7609 NodeName *string `json:"NodeName,omitempty"` 7610 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 7611 HealthState HealthState2 `json:"HealthState,omitempty"` 7612} 7613 7614// NodeHealthStateChunkList the list of node health state chunks in the cluster that respect the input filters in 7615// the chunk query. Returned by get cluster health state chunks query. 7616type NodeHealthStateChunkList struct { 7617 // Items - The list of node health state chunks that respect the input filters in the chunk query. 7618 Items *[]NodeHealthStateChunk `json:"Items,omitempty"` 7619 // TotalCount - Total number of entity health state objects that match the specified filters from the cluster health chunk query description. 7620 TotalCount *int64 `json:"TotalCount,omitempty"` 7621} 7622 7623// NodeHealthStateFilter defines matching criteria to determine whether a node should be included in the returned 7624// cluster health chunk. 7625// One filter can match zero, one or multiple nodes, depending on its properties. 7626// Can be specified in the cluster health chunk query description. 7627type NodeHealthStateFilter struct { 7628 // NodeNameFilter - Name of the node that matches the filter. The filter is applied only to the specified node, if it exists. 7629 // If the node doesn't exist, no node is returned in the cluster health chunk based on this filter. 7630 // If the node exists, it is included in the cluster health chunk if the health state matches the other filter properties. 7631 // If not specified, all nodes that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. 7632 NodeNameFilter *string `json:"NodeNameFilter,omitempty"` 7633 // HealthStateFilter - The filter for the health state of the nodes. It allows selecting nodes if they match the desired health states. 7634 // The possible values are integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the cluster aggregated health state. 7635 // If not specified, default value is None, unless the node name is specified. If the filter has default value and node name is specified, the matching node is returned. 7636 // The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. 7637 // For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and Warning (4). 7638 // - Default - Default value. Matches any HealthState. The value is zero. 7639 // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. 7640 // - Ok - Filter that matches input with HealthState value Ok. The value is 2. 7641 // - Warning - Filter that matches input with HealthState value Warning. The value is 4. 7642 // - Error - Filter that matches input with HealthState value Error. The value is 8. 7643 // - All - Filter that matches input with any HealthState value. The value is 65535. 7644 HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` 7645} 7646 7647// NodeID an internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically generated 7648// from node name. 7649type NodeID struct { 7650 // ID - Value of the node Id. This is a 128 bit integer. 7651 ID *string `json:"Id,omitempty"` 7652} 7653 7654// NodeImpact describes the expected impact of a repair to a particular node. 7655// 7656// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 7657type NodeImpact struct { 7658 // NodeName - The name of the impacted node. 7659 NodeName *string `json:"NodeName,omitempty"` 7660 // ImpactLevel - The level of impact expected. Possible values include: 'ImpactLevelInvalid', 'ImpactLevelNone', 'ImpactLevelRestart', 'ImpactLevelRemoveData', 'ImpactLevelRemoveNode' 7661 ImpactLevel ImpactLevel `json:"ImpactLevel,omitempty"` 7662} 7663 7664// NodeInfo information about a node in Service Fabric cluster. 7665type NodeInfo struct { 7666 autorest.Response `json:"-"` 7667 Name *string `json:"Name,omitempty"` 7668 // IPAddressOrFQDN - The IP address or fully qualified domain name of the node. 7669 IPAddressOrFQDN *string `json:"IpAddressOrFQDN,omitempty"` 7670 // Type - The type of the node. 7671 Type *string `json:"Type,omitempty"` 7672 // CodeVersion - The version of Service Fabric binaries that the node is running. 7673 CodeVersion *string `json:"CodeVersion,omitempty"` 7674 // ConfigVersion - The version of Service Fabric cluster manifest that the node is using. 7675 ConfigVersion *string `json:"ConfigVersion,omitempty"` 7676 // NodeStatus - Possible values include: 'NodeStatusInvalid', 'NodeStatusUp', 'NodeStatusDown', 'NodeStatusEnabling', 'NodeStatusDisabling', 'NodeStatusDisabled', 'NodeStatusUnknown', 'NodeStatusRemoved' 7677 NodeStatus NodeStatus `json:"NodeStatus,omitempty"` 7678 // NodeUpTimeInSeconds - Time in seconds since the node has been in NodeStatus Up. Value ero indicates that the node is not Up. 7679 NodeUpTimeInSeconds *string `json:"NodeUpTimeInSeconds,omitempty"` 7680 // HealthState - Possible values include: 'HealthState4Invalid', 'HealthState4Ok', 'HealthState4Warning', 'HealthState4Error', 'HealthState4Unknown' 7681 HealthState HealthState4 `json:"HealthState,omitempty"` 7682 // IsSeedNode - Indicates if the node is a seed node or not. Returns true if the node is a seed node, otherwise false. A quorum of seed nodes are required for proper operation of Service Fabric cluster. 7683 IsSeedNode *bool `json:"IsSeedNode,omitempty"` 7684 // UpgradeDomain - The upgrade domain of the node. 7685 UpgradeDomain *string `json:"UpgradeDomain,omitempty"` 7686 // FaultDomain - The fault domain of the node. 7687 FaultDomain *string `json:"FaultDomain,omitempty"` 7688 ID *NodeID `json:"Id,omitempty"` 7689 // InstanceID - The id representing the node instance. While the Id of the node is deterministically generated from the node name and remains same across restarts, the InstanceId changes every time node restarts. 7690 InstanceID *string `json:"InstanceId,omitempty"` 7691 NodeDeactivationInfo *NodeDeactivationInfo `json:"NodeDeactivationInfo,omitempty"` 7692 // IsStopped - Indicates if the node is stopped by calling stop node API or not. Returns true if the node is stopped, otherwise false. 7693 IsStopped *bool `json:"IsStopped,omitempty"` 7694 // NodeDownTimeInSeconds - Time in seconds since the node has been in NodeStatus Down. Value zero indicates node is not NodeStatus Down. 7695 NodeDownTimeInSeconds *string `json:"NodeDownTimeInSeconds,omitempty"` 7696 // NodeUpAt - Date time in UTC when the node came up. If the node has never been up then this value will be zero date time. 7697 NodeUpAt *date.Time `json:"NodeUpAt,omitempty"` 7698 // NodeDownAt - Date time in UTC when the node went down. If node has never been down then this value will be zero date time. 7699 NodeDownAt *date.Time `json:"NodeDownAt,omitempty"` 7700} 7701 7702// NodeLoadInfo information about load on a Service Fabric node. It holds a summary of all metrics and their load 7703// on a node. 7704type NodeLoadInfo struct { 7705 autorest.Response `json:"-"` 7706 NodeName *string `json:"NodeName,omitempty"` 7707 // NodeLoadMetricInformation - List that contains metrics and their load information on this node. 7708 NodeLoadMetricInformation *[]NodeLoadMetricInformation `json:"NodeLoadMetricInformation,omitempty"` 7709} 7710 7711// NodeLoadMetricInformation represents data structure that contains load information for a certain metric on a 7712// node. 7713type NodeLoadMetricInformation struct { 7714 // Name - Name of the metric for which this load information is provided. 7715 Name *string `json:"Name,omitempty"` 7716 // NodeCapacity - Total capacity on the node for this metric. 7717 NodeCapacity *string `json:"NodeCapacity,omitempty"` 7718 // NodeLoad - Current load on the node for this metric. 7719 NodeLoad *string `json:"NodeLoad,omitempty"` 7720 // NodeRemainingCapacity - The remaining capacity on the node for this metric. 7721 NodeRemainingCapacity *string `json:"NodeRemainingCapacity,omitempty"` 7722 // IsCapacityViolation - Indicates if there is a capacity violation for this metric on the node. 7723 IsCapacityViolation *bool `json:"IsCapacityViolation,omitempty"` 7724 // NodeBufferedCapacity - The value that indicates the reserved capacity for this metric on the node. 7725 NodeBufferedCapacity *string `json:"NodeBufferedCapacity,omitempty"` 7726 // NodeRemainingBufferedCapacity - The remaining reserved capacity for this metric on the node. 7727 NodeRemainingBufferedCapacity *string `json:"NodeRemainingBufferedCapacity,omitempty"` 7728} 7729 7730// NodeRepairImpactDescription describes the expected impact of a repair on a set of nodes. 7731// 7732// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 7733type NodeRepairImpactDescription struct { 7734 // NodeImpactList - The list of nodes impacted by a repair action and their respective expected impact. 7735 NodeImpactList *[]NodeImpact `json:"NodeImpactList,omitempty"` 7736 // Kind - Possible values include: 'KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase', 'KindBasicRepairImpactDescriptionBaseKindNode' 7737 Kind KindBasicRepairImpactDescriptionBase `json:"Kind,omitempty"` 7738} 7739 7740// MarshalJSON is the custom marshaler for NodeRepairImpactDescription. 7741func (nrid NodeRepairImpactDescription) MarshalJSON() ([]byte, error) { 7742 nrid.Kind = KindBasicRepairImpactDescriptionBaseKindNode 7743 objectMap := make(map[string]interface{}) 7744 if nrid.NodeImpactList != nil { 7745 objectMap["NodeImpactList"] = nrid.NodeImpactList 7746 } 7747 if nrid.Kind != "" { 7748 objectMap["Kind"] = nrid.Kind 7749 } 7750 return json.Marshal(objectMap) 7751} 7752 7753// AsNodeRepairImpactDescription is the BasicRepairImpactDescriptionBase implementation for NodeRepairImpactDescription. 7754func (nrid NodeRepairImpactDescription) AsNodeRepairImpactDescription() (*NodeRepairImpactDescription, bool) { 7755 return &nrid, true 7756} 7757 7758// AsRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for NodeRepairImpactDescription. 7759func (nrid NodeRepairImpactDescription) AsRepairImpactDescriptionBase() (*RepairImpactDescriptionBase, bool) { 7760 return nil, false 7761} 7762 7763// AsBasicRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for NodeRepairImpactDescription. 7764func (nrid NodeRepairImpactDescription) AsBasicRepairImpactDescriptionBase() (BasicRepairImpactDescriptionBase, bool) { 7765 return &nrid, true 7766} 7767 7768// NodeRepairTargetDescription describes the list of nodes targeted by a repair action. 7769// 7770// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 7771type NodeRepairTargetDescription struct { 7772 // NodeNames - The list of nodes targeted by a repair action. 7773 NodeNames *[]string `json:"NodeNames,omitempty"` 7774 // Kind - Possible values include: 'KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase', 'KindBasicRepairTargetDescriptionBaseKindNode' 7775 Kind KindBasicRepairTargetDescriptionBase `json:"Kind,omitempty"` 7776} 7777 7778// MarshalJSON is the custom marshaler for NodeRepairTargetDescription. 7779func (nrtd NodeRepairTargetDescription) MarshalJSON() ([]byte, error) { 7780 nrtd.Kind = KindBasicRepairTargetDescriptionBaseKindNode 7781 objectMap := make(map[string]interface{}) 7782 if nrtd.NodeNames != nil { 7783 objectMap["NodeNames"] = nrtd.NodeNames 7784 } 7785 if nrtd.Kind != "" { 7786 objectMap["Kind"] = nrtd.Kind 7787 } 7788 return json.Marshal(objectMap) 7789} 7790 7791// AsNodeRepairTargetDescription is the BasicRepairTargetDescriptionBase implementation for NodeRepairTargetDescription. 7792func (nrtd NodeRepairTargetDescription) AsNodeRepairTargetDescription() (*NodeRepairTargetDescription, bool) { 7793 return &nrtd, true 7794} 7795 7796// AsRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for NodeRepairTargetDescription. 7797func (nrtd NodeRepairTargetDescription) AsRepairTargetDescriptionBase() (*RepairTargetDescriptionBase, bool) { 7798 return nil, false 7799} 7800 7801// AsBasicRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for NodeRepairTargetDescription. 7802func (nrtd NodeRepairTargetDescription) AsBasicRepairTargetDescriptionBase() (BasicRepairTargetDescriptionBase, bool) { 7803 return &nrtd, true 7804} 7805 7806// NodeResult contains information about a node that was targeted by a user-induced operation. 7807type NodeResult struct { 7808 NodeName *string `json:"NodeName,omitempty"` 7809 // NodeInstanceID - The node instance id. 7810 NodeInstanceID *string `json:"NodeInstanceId,omitempty"` 7811} 7812 7813// NodesHealthEvaluation represents health evaluation for nodes, containing health evaluations for each unhealthy 7814// node that impacted current aggregated health state. Can be returned when evaluating cluster health and the 7815// aggregated health state is either Error or Warning. 7816type NodesHealthEvaluation struct { 7817 // MaxPercentUnhealthyNodes - Maximum allowed percentage of unhealthy nodes from the ClusterHealthPolicy. 7818 MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` 7819 // TotalCount - Total number of nodes found in the health store. 7820 TotalCount *int64 `json:"TotalCount,omitempty"` 7821 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 7822 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 7823 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 7824 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 7825 Description *string `json:"Description,omitempty"` 7826 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 7827 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 7828} 7829 7830// MarshalJSON is the custom marshaler for NodesHealthEvaluation. 7831func (nhe NodesHealthEvaluation) MarshalJSON() ([]byte, error) { 7832 nhe.Kind = KindNodes 7833 objectMap := make(map[string]interface{}) 7834 if nhe.MaxPercentUnhealthyNodes != nil { 7835 objectMap["MaxPercentUnhealthyNodes"] = nhe.MaxPercentUnhealthyNodes 7836 } 7837 if nhe.TotalCount != nil { 7838 objectMap["TotalCount"] = nhe.TotalCount 7839 } 7840 if nhe.UnhealthyEvaluations != nil { 7841 objectMap["UnhealthyEvaluations"] = nhe.UnhealthyEvaluations 7842 } 7843 if nhe.AggregatedHealthState != "" { 7844 objectMap["AggregatedHealthState"] = nhe.AggregatedHealthState 7845 } 7846 if nhe.Description != nil { 7847 objectMap["Description"] = nhe.Description 7848 } 7849 if nhe.Kind != "" { 7850 objectMap["Kind"] = nhe.Kind 7851 } 7852 return json.Marshal(objectMap) 7853} 7854 7855// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7856func (nhe NodesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 7857 return nil, false 7858} 7859 7860// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7861func (nhe NodesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 7862 return nil, false 7863} 7864 7865// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7866func (nhe NodesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 7867 return nil, false 7868} 7869 7870// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7871func (nhe NodesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 7872 return nil, false 7873} 7874 7875// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7876func (nhe NodesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 7877 return nil, false 7878} 7879 7880// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7881func (nhe NodesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 7882 return nil, false 7883} 7884 7885// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7886func (nhe NodesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 7887 return nil, false 7888} 7889 7890// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7891func (nhe NodesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 7892 return nil, false 7893} 7894 7895// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7896func (nhe NodesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 7897 return nil, false 7898} 7899 7900// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7901func (nhe NodesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 7902 return nil, false 7903} 7904 7905// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7906func (nhe NodesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 7907 return &nhe, true 7908} 7909 7910// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7911func (nhe NodesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 7912 return nil, false 7913} 7914 7915// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7916func (nhe NodesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 7917 return nil, false 7918} 7919 7920// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7921func (nhe NodesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 7922 return nil, false 7923} 7924 7925// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7926func (nhe NodesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 7927 return nil, false 7928} 7929 7930// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7931func (nhe NodesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 7932 return nil, false 7933} 7934 7935// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7936func (nhe NodesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 7937 return nil, false 7938} 7939 7940// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7941func (nhe NodesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 7942 return nil, false 7943} 7944 7945// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7946func (nhe NodesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 7947 return nil, false 7948} 7949 7950// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7951func (nhe NodesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 7952 return nil, false 7953} 7954 7955// AsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7956func (nhe NodesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 7957 return nil, false 7958} 7959 7960// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. 7961func (nhe NodesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 7962 return &nhe, true 7963} 7964 7965// NodeTransitionProgress information about an NodeTransition operation. This class contains an OperationState and 7966// a NodeTransitionResult. The NodeTransitionResult is not valid until OperationState 7967// is Completed or Faulted. 7968type NodeTransitionProgress struct { 7969 autorest.Response `json:"-"` 7970 // State - Possible values include: 'State1Invalid', 'State1Running', 'State1RollingBack', 'State1Completed', 'State1Faulted', 'State1Cancelled', 'State1ForceCancelled' 7971 State State1 `json:"State,omitempty"` 7972 NodeTransitionResult *NodeTransitionResult `json:"NodeTransitionResult,omitempty"` 7973} 7974 7975// NodeTransitionResult represents information about an operation in a terminal state (Completed or Faulted). 7976type NodeTransitionResult struct { 7977 // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. 7978 ErrorCode *int32 `json:"ErrorCode,omitempty"` 7979 NodeResult *NodeResult `json:"NodeResult,omitempty"` 7980} 7981 7982// NodeUpgradeProgressInfo information about the upgrading node and its status 7983type NodeUpgradeProgressInfo struct { 7984 NodeName *string `json:"NodeName,omitempty"` 7985 // UpgradePhase - Possible values include: 'UpgradePhaseInvalid', 'UpgradePhasePreUpgradeSafetyCheck', 'UpgradePhaseUpgrading', 'UpgradePhasePostUpgradeSafetyCheck' 7986 UpgradePhase UpgradePhase `json:"UpgradePhase,omitempty"` 7987 PendingSafetyChecks *[]SafetyCheckWrapper `json:"PendingSafetyChecks,omitempty"` 7988} 7989 7990// OperationStatus contains the OperationId, OperationState, and OperationType for user-induced operations. 7991type OperationStatus struct { 7992 OperationID *uuid.UUID `json:"OperationId,omitempty"` 7993 // State - Possible values include: 'State2Invalid', 'State2Running', 'State2RollingBack', 'State2Completed', 'State2Faulted', 'State2Cancelled', 'State2ForceCancelled' 7994 State State2 `json:"State,omitempty"` 7995 // Type - Possible values include: 'TypeInvalid', 'TypePartitionDataLoss', 'TypePartitionQuorumLoss', 'TypePartitionRestart', 'TypeNodeTransition' 7996 Type Type `json:"Type,omitempty"` 7997} 7998 7999// PackageSharingPolicyInfo represents a policy for the package sharing. 8000type PackageSharingPolicyInfo struct { 8001 // SharedPackageName - The name of code, configuration or data package that should be shared. 8002 SharedPackageName *string `json:"SharedPackageName,omitempty"` 8003 // PackageSharingScope - Possible values include: 'PackageSharingScopeNone', 'PackageSharingScopeAll', 'PackageSharingScopeCode', 'PackageSharingScopeConfig', 'PackageSharingScopeData' 8004 PackageSharingScope PackageSharingScope `json:"PackageSharingScope,omitempty"` 8005} 8006 8007// PagedApplicationInfoList the list of applications in the cluster. The list is paged when all of the results 8008// cannot fit in a single message. The next set of results can be obtained by executing the same query with the 8009// continuation token provided in this list. 8010type PagedApplicationInfoList struct { 8011 autorest.Response `json:"-"` 8012 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8013 Items *[]ApplicationInfo `json:"Items,omitempty"` 8014} 8015 8016// PagedApplicationTypeInfoList the list of application types that are provisioned or being provisioned in the 8017// cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can 8018// be obtained by executing the same query with the continuation token provided in this list. 8019type PagedApplicationTypeInfoList struct { 8020 autorest.Response `json:"-"` 8021 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8022 Items *[]ApplicationTypeInfo `json:"Items,omitempty"` 8023} 8024 8025// PagedComposeDeploymentStatusInfoList the list of compose deployments in the cluster. The list is paged when all 8026// of the results cannot fit in a single message. The next set of results can be obtained by executing the same 8027// query with the continuation token provided in this list. 8028type PagedComposeDeploymentStatusInfoList struct { 8029 autorest.Response `json:"-"` 8030 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8031 Items *[]ComposeDeploymentStatusInfo `json:"Items,omitempty"` 8032} 8033 8034// PagedNodeInfoList the list of nodes in the cluster. The list is paged when all of the results cannot fit in a 8035// single message. The next set of results can be obtained by executing the same query with the continuation token 8036// provided in this list. 8037type PagedNodeInfoList struct { 8038 autorest.Response `json:"-"` 8039 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8040 Items *[]NodeInfo `json:"Items,omitempty"` 8041} 8042 8043// PagedPropertyInfoList the paged list of Service Fabric properties under a given name. The list is paged when all 8044// of the results cannot fit in a single message. The next set of results can be obtained by executing the same 8045// query with the continuation token provided in this list. 8046type PagedPropertyInfoList struct { 8047 autorest.Response `json:"-"` 8048 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8049 // IsConsistent - Indicates whether any property under the given name has been modified during the enumeration. If there was a modification, this property value is false. 8050 IsConsistent *bool `json:"IsConsistent,omitempty"` 8051 Properties *[]PropertyInfo `json:"Properties,omitempty"` 8052} 8053 8054// PagedReplicaInfoList the list of replicas in the cluster for a given partition. The list is paged when all of 8055// the results cannot fit in a single message. The next set of results can be obtained by executing the same query 8056// with the continuation token provided in this list. 8057type PagedReplicaInfoList struct { 8058 autorest.Response `json:"-"` 8059 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8060 Items *[]BasicReplicaInfo `json:"Items,omitempty"` 8061} 8062 8063// UnmarshalJSON is the custom unmarshaler for PagedReplicaInfoList struct. 8064func (pril *PagedReplicaInfoList) UnmarshalJSON(body []byte) error { 8065 var m map[string]*json.RawMessage 8066 err := json.Unmarshal(body, &m) 8067 if err != nil { 8068 return err 8069 } 8070 for k, v := range m { 8071 switch k { 8072 case "ContinuationToken": 8073 if v != nil { 8074 var continuationToken string 8075 err = json.Unmarshal(*v, &continuationToken) 8076 if err != nil { 8077 return err 8078 } 8079 pril.ContinuationToken = &continuationToken 8080 } 8081 case "Items": 8082 if v != nil { 8083 items, err := unmarshalBasicReplicaInfoArray(*v) 8084 if err != nil { 8085 return err 8086 } 8087 pril.Items = &items 8088 } 8089 } 8090 } 8091 8092 return nil 8093} 8094 8095// PagedServiceInfoList the list of services in the cluster for an application. The list is paged when all of the 8096// results cannot fit in a single message. The next set of results can be obtained by executing the same query with 8097// the continuation token provided in this list. 8098type PagedServiceInfoList struct { 8099 autorest.Response `json:"-"` 8100 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8101 Items *[]BasicServiceInfo `json:"Items,omitempty"` 8102} 8103 8104// UnmarshalJSON is the custom unmarshaler for PagedServiceInfoList struct. 8105func (psil *PagedServiceInfoList) UnmarshalJSON(body []byte) error { 8106 var m map[string]*json.RawMessage 8107 err := json.Unmarshal(body, &m) 8108 if err != nil { 8109 return err 8110 } 8111 for k, v := range m { 8112 switch k { 8113 case "ContinuationToken": 8114 if v != nil { 8115 var continuationToken string 8116 err = json.Unmarshal(*v, &continuationToken) 8117 if err != nil { 8118 return err 8119 } 8120 psil.ContinuationToken = &continuationToken 8121 } 8122 case "Items": 8123 if v != nil { 8124 items, err := unmarshalBasicServiceInfoArray(*v) 8125 if err != nil { 8126 return err 8127 } 8128 psil.Items = &items 8129 } 8130 } 8131 } 8132 8133 return nil 8134} 8135 8136// PagedServicePartitionInfoList the list of partition in the cluster for a service. The list is paged when all of 8137// the results cannot fit in a single message. The next set of results can be obtained by executing the same query 8138// with the continuation token provided in this list. 8139type PagedServicePartitionInfoList struct { 8140 autorest.Response `json:"-"` 8141 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8142 Items *[]BasicServicePartitionInfo `json:"Items,omitempty"` 8143} 8144 8145// UnmarshalJSON is the custom unmarshaler for PagedServicePartitionInfoList struct. 8146func (pspil *PagedServicePartitionInfoList) UnmarshalJSON(body []byte) error { 8147 var m map[string]*json.RawMessage 8148 err := json.Unmarshal(body, &m) 8149 if err != nil { 8150 return err 8151 } 8152 for k, v := range m { 8153 switch k { 8154 case "ContinuationToken": 8155 if v != nil { 8156 var continuationToken string 8157 err = json.Unmarshal(*v, &continuationToken) 8158 if err != nil { 8159 return err 8160 } 8161 pspil.ContinuationToken = &continuationToken 8162 } 8163 case "Items": 8164 if v != nil { 8165 items, err := unmarshalBasicServicePartitionInfoArray(*v) 8166 if err != nil { 8167 return err 8168 } 8169 pspil.Items = &items 8170 } 8171 } 8172 } 8173 8174 return nil 8175} 8176 8177// PagedSubNameInfoList a paged list of Service Fabric names. The list is paged when all of the results cannot fit 8178// in a single message. The next set of results can be obtained by executing the same query with the continuation 8179// token provided in this list. 8180type PagedSubNameInfoList struct { 8181 autorest.Response `json:"-"` 8182 ContinuationToken *string `json:"ContinuationToken,omitempty"` 8183 // IsConsistent - Indicates whether any name under the given name has been modified during the enumeration. If there was a modification, this property value is false. 8184 IsConsistent *bool `json:"IsConsistent,omitempty"` 8185 SubNames *[]string `json:"SubNames,omitempty"` 8186} 8187 8188// PartitionDataLossProgress information about a partition data loss user-induced operation. 8189type PartitionDataLossProgress struct { 8190 autorest.Response `json:"-"` 8191 // State - Possible values include: 'State3Invalid', 'State3Running', 'State3RollingBack', 'State3Completed', 'State3Faulted', 'State3Cancelled', 'State3ForceCancelled' 8192 State State3 `json:"State,omitempty"` 8193 InvokeDataLossResult *InvokeDataLossResult `json:"InvokeDataLossResult,omitempty"` 8194} 8195 8196// PartitionHealth information about the health of a Service Fabric partition. 8197type PartitionHealth struct { 8198 autorest.Response `json:"-"` 8199 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 8200 // ReplicaHealthStates - The list of replica health states associated with the partition. 8201 ReplicaHealthStates *[]BasicReplicaHealthState `json:"ReplicaHealthStates,omitempty"` 8202 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 8203 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 8204 // HealthEvents - The list of health events reported on the entity. 8205 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 8206 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 8207 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 8208} 8209 8210// UnmarshalJSON is the custom unmarshaler for PartitionHealth struct. 8211func (ph *PartitionHealth) UnmarshalJSON(body []byte) error { 8212 var m map[string]*json.RawMessage 8213 err := json.Unmarshal(body, &m) 8214 if err != nil { 8215 return err 8216 } 8217 for k, v := range m { 8218 switch k { 8219 case "PartitionId": 8220 if v != nil { 8221 var partitionID uuid.UUID 8222 err = json.Unmarshal(*v, &partitionID) 8223 if err != nil { 8224 return err 8225 } 8226 ph.PartitionID = &partitionID 8227 } 8228 case "ReplicaHealthStates": 8229 if v != nil { 8230 replicaHealthStates, err := unmarshalBasicReplicaHealthStateArray(*v) 8231 if err != nil { 8232 return err 8233 } 8234 ph.ReplicaHealthStates = &replicaHealthStates 8235 } 8236 case "AggregatedHealthState": 8237 if v != nil { 8238 var aggregatedHealthState AggregatedHealthState1 8239 err = json.Unmarshal(*v, &aggregatedHealthState) 8240 if err != nil { 8241 return err 8242 } 8243 ph.AggregatedHealthState = aggregatedHealthState 8244 } 8245 case "HealthEvents": 8246 if v != nil { 8247 var healthEvents []HealthEvent 8248 err = json.Unmarshal(*v, &healthEvents) 8249 if err != nil { 8250 return err 8251 } 8252 ph.HealthEvents = &healthEvents 8253 } 8254 case "UnhealthyEvaluations": 8255 if v != nil { 8256 var unhealthyEvaluations []HealthEvaluationWrapper 8257 err = json.Unmarshal(*v, &unhealthyEvaluations) 8258 if err != nil { 8259 return err 8260 } 8261 ph.UnhealthyEvaluations = &unhealthyEvaluations 8262 } 8263 case "HealthStatistics": 8264 if v != nil { 8265 var healthStatistics HealthStatistics 8266 err = json.Unmarshal(*v, &healthStatistics) 8267 if err != nil { 8268 return err 8269 } 8270 ph.HealthStatistics = &healthStatistics 8271 } 8272 } 8273 } 8274 8275 return nil 8276} 8277 8278// PartitionHealthEvaluation represents health evaluation for a partition, containing information about the data 8279// and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated 8280// health state is either Error or Warning. 8281type PartitionHealthEvaluation struct { 8282 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 8283 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 8284 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 8285 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 8286 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 8287 Description *string `json:"Description,omitempty"` 8288 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 8289 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 8290} 8291 8292// MarshalJSON is the custom marshaler for PartitionHealthEvaluation. 8293func (phe PartitionHealthEvaluation) MarshalJSON() ([]byte, error) { 8294 phe.Kind = KindPartition 8295 objectMap := make(map[string]interface{}) 8296 if phe.PartitionID != nil { 8297 objectMap["PartitionId"] = phe.PartitionID 8298 } 8299 if phe.UnhealthyEvaluations != nil { 8300 objectMap["UnhealthyEvaluations"] = phe.UnhealthyEvaluations 8301 } 8302 if phe.AggregatedHealthState != "" { 8303 objectMap["AggregatedHealthState"] = phe.AggregatedHealthState 8304 } 8305 if phe.Description != nil { 8306 objectMap["Description"] = phe.Description 8307 } 8308 if phe.Kind != "" { 8309 objectMap["Kind"] = phe.Kind 8310 } 8311 return json.Marshal(objectMap) 8312} 8313 8314// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8315func (phe PartitionHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 8316 return nil, false 8317} 8318 8319// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8320func (phe PartitionHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 8321 return nil, false 8322} 8323 8324// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8325func (phe PartitionHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 8326 return nil, false 8327} 8328 8329// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8330func (phe PartitionHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 8331 return nil, false 8332} 8333 8334// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8335func (phe PartitionHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 8336 return nil, false 8337} 8338 8339// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8340func (phe PartitionHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 8341 return nil, false 8342} 8343 8344// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8345func (phe PartitionHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 8346 return nil, false 8347} 8348 8349// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8350func (phe PartitionHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 8351 return nil, false 8352} 8353 8354// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8355func (phe PartitionHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 8356 return nil, false 8357} 8358 8359// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8360func (phe PartitionHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 8361 return nil, false 8362} 8363 8364// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8365func (phe PartitionHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 8366 return nil, false 8367} 8368 8369// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8370func (phe PartitionHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 8371 return &phe, true 8372} 8373 8374// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8375func (phe PartitionHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 8376 return nil, false 8377} 8378 8379// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8380func (phe PartitionHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 8381 return nil, false 8382} 8383 8384// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8385func (phe PartitionHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 8386 return nil, false 8387} 8388 8389// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8390func (phe PartitionHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 8391 return nil, false 8392} 8393 8394// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8395func (phe PartitionHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 8396 return nil, false 8397} 8398 8399// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8400func (phe PartitionHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 8401 return nil, false 8402} 8403 8404// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8405func (phe PartitionHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 8406 return nil, false 8407} 8408 8409// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8410func (phe PartitionHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 8411 return nil, false 8412} 8413 8414// AsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8415func (phe PartitionHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 8416 return nil, false 8417} 8418 8419// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. 8420func (phe PartitionHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 8421 return &phe, true 8422} 8423 8424// PartitionHealthState represents the health state of a partition, which contains the partition identifier and its 8425// aggregated health state. 8426type PartitionHealthState struct { 8427 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 8428 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 8429 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 8430} 8431 8432// PartitionHealthStateChunk represents the health state chunk of a partition, which contains the partition id, its 8433// aggregated health state and any replicas that respect the filters in the cluster health chunk query description. 8434type PartitionHealthStateChunk struct { 8435 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 8436 ReplicaHealthStateChunks *ReplicaHealthStateChunkList `json:"ReplicaHealthStateChunks,omitempty"` 8437 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 8438 HealthState HealthState2 `json:"HealthState,omitempty"` 8439} 8440 8441// PartitionHealthStateChunkList the list of partition health state chunks that respect the input filters in the 8442// chunk query description. 8443// Returned by get cluster health state chunks query as part of the parent application hierarchy. 8444type PartitionHealthStateChunkList struct { 8445 // Items - The list of partition health state chunks that respect the input filters in the chunk query. 8446 Items *[]PartitionHealthStateChunk `json:"Items,omitempty"` 8447} 8448 8449// PartitionHealthStateFilter defines matching criteria to determine whether a partition should be included as a 8450// child of a service in the cluster health chunk. 8451// The partitions are only returned if the parent entities match a filter specified in the cluster health chunk 8452// query description. The parent service and application must be included in the cluster health chunk. 8453// One filter can match zero, one or multiple partitions, depending on its properties. 8454type PartitionHealthStateFilter struct { 8455 // PartitionIDFilter - ID of the partition that matches the filter. The filter is applied only to the specified partition, if it exists. 8456 // If the partition doesn't exist, no partition is returned in the cluster health chunk based on this filter. 8457 // If the partition exists, it is included in the cluster health chunk if it respects the other filter properties. 8458 // If not specified, all partitions that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. 8459 PartitionIDFilter *uuid.UUID `json:"PartitionIdFilter,omitempty"` 8460 // HealthStateFilter - The filter for the health state of the partitions. It allows selecting partitions if they match the desired health states. 8461 // The possible values are integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the cluster aggregated health state. 8462 // If not specified, default value is None, unless the partition id is specified. If the filter has default value and partition id is specified, the matching partition is returned. 8463 // The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. 8464 // For example, if the provided value is 6, it matches partitions with HealthState value of OK (2) and Warning (4). 8465 // - Default - Default value. Matches any HealthState. The value is zero. 8466 // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. 8467 // - Ok - Filter that matches input with HealthState value Ok. The value is 2. 8468 // - Warning - Filter that matches input with HealthState value Warning. The value is 4. 8469 // - Error - Filter that matches input with HealthState value Error. The value is 8. 8470 // - All - Filter that matches input with any HealthState value. The value is 65535. 8471 HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` 8472 // ReplicaFilters - Defines a list of filters that specify which replicas to be included in the returned cluster health chunk as children of the parent partition. The replicas are returned only if the parent partition matches a filter. 8473 // If the list is empty, no replicas are returned. All the replicas are used to evaluate the parent partition aggregated health state, regardless of the input filters. 8474 // The partition filter may specify multiple replica filters. 8475 // For example, it can specify a filter to return all replicas with health state Error and another filter to always include a replica identified by its replica id. 8476 ReplicaFilters *[]ReplicaHealthStateFilter `json:"ReplicaFilters,omitempty"` 8477} 8478 8479// BasicPartitionInformation information about the partition identity, partitioning scheme and keys supported by it. 8480type BasicPartitionInformation interface { 8481 AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) 8482 AsNamedPartitionInformation() (*NamedPartitionInformation, bool) 8483 AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) 8484 AsPartitionInformation() (*PartitionInformation, bool) 8485} 8486 8487// PartitionInformation information about the partition identity, partitioning scheme and keys supported by it. 8488type PartitionInformation struct { 8489 ID *uuid.UUID `json:"Id,omitempty"` 8490 // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range', 'ServicePartitionKindNamed', 'ServicePartitionKindSingleton' 8491 ServicePartitionKind ServicePartitionKind `json:"ServicePartitionKind,omitempty"` 8492} 8493 8494func unmarshalBasicPartitionInformation(body []byte) (BasicPartitionInformation, error) { 8495 var m map[string]interface{} 8496 err := json.Unmarshal(body, &m) 8497 if err != nil { 8498 return nil, err 8499 } 8500 8501 switch m["ServicePartitionKind"] { 8502 case string(ServicePartitionKindInt64Range): 8503 var i6rpi Int64RangePartitionInformation 8504 err := json.Unmarshal(body, &i6rpi) 8505 return i6rpi, err 8506 case string(ServicePartitionKindNamed): 8507 var npi NamedPartitionInformation 8508 err := json.Unmarshal(body, &npi) 8509 return npi, err 8510 case string(ServicePartitionKindSingleton): 8511 var spi SingletonPartitionInformation 8512 err := json.Unmarshal(body, &spi) 8513 return spi, err 8514 default: 8515 var pi PartitionInformation 8516 err := json.Unmarshal(body, &pi) 8517 return pi, err 8518 } 8519} 8520func unmarshalBasicPartitionInformationArray(body []byte) ([]BasicPartitionInformation, error) { 8521 var rawMessages []*json.RawMessage 8522 err := json.Unmarshal(body, &rawMessages) 8523 if err != nil { 8524 return nil, err 8525 } 8526 8527 piArray := make([]BasicPartitionInformation, len(rawMessages)) 8528 8529 for index, rawMessage := range rawMessages { 8530 pi, err := unmarshalBasicPartitionInformation(*rawMessage) 8531 if err != nil { 8532 return nil, err 8533 } 8534 piArray[index] = pi 8535 } 8536 return piArray, nil 8537} 8538 8539// MarshalJSON is the custom marshaler for PartitionInformation. 8540func (pi PartitionInformation) MarshalJSON() ([]byte, error) { 8541 pi.ServicePartitionKind = ServicePartitionKindPartitionInformation 8542 objectMap := make(map[string]interface{}) 8543 if pi.ID != nil { 8544 objectMap["Id"] = pi.ID 8545 } 8546 if pi.ServicePartitionKind != "" { 8547 objectMap["ServicePartitionKind"] = pi.ServicePartitionKind 8548 } 8549 return json.Marshal(objectMap) 8550} 8551 8552// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. 8553func (pi PartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { 8554 return nil, false 8555} 8556 8557// AsNamedPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. 8558func (pi PartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { 8559 return nil, false 8560} 8561 8562// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. 8563func (pi PartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { 8564 return nil, false 8565} 8566 8567// AsPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. 8568func (pi PartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { 8569 return &pi, true 8570} 8571 8572// AsBasicPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. 8573func (pi PartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { 8574 return &pi, true 8575} 8576 8577// PartitionLoadInformation represents load information for a partition, which contains the primary and secondary 8578// reported load metrics. 8579// In case there is no load reported, PartitionLoadInformation will contain the default load for the service of the 8580// partition. 8581// For default loads, LoadMetricReport's LastReportedUtc is set to 0. 8582type PartitionLoadInformation struct { 8583 autorest.Response `json:"-"` 8584 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 8585 // PrimaryLoadMetricReports - Array of load reports from the primary replica for this partition. 8586 PrimaryLoadMetricReports *[]LoadMetricReport `json:"PrimaryLoadMetricReports,omitempty"` 8587 // SecondaryLoadMetricReports - Array of aggregated load reports from all secondary replicas for this partition. 8588 // Array only contains the latest reported load for each metric. 8589 SecondaryLoadMetricReports *[]LoadMetricReport `json:"SecondaryLoadMetricReports,omitempty"` 8590} 8591 8592// PartitionQuorumLossProgress information about a partition quorum loss user-induced operation. 8593type PartitionQuorumLossProgress struct { 8594 autorest.Response `json:"-"` 8595 // State - Possible values include: 'State4Invalid', 'State4Running', 'State4RollingBack', 'State4Completed', 'State4Faulted', 'State4Cancelled', 'State4ForceCancelled' 8596 State State4 `json:"State,omitempty"` 8597 InvokeQuorumLossResult *InvokeQuorumLossResult `json:"InvokeQuorumLossResult,omitempty"` 8598} 8599 8600// PartitionRestartProgress information about a partition restart user-induced operation. 8601type PartitionRestartProgress struct { 8602 autorest.Response `json:"-"` 8603 // State - Possible values include: 'State5Invalid', 'State5Running', 'State5RollingBack', 'State5Completed', 'State5Faulted', 'State5Cancelled', 'State5ForceCancelled' 8604 State State5 `json:"State,omitempty"` 8605 RestartPartitionResult *RestartPartitionResult `json:"RestartPartitionResult,omitempty"` 8606} 8607 8608// BasicPartitionSafetyCheck represents a safety check for the service partition being performed by service fabric 8609// before continuing with operations. 8610type BasicPartitionSafetyCheck interface { 8611 AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) 8612 AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) 8613 AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) 8614 AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) 8615 AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) 8616 AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) 8617 AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) 8618} 8619 8620// PartitionSafetyCheck represents a safety check for the service partition being performed by service fabric 8621// before continuing with operations. 8622type PartitionSafetyCheck struct { 8623 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 8624 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 8625 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 8626} 8627 8628func unmarshalBasicPartitionSafetyCheck(body []byte) (BasicPartitionSafetyCheck, error) { 8629 var m map[string]interface{} 8630 err := json.Unmarshal(body, &m) 8631 if err != nil { 8632 return nil, err 8633 } 8634 8635 switch m["Kind"] { 8636 case string(KindEnsureAvailability): 8637 var easc EnsureAvailabilitySafetyCheck 8638 err := json.Unmarshal(body, &easc) 8639 return easc, err 8640 case string(KindEnsurePartitionQuorum): 8641 var epqsc EnsurePartitionQurumSafetyCheck 8642 err := json.Unmarshal(body, &epqsc) 8643 return epqsc, err 8644 case string(KindWaitForInbuildReplica): 8645 var wfirsc WaitForInbuildReplicaSafetyCheck 8646 err := json.Unmarshal(body, &wfirsc) 8647 return wfirsc, err 8648 case string(KindWaitForPrimaryPlacement): 8649 var wfppsc WaitForPrimaryPlacementSafetyCheck 8650 err := json.Unmarshal(body, &wfppsc) 8651 return wfppsc, err 8652 case string(KindWaitForPrimarySwap): 8653 var wfpssc WaitForPrimarySwapSafetyCheck 8654 err := json.Unmarshal(body, &wfpssc) 8655 return wfpssc, err 8656 case string(KindWaitForReconfiguration): 8657 var wfrsc WaitForReconfigurationSafetyCheck 8658 err := json.Unmarshal(body, &wfrsc) 8659 return wfrsc, err 8660 default: 8661 var psc PartitionSafetyCheck 8662 err := json.Unmarshal(body, &psc) 8663 return psc, err 8664 } 8665} 8666func unmarshalBasicPartitionSafetyCheckArray(body []byte) ([]BasicPartitionSafetyCheck, error) { 8667 var rawMessages []*json.RawMessage 8668 err := json.Unmarshal(body, &rawMessages) 8669 if err != nil { 8670 return nil, err 8671 } 8672 8673 pscArray := make([]BasicPartitionSafetyCheck, len(rawMessages)) 8674 8675 for index, rawMessage := range rawMessages { 8676 psc, err := unmarshalBasicPartitionSafetyCheck(*rawMessage) 8677 if err != nil { 8678 return nil, err 8679 } 8680 pscArray[index] = psc 8681 } 8682 return pscArray, nil 8683} 8684 8685// MarshalJSON is the custom marshaler for PartitionSafetyCheck. 8686func (psc PartitionSafetyCheck) MarshalJSON() ([]byte, error) { 8687 psc.Kind = KindPartitionSafetyCheck 8688 objectMap := make(map[string]interface{}) 8689 if psc.PartitionID != nil { 8690 objectMap["PartitionId"] = psc.PartitionID 8691 } 8692 if psc.Kind != "" { 8693 objectMap["Kind"] = psc.Kind 8694 } 8695 return json.Marshal(objectMap) 8696} 8697 8698// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8699func (psc PartitionSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 8700 return &psc, true 8701} 8702 8703// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8704func (psc PartitionSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 8705 return &psc, true 8706} 8707 8708// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8709func (psc PartitionSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 8710 return nil, false 8711} 8712 8713// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8714func (psc PartitionSafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 8715 return nil, false 8716} 8717 8718// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8719func (psc PartitionSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 8720 return nil, false 8721} 8722 8723// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8724func (psc PartitionSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 8725 return nil, false 8726} 8727 8728// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8729func (psc PartitionSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 8730 return nil, false 8731} 8732 8733// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8734func (psc PartitionSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 8735 return nil, false 8736} 8737 8738// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8739func (psc PartitionSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 8740 return nil, false 8741} 8742 8743// AsSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8744func (psc PartitionSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 8745 return nil, false 8746} 8747 8748// AsBasicSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. 8749func (psc PartitionSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 8750 return &psc, true 8751} 8752 8753// BasicPartitionSchemeDescription describes how the service is partitioned. 8754type BasicPartitionSchemeDescription interface { 8755 AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) 8756 AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) 8757 AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) 8758 AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) 8759} 8760 8761// PartitionSchemeDescription describes how the service is partitioned. 8762type PartitionSchemeDescription struct { 8763 // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range' 8764 PartitionScheme PartitionScheme `json:"PartitionScheme,omitempty"` 8765} 8766 8767func unmarshalBasicPartitionSchemeDescription(body []byte) (BasicPartitionSchemeDescription, error) { 8768 var m map[string]interface{} 8769 err := json.Unmarshal(body, &m) 8770 if err != nil { 8771 return nil, err 8772 } 8773 8774 switch m["PartitionScheme"] { 8775 case string(PartitionSchemeNamed): 8776 var npsd NamedPartitionSchemeDescription 8777 err := json.Unmarshal(body, &npsd) 8778 return npsd, err 8779 case string(PartitionSchemeSingleton): 8780 var spsd SingletonPartitionSchemeDescription 8781 err := json.Unmarshal(body, &spsd) 8782 return spsd, err 8783 case string(PartitionSchemeUniformInt64Range): 8784 var ui6rpsd UniformInt64RangePartitionSchemeDescription 8785 err := json.Unmarshal(body, &ui6rpsd) 8786 return ui6rpsd, err 8787 default: 8788 var psd PartitionSchemeDescription 8789 err := json.Unmarshal(body, &psd) 8790 return psd, err 8791 } 8792} 8793func unmarshalBasicPartitionSchemeDescriptionArray(body []byte) ([]BasicPartitionSchemeDescription, error) { 8794 var rawMessages []*json.RawMessage 8795 err := json.Unmarshal(body, &rawMessages) 8796 if err != nil { 8797 return nil, err 8798 } 8799 8800 psdArray := make([]BasicPartitionSchemeDescription, len(rawMessages)) 8801 8802 for index, rawMessage := range rawMessages { 8803 psd, err := unmarshalBasicPartitionSchemeDescription(*rawMessage) 8804 if err != nil { 8805 return nil, err 8806 } 8807 psdArray[index] = psd 8808 } 8809 return psdArray, nil 8810} 8811 8812// MarshalJSON is the custom marshaler for PartitionSchemeDescription. 8813func (psd PartitionSchemeDescription) MarshalJSON() ([]byte, error) { 8814 psd.PartitionScheme = PartitionSchemePartitionSchemeDescription 8815 objectMap := make(map[string]interface{}) 8816 if psd.PartitionScheme != "" { 8817 objectMap["PartitionScheme"] = psd.PartitionScheme 8818 } 8819 return json.Marshal(objectMap) 8820} 8821 8822// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. 8823func (psd PartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { 8824 return nil, false 8825} 8826 8827// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. 8828func (psd PartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { 8829 return nil, false 8830} 8831 8832// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. 8833func (psd PartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { 8834 return nil, false 8835} 8836 8837// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. 8838func (psd PartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { 8839 return &psd, true 8840} 8841 8842// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. 8843func (psd PartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { 8844 return &psd, true 8845} 8846 8847// PartitionsHealthEvaluation represents health evaluation for the partitions of a service, containing health 8848// evaluations for each unhealthy partition that impacts current aggregated health state. Can be returned when 8849// evaluating service health and the aggregated health state is either Error or Warning. 8850type PartitionsHealthEvaluation struct { 8851 // MaxPercentUnhealthyPartitionsPerService - Maximum allowed percentage of unhealthy partitions per service from the ServiceTypeHealthPolicy. 8852 MaxPercentUnhealthyPartitionsPerService *int32 `json:"MaxPercentUnhealthyPartitionsPerService,omitempty"` 8853 // TotalCount - Total number of partitions of the service from the health store. 8854 TotalCount *int64 `json:"TotalCount,omitempty"` 8855 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 8856 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 8857 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 8858 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 8859 Description *string `json:"Description,omitempty"` 8860 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 8861 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 8862} 8863 8864// MarshalJSON is the custom marshaler for PartitionsHealthEvaluation. 8865func (phe PartitionsHealthEvaluation) MarshalJSON() ([]byte, error) { 8866 phe.Kind = KindPartitions 8867 objectMap := make(map[string]interface{}) 8868 if phe.MaxPercentUnhealthyPartitionsPerService != nil { 8869 objectMap["MaxPercentUnhealthyPartitionsPerService"] = phe.MaxPercentUnhealthyPartitionsPerService 8870 } 8871 if phe.TotalCount != nil { 8872 objectMap["TotalCount"] = phe.TotalCount 8873 } 8874 if phe.UnhealthyEvaluations != nil { 8875 objectMap["UnhealthyEvaluations"] = phe.UnhealthyEvaluations 8876 } 8877 if phe.AggregatedHealthState != "" { 8878 objectMap["AggregatedHealthState"] = phe.AggregatedHealthState 8879 } 8880 if phe.Description != nil { 8881 objectMap["Description"] = phe.Description 8882 } 8883 if phe.Kind != "" { 8884 objectMap["Kind"] = phe.Kind 8885 } 8886 return json.Marshal(objectMap) 8887} 8888 8889// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8890func (phe PartitionsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 8891 return nil, false 8892} 8893 8894// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8895func (phe PartitionsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 8896 return nil, false 8897} 8898 8899// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8900func (phe PartitionsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 8901 return nil, false 8902} 8903 8904// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8905func (phe PartitionsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 8906 return nil, false 8907} 8908 8909// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8910func (phe PartitionsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 8911 return nil, false 8912} 8913 8914// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8915func (phe PartitionsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 8916 return nil, false 8917} 8918 8919// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8920func (phe PartitionsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 8921 return nil, false 8922} 8923 8924// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8925func (phe PartitionsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 8926 return nil, false 8927} 8928 8929// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8930func (phe PartitionsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 8931 return nil, false 8932} 8933 8934// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8935func (phe PartitionsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 8936 return nil, false 8937} 8938 8939// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8940func (phe PartitionsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 8941 return nil, false 8942} 8943 8944// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8945func (phe PartitionsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 8946 return nil, false 8947} 8948 8949// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8950func (phe PartitionsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 8951 return &phe, true 8952} 8953 8954// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8955func (phe PartitionsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 8956 return nil, false 8957} 8958 8959// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8960func (phe PartitionsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 8961 return nil, false 8962} 8963 8964// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8965func (phe PartitionsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 8966 return nil, false 8967} 8968 8969// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8970func (phe PartitionsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 8971 return nil, false 8972} 8973 8974// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8975func (phe PartitionsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 8976 return nil, false 8977} 8978 8979// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8980func (phe PartitionsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 8981 return nil, false 8982} 8983 8984// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8985func (phe PartitionsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 8986 return nil, false 8987} 8988 8989// AsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8990func (phe PartitionsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 8991 return nil, false 8992} 8993 8994// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. 8995func (phe PartitionsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 8996 return &phe, true 8997} 8998 8999// PrimaryReplicatorStatus ... 9000type PrimaryReplicatorStatus struct { 9001 ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` 9002 RemoteReplicators *[]RemoteReplicatorStatus `json:"RemoteReplicators,omitempty"` 9003 // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' 9004 Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` 9005} 9006 9007// MarshalJSON is the custom marshaler for PrimaryReplicatorStatus. 9008func (prs PrimaryReplicatorStatus) MarshalJSON() ([]byte, error) { 9009 prs.Kind = KindPrimary 9010 objectMap := make(map[string]interface{}) 9011 if prs.ReplicationQueueStatus != nil { 9012 objectMap["ReplicationQueueStatus"] = prs.ReplicationQueueStatus 9013 } 9014 if prs.RemoteReplicators != nil { 9015 objectMap["RemoteReplicators"] = prs.RemoteReplicators 9016 } 9017 if prs.Kind != "" { 9018 objectMap["Kind"] = prs.Kind 9019 } 9020 return json.Marshal(objectMap) 9021} 9022 9023// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. 9024func (prs PrimaryReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { 9025 return &prs, true 9026} 9027 9028// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. 9029func (prs PrimaryReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { 9030 return nil, false 9031} 9032 9033// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. 9034func (prs PrimaryReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { 9035 return nil, false 9036} 9037 9038// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. 9039func (prs PrimaryReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { 9040 return nil, false 9041} 9042 9043// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. 9044func (prs PrimaryReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { 9045 return nil, false 9046} 9047 9048// AsReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. 9049func (prs PrimaryReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { 9050 return nil, false 9051} 9052 9053// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. 9054func (prs PrimaryReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { 9055 return &prs, true 9056} 9057 9058// PropertyBatchDescriptionList describes a list of property batch operations to be executed. Either all or none of 9059// the operations will be committed. 9060type PropertyBatchDescriptionList struct { 9061 // Operations - A list of the property batch operations to be executed. 9062 Operations *[]BasicPropertyBatchOperation `json:"Operations,omitempty"` 9063} 9064 9065// UnmarshalJSON is the custom unmarshaler for PropertyBatchDescriptionList struct. 9066func (pbdl *PropertyBatchDescriptionList) UnmarshalJSON(body []byte) error { 9067 var m map[string]*json.RawMessage 9068 err := json.Unmarshal(body, &m) 9069 if err != nil { 9070 return err 9071 } 9072 for k, v := range m { 9073 switch k { 9074 case "Operations": 9075 if v != nil { 9076 operations, err := unmarshalBasicPropertyBatchOperationArray(*v) 9077 if err != nil { 9078 return err 9079 } 9080 pbdl.Operations = &operations 9081 } 9082 } 9083 } 9084 9085 return nil 9086} 9087 9088// BasicPropertyBatchInfo information about the results of a property batch. 9089type BasicPropertyBatchInfo interface { 9090 AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) 9091 AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) 9092 AsPropertyBatchInfo() (*PropertyBatchInfo, bool) 9093} 9094 9095// PropertyBatchInfo information about the results of a property batch. 9096type PropertyBatchInfo struct { 9097 autorest.Response `json:"-"` 9098 // Kind - Possible values include: 'KindPropertyBatchInfo', 'KindSuccessful', 'KindFailed' 9099 Kind KindBasicPropertyBatchInfo `json:"Kind,omitempty"` 9100} 9101 9102func unmarshalBasicPropertyBatchInfo(body []byte) (BasicPropertyBatchInfo, error) { 9103 var m map[string]interface{} 9104 err := json.Unmarshal(body, &m) 9105 if err != nil { 9106 return nil, err 9107 } 9108 9109 switch m["Kind"] { 9110 case string(KindSuccessful): 9111 var spbi SuccessfulPropertyBatchInfo 9112 err := json.Unmarshal(body, &spbi) 9113 return spbi, err 9114 case string(KindFailed): 9115 var fpbi FailedPropertyBatchInfo 9116 err := json.Unmarshal(body, &fpbi) 9117 return fpbi, err 9118 default: 9119 var pbi PropertyBatchInfo 9120 err := json.Unmarshal(body, &pbi) 9121 return pbi, err 9122 } 9123} 9124func unmarshalBasicPropertyBatchInfoArray(body []byte) ([]BasicPropertyBatchInfo, error) { 9125 var rawMessages []*json.RawMessage 9126 err := json.Unmarshal(body, &rawMessages) 9127 if err != nil { 9128 return nil, err 9129 } 9130 9131 pbiArray := make([]BasicPropertyBatchInfo, len(rawMessages)) 9132 9133 for index, rawMessage := range rawMessages { 9134 pbi, err := unmarshalBasicPropertyBatchInfo(*rawMessage) 9135 if err != nil { 9136 return nil, err 9137 } 9138 pbiArray[index] = pbi 9139 } 9140 return pbiArray, nil 9141} 9142 9143// MarshalJSON is the custom marshaler for PropertyBatchInfo. 9144func (pbi PropertyBatchInfo) MarshalJSON() ([]byte, error) { 9145 pbi.Kind = KindPropertyBatchInfo 9146 objectMap := make(map[string]interface{}) 9147 if pbi.Kind != "" { 9148 objectMap["Kind"] = pbi.Kind 9149 } 9150 return json.Marshal(objectMap) 9151} 9152 9153// AsSuccessfulPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. 9154func (pbi PropertyBatchInfo) AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) { 9155 return nil, false 9156} 9157 9158// AsFailedPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. 9159func (pbi PropertyBatchInfo) AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) { 9160 return nil, false 9161} 9162 9163// AsPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. 9164func (pbi PropertyBatchInfo) AsPropertyBatchInfo() (*PropertyBatchInfo, bool) { 9165 return &pbi, true 9166} 9167 9168// AsBasicPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. 9169func (pbi PropertyBatchInfo) AsBasicPropertyBatchInfo() (BasicPropertyBatchInfo, bool) { 9170 return &pbi, true 9171} 9172 9173// PropertyBatchInfoModel ... 9174type PropertyBatchInfoModel struct { 9175 autorest.Response `json:"-"` 9176 Value BasicPropertyBatchInfo `json:"value,omitempty"` 9177} 9178 9179// UnmarshalJSON is the custom unmarshaler for PropertyBatchInfoModel struct. 9180func (pbim *PropertyBatchInfoModel) UnmarshalJSON(body []byte) error { 9181 pbi, err := unmarshalBasicPropertyBatchInfo(body) 9182 if err != nil { 9183 return err 9184 } 9185 pbim.Value = pbi 9186 9187 return nil 9188} 9189 9190// BasicPropertyBatchOperation represents the base type for property operations that can be put into a batch and 9191// submitted. 9192type BasicPropertyBatchOperation interface { 9193 AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) 9194 AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) 9195 AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) 9196 AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) 9197 AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) 9198 AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) 9199 AsPropertyBatchOperation() (*PropertyBatchOperation, bool) 9200} 9201 9202// PropertyBatchOperation represents the base type for property operations that can be put into a batch and 9203// submitted. 9204type PropertyBatchOperation struct { 9205 PropertyName *string `json:"PropertyName,omitempty"` 9206 // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' 9207 Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` 9208} 9209 9210func unmarshalBasicPropertyBatchOperation(body []byte) (BasicPropertyBatchOperation, error) { 9211 var m map[string]interface{} 9212 err := json.Unmarshal(body, &m) 9213 if err != nil { 9214 return nil, err 9215 } 9216 9217 switch m["Kind"] { 9218 case string(KindCheckExists): 9219 var cepbo CheckExistsPropertyBatchOperation 9220 err := json.Unmarshal(body, &cepbo) 9221 return cepbo, err 9222 case string(KindCheckSequence): 9223 var cspbo CheckSequencePropertyBatchOperation 9224 err := json.Unmarshal(body, &cspbo) 9225 return cspbo, err 9226 case string(KindCheckValue): 9227 var cvpbo CheckValuePropertyBatchOperation 9228 err := json.Unmarshal(body, &cvpbo) 9229 return cvpbo, err 9230 case string(KindDelete): 9231 var dpbo DeletePropertyBatchOperation 9232 err := json.Unmarshal(body, &dpbo) 9233 return dpbo, err 9234 case string(KindGet): 9235 var gpbo GetPropertyBatchOperation 9236 err := json.Unmarshal(body, &gpbo) 9237 return gpbo, err 9238 case string(KindPut): 9239 var ppbo PutPropertyBatchOperation 9240 err := json.Unmarshal(body, &ppbo) 9241 return ppbo, err 9242 default: 9243 var pbo PropertyBatchOperation 9244 err := json.Unmarshal(body, &pbo) 9245 return pbo, err 9246 } 9247} 9248func unmarshalBasicPropertyBatchOperationArray(body []byte) ([]BasicPropertyBatchOperation, error) { 9249 var rawMessages []*json.RawMessage 9250 err := json.Unmarshal(body, &rawMessages) 9251 if err != nil { 9252 return nil, err 9253 } 9254 9255 pboArray := make([]BasicPropertyBatchOperation, len(rawMessages)) 9256 9257 for index, rawMessage := range rawMessages { 9258 pbo, err := unmarshalBasicPropertyBatchOperation(*rawMessage) 9259 if err != nil { 9260 return nil, err 9261 } 9262 pboArray[index] = pbo 9263 } 9264 return pboArray, nil 9265} 9266 9267// MarshalJSON is the custom marshaler for PropertyBatchOperation. 9268func (pbo PropertyBatchOperation) MarshalJSON() ([]byte, error) { 9269 pbo.Kind = KindPropertyBatchOperation 9270 objectMap := make(map[string]interface{}) 9271 if pbo.PropertyName != nil { 9272 objectMap["PropertyName"] = pbo.PropertyName 9273 } 9274 if pbo.Kind != "" { 9275 objectMap["Kind"] = pbo.Kind 9276 } 9277 return json.Marshal(objectMap) 9278} 9279 9280// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9281func (pbo PropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { 9282 return nil, false 9283} 9284 9285// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9286func (pbo PropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { 9287 return nil, false 9288} 9289 9290// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9291func (pbo PropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { 9292 return nil, false 9293} 9294 9295// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9296func (pbo PropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { 9297 return nil, false 9298} 9299 9300// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9301func (pbo PropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { 9302 return nil, false 9303} 9304 9305// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9306func (pbo PropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { 9307 return nil, false 9308} 9309 9310// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9311func (pbo PropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { 9312 return &pbo, true 9313} 9314 9315// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. 9316func (pbo PropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { 9317 return &pbo, true 9318} 9319 9320// PropertyDescription description of a Service Fabric property. 9321type PropertyDescription struct { 9322 PropertyName *string `json:"PropertyName,omitempty"` 9323 CustomTypeID *string `json:"CustomTypeId,omitempty"` 9324 Value BasicPropertyValue `json:"Value,omitempty"` 9325} 9326 9327// UnmarshalJSON is the custom unmarshaler for PropertyDescription struct. 9328func (pd *PropertyDescription) UnmarshalJSON(body []byte) error { 9329 var m map[string]*json.RawMessage 9330 err := json.Unmarshal(body, &m) 9331 if err != nil { 9332 return err 9333 } 9334 for k, v := range m { 9335 switch k { 9336 case "PropertyName": 9337 if v != nil { 9338 var propertyName string 9339 err = json.Unmarshal(*v, &propertyName) 9340 if err != nil { 9341 return err 9342 } 9343 pd.PropertyName = &propertyName 9344 } 9345 case "CustomTypeId": 9346 if v != nil { 9347 var customTypeID string 9348 err = json.Unmarshal(*v, &customTypeID) 9349 if err != nil { 9350 return err 9351 } 9352 pd.CustomTypeID = &customTypeID 9353 } 9354 case "Value": 9355 if v != nil { 9356 value, err := unmarshalBasicPropertyValue(*v) 9357 if err != nil { 9358 return err 9359 } 9360 pd.Value = value 9361 } 9362 } 9363 } 9364 9365 return nil 9366} 9367 9368// PropertyInfo information about a Service Fabric property. 9369type PropertyInfo struct { 9370 autorest.Response `json:"-"` 9371 Name *string `json:"Name,omitempty"` 9372 Value BasicPropertyValue `json:"Value,omitempty"` 9373 Metadata *PropertyMetadata `json:"Metadata,omitempty"` 9374} 9375 9376// UnmarshalJSON is the custom unmarshaler for PropertyInfo struct. 9377func (pi *PropertyInfo) UnmarshalJSON(body []byte) error { 9378 var m map[string]*json.RawMessage 9379 err := json.Unmarshal(body, &m) 9380 if err != nil { 9381 return err 9382 } 9383 for k, v := range m { 9384 switch k { 9385 case "Name": 9386 if v != nil { 9387 var name string 9388 err = json.Unmarshal(*v, &name) 9389 if err != nil { 9390 return err 9391 } 9392 pi.Name = &name 9393 } 9394 case "Value": 9395 if v != nil { 9396 value, err := unmarshalBasicPropertyValue(*v) 9397 if err != nil { 9398 return err 9399 } 9400 pi.Value = value 9401 } 9402 case "Metadata": 9403 if v != nil { 9404 var metadata PropertyMetadata 9405 err = json.Unmarshal(*v, &metadata) 9406 if err != nil { 9407 return err 9408 } 9409 pi.Metadata = &metadata 9410 } 9411 } 9412 } 9413 9414 return nil 9415} 9416 9417// PropertyMetadata the metadata associated with a property, including the property's name. 9418type PropertyMetadata struct { 9419 // TypeID - Possible values include: 'TypeIDInvalid', 'TypeIDBinary', 'TypeIDInt64', 'TypeIDDouble', 'TypeIDString', 'TypeIDGUID' 9420 TypeID TypeID `json:"TypeId,omitempty"` 9421 CustomTypeID *string `json:"CustomTypeId,omitempty"` 9422 Parent *string `json:"Parent,omitempty"` 9423 // SizeInBytes - The length of the serialized property value. 9424 SizeInBytes *int32 `json:"SizeInBytes,omitempty"` 9425 // LastModifiedUtcTimestamp - Represents when the Property was last modified. Only write operations will cause this field to be updated. 9426 LastModifiedUtcTimestamp *date.Time `json:"LastModifiedUtcTimestamp,omitempty"` 9427 // SequenceNumber - The version of the property. Every time a property is modified, its sequence number is increased. 9428 SequenceNumber *string `json:"SequenceNumber,omitempty"` 9429} 9430 9431// BasicPropertyValue describes a Service Fabric property value. 9432type BasicPropertyValue interface { 9433 AsBinaryPropertyValue() (*BinaryPropertyValue, bool) 9434 AsInt64PropertyValue() (*Int64PropertyValue, bool) 9435 AsDoublePropertyValue() (*DoublePropertyValue, bool) 9436 AsStringPropertyValue() (*StringPropertyValue, bool) 9437 AsGUIDPropertyValue() (*GUIDPropertyValue, bool) 9438 AsPropertyValue() (*PropertyValue, bool) 9439} 9440 9441// PropertyValue describes a Service Fabric property value. 9442type PropertyValue struct { 9443 // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' 9444 Kind KindBasicPropertyValue `json:"Kind,omitempty"` 9445} 9446 9447func unmarshalBasicPropertyValue(body []byte) (BasicPropertyValue, error) { 9448 var m map[string]interface{} 9449 err := json.Unmarshal(body, &m) 9450 if err != nil { 9451 return nil, err 9452 } 9453 9454 switch m["Kind"] { 9455 case string(KindBinary): 9456 var bpv BinaryPropertyValue 9457 err := json.Unmarshal(body, &bpv) 9458 return bpv, err 9459 case string(KindInt64): 9460 var i6pv Int64PropertyValue 9461 err := json.Unmarshal(body, &i6pv) 9462 return i6pv, err 9463 case string(KindDouble): 9464 var dpv DoublePropertyValue 9465 err := json.Unmarshal(body, &dpv) 9466 return dpv, err 9467 case string(KindString): 9468 var spv StringPropertyValue 9469 err := json.Unmarshal(body, &spv) 9470 return spv, err 9471 case string(KindGUID): 9472 var gpv GUIDPropertyValue 9473 err := json.Unmarshal(body, &gpv) 9474 return gpv, err 9475 default: 9476 var pv PropertyValue 9477 err := json.Unmarshal(body, &pv) 9478 return pv, err 9479 } 9480} 9481func unmarshalBasicPropertyValueArray(body []byte) ([]BasicPropertyValue, error) { 9482 var rawMessages []*json.RawMessage 9483 err := json.Unmarshal(body, &rawMessages) 9484 if err != nil { 9485 return nil, err 9486 } 9487 9488 pvArray := make([]BasicPropertyValue, len(rawMessages)) 9489 9490 for index, rawMessage := range rawMessages { 9491 pv, err := unmarshalBasicPropertyValue(*rawMessage) 9492 if err != nil { 9493 return nil, err 9494 } 9495 pvArray[index] = pv 9496 } 9497 return pvArray, nil 9498} 9499 9500// MarshalJSON is the custom marshaler for PropertyValue. 9501func (pv PropertyValue) MarshalJSON() ([]byte, error) { 9502 pv.Kind = KindPropertyValue 9503 objectMap := make(map[string]interface{}) 9504 if pv.Kind != "" { 9505 objectMap["Kind"] = pv.Kind 9506 } 9507 return json.Marshal(objectMap) 9508} 9509 9510// AsBinaryPropertyValue is the BasicPropertyValue implementation for PropertyValue. 9511func (pv PropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { 9512 return nil, false 9513} 9514 9515// AsInt64PropertyValue is the BasicPropertyValue implementation for PropertyValue. 9516func (pv PropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { 9517 return nil, false 9518} 9519 9520// AsDoublePropertyValue is the BasicPropertyValue implementation for PropertyValue. 9521func (pv PropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { 9522 return nil, false 9523} 9524 9525// AsStringPropertyValue is the BasicPropertyValue implementation for PropertyValue. 9526func (pv PropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { 9527 return nil, false 9528} 9529 9530// AsGUIDPropertyValue is the BasicPropertyValue implementation for PropertyValue. 9531func (pv PropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { 9532 return nil, false 9533} 9534 9535// AsPropertyValue is the BasicPropertyValue implementation for PropertyValue. 9536func (pv PropertyValue) AsPropertyValue() (*PropertyValue, bool) { 9537 return &pv, true 9538} 9539 9540// AsBasicPropertyValue is the BasicPropertyValue implementation for PropertyValue. 9541func (pv PropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { 9542 return &pv, true 9543} 9544 9545// ProvisionFabricDescription describes the parameters for provisioning a cluster. 9546type ProvisionFabricDescription struct { 9547 // CodeFilePath - The cluster code package file path. 9548 CodeFilePath *string `json:"CodeFilePath,omitempty"` 9549 // ClusterManifestFilePath - The cluster manifest file path. 9550 ClusterManifestFilePath *string `json:"ClusterManifestFilePath,omitempty"` 9551} 9552 9553// PutPropertyBatchOperation puts the specified property under the specified name. Note that if one 9554// PropertyBatchOperation in a PropertyBatch fails, the entire batch fails and cannot be committed in a 9555// transactional manner. 9556type PutPropertyBatchOperation struct { 9557 Value BasicPropertyValue `json:"Value,omitempty"` 9558 CustomTypeID *string `json:"CustomTypeId,omitempty"` 9559 PropertyName *string `json:"PropertyName,omitempty"` 9560 // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' 9561 Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` 9562} 9563 9564// MarshalJSON is the custom marshaler for PutPropertyBatchOperation. 9565func (ppbo PutPropertyBatchOperation) MarshalJSON() ([]byte, error) { 9566 ppbo.Kind = KindPut 9567 objectMap := make(map[string]interface{}) 9568 objectMap["Value"] = ppbo.Value 9569 if ppbo.CustomTypeID != nil { 9570 objectMap["CustomTypeId"] = ppbo.CustomTypeID 9571 } 9572 if ppbo.PropertyName != nil { 9573 objectMap["PropertyName"] = ppbo.PropertyName 9574 } 9575 if ppbo.Kind != "" { 9576 objectMap["Kind"] = ppbo.Kind 9577 } 9578 return json.Marshal(objectMap) 9579} 9580 9581// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9582func (ppbo PutPropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { 9583 return nil, false 9584} 9585 9586// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9587func (ppbo PutPropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { 9588 return nil, false 9589} 9590 9591// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9592func (ppbo PutPropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { 9593 return nil, false 9594} 9595 9596// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9597func (ppbo PutPropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { 9598 return nil, false 9599} 9600 9601// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9602func (ppbo PutPropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { 9603 return nil, false 9604} 9605 9606// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9607func (ppbo PutPropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { 9608 return &ppbo, true 9609} 9610 9611// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9612func (ppbo PutPropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { 9613 return nil, false 9614} 9615 9616// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. 9617func (ppbo PutPropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { 9618 return &ppbo, true 9619} 9620 9621// UnmarshalJSON is the custom unmarshaler for PutPropertyBatchOperation struct. 9622func (ppbo *PutPropertyBatchOperation) UnmarshalJSON(body []byte) error { 9623 var m map[string]*json.RawMessage 9624 err := json.Unmarshal(body, &m) 9625 if err != nil { 9626 return err 9627 } 9628 for k, v := range m { 9629 switch k { 9630 case "Value": 9631 if v != nil { 9632 value, err := unmarshalBasicPropertyValue(*v) 9633 if err != nil { 9634 return err 9635 } 9636 ppbo.Value = value 9637 } 9638 case "CustomTypeId": 9639 if v != nil { 9640 var customTypeID string 9641 err = json.Unmarshal(*v, &customTypeID) 9642 if err != nil { 9643 return err 9644 } 9645 ppbo.CustomTypeID = &customTypeID 9646 } 9647 case "PropertyName": 9648 if v != nil { 9649 var propertyName string 9650 err = json.Unmarshal(*v, &propertyName) 9651 if err != nil { 9652 return err 9653 } 9654 ppbo.PropertyName = &propertyName 9655 } 9656 case "Kind": 9657 if v != nil { 9658 var kind KindBasicPropertyBatchOperation 9659 err = json.Unmarshal(*v, &kind) 9660 if err != nil { 9661 return err 9662 } 9663 ppbo.Kind = kind 9664 } 9665 } 9666 } 9667 9668 return nil 9669} 9670 9671// ReconfigurationInformation information about current reconfiguration like phase, type, previous configuration 9672// role of replica and reconfiguration start date time. 9673type ReconfigurationInformation struct { 9674 // PreviousConfigurationRole - Possible values include: 'PreviousConfigurationRoleUnknown', 'PreviousConfigurationRoleNone', 'PreviousConfigurationRolePrimary', 'PreviousConfigurationRoleIdleSecondary', 'PreviousConfigurationRoleActiveSecondary' 9675 PreviousConfigurationRole PreviousConfigurationRole `json:"PreviousConfigurationRole,omitempty"` 9676 // ReconfigurationPhase - Possible values include: 'ReconfigurationPhaseUnknown', 'ReconfigurationPhaseNone', 'ReconfigurationPhasePhase0', 'ReconfigurationPhasePhase1', 'ReconfigurationPhasePhase2', 'ReconfigurationPhasePhase3', 'ReconfigurationPhasePhase4', 'ReconfigurationPhaseAbortPhaseZero' 9677 ReconfigurationPhase ReconfigurationPhase `json:"ReconfigurationPhase,omitempty"` 9678 // ReconfigurationType - Possible values include: 'ReconfigurationTypeUnknown', 'ReconfigurationTypeSwapPrimary', 'ReconfigurationTypeFailover', 'ReconfigurationTypeOther' 9679 ReconfigurationType ReconfigurationType `json:"ReconfigurationType,omitempty"` 9680 // ReconfigurationStartTimeUtc - Start time (in UTC) of the ongoing reconfiguration. If no reconfiguration is taking place then this value will be zero date-time. 9681 ReconfigurationStartTimeUtc *date.Time `json:"ReconfigurationStartTimeUtc,omitempty"` 9682} 9683 9684// RegistryCredential credential information to connect to container registry. 9685type RegistryCredential struct { 9686 // RegistryUserName - The user name to connect to container registry. 9687 RegistryUserName *string `json:"RegistryUserName,omitempty"` 9688 // RegistryPassword - The password for supplied username to connect to container registry. 9689 RegistryPassword *string `json:"RegistryPassword,omitempty"` 9690 // PasswordEncrypted - Indicates that supplied container registry password is encrypted. 9691 PasswordEncrypted *bool `json:"PasswordEncrypted,omitempty"` 9692} 9693 9694// RemoteReplicatorAcknowledgementDetail provides various statistics of the acknowledgements that are being 9695// received from the remote replicator. 9696type RemoteReplicatorAcknowledgementDetail struct { 9697 // AverageReceiveDuration - Represents the average duration it takes for the remote replicator to receive an operation. 9698 AverageReceiveDuration *string `json:"AverageReceiveDuration,omitempty"` 9699 // AverageApplyDuration - Represents the average duration it takes for the remote replicator to apply an operation. This usually entails writing the operation to disk. 9700 AverageApplyDuration *string `json:"AverageApplyDuration,omitempty"` 9701 // NotReceivedCount - Represents the number of operations not yet received by a remote replicator. 9702 NotReceivedCount *string `json:"NotReceivedCount,omitempty"` 9703 // ReceivedAndNotAppliedCount - Represents the number of operations received and not yet applied by a remote replicator. 9704 ReceivedAndNotAppliedCount *string `json:"ReceivedAndNotAppliedCount,omitempty"` 9705} 9706 9707// RemoteReplicatorAcknowledgementStatus provides details about the remote replicators from the primary 9708// replicator's point of view. 9709type RemoteReplicatorAcknowledgementStatus struct { 9710 ReplicationStreamAcknowledgementDetail *RemoteReplicatorAcknowledgementDetail `json:"ReplicationStreamAcknowledgementDetail,omitempty"` 9711 CopyStreamAcknowledgementDetail *RemoteReplicatorAcknowledgementDetail `json:"CopyStreamAcknowledgementDetail,omitempty"` 9712} 9713 9714// RemoteReplicatorStatus represents the state of the secondary replicator from the primary replicator’s point of 9715// view. 9716type RemoteReplicatorStatus struct { 9717 ReplicaID *string `json:"ReplicaId,omitempty"` 9718 // LastAcknowledgementProcessedTimeUtc - The last timestamp (in UTC) when an acknowledgement from the secondary replicator was processed on the primary. 9719 // UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever processed. 9720 LastAcknowledgementProcessedTimeUtc *date.Time `json:"LastAcknowledgementProcessedTimeUtc,omitempty"` 9721 // LastReceivedReplicationSequenceNumber - The highest replication operation sequence number that the secondary has received from the primary. 9722 LastReceivedReplicationSequenceNumber *string `json:"LastReceivedReplicationSequenceNumber,omitempty"` 9723 // LastAppliedReplicationSequenceNumber - The highest replication operation sequence number that the secondary has applied to its state. 9724 LastAppliedReplicationSequenceNumber *string `json:"LastAppliedReplicationSequenceNumber,omitempty"` 9725 // IsInBuild - A value that indicates whether the secondary replica is in the process of being built. 9726 IsInBuild *bool `json:"IsInBuild,omitempty"` 9727 // LastReceivedCopySequenceNumber - The highest copy operation sequence number that the secondary has received from the primary. 9728 // A value of -1 implies that the secondary has received all copy operations. 9729 LastReceivedCopySequenceNumber *string `json:"LastReceivedCopySequenceNumber,omitempty"` 9730 // LastAppliedCopySequenceNumber - The highest copy operation sequence number that the secondary has applied to its state. 9731 // A value of -1 implies that the secondary has applied all copy operations and the copy process is complete. 9732 LastAppliedCopySequenceNumber *string `json:"LastAppliedCopySequenceNumber,omitempty"` 9733 RemoteReplicatorAcknowledgementStatus *RemoteReplicatorAcknowledgementStatus `json:"RemoteReplicatorAcknowledgementStatus,omitempty"` 9734} 9735 9736// BasicRepairImpactDescriptionBase describes the expected impact of executing a repair task. 9737// 9738// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 9739type BasicRepairImpactDescriptionBase interface { 9740 AsNodeRepairImpactDescription() (*NodeRepairImpactDescription, bool) 9741 AsRepairImpactDescriptionBase() (*RepairImpactDescriptionBase, bool) 9742} 9743 9744// RepairImpactDescriptionBase describes the expected impact of executing a repair task. 9745// 9746// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 9747type RepairImpactDescriptionBase struct { 9748 // Kind - Possible values include: 'KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase', 'KindBasicRepairImpactDescriptionBaseKindNode' 9749 Kind KindBasicRepairImpactDescriptionBase `json:"Kind,omitempty"` 9750} 9751 9752func unmarshalBasicRepairImpactDescriptionBase(body []byte) (BasicRepairImpactDescriptionBase, error) { 9753 var m map[string]interface{} 9754 err := json.Unmarshal(body, &m) 9755 if err != nil { 9756 return nil, err 9757 } 9758 9759 switch m["Kind"] { 9760 case string(KindBasicRepairImpactDescriptionBaseKindNode): 9761 var nrid NodeRepairImpactDescription 9762 err := json.Unmarshal(body, &nrid) 9763 return nrid, err 9764 default: 9765 var ridb RepairImpactDescriptionBase 9766 err := json.Unmarshal(body, &ridb) 9767 return ridb, err 9768 } 9769} 9770func unmarshalBasicRepairImpactDescriptionBaseArray(body []byte) ([]BasicRepairImpactDescriptionBase, error) { 9771 var rawMessages []*json.RawMessage 9772 err := json.Unmarshal(body, &rawMessages) 9773 if err != nil { 9774 return nil, err 9775 } 9776 9777 ridbArray := make([]BasicRepairImpactDescriptionBase, len(rawMessages)) 9778 9779 for index, rawMessage := range rawMessages { 9780 ridb, err := unmarshalBasicRepairImpactDescriptionBase(*rawMessage) 9781 if err != nil { 9782 return nil, err 9783 } 9784 ridbArray[index] = ridb 9785 } 9786 return ridbArray, nil 9787} 9788 9789// MarshalJSON is the custom marshaler for RepairImpactDescriptionBase. 9790func (ridb RepairImpactDescriptionBase) MarshalJSON() ([]byte, error) { 9791 ridb.Kind = KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase 9792 objectMap := make(map[string]interface{}) 9793 if ridb.Kind != "" { 9794 objectMap["Kind"] = ridb.Kind 9795 } 9796 return json.Marshal(objectMap) 9797} 9798 9799// AsNodeRepairImpactDescription is the BasicRepairImpactDescriptionBase implementation for RepairImpactDescriptionBase. 9800func (ridb RepairImpactDescriptionBase) AsNodeRepairImpactDescription() (*NodeRepairImpactDescription, bool) { 9801 return nil, false 9802} 9803 9804// AsRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for RepairImpactDescriptionBase. 9805func (ridb RepairImpactDescriptionBase) AsRepairImpactDescriptionBase() (*RepairImpactDescriptionBase, bool) { 9806 return &ridb, true 9807} 9808 9809// AsBasicRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for RepairImpactDescriptionBase. 9810func (ridb RepairImpactDescriptionBase) AsBasicRepairImpactDescriptionBase() (BasicRepairImpactDescriptionBase, bool) { 9811 return &ridb, true 9812} 9813 9814// BasicRepairTargetDescriptionBase describes the entities targeted by a repair action. 9815// 9816// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 9817type BasicRepairTargetDescriptionBase interface { 9818 AsNodeRepairTargetDescription() (*NodeRepairTargetDescription, bool) 9819 AsRepairTargetDescriptionBase() (*RepairTargetDescriptionBase, bool) 9820} 9821 9822// RepairTargetDescriptionBase describes the entities targeted by a repair action. 9823// 9824// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 9825type RepairTargetDescriptionBase struct { 9826 // Kind - Possible values include: 'KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase', 'KindBasicRepairTargetDescriptionBaseKindNode' 9827 Kind KindBasicRepairTargetDescriptionBase `json:"Kind,omitempty"` 9828} 9829 9830func unmarshalBasicRepairTargetDescriptionBase(body []byte) (BasicRepairTargetDescriptionBase, error) { 9831 var m map[string]interface{} 9832 err := json.Unmarshal(body, &m) 9833 if err != nil { 9834 return nil, err 9835 } 9836 9837 switch m["Kind"] { 9838 case string(KindBasicRepairTargetDescriptionBaseKindNode): 9839 var nrtd NodeRepairTargetDescription 9840 err := json.Unmarshal(body, &nrtd) 9841 return nrtd, err 9842 default: 9843 var rtdb RepairTargetDescriptionBase 9844 err := json.Unmarshal(body, &rtdb) 9845 return rtdb, err 9846 } 9847} 9848func unmarshalBasicRepairTargetDescriptionBaseArray(body []byte) ([]BasicRepairTargetDescriptionBase, error) { 9849 var rawMessages []*json.RawMessage 9850 err := json.Unmarshal(body, &rawMessages) 9851 if err != nil { 9852 return nil, err 9853 } 9854 9855 rtdbArray := make([]BasicRepairTargetDescriptionBase, len(rawMessages)) 9856 9857 for index, rawMessage := range rawMessages { 9858 rtdb, err := unmarshalBasicRepairTargetDescriptionBase(*rawMessage) 9859 if err != nil { 9860 return nil, err 9861 } 9862 rtdbArray[index] = rtdb 9863 } 9864 return rtdbArray, nil 9865} 9866 9867// MarshalJSON is the custom marshaler for RepairTargetDescriptionBase. 9868func (rtdb RepairTargetDescriptionBase) MarshalJSON() ([]byte, error) { 9869 rtdb.Kind = KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase 9870 objectMap := make(map[string]interface{}) 9871 if rtdb.Kind != "" { 9872 objectMap["Kind"] = rtdb.Kind 9873 } 9874 return json.Marshal(objectMap) 9875} 9876 9877// AsNodeRepairTargetDescription is the BasicRepairTargetDescriptionBase implementation for RepairTargetDescriptionBase. 9878func (rtdb RepairTargetDescriptionBase) AsNodeRepairTargetDescription() (*NodeRepairTargetDescription, bool) { 9879 return nil, false 9880} 9881 9882// AsRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for RepairTargetDescriptionBase. 9883func (rtdb RepairTargetDescriptionBase) AsRepairTargetDescriptionBase() (*RepairTargetDescriptionBase, bool) { 9884 return &rtdb, true 9885} 9886 9887// AsBasicRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for RepairTargetDescriptionBase. 9888func (rtdb RepairTargetDescriptionBase) AsBasicRepairTargetDescriptionBase() (BasicRepairTargetDescriptionBase, bool) { 9889 return &rtdb, true 9890} 9891 9892// RepairTask represents a repair task, which includes information about what kind of repair was requested, what 9893// its progress is, and what its final result was. 9894// 9895// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 9896type RepairTask struct { 9897 // TaskID - The ID of the repair task. 9898 TaskID *string `json:"TaskId,omitempty"` 9899 // Version - The version of the repair task. 9900 // When creating a new repair task, the version must be set to zero. When updating a repair task, 9901 // the version is used for optimistic concurrency checks. If the version is 9902 // set to zero, the update will not check for write conflicts. If the version is set to a non-zero value, then the 9903 // update will only succeed if the actual current version of the repair task matches this value. 9904 Version *string `json:"Version,omitempty"` 9905 // Description - A description of the purpose of the repair task, or other informational details. 9906 // May be set when the repair task is created, and is immutable once set. 9907 Description *string `json:"Description,omitempty"` 9908 // State - The workflow state of the repair task. Valid initial states are Created, Claimed, and Preparing. 9909 // - Invalid - Indicates that the repair task state is invalid. All Service Fabric enumerations have the invalid value. 9910 // - Created - Indicates that the repair task has been created. 9911 // - Claimed - Indicates that the repair task has been claimed by a repair executor. 9912 // - Preparing - Indicates that the Repair Manager is preparing the system to handle the impact of the repair task, usually by taking resources offline gracefully. 9913 // - Approved - Indicates that the repair task has been approved by the Repair Manager and is safe to execute. 9914 // - Executing - Indicates that execution of the repair task is in progress. 9915 // - Restoring - Indicates that the Repair Manager is restoring the system to its pre-repair state, usually by bringing resources back online. 9916 // - Completed - Indicates that the repair task has completed, and no further state changes will occur. 9917 // . Possible values include: 'State6Invalid', 'State6Created', 'State6Claimed', 'State6Preparing', 'State6Approved', 'State6Executing', 'State6Restoring', 'State6Completed' 9918 State State6 `json:"State,omitempty"` 9919 // Flags - A bitwise-OR of the following values, which gives additional details about the status of the repair task. 9920 // - 1 - Cancellation of the repair has been requested 9921 // - 2 - Abort of the repair has been requested 9922 // - 4 - Approval of the repair was forced via client request 9923 Flags *int32 `json:"Flags,omitempty"` 9924 // Action - The requested repair action. Must be specified when the repair task is created, and is immutable once set. 9925 Action *string `json:"Action,omitempty"` 9926 Target BasicRepairTargetDescriptionBase `json:"Target,omitempty"` 9927 // Executor - The name of the repair executor. Must be specified in Claimed and later states, and is immutable once set. 9928 Executor *string `json:"Executor,omitempty"` 9929 // ExecutorData - A data string that the repair executor can use to store its internal state. 9930 ExecutorData *string `json:"ExecutorData,omitempty"` 9931 Impact BasicRepairImpactDescriptionBase `json:"Impact,omitempty"` 9932 // ResultStatus - A value describing the overall result of the repair task execution. 9933 // Must be specified in the Restoring and later states, and is immutable once set. 9934 // - Invalid - Indicates that the repair task result is invalid. All Service Fabric enumerations have the invalid value. 9935 // - Succeeded - Indicates that the repair task completed execution successfully. 9936 // - Cancelled - Indicates that the repair task was cancelled prior to execution. 9937 // - Interrupted - Indicates that execution of the repair task was interrupted by a cancellation request after some work had already been performed. 9938 // - Failed - Indicates that there was a failure during execution of the repair task. Some work may have been performed. 9939 // - Pending - Indicates that the repair task result is not yet available, because the repair task has not finished executing. 9940 // . Possible values include: 'ResultStatusInvalid', 'ResultStatusSucceeded', 'ResultStatusCancelled', 'ResultStatusInterrupted', 'ResultStatusFailed', 'ResultStatusPending' 9941 ResultStatus ResultStatus `json:"ResultStatus,omitempty"` 9942 // ResultCode - A numeric value providing additional details about the result of the repair task execution. 9943 // May be specified in the Restoring and later states, and is immutable once set. 9944 ResultCode *int32 `json:"ResultCode,omitempty"` 9945 // ResultDetails - A string providing additional details about the result of the repair task execution. 9946 // May be specified in the Restoring and later states, and is immutable once set. 9947 ResultDetails *string `json:"ResultDetails,omitempty"` 9948 History *RepairTaskHistory `json:"History,omitempty"` 9949 // PreparingHealthCheckState - Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' 9950 PreparingHealthCheckState PreparingHealthCheckState `json:"PreparingHealthCheckState,omitempty"` 9951 // RestoringHealthCheckState - Possible values include: 'RestoringHealthCheckStateNotStarted', 'RestoringHealthCheckStateInProgress', 'RestoringHealthCheckStateSucceeded', 'RestoringHealthCheckStateSkipped', 'RestoringHealthCheckStateTimedOut' 9952 RestoringHealthCheckState RestoringHealthCheckState `json:"RestoringHealthCheckState,omitempty"` 9953 // PerformPreparingHealthCheck - A value to determine if health checks will be performed when the repair task enters the Preparing state. 9954 PerformPreparingHealthCheck *bool `json:"PerformPreparingHealthCheck,omitempty"` 9955 // PerformRestoringHealthCheck - A value to determine if health checks will be performed when the repair task enters the Restoring state. 9956 PerformRestoringHealthCheck *bool `json:"PerformRestoringHealthCheck,omitempty"` 9957} 9958 9959// UnmarshalJSON is the custom unmarshaler for RepairTask struct. 9960func (rt *RepairTask) UnmarshalJSON(body []byte) error { 9961 var m map[string]*json.RawMessage 9962 err := json.Unmarshal(body, &m) 9963 if err != nil { 9964 return err 9965 } 9966 for k, v := range m { 9967 switch k { 9968 case "TaskId": 9969 if v != nil { 9970 var taskID string 9971 err = json.Unmarshal(*v, &taskID) 9972 if err != nil { 9973 return err 9974 } 9975 rt.TaskID = &taskID 9976 } 9977 case "Version": 9978 if v != nil { 9979 var version string 9980 err = json.Unmarshal(*v, &version) 9981 if err != nil { 9982 return err 9983 } 9984 rt.Version = &version 9985 } 9986 case "Description": 9987 if v != nil { 9988 var description string 9989 err = json.Unmarshal(*v, &description) 9990 if err != nil { 9991 return err 9992 } 9993 rt.Description = &description 9994 } 9995 case "State": 9996 if v != nil { 9997 var state State6 9998 err = json.Unmarshal(*v, &state) 9999 if err != nil { 10000 return err 10001 } 10002 rt.State = state 10003 } 10004 case "Flags": 10005 if v != nil { 10006 var flags int32 10007 err = json.Unmarshal(*v, &flags) 10008 if err != nil { 10009 return err 10010 } 10011 rt.Flags = &flags 10012 } 10013 case "Action": 10014 if v != nil { 10015 var action string 10016 err = json.Unmarshal(*v, &action) 10017 if err != nil { 10018 return err 10019 } 10020 rt.Action = &action 10021 } 10022 case "Target": 10023 if v != nil { 10024 target, err := unmarshalBasicRepairTargetDescriptionBase(*v) 10025 if err != nil { 10026 return err 10027 } 10028 rt.Target = target 10029 } 10030 case "Executor": 10031 if v != nil { 10032 var executor string 10033 err = json.Unmarshal(*v, &executor) 10034 if err != nil { 10035 return err 10036 } 10037 rt.Executor = &executor 10038 } 10039 case "ExecutorData": 10040 if v != nil { 10041 var executorData string 10042 err = json.Unmarshal(*v, &executorData) 10043 if err != nil { 10044 return err 10045 } 10046 rt.ExecutorData = &executorData 10047 } 10048 case "Impact": 10049 if v != nil { 10050 impact, err := unmarshalBasicRepairImpactDescriptionBase(*v) 10051 if err != nil { 10052 return err 10053 } 10054 rt.Impact = impact 10055 } 10056 case "ResultStatus": 10057 if v != nil { 10058 var resultStatus ResultStatus 10059 err = json.Unmarshal(*v, &resultStatus) 10060 if err != nil { 10061 return err 10062 } 10063 rt.ResultStatus = resultStatus 10064 } 10065 case "ResultCode": 10066 if v != nil { 10067 var resultCode int32 10068 err = json.Unmarshal(*v, &resultCode) 10069 if err != nil { 10070 return err 10071 } 10072 rt.ResultCode = &resultCode 10073 } 10074 case "ResultDetails": 10075 if v != nil { 10076 var resultDetails string 10077 err = json.Unmarshal(*v, &resultDetails) 10078 if err != nil { 10079 return err 10080 } 10081 rt.ResultDetails = &resultDetails 10082 } 10083 case "History": 10084 if v != nil { 10085 var history RepairTaskHistory 10086 err = json.Unmarshal(*v, &history) 10087 if err != nil { 10088 return err 10089 } 10090 rt.History = &history 10091 } 10092 case "PreparingHealthCheckState": 10093 if v != nil { 10094 var preparingHealthCheckState PreparingHealthCheckState 10095 err = json.Unmarshal(*v, &preparingHealthCheckState) 10096 if err != nil { 10097 return err 10098 } 10099 rt.PreparingHealthCheckState = preparingHealthCheckState 10100 } 10101 case "RestoringHealthCheckState": 10102 if v != nil { 10103 var restoringHealthCheckState RestoringHealthCheckState 10104 err = json.Unmarshal(*v, &restoringHealthCheckState) 10105 if err != nil { 10106 return err 10107 } 10108 rt.RestoringHealthCheckState = restoringHealthCheckState 10109 } 10110 case "PerformPreparingHealthCheck": 10111 if v != nil { 10112 var performPreparingHealthCheck bool 10113 err = json.Unmarshal(*v, &performPreparingHealthCheck) 10114 if err != nil { 10115 return err 10116 } 10117 rt.PerformPreparingHealthCheck = &performPreparingHealthCheck 10118 } 10119 case "PerformRestoringHealthCheck": 10120 if v != nil { 10121 var performRestoringHealthCheck bool 10122 err = json.Unmarshal(*v, &performRestoringHealthCheck) 10123 if err != nil { 10124 return err 10125 } 10126 rt.PerformRestoringHealthCheck = &performRestoringHealthCheck 10127 } 10128 } 10129 } 10130 10131 return nil 10132} 10133 10134// RepairTaskApproveDescription describes a request for forced approval of a repair task. 10135// 10136// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 10137type RepairTaskApproveDescription struct { 10138 // TaskID - The ID of the repair task. 10139 TaskID *string `json:"TaskId,omitempty"` 10140 // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current version of the repair task. If zero, then no version check is performed.</para> 10141 Version *string `json:"Version,omitempty"` 10142} 10143 10144// RepairTaskCancelDescription describes a request to cancel a repair task. 10145// 10146// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 10147type RepairTaskCancelDescription struct { 10148 // TaskID - The ID of the repair task. 10149 TaskID *string `json:"TaskId,omitempty"` 10150 // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current version of the repair task. If zero, then no version check is performed.</para> 10151 Version *string `json:"Version,omitempty"` 10152 // RequestAbort - _True_ if the repair should be stopped as soon as possible even if it has already started executing. _False_ if the repair should be cancelled only if execution has not yet started.</para> 10153 RequestAbort *bool `json:"RequestAbort,omitempty"` 10154} 10155 10156// RepairTaskDeleteDescription describes a request to delete a completed repair task. 10157// 10158// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 10159type RepairTaskDeleteDescription struct { 10160 // TaskID - The ID of the completed repair task to be deleted. 10161 TaskID *string `json:"TaskId,omitempty"` 10162 // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current version of the repair task. If zero, then no version check is performed. 10163 Version *string `json:"Version,omitempty"` 10164} 10165 10166// RepairTaskHistory a record of the times when the repair task entered each state. 10167// 10168// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 10169type RepairTaskHistory struct { 10170 // CreatedUtcTimestamp - The time when the repair task entered the Created state. 10171 CreatedUtcTimestamp *date.Time `json:"CreatedUtcTimestamp,omitempty"` 10172 // ClaimedUtcTimestamp - The time when the repair task entered the Claimed state. 10173 ClaimedUtcTimestamp *date.Time `json:"ClaimedUtcTimestamp,omitempty"` 10174 // PreparingUtcTimestamp - The time when the repair task entered the Preparing state. 10175 PreparingUtcTimestamp *date.Time `json:"PreparingUtcTimestamp,omitempty"` 10176 // ApprovedUtcTimestamp - The time when the repair task entered the Approved state 10177 ApprovedUtcTimestamp *date.Time `json:"ApprovedUtcTimestamp,omitempty"` 10178 // ExecutingUtcTimestamp - The time when the repair task entered the Executing state 10179 ExecutingUtcTimestamp *date.Time `json:"ExecutingUtcTimestamp,omitempty"` 10180 // RestoringUtcTimestamp - The time when the repair task entered the Restoring state 10181 RestoringUtcTimestamp *date.Time `json:"RestoringUtcTimestamp,omitempty"` 10182 // CompletedUtcTimestamp - The time when the repair task entered the Completed state 10183 CompletedUtcTimestamp *date.Time `json:"CompletedUtcTimestamp,omitempty"` 10184 // PreparingHealthCheckStartUtcTimestamp - The time when the repair task started the health check in the Preparing state. 10185 PreparingHealthCheckStartUtcTimestamp *date.Time `json:"PreparingHealthCheckStartUtcTimestamp,omitempty"` 10186 // PreparingHealthCheckEndUtcTimestamp - The time when the repair task completed the health check in the Preparing state. 10187 PreparingHealthCheckEndUtcTimestamp *date.Time `json:"PreparingHealthCheckEndUtcTimestamp,omitempty"` 10188 // RestoringHealthCheckStartUtcTimestamp - The time when the repair task started the health check in the Restoring state. 10189 RestoringHealthCheckStartUtcTimestamp *date.Time `json:"RestoringHealthCheckStartUtcTimestamp,omitempty"` 10190 // RestoringHealthCheckEndUtcTimestamp - The time when the repair task completed the health check in the Restoring state. 10191 RestoringHealthCheckEndUtcTimestamp *date.Time `json:"RestoringHealthCheckEndUtcTimestamp,omitempty"` 10192} 10193 10194// RepairTaskUpdateHealthPolicyDescription describes a request to update the health policy of a repair task. 10195// 10196// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 10197type RepairTaskUpdateHealthPolicyDescription struct { 10198 // TaskID - The ID of the repair task to be updated. 10199 TaskID *string `json:"TaskId,omitempty"` 10200 // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current value of the repair task. If zero, then no version check is performed. 10201 Version *string `json:"Version,omitempty"` 10202 // PerformPreparingHealthCheck - A boolean indicating if health check is to be performed in the Preparing stage of the repair task. If not specified the existing value should not be altered. Otherwise, specify the desired new value. 10203 PerformPreparingHealthCheck *bool `json:"PerformPreparingHealthCheck,omitempty"` 10204 // PerformRestoringHealthCheck - A boolean indicating if health check is to be performed in the Restoring stage of the repair task. If not specified the existing value should not be altered. Otherwise, specify the desired new value. 10205 PerformRestoringHealthCheck *bool `json:"PerformRestoringHealthCheck,omitempty"` 10206} 10207 10208// RepairTaskUpdateInfo describes the result of an operation that created or updated a repair task. 10209// 10210// This type supports the Service Fabric platform; it is not meant to be used directly from your code. 10211type RepairTaskUpdateInfo struct { 10212 autorest.Response `json:"-"` 10213 // Version - The new version of the repair task. 10214 Version *string `json:"Version,omitempty"` 10215} 10216 10217// BasicReplicaHealth represents a base class for stateful service replica or stateless service instance health. 10218// Contains the replica aggregated health state, the health events and the unhealthy evaluations. 10219type BasicReplicaHealth interface { 10220 AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) 10221 AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) 10222 AsReplicaHealth() (*ReplicaHealth, bool) 10223} 10224 10225// ReplicaHealth represents a base class for stateful service replica or stateless service instance health. 10226// Contains the replica aggregated health state, the health events and the unhealthy evaluations. 10227type ReplicaHealth struct { 10228 autorest.Response `json:"-"` 10229 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 10230 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthServiceKindReplicaHealth', 'ServiceKindBasicReplicaHealthServiceKindStateful', 'ServiceKindBasicReplicaHealthServiceKindStateless' 10231 ServiceKind ServiceKindBasicReplicaHealth `json:"ServiceKind,omitempty"` 10232 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 10233 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 10234 // HealthEvents - The list of health events reported on the entity. 10235 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 10236 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 10237 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 10238} 10239 10240func unmarshalBasicReplicaHealth(body []byte) (BasicReplicaHealth, error) { 10241 var m map[string]interface{} 10242 err := json.Unmarshal(body, &m) 10243 if err != nil { 10244 return nil, err 10245 } 10246 10247 switch m["ServiceKind"] { 10248 case string(ServiceKindBasicReplicaHealthServiceKindStateful): 10249 var ssrh StatefulServiceReplicaHealth 10250 err := json.Unmarshal(body, &ssrh) 10251 return ssrh, err 10252 case string(ServiceKindBasicReplicaHealthServiceKindStateless): 10253 var ssih StatelessServiceInstanceHealth 10254 err := json.Unmarshal(body, &ssih) 10255 return ssih, err 10256 default: 10257 var rh ReplicaHealth 10258 err := json.Unmarshal(body, &rh) 10259 return rh, err 10260 } 10261} 10262func unmarshalBasicReplicaHealthArray(body []byte) ([]BasicReplicaHealth, error) { 10263 var rawMessages []*json.RawMessage 10264 err := json.Unmarshal(body, &rawMessages) 10265 if err != nil { 10266 return nil, err 10267 } 10268 10269 rhArray := make([]BasicReplicaHealth, len(rawMessages)) 10270 10271 for index, rawMessage := range rawMessages { 10272 rh, err := unmarshalBasicReplicaHealth(*rawMessage) 10273 if err != nil { 10274 return nil, err 10275 } 10276 rhArray[index] = rh 10277 } 10278 return rhArray, nil 10279} 10280 10281// MarshalJSON is the custom marshaler for ReplicaHealth. 10282func (rh ReplicaHealth) MarshalJSON() ([]byte, error) { 10283 rh.ServiceKind = ServiceKindBasicReplicaHealthServiceKindReplicaHealth 10284 objectMap := make(map[string]interface{}) 10285 if rh.PartitionID != nil { 10286 objectMap["PartitionId"] = rh.PartitionID 10287 } 10288 if rh.ServiceKind != "" { 10289 objectMap["ServiceKind"] = rh.ServiceKind 10290 } 10291 if rh.AggregatedHealthState != "" { 10292 objectMap["AggregatedHealthState"] = rh.AggregatedHealthState 10293 } 10294 if rh.HealthEvents != nil { 10295 objectMap["HealthEvents"] = rh.HealthEvents 10296 } 10297 if rh.UnhealthyEvaluations != nil { 10298 objectMap["UnhealthyEvaluations"] = rh.UnhealthyEvaluations 10299 } 10300 if rh.HealthStatistics != nil { 10301 objectMap["HealthStatistics"] = rh.HealthStatistics 10302 } 10303 return json.Marshal(objectMap) 10304} 10305 10306// AsStatefulServiceReplicaHealth is the BasicReplicaHealth implementation for ReplicaHealth. 10307func (rh ReplicaHealth) AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) { 10308 return nil, false 10309} 10310 10311// AsStatelessServiceInstanceHealth is the BasicReplicaHealth implementation for ReplicaHealth. 10312func (rh ReplicaHealth) AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) { 10313 return nil, false 10314} 10315 10316// AsReplicaHealth is the BasicReplicaHealth implementation for ReplicaHealth. 10317func (rh ReplicaHealth) AsReplicaHealth() (*ReplicaHealth, bool) { 10318 return &rh, true 10319} 10320 10321// AsBasicReplicaHealth is the BasicReplicaHealth implementation for ReplicaHealth. 10322func (rh ReplicaHealth) AsBasicReplicaHealth() (BasicReplicaHealth, bool) { 10323 return &rh, true 10324} 10325 10326// ReplicaHealthEvaluation represents health evaluation for a replica, containing information about the data and 10327// the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated 10328// health state is either Error or Warning. 10329type ReplicaHealthEvaluation struct { 10330 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 10331 ReplicaOrInstanceID *string `json:"ReplicaOrInstanceId,omitempty"` 10332 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 10333 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 10334 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 10335 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 10336 Description *string `json:"Description,omitempty"` 10337 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 10338 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 10339} 10340 10341// MarshalJSON is the custom marshaler for ReplicaHealthEvaluation. 10342func (rhe ReplicaHealthEvaluation) MarshalJSON() ([]byte, error) { 10343 rhe.Kind = KindReplica 10344 objectMap := make(map[string]interface{}) 10345 if rhe.PartitionID != nil { 10346 objectMap["PartitionId"] = rhe.PartitionID 10347 } 10348 if rhe.ReplicaOrInstanceID != nil { 10349 objectMap["ReplicaOrInstanceId"] = rhe.ReplicaOrInstanceID 10350 } 10351 if rhe.UnhealthyEvaluations != nil { 10352 objectMap["UnhealthyEvaluations"] = rhe.UnhealthyEvaluations 10353 } 10354 if rhe.AggregatedHealthState != "" { 10355 objectMap["AggregatedHealthState"] = rhe.AggregatedHealthState 10356 } 10357 if rhe.Description != nil { 10358 objectMap["Description"] = rhe.Description 10359 } 10360 if rhe.Kind != "" { 10361 objectMap["Kind"] = rhe.Kind 10362 } 10363 return json.Marshal(objectMap) 10364} 10365 10366// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10367func (rhe ReplicaHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 10368 return nil, false 10369} 10370 10371// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10372func (rhe ReplicaHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 10373 return nil, false 10374} 10375 10376// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10377func (rhe ReplicaHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 10378 return nil, false 10379} 10380 10381// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10382func (rhe ReplicaHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 10383 return nil, false 10384} 10385 10386// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10387func (rhe ReplicaHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 10388 return nil, false 10389} 10390 10391// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10392func (rhe ReplicaHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 10393 return nil, false 10394} 10395 10396// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10397func (rhe ReplicaHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 10398 return nil, false 10399} 10400 10401// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10402func (rhe ReplicaHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 10403 return nil, false 10404} 10405 10406// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10407func (rhe ReplicaHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 10408 return nil, false 10409} 10410 10411// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10412func (rhe ReplicaHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 10413 return nil, false 10414} 10415 10416// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10417func (rhe ReplicaHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 10418 return nil, false 10419} 10420 10421// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10422func (rhe ReplicaHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 10423 return nil, false 10424} 10425 10426// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10427func (rhe ReplicaHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 10428 return nil, false 10429} 10430 10431// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10432func (rhe ReplicaHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 10433 return &rhe, true 10434} 10435 10436// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10437func (rhe ReplicaHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 10438 return nil, false 10439} 10440 10441// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10442func (rhe ReplicaHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 10443 return nil, false 10444} 10445 10446// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10447func (rhe ReplicaHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 10448 return nil, false 10449} 10450 10451// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10452func (rhe ReplicaHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 10453 return nil, false 10454} 10455 10456// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10457func (rhe ReplicaHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 10458 return nil, false 10459} 10460 10461// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10462func (rhe ReplicaHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 10463 return nil, false 10464} 10465 10466// AsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10467func (rhe ReplicaHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 10468 return nil, false 10469} 10470 10471// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. 10472func (rhe ReplicaHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 10473 return &rhe, true 10474} 10475 10476// ReplicaHealthModel ... 10477type ReplicaHealthModel struct { 10478 autorest.Response `json:"-"` 10479 Value BasicReplicaHealth `json:"value,omitempty"` 10480} 10481 10482// UnmarshalJSON is the custom unmarshaler for ReplicaHealthModel struct. 10483func (rhm *ReplicaHealthModel) UnmarshalJSON(body []byte) error { 10484 rh, err := unmarshalBasicReplicaHealth(body) 10485 if err != nil { 10486 return err 10487 } 10488 rhm.Value = rh 10489 10490 return nil 10491} 10492 10493// BasicReplicaHealthState represents a base class for stateful service replica or stateless service instance health 10494// state. 10495type BasicReplicaHealthState interface { 10496 AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) 10497 AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) 10498 AsReplicaHealthState() (*ReplicaHealthState, bool) 10499} 10500 10501// ReplicaHealthState represents a base class for stateful service replica or stateless service instance health 10502// state. 10503type ReplicaHealthState struct { 10504 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 10505 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState', 'ServiceKindBasicReplicaHealthStateServiceKindStateful', 'ServiceKindBasicReplicaHealthStateServiceKindStateless' 10506 ServiceKind ServiceKindBasicReplicaHealthState `json:"ServiceKind,omitempty"` 10507 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 10508 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 10509} 10510 10511func unmarshalBasicReplicaHealthState(body []byte) (BasicReplicaHealthState, error) { 10512 var m map[string]interface{} 10513 err := json.Unmarshal(body, &m) 10514 if err != nil { 10515 return nil, err 10516 } 10517 10518 switch m["ServiceKind"] { 10519 case string(ServiceKindBasicReplicaHealthStateServiceKindStateful): 10520 var ssrhs StatefulServiceReplicaHealthState 10521 err := json.Unmarshal(body, &ssrhs) 10522 return ssrhs, err 10523 case string(ServiceKindBasicReplicaHealthStateServiceKindStateless): 10524 var ssihs StatelessServiceInstanceHealthState 10525 err := json.Unmarshal(body, &ssihs) 10526 return ssihs, err 10527 default: 10528 var RHS ReplicaHealthState 10529 err := json.Unmarshal(body, &RHS) 10530 return RHS, err 10531 } 10532} 10533func unmarshalBasicReplicaHealthStateArray(body []byte) ([]BasicReplicaHealthState, error) { 10534 var rawMessages []*json.RawMessage 10535 err := json.Unmarshal(body, &rawMessages) 10536 if err != nil { 10537 return nil, err 10538 } 10539 10540 RHSArray := make([]BasicReplicaHealthState, len(rawMessages)) 10541 10542 for index, rawMessage := range rawMessages { 10543 RHS, err := unmarshalBasicReplicaHealthState(*rawMessage) 10544 if err != nil { 10545 return nil, err 10546 } 10547 RHSArray[index] = RHS 10548 } 10549 return RHSArray, nil 10550} 10551 10552// MarshalJSON is the custom marshaler for ReplicaHealthState. 10553func (RHS ReplicaHealthState) MarshalJSON() ([]byte, error) { 10554 RHS.ServiceKind = ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState 10555 objectMap := make(map[string]interface{}) 10556 if RHS.PartitionID != nil { 10557 objectMap["PartitionId"] = RHS.PartitionID 10558 } 10559 if RHS.ServiceKind != "" { 10560 objectMap["ServiceKind"] = RHS.ServiceKind 10561 } 10562 if RHS.AggregatedHealthState != "" { 10563 objectMap["AggregatedHealthState"] = RHS.AggregatedHealthState 10564 } 10565 return json.Marshal(objectMap) 10566} 10567 10568// AsStatefulServiceReplicaHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. 10569func (RHS ReplicaHealthState) AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) { 10570 return nil, false 10571} 10572 10573// AsStatelessServiceInstanceHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. 10574func (RHS ReplicaHealthState) AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) { 10575 return nil, false 10576} 10577 10578// AsReplicaHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. 10579func (RHS ReplicaHealthState) AsReplicaHealthState() (*ReplicaHealthState, bool) { 10580 return &RHS, true 10581} 10582 10583// AsBasicReplicaHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. 10584func (RHS ReplicaHealthState) AsBasicReplicaHealthState() (BasicReplicaHealthState, bool) { 10585 return &RHS, true 10586} 10587 10588// ReplicaHealthStateChunk represents the health state chunk of a stateful service replica or a stateless service 10589// instance. 10590// The replica health state contains the replica ID and its aggregated health state. 10591type ReplicaHealthStateChunk struct { 10592 ReplicaOrInstanceID *string `json:"ReplicaOrInstanceId,omitempty"` 10593 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 10594 HealthState HealthState2 `json:"HealthState,omitempty"` 10595} 10596 10597// ReplicaHealthStateChunkList the list of replica health state chunks that respect the input filters in the chunk 10598// query. Returned by get cluster health state chunks query. 10599type ReplicaHealthStateChunkList struct { 10600 // Items - The list of replica health state chunks that respect the input filters in the chunk query. 10601 Items *[]ReplicaHealthStateChunk `json:"Items,omitempty"` 10602} 10603 10604// ReplicaHealthStateFilter defines matching criteria to determine whether a replica should be included as a child 10605// of a partition in the cluster health chunk. 10606// The replicas are only returned if the parent entities match a filter specified in the cluster health chunk query 10607// description. The parent partition, service and application must be included in the cluster health chunk. 10608// One filter can match zero, one or multiple replicas, depending on its properties. 10609type ReplicaHealthStateFilter struct { 10610 // ReplicaOrInstanceIDFilter - Id of the stateful service replica or stateles service instance that matches the filter. The filter is applied only to the specified replica, if it exists. 10611 // If the replica doesn't exist, no replica is returned in the cluster health chunk based on this filter. 10612 // If the replica exists, it is included in the cluster health chunk if it respects the other filter properties. 10613 // If not specified, all replicas that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. 10614 ReplicaOrInstanceIDFilter *string `json:"ReplicaOrInstanceIdFilter,omitempty"` 10615 // HealthStateFilter - The filter for the health state of the replicas. It allows selecting replicas if they match the desired health states. 10616 // The possible values are integer value of one of the following health states. Only replicas that match the filter are returned. All replicas are used to evaluate the parent partition aggregated health state. 10617 // If not specified, default value is None, unless the replica id is specified. If the filter has default value and replica id is specified, the matching replica is returned. 10618 // The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. 10619 // For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) and Warning (4). 10620 // - Default - Default value. Matches any HealthState. The value is zero. 10621 // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. 10622 // - Ok - Filter that matches input with HealthState value Ok. The value is 2. 10623 // - Warning - Filter that matches input with HealthState value Warning. The value is 4. 10624 // - Error - Filter that matches input with HealthState value Error. The value is 8. 10625 // - All - Filter that matches input with any HealthState value. The value is 65535. 10626 HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` 10627} 10628 10629// BasicReplicaInfo information about the identity, status, health, node name, uptime, and other details about the 10630// replica. 10631type BasicReplicaInfo interface { 10632 AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) 10633 AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) 10634 AsReplicaInfo() (*ReplicaInfo, bool) 10635} 10636 10637// ReplicaInfo information about the identity, status, health, node name, uptime, and other details about the 10638// replica. 10639type ReplicaInfo struct { 10640 autorest.Response `json:"-"` 10641 // ReplicaStatus - Possible values include: 'ReplicaStatus1Invalid', 'ReplicaStatus1InBuild', 'ReplicaStatus1Standby', 'ReplicaStatus1Ready', 'ReplicaStatus1Down', 'ReplicaStatus1Dropped' 10642 ReplicaStatus ReplicaStatus1 `json:"ReplicaStatus,omitempty"` 10643 // HealthState - Possible values include: 'HealthState6Invalid', 'HealthState6Ok', 'HealthState6Warning', 'HealthState6Error', 'HealthState6Unknown' 10644 HealthState HealthState6 `json:"HealthState,omitempty"` 10645 NodeName *string `json:"NodeName,omitempty"` 10646 // Address - The address the replica is listening on. 10647 Address *string `json:"Address,omitempty"` 10648 // LastInBuildDurationInSeconds - The last in build duration of the replica in seconds. 10649 LastInBuildDurationInSeconds *string `json:"LastInBuildDurationInSeconds,omitempty"` 10650 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaInfoServiceKindReplicaInfo', 'ServiceKindBasicReplicaInfoServiceKindStateful', 'ServiceKindBasicReplicaInfoServiceKindStateless' 10651 ServiceKind ServiceKindBasicReplicaInfo `json:"ServiceKind,omitempty"` 10652} 10653 10654func unmarshalBasicReplicaInfo(body []byte) (BasicReplicaInfo, error) { 10655 var m map[string]interface{} 10656 err := json.Unmarshal(body, &m) 10657 if err != nil { 10658 return nil, err 10659 } 10660 10661 switch m["ServiceKind"] { 10662 case string(ServiceKindBasicReplicaInfoServiceKindStateful): 10663 var ssri StatefulServiceReplicaInfo 10664 err := json.Unmarshal(body, &ssri) 10665 return ssri, err 10666 case string(ServiceKindBasicReplicaInfoServiceKindStateless): 10667 var ssii StatelessServiceInstanceInfo 10668 err := json.Unmarshal(body, &ssii) 10669 return ssii, err 10670 default: 10671 var ri ReplicaInfo 10672 err := json.Unmarshal(body, &ri) 10673 return ri, err 10674 } 10675} 10676func unmarshalBasicReplicaInfoArray(body []byte) ([]BasicReplicaInfo, error) { 10677 var rawMessages []*json.RawMessage 10678 err := json.Unmarshal(body, &rawMessages) 10679 if err != nil { 10680 return nil, err 10681 } 10682 10683 riArray := make([]BasicReplicaInfo, len(rawMessages)) 10684 10685 for index, rawMessage := range rawMessages { 10686 ri, err := unmarshalBasicReplicaInfo(*rawMessage) 10687 if err != nil { 10688 return nil, err 10689 } 10690 riArray[index] = ri 10691 } 10692 return riArray, nil 10693} 10694 10695// MarshalJSON is the custom marshaler for ReplicaInfo. 10696func (ri ReplicaInfo) MarshalJSON() ([]byte, error) { 10697 ri.ServiceKind = ServiceKindBasicReplicaInfoServiceKindReplicaInfo 10698 objectMap := make(map[string]interface{}) 10699 if ri.ReplicaStatus != "" { 10700 objectMap["ReplicaStatus"] = ri.ReplicaStatus 10701 } 10702 if ri.HealthState != "" { 10703 objectMap["HealthState"] = ri.HealthState 10704 } 10705 if ri.NodeName != nil { 10706 objectMap["NodeName"] = ri.NodeName 10707 } 10708 if ri.Address != nil { 10709 objectMap["Address"] = ri.Address 10710 } 10711 if ri.LastInBuildDurationInSeconds != nil { 10712 objectMap["LastInBuildDurationInSeconds"] = ri.LastInBuildDurationInSeconds 10713 } 10714 if ri.ServiceKind != "" { 10715 objectMap["ServiceKind"] = ri.ServiceKind 10716 } 10717 return json.Marshal(objectMap) 10718} 10719 10720// AsStatefulServiceReplicaInfo is the BasicReplicaInfo implementation for ReplicaInfo. 10721func (ri ReplicaInfo) AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) { 10722 return nil, false 10723} 10724 10725// AsStatelessServiceInstanceInfo is the BasicReplicaInfo implementation for ReplicaInfo. 10726func (ri ReplicaInfo) AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) { 10727 return nil, false 10728} 10729 10730// AsReplicaInfo is the BasicReplicaInfo implementation for ReplicaInfo. 10731func (ri ReplicaInfo) AsReplicaInfo() (*ReplicaInfo, bool) { 10732 return &ri, true 10733} 10734 10735// AsBasicReplicaInfo is the BasicReplicaInfo implementation for ReplicaInfo. 10736func (ri ReplicaInfo) AsBasicReplicaInfo() (BasicReplicaInfo, bool) { 10737 return &ri, true 10738} 10739 10740// ReplicaInfoModel ... 10741type ReplicaInfoModel struct { 10742 autorest.Response `json:"-"` 10743 Value BasicReplicaInfo `json:"value,omitempty"` 10744} 10745 10746// UnmarshalJSON is the custom unmarshaler for ReplicaInfoModel struct. 10747func (rim *ReplicaInfoModel) UnmarshalJSON(body []byte) error { 10748 ri, err := unmarshalBasicReplicaInfo(body) 10749 if err != nil { 10750 return err 10751 } 10752 rim.Value = ri 10753 10754 return nil 10755} 10756 10757// ReplicasHealthEvaluation represents health evaluation for replicas, containing health evaluations for each 10758// unhealthy replica that impacted current aggregated health state. Can be returned when evaluating partition 10759// health and the aggregated health state is either Error or Warning. 10760type ReplicasHealthEvaluation struct { 10761 // MaxPercentUnhealthyReplicasPerPartition - Maximum allowed percentage of unhealthy replicas per partition from the ApplicationHealthPolicy. 10762 MaxPercentUnhealthyReplicasPerPartition *int32 `json:"MaxPercentUnhealthyReplicasPerPartition,omitempty"` 10763 // TotalCount - Total number of replicas in the partition from the health store. 10764 TotalCount *int64 `json:"TotalCount,omitempty"` 10765 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 10766 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 10767 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 10768 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 10769 Description *string `json:"Description,omitempty"` 10770 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 10771 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 10772} 10773 10774// MarshalJSON is the custom marshaler for ReplicasHealthEvaluation. 10775func (rhe ReplicasHealthEvaluation) MarshalJSON() ([]byte, error) { 10776 rhe.Kind = KindReplicas 10777 objectMap := make(map[string]interface{}) 10778 if rhe.MaxPercentUnhealthyReplicasPerPartition != nil { 10779 objectMap["MaxPercentUnhealthyReplicasPerPartition"] = rhe.MaxPercentUnhealthyReplicasPerPartition 10780 } 10781 if rhe.TotalCount != nil { 10782 objectMap["TotalCount"] = rhe.TotalCount 10783 } 10784 if rhe.UnhealthyEvaluations != nil { 10785 objectMap["UnhealthyEvaluations"] = rhe.UnhealthyEvaluations 10786 } 10787 if rhe.AggregatedHealthState != "" { 10788 objectMap["AggregatedHealthState"] = rhe.AggregatedHealthState 10789 } 10790 if rhe.Description != nil { 10791 objectMap["Description"] = rhe.Description 10792 } 10793 if rhe.Kind != "" { 10794 objectMap["Kind"] = rhe.Kind 10795 } 10796 return json.Marshal(objectMap) 10797} 10798 10799// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10800func (rhe ReplicasHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 10801 return nil, false 10802} 10803 10804// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10805func (rhe ReplicasHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 10806 return nil, false 10807} 10808 10809// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10810func (rhe ReplicasHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 10811 return nil, false 10812} 10813 10814// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10815func (rhe ReplicasHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 10816 return nil, false 10817} 10818 10819// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10820func (rhe ReplicasHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 10821 return nil, false 10822} 10823 10824// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10825func (rhe ReplicasHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 10826 return nil, false 10827} 10828 10829// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10830func (rhe ReplicasHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 10831 return nil, false 10832} 10833 10834// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10835func (rhe ReplicasHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 10836 return nil, false 10837} 10838 10839// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10840func (rhe ReplicasHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 10841 return nil, false 10842} 10843 10844// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10845func (rhe ReplicasHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 10846 return nil, false 10847} 10848 10849// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10850func (rhe ReplicasHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 10851 return nil, false 10852} 10853 10854// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10855func (rhe ReplicasHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 10856 return nil, false 10857} 10858 10859// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10860func (rhe ReplicasHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 10861 return nil, false 10862} 10863 10864// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10865func (rhe ReplicasHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 10866 return nil, false 10867} 10868 10869// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10870func (rhe ReplicasHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 10871 return &rhe, true 10872} 10873 10874// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10875func (rhe ReplicasHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 10876 return nil, false 10877} 10878 10879// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10880func (rhe ReplicasHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 10881 return nil, false 10882} 10883 10884// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10885func (rhe ReplicasHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 10886 return nil, false 10887} 10888 10889// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10890func (rhe ReplicasHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 10891 return nil, false 10892} 10893 10894// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10895func (rhe ReplicasHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 10896 return nil, false 10897} 10898 10899// AsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10900func (rhe ReplicasHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 10901 return nil, false 10902} 10903 10904// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. 10905func (rhe ReplicasHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 10906 return &rhe, true 10907} 10908 10909// BasicReplicaStatusBase information about the replica. 10910type BasicReplicaStatusBase interface { 10911 AsKeyValueStoreReplicaStatus() (*KeyValueStoreReplicaStatus, bool) 10912 AsReplicaStatusBase() (*ReplicaStatusBase, bool) 10913} 10914 10915// ReplicaStatusBase information about the replica. 10916type ReplicaStatusBase struct { 10917 // Kind - Possible values include: 'KindReplicaStatusBase', 'KindKeyValueStore' 10918 Kind KindBasicReplicaStatusBase `json:"Kind,omitempty"` 10919} 10920 10921func unmarshalBasicReplicaStatusBase(body []byte) (BasicReplicaStatusBase, error) { 10922 var m map[string]interface{} 10923 err := json.Unmarshal(body, &m) 10924 if err != nil { 10925 return nil, err 10926 } 10927 10928 switch m["Kind"] { 10929 case string(KindKeyValueStore): 10930 var kvsrs KeyValueStoreReplicaStatus 10931 err := json.Unmarshal(body, &kvsrs) 10932 return kvsrs, err 10933 default: 10934 var rsb ReplicaStatusBase 10935 err := json.Unmarshal(body, &rsb) 10936 return rsb, err 10937 } 10938} 10939func unmarshalBasicReplicaStatusBaseArray(body []byte) ([]BasicReplicaStatusBase, error) { 10940 var rawMessages []*json.RawMessage 10941 err := json.Unmarshal(body, &rawMessages) 10942 if err != nil { 10943 return nil, err 10944 } 10945 10946 rsbArray := make([]BasicReplicaStatusBase, len(rawMessages)) 10947 10948 for index, rawMessage := range rawMessages { 10949 rsb, err := unmarshalBasicReplicaStatusBase(*rawMessage) 10950 if err != nil { 10951 return nil, err 10952 } 10953 rsbArray[index] = rsb 10954 } 10955 return rsbArray, nil 10956} 10957 10958// MarshalJSON is the custom marshaler for ReplicaStatusBase. 10959func (rsb ReplicaStatusBase) MarshalJSON() ([]byte, error) { 10960 rsb.Kind = KindReplicaStatusBase 10961 objectMap := make(map[string]interface{}) 10962 if rsb.Kind != "" { 10963 objectMap["Kind"] = rsb.Kind 10964 } 10965 return json.Marshal(objectMap) 10966} 10967 10968// AsKeyValueStoreReplicaStatus is the BasicReplicaStatusBase implementation for ReplicaStatusBase. 10969func (rsb ReplicaStatusBase) AsKeyValueStoreReplicaStatus() (*KeyValueStoreReplicaStatus, bool) { 10970 return nil, false 10971} 10972 10973// AsReplicaStatusBase is the BasicReplicaStatusBase implementation for ReplicaStatusBase. 10974func (rsb ReplicaStatusBase) AsReplicaStatusBase() (*ReplicaStatusBase, bool) { 10975 return &rsb, true 10976} 10977 10978// AsBasicReplicaStatusBase is the BasicReplicaStatusBase implementation for ReplicaStatusBase. 10979func (rsb ReplicaStatusBase) AsBasicReplicaStatusBase() (BasicReplicaStatusBase, bool) { 10980 return &rsb, true 10981} 10982 10983// ReplicatorQueueStatus provides various statistics of the queue used in the service fabric replicator. 10984// Contains information about the service fabric replicator like the replication/copy queue utilization, last 10985// acknowledgement received timestamp, etc. 10986// Depending on the role of the replicator, the properties in this type imply different meanings. 10987type ReplicatorQueueStatus struct { 10988 // QueueUtilizationPercentage - Represents the utilization of the queue. A value of 0 indicates that the queue is empty and a value of 100 indicates the queue is full. 10989 QueueUtilizationPercentage *int32 `json:"QueueUtilizationPercentage,omitempty"` 10990 // QueueMemorySize - Represents the virtual memory consumed by the queue in bytes. 10991 QueueMemorySize *string `json:"QueueMemorySize,omitempty"` 10992 // FirstSequenceNumber - On a primary replicator, this is semantically the sequence number of the operation for which all the secondary replicas have sent an acknowledgement. 10993 // On a secondary replicator, this is the smallest sequence number of the operation that is present in the queue. 10994 FirstSequenceNumber *string `json:"FirstSequenceNumber,omitempty"` 10995 // CompletedSequenceNumber - On a primary replicator, this is semantically the highest sequence number of the operation for which all the secondary replicas have sent an acknowledgement. 10996 // On a secondary replicator, this is semantically the highest sequence number that has been applied to the persistent state. 10997 CompletedSequenceNumber *string `json:"CompletedSequenceNumber,omitempty"` 10998 // CommittedSequenceNumber - On a primary replicator, this is semantically the highest sequence number of the operation for which a write quorum of the secondary replicas have sent an acknowledgement. 10999 // On a secondary replicator, this is semantically the highest sequence number of the in-order operation received from the primary. 11000 CommittedSequenceNumber *string `json:"CommittedSequenceNumber,omitempty"` 11001 // LastSequenceNumber - Represents the latest sequence number of the operation that is available in the queue. 11002 LastSequenceNumber *string `json:"LastSequenceNumber,omitempty"` 11003} 11004 11005// BasicReplicatorStatus represents a base class for primary or secondary replicator status. 11006// Contains information about the service fabric replicator like the replication/copy queue utilization, last 11007// acknowledgement received timestamp, etc. 11008type BasicReplicatorStatus interface { 11009 AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) 11010 AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) 11011 AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) 11012 AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) 11013 AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) 11014 AsReplicatorStatus() (*ReplicatorStatus, bool) 11015} 11016 11017// ReplicatorStatus represents a base class for primary or secondary replicator status. 11018// Contains information about the service fabric replicator like the replication/copy queue utilization, last 11019// acknowledgement received timestamp, etc. 11020type ReplicatorStatus struct { 11021 // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' 11022 Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` 11023} 11024 11025func unmarshalBasicReplicatorStatus(body []byte) (BasicReplicatorStatus, error) { 11026 var m map[string]interface{} 11027 err := json.Unmarshal(body, &m) 11028 if err != nil { 11029 return nil, err 11030 } 11031 11032 switch m["Kind"] { 11033 case string(KindPrimary): 11034 var prs PrimaryReplicatorStatus 11035 err := json.Unmarshal(body, &prs) 11036 return prs, err 11037 case string(KindSecondaryReplicatorStatus): 11038 var srs SecondaryReplicatorStatus 11039 err := json.Unmarshal(body, &srs) 11040 return srs, err 11041 case string(KindActiveSecondary): 11042 var sars SecondaryActiveReplicatorStatus 11043 err := json.Unmarshal(body, &sars) 11044 return sars, err 11045 case string(KindIdleSecondary): 11046 var sirs SecondaryIdleReplicatorStatus 11047 err := json.Unmarshal(body, &sirs) 11048 return sirs, err 11049 default: 11050 var rs ReplicatorStatus 11051 err := json.Unmarshal(body, &rs) 11052 return rs, err 11053 } 11054} 11055func unmarshalBasicReplicatorStatusArray(body []byte) ([]BasicReplicatorStatus, error) { 11056 var rawMessages []*json.RawMessage 11057 err := json.Unmarshal(body, &rawMessages) 11058 if err != nil { 11059 return nil, err 11060 } 11061 11062 rsArray := make([]BasicReplicatorStatus, len(rawMessages)) 11063 11064 for index, rawMessage := range rawMessages { 11065 rs, err := unmarshalBasicReplicatorStatus(*rawMessage) 11066 if err != nil { 11067 return nil, err 11068 } 11069 rsArray[index] = rs 11070 } 11071 return rsArray, nil 11072} 11073 11074// MarshalJSON is the custom marshaler for ReplicatorStatus. 11075func (rs ReplicatorStatus) MarshalJSON() ([]byte, error) { 11076 rs.Kind = KindReplicatorStatus 11077 objectMap := make(map[string]interface{}) 11078 if rs.Kind != "" { 11079 objectMap["Kind"] = rs.Kind 11080 } 11081 return json.Marshal(objectMap) 11082} 11083 11084// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. 11085func (rs ReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { 11086 return nil, false 11087} 11088 11089// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. 11090func (rs ReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { 11091 return nil, false 11092} 11093 11094// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. 11095func (rs ReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { 11096 return nil, false 11097} 11098 11099// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. 11100func (rs ReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { 11101 return nil, false 11102} 11103 11104// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. 11105func (rs ReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { 11106 return nil, false 11107} 11108 11109// AsReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. 11110func (rs ReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { 11111 return &rs, true 11112} 11113 11114// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. 11115func (rs ReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { 11116 return &rs, true 11117} 11118 11119// ResolvedServiceEndpoint endpoint of a resolved service partition. 11120type ResolvedServiceEndpoint struct { 11121 // Kind - Possible values include: 'KindInvalid', 'KindStateless', 'KindStatefulPrimary', 'KindStatefulSecondary' 11122 Kind Kind `json:"Kind,omitempty"` 11123 // Address - The address of the endpoint. If the endpoint has multiple listeners the address is a JSON object with one property per listener with the value as the address of that listener. 11124 Address *string `json:"Address,omitempty"` 11125} 11126 11127// ResolvedServicePartition information about a service partition and its associated endpoints. 11128type ResolvedServicePartition struct { 11129 autorest.Response `json:"-"` 11130 Name *string `json:"Name,omitempty"` 11131 PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` 11132 Endpoints *[]ResolvedServiceEndpoint `json:"Endpoints,omitempty"` 11133 // Version - The version of this resolved service partition result. This version should be passed in the next time the ResolveService call is made via the PreviousRspVersion query parameter. 11134 Version *string `json:"Version,omitempty"` 11135} 11136 11137// UnmarshalJSON is the custom unmarshaler for ResolvedServicePartition struct. 11138func (rsp *ResolvedServicePartition) UnmarshalJSON(body []byte) error { 11139 var m map[string]*json.RawMessage 11140 err := json.Unmarshal(body, &m) 11141 if err != nil { 11142 return err 11143 } 11144 for k, v := range m { 11145 switch k { 11146 case "Name": 11147 if v != nil { 11148 var name string 11149 err = json.Unmarshal(*v, &name) 11150 if err != nil { 11151 return err 11152 } 11153 rsp.Name = &name 11154 } 11155 case "PartitionInformation": 11156 if v != nil { 11157 partitionInformation, err := unmarshalBasicPartitionInformation(*v) 11158 if err != nil { 11159 return err 11160 } 11161 rsp.PartitionInformation = partitionInformation 11162 } 11163 case "Endpoints": 11164 if v != nil { 11165 var endpoints []ResolvedServiceEndpoint 11166 err = json.Unmarshal(*v, &endpoints) 11167 if err != nil { 11168 return err 11169 } 11170 rsp.Endpoints = &endpoints 11171 } 11172 case "Version": 11173 if v != nil { 11174 var version string 11175 err = json.Unmarshal(*v, &version) 11176 if err != nil { 11177 return err 11178 } 11179 rsp.Version = &version 11180 } 11181 } 11182 } 11183 11184 return nil 11185} 11186 11187// RestartDeployedCodePackageDescription defines description for restarting a deloyed code package on Service 11188// Fabric node. 11189type RestartDeployedCodePackageDescription struct { 11190 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 11191 ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` 11192 CodePackageName *string `json:"CodePackageName,omitempty"` 11193 CodePackageInstanceID *string `json:"CodePackageInstanceId,omitempty"` 11194} 11195 11196// RestartNodeDescription describes the parameters to restart a Service Fabric node. 11197type RestartNodeDescription struct { 11198 // NodeInstanceID - The instance id of the target node. If instance id is specified the node is restarted only if it matches with the current instance of the node. A default value of "0" would match any instance id. The instance id can be obtained using get node query. 11199 NodeInstanceID *string `json:"NodeInstanceId,omitempty"` 11200 // CreateFabricDump - Specify True to create a dump of the fabric node process. This is case sensitive. Possible values include: 'False', 'True' 11201 CreateFabricDump CreateFabricDump `json:"CreateFabricDump,omitempty"` 11202} 11203 11204// RestartPartitionResult represents information about an operation in a terminal state (Completed or Faulted). 11205type RestartPartitionResult struct { 11206 // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. 11207 ErrorCode *int32 `json:"ErrorCode,omitempty"` 11208 SelectedPartition *SelectedPartition `json:"SelectedPartition,omitempty"` 11209} 11210 11211// ResumeApplicationUpgradeDescription describes the parameters for resuming an unmonitored manual Service Fabric 11212// application upgrade 11213type ResumeApplicationUpgradeDescription struct { 11214 // UpgradeDomainName - The name of the upgrade domain in which to resume the upgrade. 11215 UpgradeDomainName *string `json:"UpgradeDomainName,omitempty"` 11216} 11217 11218// ResumeClusterUpgradeDescription describes the parameters for resuming a cluster upgrade. 11219type ResumeClusterUpgradeDescription struct { 11220 // UpgradeDomain - The next upgrade domain for this cluster upgrade. 11221 UpgradeDomain *string `json:"UpgradeDomain,omitempty"` 11222} 11223 11224// RollingUpgradeUpdateDescription describes the parameters for updating a rolling upgrade of application or 11225// cluster. 11226type RollingUpgradeUpdateDescription struct { 11227 // RollingUpgradeMode - Possible values include: 'RollingUpgradeMode3Invalid', 'RollingUpgradeMode3UnmonitoredAuto', 'RollingUpgradeMode3UnmonitoredManual', 'RollingUpgradeMode3Monitored' 11228 RollingUpgradeMode RollingUpgradeMode3 `json:"RollingUpgradeMode,omitempty"` 11229 ForceRestart *bool `json:"ForceRestart,omitempty"` 11230 ReplicaSetCheckTimeoutInMilliseconds *int64 `json:"ReplicaSetCheckTimeoutInMilliseconds,omitempty"` 11231 // FailureAction - Possible values include: 'FailureAction1Invalid', 'FailureAction1Rollback', 'FailureAction1Manual' 11232 FailureAction FailureAction1 `json:"FailureAction,omitempty"` 11233 HealthCheckWaitDurationInMilliseconds *string `json:"HealthCheckWaitDurationInMilliseconds,omitempty"` 11234 HealthCheckStableDurationInMilliseconds *string `json:"HealthCheckStableDurationInMilliseconds,omitempty"` 11235 HealthCheckRetryTimeoutInMilliseconds *string `json:"HealthCheckRetryTimeoutInMilliseconds,omitempty"` 11236 UpgradeTimeoutInMilliseconds *string `json:"UpgradeTimeoutInMilliseconds,omitempty"` 11237 UpgradeDomainTimeoutInMilliseconds *string `json:"UpgradeDomainTimeoutInMilliseconds,omitempty"` 11238} 11239 11240// BasicSafetyCheck represents a safety check performed by service fabric before continuing with the operations. These 11241// checks ensure the availability of the service and the reliability of the state. 11242type BasicSafetyCheck interface { 11243 AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) 11244 AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) 11245 AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) 11246 AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) 11247 AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) 11248 AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) 11249 AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) 11250 AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) 11251 AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) 11252 AsSafetyCheck() (*SafetyCheck, bool) 11253} 11254 11255// SafetyCheck represents a safety check performed by service fabric before continuing with the operations. These 11256// checks ensure the availability of the service and the reliability of the state. 11257type SafetyCheck struct { 11258 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 11259 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 11260} 11261 11262func unmarshalBasicSafetyCheck(body []byte) (BasicSafetyCheck, error) { 11263 var m map[string]interface{} 11264 err := json.Unmarshal(body, &m) 11265 if err != nil { 11266 return nil, err 11267 } 11268 11269 switch m["Kind"] { 11270 case string(KindPartitionSafetyCheck): 11271 var psc PartitionSafetyCheck 11272 err := json.Unmarshal(body, &psc) 11273 return psc, err 11274 case string(KindEnsureAvailability): 11275 var easc EnsureAvailabilitySafetyCheck 11276 err := json.Unmarshal(body, &easc) 11277 return easc, err 11278 case string(KindEnsurePartitionQuorum): 11279 var epqsc EnsurePartitionQurumSafetyCheck 11280 err := json.Unmarshal(body, &epqsc) 11281 return epqsc, err 11282 case string(KindEnsureSeedNodeQuorum): 11283 var snsc SeedNodeSafetyCheck 11284 err := json.Unmarshal(body, &snsc) 11285 return snsc, err 11286 case string(KindWaitForInbuildReplica): 11287 var wfirsc WaitForInbuildReplicaSafetyCheck 11288 err := json.Unmarshal(body, &wfirsc) 11289 return wfirsc, err 11290 case string(KindWaitForPrimaryPlacement): 11291 var wfppsc WaitForPrimaryPlacementSafetyCheck 11292 err := json.Unmarshal(body, &wfppsc) 11293 return wfppsc, err 11294 case string(KindWaitForPrimarySwap): 11295 var wfpssc WaitForPrimarySwapSafetyCheck 11296 err := json.Unmarshal(body, &wfpssc) 11297 return wfpssc, err 11298 case string(KindWaitForReconfiguration): 11299 var wfrsc WaitForReconfigurationSafetyCheck 11300 err := json.Unmarshal(body, &wfrsc) 11301 return wfrsc, err 11302 default: 11303 var sc SafetyCheck 11304 err := json.Unmarshal(body, &sc) 11305 return sc, err 11306 } 11307} 11308func unmarshalBasicSafetyCheckArray(body []byte) ([]BasicSafetyCheck, error) { 11309 var rawMessages []*json.RawMessage 11310 err := json.Unmarshal(body, &rawMessages) 11311 if err != nil { 11312 return nil, err 11313 } 11314 11315 scArray := make([]BasicSafetyCheck, len(rawMessages)) 11316 11317 for index, rawMessage := range rawMessages { 11318 sc, err := unmarshalBasicSafetyCheck(*rawMessage) 11319 if err != nil { 11320 return nil, err 11321 } 11322 scArray[index] = sc 11323 } 11324 return scArray, nil 11325} 11326 11327// MarshalJSON is the custom marshaler for SafetyCheck. 11328func (sc SafetyCheck) MarshalJSON() ([]byte, error) { 11329 sc.Kind = KindSafetyCheck 11330 objectMap := make(map[string]interface{}) 11331 if sc.Kind != "" { 11332 objectMap["Kind"] = sc.Kind 11333 } 11334 return json.Marshal(objectMap) 11335} 11336 11337// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11338func (sc SafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 11339 return nil, false 11340} 11341 11342// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11343func (sc SafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 11344 return nil, false 11345} 11346 11347// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11348func (sc SafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 11349 return nil, false 11350} 11351 11352// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11353func (sc SafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 11354 return nil, false 11355} 11356 11357// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11358func (sc SafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 11359 return nil, false 11360} 11361 11362// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11363func (sc SafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 11364 return nil, false 11365} 11366 11367// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11368func (sc SafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 11369 return nil, false 11370} 11371 11372// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11373func (sc SafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 11374 return nil, false 11375} 11376 11377// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11378func (sc SafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 11379 return nil, false 11380} 11381 11382// AsSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11383func (sc SafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 11384 return &sc, true 11385} 11386 11387// AsBasicSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. 11388func (sc SafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 11389 return &sc, true 11390} 11391 11392// SafetyCheckWrapper a wrapper for the safety check object. Safety checks are performed by service fabric before 11393// continuing with the operations. These checks ensure the availability of the service and the reliability of the 11394// state. 11395type SafetyCheckWrapper struct { 11396 SafetyCheck BasicSafetyCheck `json:"SafetyCheck,omitempty"` 11397} 11398 11399// UnmarshalJSON is the custom unmarshaler for SafetyCheckWrapper struct. 11400func (scw *SafetyCheckWrapper) UnmarshalJSON(body []byte) error { 11401 var m map[string]*json.RawMessage 11402 err := json.Unmarshal(body, &m) 11403 if err != nil { 11404 return err 11405 } 11406 for k, v := range m { 11407 switch k { 11408 case "SafetyCheck": 11409 if v != nil { 11410 safetyCheck, err := unmarshalBasicSafetyCheck(*v) 11411 if err != nil { 11412 return err 11413 } 11414 scw.SafetyCheck = safetyCheck 11415 } 11416 } 11417 } 11418 11419 return nil 11420} 11421 11422// SecondaryActiveReplicatorStatus status of the secondary replicator when it is in active mode and is part of the 11423// replica set. 11424type SecondaryActiveReplicatorStatus struct { 11425 ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` 11426 // LastReplicationOperationReceivedTimeUtc - The last time-stamp (UTC) at which a replication operation was received from the primary. 11427 // UTC 0 represents an invalid value, indicating that a replication operation message was never received. 11428 LastReplicationOperationReceivedTimeUtc *date.Time `json:"LastReplicationOperationReceivedTimeUtc,omitempty"` 11429 // IsInBuild - Value that indicates whether the replica is currently being built. 11430 IsInBuild *bool `json:"IsInBuild,omitempty"` 11431 CopyQueueStatus *ReplicatorQueueStatus `json:"CopyQueueStatus,omitempty"` 11432 // LastCopyOperationReceivedTimeUtc - The last time-stamp (UTC) at which a copy operation was received from the primary. 11433 // UTC 0 represents an invalid value, indicating that a copy operation message was never received. 11434 LastCopyOperationReceivedTimeUtc *date.Time `json:"LastCopyOperationReceivedTimeUtc,omitempty"` 11435 // LastAcknowledgementSentTimeUtc - The last time-stamp (UTC) at which an acknowledgment was sent to the primary replicator. 11436 // UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. 11437 LastAcknowledgementSentTimeUtc *date.Time `json:"LastAcknowledgementSentTimeUtc,omitempty"` 11438 // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' 11439 Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` 11440} 11441 11442// MarshalJSON is the custom marshaler for SecondaryActiveReplicatorStatus. 11443func (sars SecondaryActiveReplicatorStatus) MarshalJSON() ([]byte, error) { 11444 sars.Kind = KindActiveSecondary 11445 objectMap := make(map[string]interface{}) 11446 if sars.ReplicationQueueStatus != nil { 11447 objectMap["ReplicationQueueStatus"] = sars.ReplicationQueueStatus 11448 } 11449 if sars.LastReplicationOperationReceivedTimeUtc != nil { 11450 objectMap["LastReplicationOperationReceivedTimeUtc"] = sars.LastReplicationOperationReceivedTimeUtc 11451 } 11452 if sars.IsInBuild != nil { 11453 objectMap["IsInBuild"] = sars.IsInBuild 11454 } 11455 if sars.CopyQueueStatus != nil { 11456 objectMap["CopyQueueStatus"] = sars.CopyQueueStatus 11457 } 11458 if sars.LastCopyOperationReceivedTimeUtc != nil { 11459 objectMap["LastCopyOperationReceivedTimeUtc"] = sars.LastCopyOperationReceivedTimeUtc 11460 } 11461 if sars.LastAcknowledgementSentTimeUtc != nil { 11462 objectMap["LastAcknowledgementSentTimeUtc"] = sars.LastAcknowledgementSentTimeUtc 11463 } 11464 if sars.Kind != "" { 11465 objectMap["Kind"] = sars.Kind 11466 } 11467 return json.Marshal(objectMap) 11468} 11469 11470// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. 11471func (sars SecondaryActiveReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { 11472 return nil, false 11473} 11474 11475// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. 11476func (sars SecondaryActiveReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { 11477 return nil, false 11478} 11479 11480// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. 11481func (sars SecondaryActiveReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { 11482 return &sars, true 11483} 11484 11485// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. 11486func (sars SecondaryActiveReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { 11487 return &sars, true 11488} 11489 11490// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. 11491func (sars SecondaryActiveReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { 11492 return nil, false 11493} 11494 11495// AsReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. 11496func (sars SecondaryActiveReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { 11497 return nil, false 11498} 11499 11500// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. 11501func (sars SecondaryActiveReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { 11502 return &sars, true 11503} 11504 11505// SecondaryIdleReplicatorStatus status of the secondary replicator when it is in idle mode and is being built by 11506// the primary. 11507type SecondaryIdleReplicatorStatus struct { 11508 ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` 11509 // LastReplicationOperationReceivedTimeUtc - The last time-stamp (UTC) at which a replication operation was received from the primary. 11510 // UTC 0 represents an invalid value, indicating that a replication operation message was never received. 11511 LastReplicationOperationReceivedTimeUtc *date.Time `json:"LastReplicationOperationReceivedTimeUtc,omitempty"` 11512 // IsInBuild - Value that indicates whether the replica is currently being built. 11513 IsInBuild *bool `json:"IsInBuild,omitempty"` 11514 CopyQueueStatus *ReplicatorQueueStatus `json:"CopyQueueStatus,omitempty"` 11515 // LastCopyOperationReceivedTimeUtc - The last time-stamp (UTC) at which a copy operation was received from the primary. 11516 // UTC 0 represents an invalid value, indicating that a copy operation message was never received. 11517 LastCopyOperationReceivedTimeUtc *date.Time `json:"LastCopyOperationReceivedTimeUtc,omitempty"` 11518 // LastAcknowledgementSentTimeUtc - The last time-stamp (UTC) at which an acknowledgment was sent to the primary replicator. 11519 // UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. 11520 LastAcknowledgementSentTimeUtc *date.Time `json:"LastAcknowledgementSentTimeUtc,omitempty"` 11521 // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' 11522 Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` 11523} 11524 11525// MarshalJSON is the custom marshaler for SecondaryIdleReplicatorStatus. 11526func (sirs SecondaryIdleReplicatorStatus) MarshalJSON() ([]byte, error) { 11527 sirs.Kind = KindIdleSecondary 11528 objectMap := make(map[string]interface{}) 11529 if sirs.ReplicationQueueStatus != nil { 11530 objectMap["ReplicationQueueStatus"] = sirs.ReplicationQueueStatus 11531 } 11532 if sirs.LastReplicationOperationReceivedTimeUtc != nil { 11533 objectMap["LastReplicationOperationReceivedTimeUtc"] = sirs.LastReplicationOperationReceivedTimeUtc 11534 } 11535 if sirs.IsInBuild != nil { 11536 objectMap["IsInBuild"] = sirs.IsInBuild 11537 } 11538 if sirs.CopyQueueStatus != nil { 11539 objectMap["CopyQueueStatus"] = sirs.CopyQueueStatus 11540 } 11541 if sirs.LastCopyOperationReceivedTimeUtc != nil { 11542 objectMap["LastCopyOperationReceivedTimeUtc"] = sirs.LastCopyOperationReceivedTimeUtc 11543 } 11544 if sirs.LastAcknowledgementSentTimeUtc != nil { 11545 objectMap["LastAcknowledgementSentTimeUtc"] = sirs.LastAcknowledgementSentTimeUtc 11546 } 11547 if sirs.Kind != "" { 11548 objectMap["Kind"] = sirs.Kind 11549 } 11550 return json.Marshal(objectMap) 11551} 11552 11553// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. 11554func (sirs SecondaryIdleReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { 11555 return nil, false 11556} 11557 11558// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. 11559func (sirs SecondaryIdleReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { 11560 return nil, false 11561} 11562 11563// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. 11564func (sirs SecondaryIdleReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { 11565 return &sirs, true 11566} 11567 11568// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. 11569func (sirs SecondaryIdleReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { 11570 return nil, false 11571} 11572 11573// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. 11574func (sirs SecondaryIdleReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { 11575 return &sirs, true 11576} 11577 11578// AsReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. 11579func (sirs SecondaryIdleReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { 11580 return nil, false 11581} 11582 11583// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. 11584func (sirs SecondaryIdleReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { 11585 return &sirs, true 11586} 11587 11588// BasicSecondaryReplicatorStatus ... 11589type BasicSecondaryReplicatorStatus interface { 11590 AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) 11591 AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) 11592 AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) 11593} 11594 11595// SecondaryReplicatorStatus ... 11596type SecondaryReplicatorStatus struct { 11597 ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` 11598 // LastReplicationOperationReceivedTimeUtc - The last time-stamp (UTC) at which a replication operation was received from the primary. 11599 // UTC 0 represents an invalid value, indicating that a replication operation message was never received. 11600 LastReplicationOperationReceivedTimeUtc *date.Time `json:"LastReplicationOperationReceivedTimeUtc,omitempty"` 11601 // IsInBuild - Value that indicates whether the replica is currently being built. 11602 IsInBuild *bool `json:"IsInBuild,omitempty"` 11603 CopyQueueStatus *ReplicatorQueueStatus `json:"CopyQueueStatus,omitempty"` 11604 // LastCopyOperationReceivedTimeUtc - The last time-stamp (UTC) at which a copy operation was received from the primary. 11605 // UTC 0 represents an invalid value, indicating that a copy operation message was never received. 11606 LastCopyOperationReceivedTimeUtc *date.Time `json:"LastCopyOperationReceivedTimeUtc,omitempty"` 11607 // LastAcknowledgementSentTimeUtc - The last time-stamp (UTC) at which an acknowledgment was sent to the primary replicator. 11608 // UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. 11609 LastAcknowledgementSentTimeUtc *date.Time `json:"LastAcknowledgementSentTimeUtc,omitempty"` 11610 // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' 11611 Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` 11612} 11613 11614func unmarshalBasicSecondaryReplicatorStatus(body []byte) (BasicSecondaryReplicatorStatus, error) { 11615 var m map[string]interface{} 11616 err := json.Unmarshal(body, &m) 11617 if err != nil { 11618 return nil, err 11619 } 11620 11621 switch m["Kind"] { 11622 case string(KindActiveSecondary): 11623 var sars SecondaryActiveReplicatorStatus 11624 err := json.Unmarshal(body, &sars) 11625 return sars, err 11626 case string(KindIdleSecondary): 11627 var sirs SecondaryIdleReplicatorStatus 11628 err := json.Unmarshal(body, &sirs) 11629 return sirs, err 11630 default: 11631 var srs SecondaryReplicatorStatus 11632 err := json.Unmarshal(body, &srs) 11633 return srs, err 11634 } 11635} 11636func unmarshalBasicSecondaryReplicatorStatusArray(body []byte) ([]BasicSecondaryReplicatorStatus, error) { 11637 var rawMessages []*json.RawMessage 11638 err := json.Unmarshal(body, &rawMessages) 11639 if err != nil { 11640 return nil, err 11641 } 11642 11643 srsArray := make([]BasicSecondaryReplicatorStatus, len(rawMessages)) 11644 11645 for index, rawMessage := range rawMessages { 11646 srs, err := unmarshalBasicSecondaryReplicatorStatus(*rawMessage) 11647 if err != nil { 11648 return nil, err 11649 } 11650 srsArray[index] = srs 11651 } 11652 return srsArray, nil 11653} 11654 11655// MarshalJSON is the custom marshaler for SecondaryReplicatorStatus. 11656func (srs SecondaryReplicatorStatus) MarshalJSON() ([]byte, error) { 11657 srs.Kind = KindSecondaryReplicatorStatus 11658 objectMap := make(map[string]interface{}) 11659 if srs.ReplicationQueueStatus != nil { 11660 objectMap["ReplicationQueueStatus"] = srs.ReplicationQueueStatus 11661 } 11662 if srs.LastReplicationOperationReceivedTimeUtc != nil { 11663 objectMap["LastReplicationOperationReceivedTimeUtc"] = srs.LastReplicationOperationReceivedTimeUtc 11664 } 11665 if srs.IsInBuild != nil { 11666 objectMap["IsInBuild"] = srs.IsInBuild 11667 } 11668 if srs.CopyQueueStatus != nil { 11669 objectMap["CopyQueueStatus"] = srs.CopyQueueStatus 11670 } 11671 if srs.LastCopyOperationReceivedTimeUtc != nil { 11672 objectMap["LastCopyOperationReceivedTimeUtc"] = srs.LastCopyOperationReceivedTimeUtc 11673 } 11674 if srs.LastAcknowledgementSentTimeUtc != nil { 11675 objectMap["LastAcknowledgementSentTimeUtc"] = srs.LastAcknowledgementSentTimeUtc 11676 } 11677 if srs.Kind != "" { 11678 objectMap["Kind"] = srs.Kind 11679 } 11680 return json.Marshal(objectMap) 11681} 11682 11683// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. 11684func (srs SecondaryReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { 11685 return nil, false 11686} 11687 11688// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. 11689func (srs SecondaryReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { 11690 return &srs, true 11691} 11692 11693// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. 11694func (srs SecondaryReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { 11695 return &srs, true 11696} 11697 11698// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. 11699func (srs SecondaryReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { 11700 return nil, false 11701} 11702 11703// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. 11704func (srs SecondaryReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { 11705 return nil, false 11706} 11707 11708// AsReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. 11709func (srs SecondaryReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { 11710 return nil, false 11711} 11712 11713// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. 11714func (srs SecondaryReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { 11715 return &srs, true 11716} 11717 11718// SeedNodeSafetyCheck represents a safety check for the seed nodes being performed by service fabric before 11719// continuing with node level operations. 11720type SeedNodeSafetyCheck struct { 11721 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 11722 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 11723} 11724 11725// MarshalJSON is the custom marshaler for SeedNodeSafetyCheck. 11726func (snsc SeedNodeSafetyCheck) MarshalJSON() ([]byte, error) { 11727 snsc.Kind = KindEnsureSeedNodeQuorum 11728 objectMap := make(map[string]interface{}) 11729 if snsc.Kind != "" { 11730 objectMap["Kind"] = snsc.Kind 11731 } 11732 return json.Marshal(objectMap) 11733} 11734 11735// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11736func (snsc SeedNodeSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 11737 return nil, false 11738} 11739 11740// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11741func (snsc SeedNodeSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 11742 return nil, false 11743} 11744 11745// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11746func (snsc SeedNodeSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 11747 return nil, false 11748} 11749 11750// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11751func (snsc SeedNodeSafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 11752 return nil, false 11753} 11754 11755// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11756func (snsc SeedNodeSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 11757 return &snsc, true 11758} 11759 11760// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11761func (snsc SeedNodeSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 11762 return nil, false 11763} 11764 11765// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11766func (snsc SeedNodeSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 11767 return nil, false 11768} 11769 11770// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11771func (snsc SeedNodeSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 11772 return nil, false 11773} 11774 11775// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11776func (snsc SeedNodeSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 11777 return nil, false 11778} 11779 11780// AsSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11781func (snsc SeedNodeSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 11782 return nil, false 11783} 11784 11785// AsBasicSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. 11786func (snsc SeedNodeSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 11787 return &snsc, true 11788} 11789 11790// SelectedPartition this class returns information about the partition that the user-induced operation acted upon. 11791type SelectedPartition struct { 11792 ServiceName *string `json:"ServiceName,omitempty"` 11793 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 11794} 11795 11796// ServiceCorrelationDescription creates a particular correlation between services. 11797type ServiceCorrelationDescription struct { 11798 // Scheme - Possible values include: 'SchemeInvalid', 'SchemeAffinity', 'SchemeAlignedAffinity', 'SchemeNonAlignedAffinity' 11799 Scheme Scheme `json:"Scheme,omitempty"` 11800 ServiceName *string `json:"ServiceName,omitempty"` 11801} 11802 11803// BasicServiceDescription a ServiceDescription contains all of the information necessary to create a service. 11804type BasicServiceDescription interface { 11805 AsStatefulServiceDescription() (*StatefulServiceDescription, bool) 11806 AsStatelessServiceDescription() (*StatelessServiceDescription, bool) 11807 AsServiceDescription() (*ServiceDescription, bool) 11808} 11809 11810// ServiceDescription a ServiceDescription contains all of the information necessary to create a service. 11811type ServiceDescription struct { 11812 autorest.Response `json:"-"` 11813 ApplicationName *string `json:"ApplicationName,omitempty"` 11814 ServiceName *string `json:"ServiceName,omitempty"` 11815 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 11816 InitializationData *[]int32 `json:"InitializationData,omitempty"` 11817 PartitionDescription BasicPartitionSchemeDescription `json:"PartitionDescription,omitempty"` 11818 // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". 11819 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 11820 CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` 11821 ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"ServiceLoadMetrics,omitempty"` 11822 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 11823 // DefaultMoveCost - Possible values include: 'Zero', 'Low', 'Medium', 'High' 11824 DefaultMoveCost DefaultMoveCost `json:"DefaultMoveCost,omitempty"` 11825 // IsDefaultMoveCostSpecified - Indicates if the DefaultMoveCost property is specified. 11826 IsDefaultMoveCostSpecified *bool `json:"IsDefaultMoveCostSpecified,omitempty"` 11827 // ServicePackageActivationMode - Possible values include: 'ServicePackageActivationMode1SharedProcess', 'ServicePackageActivationMode1ExclusiveProcess' 11828 ServicePackageActivationMode ServicePackageActivationMode1 `json:"ServicePackageActivationMode,omitempty"` 11829 // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. 11830 ServiceDNSName *string `json:"ServiceDnsName,omitempty"` 11831 // ServiceKind - Possible values include: 'ServiceKindBasicServiceDescriptionServiceKindServiceDescription', 'ServiceKindBasicServiceDescriptionServiceKindStateful', 'ServiceKindBasicServiceDescriptionServiceKindStateless' 11832 ServiceKind ServiceKindBasicServiceDescription `json:"ServiceKind,omitempty"` 11833} 11834 11835func unmarshalBasicServiceDescription(body []byte) (BasicServiceDescription, error) { 11836 var m map[string]interface{} 11837 err := json.Unmarshal(body, &m) 11838 if err != nil { 11839 return nil, err 11840 } 11841 11842 switch m["ServiceKind"] { 11843 case string(ServiceKindBasicServiceDescriptionServiceKindStateful): 11844 var ssd StatefulServiceDescription 11845 err := json.Unmarshal(body, &ssd) 11846 return ssd, err 11847 case string(ServiceKindBasicServiceDescriptionServiceKindStateless): 11848 var ssd StatelessServiceDescription 11849 err := json.Unmarshal(body, &ssd) 11850 return ssd, err 11851 default: 11852 var sd ServiceDescription 11853 err := json.Unmarshal(body, &sd) 11854 return sd, err 11855 } 11856} 11857func unmarshalBasicServiceDescriptionArray(body []byte) ([]BasicServiceDescription, error) { 11858 var rawMessages []*json.RawMessage 11859 err := json.Unmarshal(body, &rawMessages) 11860 if err != nil { 11861 return nil, err 11862 } 11863 11864 sdArray := make([]BasicServiceDescription, len(rawMessages)) 11865 11866 for index, rawMessage := range rawMessages { 11867 sd, err := unmarshalBasicServiceDescription(*rawMessage) 11868 if err != nil { 11869 return nil, err 11870 } 11871 sdArray[index] = sd 11872 } 11873 return sdArray, nil 11874} 11875 11876// MarshalJSON is the custom marshaler for ServiceDescription. 11877func (sd ServiceDescription) MarshalJSON() ([]byte, error) { 11878 sd.ServiceKind = ServiceKindBasicServiceDescriptionServiceKindServiceDescription 11879 objectMap := make(map[string]interface{}) 11880 if sd.ApplicationName != nil { 11881 objectMap["ApplicationName"] = sd.ApplicationName 11882 } 11883 if sd.ServiceName != nil { 11884 objectMap["ServiceName"] = sd.ServiceName 11885 } 11886 if sd.ServiceTypeName != nil { 11887 objectMap["ServiceTypeName"] = sd.ServiceTypeName 11888 } 11889 if sd.InitializationData != nil { 11890 objectMap["InitializationData"] = sd.InitializationData 11891 } 11892 objectMap["PartitionDescription"] = sd.PartitionDescription 11893 if sd.PlacementConstraints != nil { 11894 objectMap["PlacementConstraints"] = sd.PlacementConstraints 11895 } 11896 if sd.CorrelationScheme != nil { 11897 objectMap["CorrelationScheme"] = sd.CorrelationScheme 11898 } 11899 if sd.ServiceLoadMetrics != nil { 11900 objectMap["ServiceLoadMetrics"] = sd.ServiceLoadMetrics 11901 } 11902 if sd.ServicePlacementPolicies != nil { 11903 objectMap["ServicePlacementPolicies"] = sd.ServicePlacementPolicies 11904 } 11905 if sd.DefaultMoveCost != "" { 11906 objectMap["DefaultMoveCost"] = sd.DefaultMoveCost 11907 } 11908 if sd.IsDefaultMoveCostSpecified != nil { 11909 objectMap["IsDefaultMoveCostSpecified"] = sd.IsDefaultMoveCostSpecified 11910 } 11911 if sd.ServicePackageActivationMode != "" { 11912 objectMap["ServicePackageActivationMode"] = sd.ServicePackageActivationMode 11913 } 11914 if sd.ServiceDNSName != nil { 11915 objectMap["ServiceDnsName"] = sd.ServiceDNSName 11916 } 11917 if sd.ServiceKind != "" { 11918 objectMap["ServiceKind"] = sd.ServiceKind 11919 } 11920 return json.Marshal(objectMap) 11921} 11922 11923// AsStatefulServiceDescription is the BasicServiceDescription implementation for ServiceDescription. 11924func (sd ServiceDescription) AsStatefulServiceDescription() (*StatefulServiceDescription, bool) { 11925 return nil, false 11926} 11927 11928// AsStatelessServiceDescription is the BasicServiceDescription implementation for ServiceDescription. 11929func (sd ServiceDescription) AsStatelessServiceDescription() (*StatelessServiceDescription, bool) { 11930 return nil, false 11931} 11932 11933// AsServiceDescription is the BasicServiceDescription implementation for ServiceDescription. 11934func (sd ServiceDescription) AsServiceDescription() (*ServiceDescription, bool) { 11935 return &sd, true 11936} 11937 11938// AsBasicServiceDescription is the BasicServiceDescription implementation for ServiceDescription. 11939func (sd ServiceDescription) AsBasicServiceDescription() (BasicServiceDescription, bool) { 11940 return &sd, true 11941} 11942 11943// UnmarshalJSON is the custom unmarshaler for ServiceDescription struct. 11944func (sd *ServiceDescription) UnmarshalJSON(body []byte) error { 11945 var m map[string]*json.RawMessage 11946 err := json.Unmarshal(body, &m) 11947 if err != nil { 11948 return err 11949 } 11950 for k, v := range m { 11951 switch k { 11952 case "ApplicationName": 11953 if v != nil { 11954 var applicationName string 11955 err = json.Unmarshal(*v, &applicationName) 11956 if err != nil { 11957 return err 11958 } 11959 sd.ApplicationName = &applicationName 11960 } 11961 case "ServiceName": 11962 if v != nil { 11963 var serviceName string 11964 err = json.Unmarshal(*v, &serviceName) 11965 if err != nil { 11966 return err 11967 } 11968 sd.ServiceName = &serviceName 11969 } 11970 case "ServiceTypeName": 11971 if v != nil { 11972 var serviceTypeName string 11973 err = json.Unmarshal(*v, &serviceTypeName) 11974 if err != nil { 11975 return err 11976 } 11977 sd.ServiceTypeName = &serviceTypeName 11978 } 11979 case "InitializationData": 11980 if v != nil { 11981 var initializationData []int32 11982 err = json.Unmarshal(*v, &initializationData) 11983 if err != nil { 11984 return err 11985 } 11986 sd.InitializationData = &initializationData 11987 } 11988 case "PartitionDescription": 11989 if v != nil { 11990 partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v) 11991 if err != nil { 11992 return err 11993 } 11994 sd.PartitionDescription = partitionDescription 11995 } 11996 case "PlacementConstraints": 11997 if v != nil { 11998 var placementConstraints string 11999 err = json.Unmarshal(*v, &placementConstraints) 12000 if err != nil { 12001 return err 12002 } 12003 sd.PlacementConstraints = &placementConstraints 12004 } 12005 case "CorrelationScheme": 12006 if v != nil { 12007 var correlationScheme []ServiceCorrelationDescription 12008 err = json.Unmarshal(*v, &correlationScheme) 12009 if err != nil { 12010 return err 12011 } 12012 sd.CorrelationScheme = &correlationScheme 12013 } 12014 case "ServiceLoadMetrics": 12015 if v != nil { 12016 var serviceLoadMetrics []ServiceLoadMetricDescription 12017 err = json.Unmarshal(*v, &serviceLoadMetrics) 12018 if err != nil { 12019 return err 12020 } 12021 sd.ServiceLoadMetrics = &serviceLoadMetrics 12022 } 12023 case "ServicePlacementPolicies": 12024 if v != nil { 12025 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 12026 if err != nil { 12027 return err 12028 } 12029 sd.ServicePlacementPolicies = &servicePlacementPolicies 12030 } 12031 case "DefaultMoveCost": 12032 if v != nil { 12033 var defaultMoveCost DefaultMoveCost 12034 err = json.Unmarshal(*v, &defaultMoveCost) 12035 if err != nil { 12036 return err 12037 } 12038 sd.DefaultMoveCost = defaultMoveCost 12039 } 12040 case "IsDefaultMoveCostSpecified": 12041 if v != nil { 12042 var isDefaultMoveCostSpecified bool 12043 err = json.Unmarshal(*v, &isDefaultMoveCostSpecified) 12044 if err != nil { 12045 return err 12046 } 12047 sd.IsDefaultMoveCostSpecified = &isDefaultMoveCostSpecified 12048 } 12049 case "ServicePackageActivationMode": 12050 if v != nil { 12051 var servicePackageActivationMode ServicePackageActivationMode1 12052 err = json.Unmarshal(*v, &servicePackageActivationMode) 12053 if err != nil { 12054 return err 12055 } 12056 sd.ServicePackageActivationMode = servicePackageActivationMode 12057 } 12058 case "ServiceDnsName": 12059 if v != nil { 12060 var serviceDNSName string 12061 err = json.Unmarshal(*v, &serviceDNSName) 12062 if err != nil { 12063 return err 12064 } 12065 sd.ServiceDNSName = &serviceDNSName 12066 } 12067 case "ServiceKind": 12068 if v != nil { 12069 var serviceKind ServiceKindBasicServiceDescription 12070 err = json.Unmarshal(*v, &serviceKind) 12071 if err != nil { 12072 return err 12073 } 12074 sd.ServiceKind = serviceKind 12075 } 12076 } 12077 } 12078 12079 return nil 12080} 12081 12082// ServiceDescriptionModel ... 12083type ServiceDescriptionModel struct { 12084 autorest.Response `json:"-"` 12085 Value BasicServiceDescription `json:"value,omitempty"` 12086} 12087 12088// UnmarshalJSON is the custom unmarshaler for ServiceDescriptionModel struct. 12089func (sdm *ServiceDescriptionModel) UnmarshalJSON(body []byte) error { 12090 sd, err := unmarshalBasicServiceDescription(body) 12091 if err != nil { 12092 return err 12093 } 12094 sdm.Value = sd 12095 12096 return nil 12097} 12098 12099// ServiceFromTemplateDescription defines description for creating a Service Fabric service from a template defined 12100// in the application manifest. 12101type ServiceFromTemplateDescription struct { 12102 ApplicationName *string `json:"ApplicationName,omitempty"` 12103 ServiceName *string `json:"ServiceName,omitempty"` 12104 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 12105 InitializationData *[]int32 `json:"InitializationData,omitempty"` 12106 // ServicePackageActivationMode - Possible values include: 'SharedProcess', 'ExclusiveProcess' 12107 ServicePackageActivationMode ServicePackageActivationMode `json:"ServicePackageActivationMode,omitempty"` 12108 // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. 12109 ServiceDNSName *string `json:"ServiceDnsName,omitempty"` 12110} 12111 12112// ServiceHealth information about the health of a Service Fabric service. 12113type ServiceHealth struct { 12114 autorest.Response `json:"-"` 12115 Name *string `json:"Name,omitempty"` 12116 // PartitionHealthStates - The list of partition health states associated with the service. 12117 PartitionHealthStates *[]PartitionHealthState `json:"PartitionHealthStates,omitempty"` 12118 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 12119 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 12120 // HealthEvents - The list of health events reported on the entity. 12121 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 12122 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 12123 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 12124} 12125 12126// ServiceHealthEvaluation represents health evaluation for a service, containing information about the data and 12127// the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated 12128// health state is either Error or Warning. 12129type ServiceHealthEvaluation struct { 12130 ServiceName *string `json:"ServiceName,omitempty"` 12131 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 12132 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 12133 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 12134 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 12135 Description *string `json:"Description,omitempty"` 12136 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 12137 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 12138} 12139 12140// MarshalJSON is the custom marshaler for ServiceHealthEvaluation. 12141func (she ServiceHealthEvaluation) MarshalJSON() ([]byte, error) { 12142 she.Kind = KindService 12143 objectMap := make(map[string]interface{}) 12144 if she.ServiceName != nil { 12145 objectMap["ServiceName"] = she.ServiceName 12146 } 12147 if she.UnhealthyEvaluations != nil { 12148 objectMap["UnhealthyEvaluations"] = she.UnhealthyEvaluations 12149 } 12150 if she.AggregatedHealthState != "" { 12151 objectMap["AggregatedHealthState"] = she.AggregatedHealthState 12152 } 12153 if she.Description != nil { 12154 objectMap["Description"] = she.Description 12155 } 12156 if she.Kind != "" { 12157 objectMap["Kind"] = she.Kind 12158 } 12159 return json.Marshal(objectMap) 12160} 12161 12162// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12163func (she ServiceHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 12164 return nil, false 12165} 12166 12167// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12168func (she ServiceHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 12169 return nil, false 12170} 12171 12172// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12173func (she ServiceHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 12174 return nil, false 12175} 12176 12177// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12178func (she ServiceHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 12179 return nil, false 12180} 12181 12182// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12183func (she ServiceHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 12184 return nil, false 12185} 12186 12187// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12188func (she ServiceHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 12189 return nil, false 12190} 12191 12192// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12193func (she ServiceHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 12194 return nil, false 12195} 12196 12197// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12198func (she ServiceHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 12199 return nil, false 12200} 12201 12202// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12203func (she ServiceHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 12204 return nil, false 12205} 12206 12207// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12208func (she ServiceHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 12209 return nil, false 12210} 12211 12212// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12213func (she ServiceHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 12214 return nil, false 12215} 12216 12217// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12218func (she ServiceHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 12219 return nil, false 12220} 12221 12222// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12223func (she ServiceHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 12224 return nil, false 12225} 12226 12227// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12228func (she ServiceHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 12229 return nil, false 12230} 12231 12232// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12233func (she ServiceHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 12234 return nil, false 12235} 12236 12237// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12238func (she ServiceHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 12239 return &she, true 12240} 12241 12242// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12243func (she ServiceHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 12244 return nil, false 12245} 12246 12247// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12248func (she ServiceHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 12249 return nil, false 12250} 12251 12252// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12253func (she ServiceHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 12254 return nil, false 12255} 12256 12257// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12258func (she ServiceHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 12259 return nil, false 12260} 12261 12262// AsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12263func (she ServiceHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 12264 return nil, false 12265} 12266 12267// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. 12268func (she ServiceHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 12269 return &she, true 12270} 12271 12272// ServiceHealthState represents the health state of a service, which contains the service identifier and its 12273// aggregated health state. 12274type ServiceHealthState struct { 12275 ServiceName *string `json:"ServiceName,omitempty"` 12276 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 12277 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 12278} 12279 12280// ServiceHealthStateChunk represents the health state chunk of a service, which contains the service name, its 12281// aggregated health state and any partitions that respect the filters in the cluster health chunk query 12282// description. 12283type ServiceHealthStateChunk struct { 12284 ServiceName *string `json:"ServiceName,omitempty"` 12285 PartitionHealthStateChunks *PartitionHealthStateChunkList `json:"PartitionHealthStateChunks,omitempty"` 12286 // HealthState - Possible values include: 'HealthState2Invalid', 'HealthState2Ok', 'HealthState2Warning', 'HealthState2Error', 'HealthState2Unknown' 12287 HealthState HealthState2 `json:"HealthState,omitempty"` 12288} 12289 12290// ServiceHealthStateChunkList the list of service health state chunks that respect the input filters in the chunk 12291// query. Returned by get cluster health state chunks query. 12292type ServiceHealthStateChunkList struct { 12293 // Items - The list of service health state chunks that respect the input filters in the chunk query. 12294 Items *[]ServiceHealthStateChunk `json:"Items,omitempty"` 12295} 12296 12297// ServiceHealthStateFilter defines matching criteria to determine whether a service should be included as a child 12298// of an application in the cluster health chunk. 12299// The services are only returned if the parent application matches a filter specified in the cluster health chunk 12300// query description. 12301// One filter can match zero, one or multiple services, depending on its properties. 12302type ServiceHealthStateFilter struct { 12303 // ServiceNameFilter - The name of the service that matches the filter. The filter is applied only to the specified service, if it exists. 12304 // If the service doesn't exist, no service is returned in the cluster health chunk based on this filter. 12305 // If the service exists, it is included as the application's child if the health state matches the other filter properties. 12306 // If not specified, all services that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. 12307 ServiceNameFilter *string `json:"ServiceNameFilter,omitempty"` 12308 // HealthStateFilter - The filter for the health state of the services. It allows selecting services if they match the desired health states. 12309 // The possible values are integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the cluster aggregated health state. 12310 // If not specified, default value is None, unless the service name is specified. If the filter has default value and service name is specified, the matching service is returned. 12311 // The state values are flag based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. 12312 // For example, if the provided value is 6, it matches services with HealthState value of OK (2) and Warning (4). 12313 // - Default - Default value. Matches any HealthState. The value is zero. 12314 // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. 12315 // - Ok - Filter that matches input with HealthState value Ok. The value is 2. 12316 // - Warning - Filter that matches input with HealthState value Warning. The value is 4. 12317 // - Error - Filter that matches input with HealthState value Error. The value is 8. 12318 // - All - Filter that matches input with any HealthState value. The value is 65535. 12319 HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` 12320 // PartitionFilters - Defines a list of filters that specify which partitions to be included in the returned cluster health chunk as children of the service. The partitions are returned only if the parent service matches a filter. 12321 // If the list is empty, no partitions are returned. All the partitions are used to evaluate the parent service aggregated health state, regardless of the input filters. 12322 // The service filter may specify multiple partition filters. 12323 // For example, it can specify a filter to return all partitions with health state Error and another filter to always include a partition identified by its partition id. 12324 PartitionFilters *[]PartitionHealthStateFilter `json:"PartitionFilters,omitempty"` 12325} 12326 12327// BasicServiceInfo information about a Service Fabric service. 12328type BasicServiceInfo interface { 12329 AsStatefulServiceInfo() (*StatefulServiceInfo, bool) 12330 AsStatelessServiceInfo() (*StatelessServiceInfo, bool) 12331 AsServiceInfo() (*ServiceInfo, bool) 12332} 12333 12334// ServiceInfo information about a Service Fabric service. 12335type ServiceInfo struct { 12336 autorest.Response `json:"-"` 12337 ID *string `json:"Id,omitempty"` 12338 Name *string `json:"Name,omitempty"` 12339 TypeName *string `json:"TypeName,omitempty"` 12340 // ManifestVersion - The version of the service manifest. 12341 ManifestVersion *string `json:"ManifestVersion,omitempty"` 12342 // HealthState - Possible values include: 'HealthState7Invalid', 'HealthState7Ok', 'HealthState7Warning', 'HealthState7Error', 'HealthState7Unknown' 12343 HealthState HealthState7 `json:"HealthState,omitempty"` 12344 // ServiceStatus - Possible values include: 'ServiceStatusUnknown', 'ServiceStatusActive', 'ServiceStatusUpgrading', 'ServiceStatusDeleting', 'ServiceStatusCreating', 'ServiceStatusFailed' 12345 ServiceStatus ServiceStatus `json:"ServiceStatus,omitempty"` 12346 // IsServiceGroup - Whether the service is in a service group. 12347 IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` 12348 // ServiceKind - Possible values include: 'ServiceKindBasicServiceInfoServiceKindServiceInfo', 'ServiceKindBasicServiceInfoServiceKindStateful', 'ServiceKindBasicServiceInfoServiceKindStateless' 12349 ServiceKind ServiceKindBasicServiceInfo `json:"ServiceKind,omitempty"` 12350} 12351 12352func unmarshalBasicServiceInfo(body []byte) (BasicServiceInfo, error) { 12353 var m map[string]interface{} 12354 err := json.Unmarshal(body, &m) 12355 if err != nil { 12356 return nil, err 12357 } 12358 12359 switch m["ServiceKind"] { 12360 case string(ServiceKindBasicServiceInfoServiceKindStateful): 12361 var ssi StatefulServiceInfo 12362 err := json.Unmarshal(body, &ssi) 12363 return ssi, err 12364 case string(ServiceKindBasicServiceInfoServiceKindStateless): 12365 var ssi StatelessServiceInfo 12366 err := json.Unmarshal(body, &ssi) 12367 return ssi, err 12368 default: 12369 var si ServiceInfo 12370 err := json.Unmarshal(body, &si) 12371 return si, err 12372 } 12373} 12374func unmarshalBasicServiceInfoArray(body []byte) ([]BasicServiceInfo, error) { 12375 var rawMessages []*json.RawMessage 12376 err := json.Unmarshal(body, &rawMessages) 12377 if err != nil { 12378 return nil, err 12379 } 12380 12381 siArray := make([]BasicServiceInfo, len(rawMessages)) 12382 12383 for index, rawMessage := range rawMessages { 12384 si, err := unmarshalBasicServiceInfo(*rawMessage) 12385 if err != nil { 12386 return nil, err 12387 } 12388 siArray[index] = si 12389 } 12390 return siArray, nil 12391} 12392 12393// MarshalJSON is the custom marshaler for ServiceInfo. 12394func (si ServiceInfo) MarshalJSON() ([]byte, error) { 12395 si.ServiceKind = ServiceKindBasicServiceInfoServiceKindServiceInfo 12396 objectMap := make(map[string]interface{}) 12397 if si.ID != nil { 12398 objectMap["Id"] = si.ID 12399 } 12400 if si.Name != nil { 12401 objectMap["Name"] = si.Name 12402 } 12403 if si.TypeName != nil { 12404 objectMap["TypeName"] = si.TypeName 12405 } 12406 if si.ManifestVersion != nil { 12407 objectMap["ManifestVersion"] = si.ManifestVersion 12408 } 12409 if si.HealthState != "" { 12410 objectMap["HealthState"] = si.HealthState 12411 } 12412 if si.ServiceStatus != "" { 12413 objectMap["ServiceStatus"] = si.ServiceStatus 12414 } 12415 if si.IsServiceGroup != nil { 12416 objectMap["IsServiceGroup"] = si.IsServiceGroup 12417 } 12418 if si.ServiceKind != "" { 12419 objectMap["ServiceKind"] = si.ServiceKind 12420 } 12421 return json.Marshal(objectMap) 12422} 12423 12424// AsStatefulServiceInfo is the BasicServiceInfo implementation for ServiceInfo. 12425func (si ServiceInfo) AsStatefulServiceInfo() (*StatefulServiceInfo, bool) { 12426 return nil, false 12427} 12428 12429// AsStatelessServiceInfo is the BasicServiceInfo implementation for ServiceInfo. 12430func (si ServiceInfo) AsStatelessServiceInfo() (*StatelessServiceInfo, bool) { 12431 return nil, false 12432} 12433 12434// AsServiceInfo is the BasicServiceInfo implementation for ServiceInfo. 12435func (si ServiceInfo) AsServiceInfo() (*ServiceInfo, bool) { 12436 return &si, true 12437} 12438 12439// AsBasicServiceInfo is the BasicServiceInfo implementation for ServiceInfo. 12440func (si ServiceInfo) AsBasicServiceInfo() (BasicServiceInfo, bool) { 12441 return &si, true 12442} 12443 12444// ServiceInfoModel ... 12445type ServiceInfoModel struct { 12446 autorest.Response `json:"-"` 12447 Value BasicServiceInfo `json:"value,omitempty"` 12448} 12449 12450// UnmarshalJSON is the custom unmarshaler for ServiceInfoModel struct. 12451func (sim *ServiceInfoModel) UnmarshalJSON(body []byte) error { 12452 si, err := unmarshalBasicServiceInfo(body) 12453 if err != nil { 12454 return err 12455 } 12456 sim.Value = si 12457 12458 return nil 12459} 12460 12461// ServiceLoadMetricDescription specifies a metric to load balance a service during runtime. 12462type ServiceLoadMetricDescription struct { 12463 // Name - The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive. 12464 Name *string `json:"Name,omitempty"` 12465 // Weight - Possible values include: 'WeightZero', 'WeightLow', 'WeightMedium', 'WeightHigh' 12466 Weight Weight `json:"Weight,omitempty"` 12467 // PrimaryDefaultLoad - Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica. 12468 PrimaryDefaultLoad *int32 `json:"PrimaryDefaultLoad,omitempty"` 12469 // SecondaryDefaultLoad - Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. 12470 SecondaryDefaultLoad *int32 `json:"SecondaryDefaultLoad,omitempty"` 12471 // DefaultLoad - Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. 12472 DefaultLoad *int32 `json:"DefaultLoad,omitempty"` 12473} 12474 12475// ServiceNameInfo information about the service name. 12476type ServiceNameInfo struct { 12477 autorest.Response `json:"-"` 12478 ID *string `json:"Id,omitempty"` 12479 Name *string `json:"Name,omitempty"` 12480} 12481 12482// BasicServicePartitionInfo information about a partition of a Service Fabric service. 12483type BasicServicePartitionInfo interface { 12484 AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) 12485 AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) 12486 AsServicePartitionInfo() (*ServicePartitionInfo, bool) 12487} 12488 12489// ServicePartitionInfo information about a partition of a Service Fabric service. 12490type ServicePartitionInfo struct { 12491 autorest.Response `json:"-"` 12492 // HealthState - Possible values include: 'HealthState5Invalid', 'HealthState5Ok', 'HealthState5Warning', 'HealthState5Error', 'HealthState5Unknown' 12493 HealthState HealthState5 `json:"HealthState,omitempty"` 12494 // PartitionStatus - Possible values include: 'PartitionStatusInvalid', 'PartitionStatusReady', 'PartitionStatusNotReady', 'PartitionStatusInQuorumLoss', 'PartitionStatusReconfiguring', 'PartitionStatusDeleting' 12495 PartitionStatus PartitionStatus `json:"PartitionStatus,omitempty"` 12496 PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` 12497 // ServiceKind - Possible values include: 'ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo', 'ServiceKindBasicServicePartitionInfoServiceKindStateful', 'ServiceKindBasicServicePartitionInfoServiceKindStateless' 12498 ServiceKind ServiceKindBasicServicePartitionInfo `json:"ServiceKind,omitempty"` 12499} 12500 12501func unmarshalBasicServicePartitionInfo(body []byte) (BasicServicePartitionInfo, error) { 12502 var m map[string]interface{} 12503 err := json.Unmarshal(body, &m) 12504 if err != nil { 12505 return nil, err 12506 } 12507 12508 switch m["ServiceKind"] { 12509 case string(ServiceKindBasicServicePartitionInfoServiceKindStateful): 12510 var sspi StatefulServicePartitionInfo 12511 err := json.Unmarshal(body, &sspi) 12512 return sspi, err 12513 case string(ServiceKindBasicServicePartitionInfoServiceKindStateless): 12514 var sspi StatelessServicePartitionInfo 12515 err := json.Unmarshal(body, &sspi) 12516 return sspi, err 12517 default: 12518 var spi ServicePartitionInfo 12519 err := json.Unmarshal(body, &spi) 12520 return spi, err 12521 } 12522} 12523func unmarshalBasicServicePartitionInfoArray(body []byte) ([]BasicServicePartitionInfo, error) { 12524 var rawMessages []*json.RawMessage 12525 err := json.Unmarshal(body, &rawMessages) 12526 if err != nil { 12527 return nil, err 12528 } 12529 12530 spiArray := make([]BasicServicePartitionInfo, len(rawMessages)) 12531 12532 for index, rawMessage := range rawMessages { 12533 spi, err := unmarshalBasicServicePartitionInfo(*rawMessage) 12534 if err != nil { 12535 return nil, err 12536 } 12537 spiArray[index] = spi 12538 } 12539 return spiArray, nil 12540} 12541 12542// MarshalJSON is the custom marshaler for ServicePartitionInfo. 12543func (spi ServicePartitionInfo) MarshalJSON() ([]byte, error) { 12544 spi.ServiceKind = ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo 12545 objectMap := make(map[string]interface{}) 12546 if spi.HealthState != "" { 12547 objectMap["HealthState"] = spi.HealthState 12548 } 12549 if spi.PartitionStatus != "" { 12550 objectMap["PartitionStatus"] = spi.PartitionStatus 12551 } 12552 objectMap["PartitionInformation"] = spi.PartitionInformation 12553 if spi.ServiceKind != "" { 12554 objectMap["ServiceKind"] = spi.ServiceKind 12555 } 12556 return json.Marshal(objectMap) 12557} 12558 12559// AsStatefulServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. 12560func (spi ServicePartitionInfo) AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) { 12561 return nil, false 12562} 12563 12564// AsStatelessServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. 12565func (spi ServicePartitionInfo) AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) { 12566 return nil, false 12567} 12568 12569// AsServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. 12570func (spi ServicePartitionInfo) AsServicePartitionInfo() (*ServicePartitionInfo, bool) { 12571 return &spi, true 12572} 12573 12574// AsBasicServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. 12575func (spi ServicePartitionInfo) AsBasicServicePartitionInfo() (BasicServicePartitionInfo, bool) { 12576 return &spi, true 12577} 12578 12579// UnmarshalJSON is the custom unmarshaler for ServicePartitionInfo struct. 12580func (spi *ServicePartitionInfo) UnmarshalJSON(body []byte) error { 12581 var m map[string]*json.RawMessage 12582 err := json.Unmarshal(body, &m) 12583 if err != nil { 12584 return err 12585 } 12586 for k, v := range m { 12587 switch k { 12588 case "HealthState": 12589 if v != nil { 12590 var healthState HealthState5 12591 err = json.Unmarshal(*v, &healthState) 12592 if err != nil { 12593 return err 12594 } 12595 spi.HealthState = healthState 12596 } 12597 case "PartitionStatus": 12598 if v != nil { 12599 var partitionStatus PartitionStatus 12600 err = json.Unmarshal(*v, &partitionStatus) 12601 if err != nil { 12602 return err 12603 } 12604 spi.PartitionStatus = partitionStatus 12605 } 12606 case "PartitionInformation": 12607 if v != nil { 12608 partitionInformation, err := unmarshalBasicPartitionInformation(*v) 12609 if err != nil { 12610 return err 12611 } 12612 spi.PartitionInformation = partitionInformation 12613 } 12614 case "ServiceKind": 12615 if v != nil { 12616 var serviceKind ServiceKindBasicServicePartitionInfo 12617 err = json.Unmarshal(*v, &serviceKind) 12618 if err != nil { 12619 return err 12620 } 12621 spi.ServiceKind = serviceKind 12622 } 12623 } 12624 } 12625 12626 return nil 12627} 12628 12629// ServicePartitionInfoModel ... 12630type ServicePartitionInfoModel struct { 12631 autorest.Response `json:"-"` 12632 Value BasicServicePartitionInfo `json:"value,omitempty"` 12633} 12634 12635// UnmarshalJSON is the custom unmarshaler for ServicePartitionInfoModel struct. 12636func (spim *ServicePartitionInfoModel) UnmarshalJSON(body []byte) error { 12637 spi, err := unmarshalBasicServicePartitionInfo(body) 12638 if err != nil { 12639 return err 12640 } 12641 spim.Value = spi 12642 12643 return nil 12644} 12645 12646// ServicePlacementInvalidDomainPolicyDescription describes the policy to be used for placement of a Service Fabric 12647// service where a particular fault or upgrade domain should not be used for placement of the instances or replicas 12648// of that service. 12649type ServicePlacementInvalidDomainPolicyDescription struct { 12650 // DomainName - The name of the domain that should not be used for placement. 12651 DomainName *string `json:"DomainName,omitempty"` 12652 // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' 12653 Type TypeBasicServicePlacementPolicyDescription `json:"Type,omitempty"` 12654} 12655 12656// MarshalJSON is the custom marshaler for ServicePlacementInvalidDomainPolicyDescription. 12657func (spidpd ServicePlacementInvalidDomainPolicyDescription) MarshalJSON() ([]byte, error) { 12658 spidpd.Type = TypeInvalidDomain 12659 objectMap := make(map[string]interface{}) 12660 if spidpd.DomainName != nil { 12661 objectMap["DomainName"] = spidpd.DomainName 12662 } 12663 if spidpd.Type != "" { 12664 objectMap["Type"] = spidpd.Type 12665 } 12666 return json.Marshal(objectMap) 12667} 12668 12669// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. 12670func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { 12671 return &spidpd, true 12672} 12673 12674// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. 12675func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { 12676 return nil, false 12677} 12678 12679// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. 12680func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { 12681 return nil, false 12682} 12683 12684// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. 12685func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { 12686 return nil, false 12687} 12688 12689// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. 12690func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { 12691 return nil, false 12692} 12693 12694// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. 12695func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { 12696 return nil, false 12697} 12698 12699// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. 12700func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { 12701 return &spidpd, true 12702} 12703 12704// ServicePlacementNonPartiallyPlaceServicePolicyDescription describes the policy to be used for placement of a 12705// Service Fabric service where all replicas must be able to be placed in order for any replicas to be created. 12706type ServicePlacementNonPartiallyPlaceServicePolicyDescription struct { 12707 // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' 12708 Type TypeBasicServicePlacementPolicyDescription `json:"Type,omitempty"` 12709} 12710 12711// MarshalJSON is the custom marshaler for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12712func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) MarshalJSON() ([]byte, error) { 12713 spnppspd.Type = TypeNonPartiallyPlaceService 12714 objectMap := make(map[string]interface{}) 12715 if spnppspd.Type != "" { 12716 objectMap["Type"] = spnppspd.Type 12717 } 12718 return json.Marshal(objectMap) 12719} 12720 12721// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12722func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { 12723 return nil, false 12724} 12725 12726// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12727func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { 12728 return &spnppspd, true 12729} 12730 12731// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12732func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { 12733 return nil, false 12734} 12735 12736// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12737func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { 12738 return nil, false 12739} 12740 12741// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12742func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { 12743 return nil, false 12744} 12745 12746// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12747func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { 12748 return nil, false 12749} 12750 12751// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. 12752func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { 12753 return &spnppspd, true 12754} 12755 12756// BasicServicePlacementPolicyDescription describes the policy to be used for placement of a Service Fabric service. 12757type BasicServicePlacementPolicyDescription interface { 12758 AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) 12759 AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) 12760 AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) 12761 AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) 12762 AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) 12763 AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) 12764} 12765 12766// ServicePlacementPolicyDescription describes the policy to be used for placement of a Service Fabric service. 12767type ServicePlacementPolicyDescription struct { 12768 // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' 12769 Type TypeBasicServicePlacementPolicyDescription `json:"Type,omitempty"` 12770} 12771 12772func unmarshalBasicServicePlacementPolicyDescription(body []byte) (BasicServicePlacementPolicyDescription, error) { 12773 var m map[string]interface{} 12774 err := json.Unmarshal(body, &m) 12775 if err != nil { 12776 return nil, err 12777 } 12778 12779 switch m["Type"] { 12780 case string(TypeInvalidDomain): 12781 var spidpd ServicePlacementInvalidDomainPolicyDescription 12782 err := json.Unmarshal(body, &spidpd) 12783 return spidpd, err 12784 case string(TypeNonPartiallyPlaceService): 12785 var spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription 12786 err := json.Unmarshal(body, &spnppspd) 12787 return spnppspd, err 12788 case string(TypePreferPrimaryDomain): 12789 var spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription 12790 err := json.Unmarshal(body, &spppdpd) 12791 return spppdpd, err 12792 case string(TypeRequireDomain): 12793 var sprdpd ServicePlacementRequiredDomainPolicyDescription 12794 err := json.Unmarshal(body, &sprdpd) 12795 return sprdpd, err 12796 case string(TypeRequireDomainDistribution): 12797 var sprddpd ServicePlacementRequireDomainDistributionPolicyDescription 12798 err := json.Unmarshal(body, &sprddpd) 12799 return sprddpd, err 12800 default: 12801 var sppd ServicePlacementPolicyDescription 12802 err := json.Unmarshal(body, &sppd) 12803 return sppd, err 12804 } 12805} 12806func unmarshalBasicServicePlacementPolicyDescriptionArray(body []byte) ([]BasicServicePlacementPolicyDescription, error) { 12807 var rawMessages []*json.RawMessage 12808 err := json.Unmarshal(body, &rawMessages) 12809 if err != nil { 12810 return nil, err 12811 } 12812 12813 sppdArray := make([]BasicServicePlacementPolicyDescription, len(rawMessages)) 12814 12815 for index, rawMessage := range rawMessages { 12816 sppd, err := unmarshalBasicServicePlacementPolicyDescription(*rawMessage) 12817 if err != nil { 12818 return nil, err 12819 } 12820 sppdArray[index] = sppd 12821 } 12822 return sppdArray, nil 12823} 12824 12825// MarshalJSON is the custom marshaler for ServicePlacementPolicyDescription. 12826func (sppd ServicePlacementPolicyDescription) MarshalJSON() ([]byte, error) { 12827 sppd.Type = TypeServicePlacementPolicyDescription 12828 objectMap := make(map[string]interface{}) 12829 if sppd.Type != "" { 12830 objectMap["Type"] = sppd.Type 12831 } 12832 return json.Marshal(objectMap) 12833} 12834 12835// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. 12836func (sppd ServicePlacementPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { 12837 return nil, false 12838} 12839 12840// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. 12841func (sppd ServicePlacementPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { 12842 return nil, false 12843} 12844 12845// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. 12846func (sppd ServicePlacementPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { 12847 return nil, false 12848} 12849 12850// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. 12851func (sppd ServicePlacementPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { 12852 return nil, false 12853} 12854 12855// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. 12856func (sppd ServicePlacementPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { 12857 return nil, false 12858} 12859 12860// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. 12861func (sppd ServicePlacementPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { 12862 return &sppd, true 12863} 12864 12865// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. 12866func (sppd ServicePlacementPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { 12867 return &sppd, true 12868} 12869 12870// ServicePlacementPreferPrimaryDomainPolicyDescription describes the policy to be used for placement of a Service 12871// Fabric service where the service's Primary replicas should optimally be placed in a particular domain. 12872// 12873// This placement policy is usually used with fault domains in scenarios where the Service Fabric cluster is 12874// geographically distributed in order to indicate that a service's primary replica should be located in a 12875// particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter 12876// boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up 12877// located in this domain due to failures, capacity limits, or other constraints. 12878type ServicePlacementPreferPrimaryDomainPolicyDescription struct { 12879 // DomainName - The name of the domain that should used for placement as per this policy. 12880 DomainName *string `json:"DomainName,omitempty"` 12881 // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' 12882 Type TypeBasicServicePlacementPolicyDescription `json:"Type,omitempty"` 12883} 12884 12885// MarshalJSON is the custom marshaler for ServicePlacementPreferPrimaryDomainPolicyDescription. 12886func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) MarshalJSON() ([]byte, error) { 12887 spppdpd.Type = TypePreferPrimaryDomain 12888 objectMap := make(map[string]interface{}) 12889 if spppdpd.DomainName != nil { 12890 objectMap["DomainName"] = spppdpd.DomainName 12891 } 12892 if spppdpd.Type != "" { 12893 objectMap["Type"] = spppdpd.Type 12894 } 12895 return json.Marshal(objectMap) 12896} 12897 12898// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. 12899func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { 12900 return nil, false 12901} 12902 12903// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. 12904func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { 12905 return nil, false 12906} 12907 12908// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. 12909func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { 12910 return &spppdpd, true 12911} 12912 12913// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. 12914func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { 12915 return nil, false 12916} 12917 12918// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. 12919func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { 12920 return nil, false 12921} 12922 12923// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. 12924func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { 12925 return nil, false 12926} 12927 12928// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. 12929func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { 12930 return &spppdpd, true 12931} 12932 12933// ServicePlacementRequiredDomainPolicyDescription describes the policy to be used for placement of a Service 12934// Fabric service where the instances or replicas of that service must be placed in a particular domain 12935type ServicePlacementRequiredDomainPolicyDescription struct { 12936 // DomainName - The name of the domain that should used for placement as per this policy. 12937 DomainName *string `json:"DomainName,omitempty"` 12938 // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' 12939 Type TypeBasicServicePlacementPolicyDescription `json:"Type,omitempty"` 12940} 12941 12942// MarshalJSON is the custom marshaler for ServicePlacementRequiredDomainPolicyDescription. 12943func (sprdpd ServicePlacementRequiredDomainPolicyDescription) MarshalJSON() ([]byte, error) { 12944 sprdpd.Type = TypeRequireDomain 12945 objectMap := make(map[string]interface{}) 12946 if sprdpd.DomainName != nil { 12947 objectMap["DomainName"] = sprdpd.DomainName 12948 } 12949 if sprdpd.Type != "" { 12950 objectMap["Type"] = sprdpd.Type 12951 } 12952 return json.Marshal(objectMap) 12953} 12954 12955// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. 12956func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { 12957 return nil, false 12958} 12959 12960// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. 12961func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { 12962 return nil, false 12963} 12964 12965// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. 12966func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { 12967 return nil, false 12968} 12969 12970// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. 12971func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { 12972 return &sprdpd, true 12973} 12974 12975// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. 12976func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { 12977 return nil, false 12978} 12979 12980// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. 12981func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { 12982 return nil, false 12983} 12984 12985// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. 12986func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { 12987 return &sprdpd, true 12988} 12989 12990// ServicePlacementRequireDomainDistributionPolicyDescription describes the policy to be used for placement of a 12991// Service Fabric service where two replicas from the same partition should never be placed in the same fault or 12992// upgrade domain. 12993// 12994// While this is not common it can expose the service to an increased risk of concurrent failures due to unplanned 12995// outages or other cases of subsequent/concurrent failures. As an example, consider a case where replicas are 12996// deployed across different data center, with one replica per location. In the event that one of the datacenters 12997// goes offline, normally the replica that was placed in that datacenter will be packed into one of the remaining 12998// datacenters. If this is not desirable then this policy should be set. 12999type ServicePlacementRequireDomainDistributionPolicyDescription struct { 13000 // DomainName - The name of the domain that should used for placement as per this policy. 13001 DomainName *string `json:"DomainName,omitempty"` 13002 // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' 13003 Type TypeBasicServicePlacementPolicyDescription `json:"Type,omitempty"` 13004} 13005 13006// MarshalJSON is the custom marshaler for ServicePlacementRequireDomainDistributionPolicyDescription. 13007func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) MarshalJSON() ([]byte, error) { 13008 sprddpd.Type = TypeRequireDomainDistribution 13009 objectMap := make(map[string]interface{}) 13010 if sprddpd.DomainName != nil { 13011 objectMap["DomainName"] = sprddpd.DomainName 13012 } 13013 if sprddpd.Type != "" { 13014 objectMap["Type"] = sprddpd.Type 13015 } 13016 return json.Marshal(objectMap) 13017} 13018 13019// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. 13020func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { 13021 return nil, false 13022} 13023 13024// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. 13025func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { 13026 return nil, false 13027} 13028 13029// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. 13030func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { 13031 return nil, false 13032} 13033 13034// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. 13035func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { 13036 return nil, false 13037} 13038 13039// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. 13040func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { 13041 return &sprddpd, true 13042} 13043 13044// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. 13045func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { 13046 return nil, false 13047} 13048 13049// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. 13050func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { 13051 return &sprddpd, true 13052} 13053 13054// ServicesHealthEvaluation represents health evaluation for services of a certain service type belonging to an 13055// application, containing health evaluations for each unhealthy service that impacted current aggregated health 13056// state. Can be returned when evaluating application health and the aggregated health state is either Error or 13057// Warning. 13058type ServicesHealthEvaluation struct { 13059 // ServiceTypeName - Name of the service type of the services. 13060 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 13061 // MaxPercentUnhealthyServices - Maximum allowed percentage of unhealthy services from the ServiceTypeHealthPolicy. 13062 MaxPercentUnhealthyServices *int32 `json:"MaxPercentUnhealthyServices,omitempty"` 13063 // TotalCount - Total number of services of the current service type in the application from the health store. 13064 TotalCount *int64 `json:"TotalCount,omitempty"` 13065 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 13066 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 13067 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 13068 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 13069 Description *string `json:"Description,omitempty"` 13070 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 13071 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 13072} 13073 13074// MarshalJSON is the custom marshaler for ServicesHealthEvaluation. 13075func (she ServicesHealthEvaluation) MarshalJSON() ([]byte, error) { 13076 she.Kind = KindServices 13077 objectMap := make(map[string]interface{}) 13078 if she.ServiceTypeName != nil { 13079 objectMap["ServiceTypeName"] = she.ServiceTypeName 13080 } 13081 if she.MaxPercentUnhealthyServices != nil { 13082 objectMap["MaxPercentUnhealthyServices"] = she.MaxPercentUnhealthyServices 13083 } 13084 if she.TotalCount != nil { 13085 objectMap["TotalCount"] = she.TotalCount 13086 } 13087 if she.UnhealthyEvaluations != nil { 13088 objectMap["UnhealthyEvaluations"] = she.UnhealthyEvaluations 13089 } 13090 if she.AggregatedHealthState != "" { 13091 objectMap["AggregatedHealthState"] = she.AggregatedHealthState 13092 } 13093 if she.Description != nil { 13094 objectMap["Description"] = she.Description 13095 } 13096 if she.Kind != "" { 13097 objectMap["Kind"] = she.Kind 13098 } 13099 return json.Marshal(objectMap) 13100} 13101 13102// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13103func (she ServicesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 13104 return nil, false 13105} 13106 13107// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13108func (she ServicesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 13109 return nil, false 13110} 13111 13112// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13113func (she ServicesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 13114 return nil, false 13115} 13116 13117// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13118func (she ServicesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 13119 return nil, false 13120} 13121 13122// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13123func (she ServicesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 13124 return nil, false 13125} 13126 13127// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13128func (she ServicesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 13129 return nil, false 13130} 13131 13132// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13133func (she ServicesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 13134 return nil, false 13135} 13136 13137// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13138func (she ServicesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 13139 return nil, false 13140} 13141 13142// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13143func (she ServicesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 13144 return nil, false 13145} 13146 13147// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13148func (she ServicesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 13149 return nil, false 13150} 13151 13152// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13153func (she ServicesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 13154 return nil, false 13155} 13156 13157// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13158func (she ServicesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 13159 return nil, false 13160} 13161 13162// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13163func (she ServicesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 13164 return nil, false 13165} 13166 13167// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13168func (she ServicesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 13169 return nil, false 13170} 13171 13172// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13173func (she ServicesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 13174 return nil, false 13175} 13176 13177// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13178func (she ServicesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 13179 return nil, false 13180} 13181 13182// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13183func (she ServicesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 13184 return &she, true 13185} 13186 13187// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13188func (she ServicesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 13189 return nil, false 13190} 13191 13192// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13193func (she ServicesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 13194 return nil, false 13195} 13196 13197// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13198func (she ServicesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 13199 return nil, false 13200} 13201 13202// AsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13203func (she ServicesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 13204 return nil, false 13205} 13206 13207// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. 13208func (she ServicesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 13209 return &she, true 13210} 13211 13212// BasicServiceTypeDescription describes a service type defined in the service manifest of a provisioned application 13213// type. The properties the the ones defined in the service manifest. 13214type BasicServiceTypeDescription interface { 13215 AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) 13216 AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) 13217 AsServiceTypeDescription() (*ServiceTypeDescription, bool) 13218} 13219 13220// ServiceTypeDescription describes a service type defined in the service manifest of a provisioned application 13221// type. The properties the the ones defined in the service manifest. 13222type ServiceTypeDescription struct { 13223 // IsStateful - Indicates whether the service type is a stateful service type or a stateless service type. This property is true if the service type is a stateful service type, false otherwise. 13224 IsStateful *bool `json:"IsStateful,omitempty"` 13225 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 13226 // PlacementConstraints - The placement constraint to be used when instantiating this service in a Service Fabric cluster. 13227 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 13228 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 13229 Extensions *[]ServiceTypeExtensionDescription `json:"Extensions,omitempty"` 13230 // Kind - Possible values include: 'KindServiceTypeDescription', 'KindStateful', 'KindStateless1' 13231 Kind KindBasicServiceTypeDescription `json:"Kind,omitempty"` 13232} 13233 13234func unmarshalBasicServiceTypeDescription(body []byte) (BasicServiceTypeDescription, error) { 13235 var m map[string]interface{} 13236 err := json.Unmarshal(body, &m) 13237 if err != nil { 13238 return nil, err 13239 } 13240 13241 switch m["Kind"] { 13242 case string(KindStateful): 13243 var sstd StatefulServiceTypeDescription 13244 err := json.Unmarshal(body, &sstd) 13245 return sstd, err 13246 case string(KindStateless1): 13247 var sstd StatelessServiceTypeDescription 13248 err := json.Unmarshal(body, &sstd) 13249 return sstd, err 13250 default: 13251 var std ServiceTypeDescription 13252 err := json.Unmarshal(body, &std) 13253 return std, err 13254 } 13255} 13256func unmarshalBasicServiceTypeDescriptionArray(body []byte) ([]BasicServiceTypeDescription, error) { 13257 var rawMessages []*json.RawMessage 13258 err := json.Unmarshal(body, &rawMessages) 13259 if err != nil { 13260 return nil, err 13261 } 13262 13263 stdArray := make([]BasicServiceTypeDescription, len(rawMessages)) 13264 13265 for index, rawMessage := range rawMessages { 13266 std, err := unmarshalBasicServiceTypeDescription(*rawMessage) 13267 if err != nil { 13268 return nil, err 13269 } 13270 stdArray[index] = std 13271 } 13272 return stdArray, nil 13273} 13274 13275// MarshalJSON is the custom marshaler for ServiceTypeDescription. 13276func (std ServiceTypeDescription) MarshalJSON() ([]byte, error) { 13277 std.Kind = KindServiceTypeDescription 13278 objectMap := make(map[string]interface{}) 13279 if std.IsStateful != nil { 13280 objectMap["IsStateful"] = std.IsStateful 13281 } 13282 if std.ServiceTypeName != nil { 13283 objectMap["ServiceTypeName"] = std.ServiceTypeName 13284 } 13285 if std.PlacementConstraints != nil { 13286 objectMap["PlacementConstraints"] = std.PlacementConstraints 13287 } 13288 if std.ServicePlacementPolicies != nil { 13289 objectMap["ServicePlacementPolicies"] = std.ServicePlacementPolicies 13290 } 13291 if std.Extensions != nil { 13292 objectMap["Extensions"] = std.Extensions 13293 } 13294 if std.Kind != "" { 13295 objectMap["Kind"] = std.Kind 13296 } 13297 return json.Marshal(objectMap) 13298} 13299 13300// AsStatefulServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. 13301func (std ServiceTypeDescription) AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) { 13302 return nil, false 13303} 13304 13305// AsStatelessServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. 13306func (std ServiceTypeDescription) AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) { 13307 return nil, false 13308} 13309 13310// AsServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. 13311func (std ServiceTypeDescription) AsServiceTypeDescription() (*ServiceTypeDescription, bool) { 13312 return &std, true 13313} 13314 13315// AsBasicServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. 13316func (std ServiceTypeDescription) AsBasicServiceTypeDescription() (BasicServiceTypeDescription, bool) { 13317 return &std, true 13318} 13319 13320// UnmarshalJSON is the custom unmarshaler for ServiceTypeDescription struct. 13321func (std *ServiceTypeDescription) UnmarshalJSON(body []byte) error { 13322 var m map[string]*json.RawMessage 13323 err := json.Unmarshal(body, &m) 13324 if err != nil { 13325 return err 13326 } 13327 for k, v := range m { 13328 switch k { 13329 case "IsStateful": 13330 if v != nil { 13331 var isStateful bool 13332 err = json.Unmarshal(*v, &isStateful) 13333 if err != nil { 13334 return err 13335 } 13336 std.IsStateful = &isStateful 13337 } 13338 case "ServiceTypeName": 13339 if v != nil { 13340 var serviceTypeName string 13341 err = json.Unmarshal(*v, &serviceTypeName) 13342 if err != nil { 13343 return err 13344 } 13345 std.ServiceTypeName = &serviceTypeName 13346 } 13347 case "PlacementConstraints": 13348 if v != nil { 13349 var placementConstraints string 13350 err = json.Unmarshal(*v, &placementConstraints) 13351 if err != nil { 13352 return err 13353 } 13354 std.PlacementConstraints = &placementConstraints 13355 } 13356 case "ServicePlacementPolicies": 13357 if v != nil { 13358 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 13359 if err != nil { 13360 return err 13361 } 13362 std.ServicePlacementPolicies = &servicePlacementPolicies 13363 } 13364 case "Extensions": 13365 if v != nil { 13366 var extensions []ServiceTypeExtensionDescription 13367 err = json.Unmarshal(*v, &extensions) 13368 if err != nil { 13369 return err 13370 } 13371 std.Extensions = &extensions 13372 } 13373 case "Kind": 13374 if v != nil { 13375 var kind KindBasicServiceTypeDescription 13376 err = json.Unmarshal(*v, &kind) 13377 if err != nil { 13378 return err 13379 } 13380 std.Kind = kind 13381 } 13382 } 13383 } 13384 13385 return nil 13386} 13387 13388// ServiceTypeExtensionDescription describes extension of a service type defined in the service manifest. 13389type ServiceTypeExtensionDescription struct { 13390 // Key - The name of the extension. 13391 Key *string `json:"Key,omitempty"` 13392 // Value - The extension value. 13393 Value *string `json:"Value,omitempty"` 13394} 13395 13396// ServiceTypeHealthPolicy represents the health policy used to evaluate the health of services belonging to a 13397// service type. 13398type ServiceTypeHealthPolicy struct { 13399 // MaxPercentUnhealthyPartitionsPerService - The maximum allowed percentage of unhealthy partitions per service. Allowed values are Byte values from zero to 100 13400 // The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error. 13401 // If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. 13402 // The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. 13403 // The computation rounds up to tolerate one failure on small numbers of partitions. Default percentage is zero. 13404 MaxPercentUnhealthyPartitionsPerService *int32 `json:"MaxPercentUnhealthyPartitionsPerService,omitempty"` 13405 // MaxPercentUnhealthyReplicasPerPartition - The maximum allowed percentage of unhealthy replicas per partition. Allowed values are Byte values from zero to 100. 13406 // The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error. 13407 // If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. 13408 // The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. 13409 // The computation rounds up to tolerate one failure on small numbers of replicas. Default percentage is zero. 13410 MaxPercentUnhealthyReplicasPerPartition *int32 `json:"MaxPercentUnhealthyReplicasPerPartition,omitempty"` 13411 // MaxPercentUnhealthyServices - The maximum maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. 13412 // The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. 13413 // If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. 13414 // This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. 13415 // The computation rounds up to tolerate one failure on small numbers of services. Default percentage is zero. 13416 MaxPercentUnhealthyServices *int32 `json:"MaxPercentUnhealthyServices,omitempty"` 13417} 13418 13419// ServiceTypeHealthPolicyMapItem defines an item in ServiceTypeHealthPolicyMap. 13420type ServiceTypeHealthPolicyMapItem struct { 13421 // Key - The key of the service type health policy map item. This is the name of the service type. 13422 Key *string `json:"Key,omitempty"` 13423 Value *ServiceTypeHealthPolicy `json:"Value,omitempty"` 13424} 13425 13426// ServiceTypeInfo information about a service type that is defined in a service manifest of a provisioned 13427// application type. 13428type ServiceTypeInfo struct { 13429 ServiceTypeDescription BasicServiceTypeDescription `json:"ServiceTypeDescription,omitempty"` 13430 ServiceManifestName *string `json:"ServiceManifestName,omitempty"` 13431 // ServiceManifestVersion - The version of the service manifest in which this service type is defined. 13432 ServiceManifestVersion *string `json:"ServiceManifestVersion,omitempty"` 13433 // IsServiceGroup - Indicates whether the service is a service group. If it is, the property value is true otherwise false. 13434 IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` 13435} 13436 13437// UnmarshalJSON is the custom unmarshaler for ServiceTypeInfo struct. 13438func (sti *ServiceTypeInfo) UnmarshalJSON(body []byte) error { 13439 var m map[string]*json.RawMessage 13440 err := json.Unmarshal(body, &m) 13441 if err != nil { 13442 return err 13443 } 13444 for k, v := range m { 13445 switch k { 13446 case "ServiceTypeDescription": 13447 if v != nil { 13448 serviceTypeDescription, err := unmarshalBasicServiceTypeDescription(*v) 13449 if err != nil { 13450 return err 13451 } 13452 sti.ServiceTypeDescription = serviceTypeDescription 13453 } 13454 case "ServiceManifestName": 13455 if v != nil { 13456 var serviceManifestName string 13457 err = json.Unmarshal(*v, &serviceManifestName) 13458 if err != nil { 13459 return err 13460 } 13461 sti.ServiceManifestName = &serviceManifestName 13462 } 13463 case "ServiceManifestVersion": 13464 if v != nil { 13465 var serviceManifestVersion string 13466 err = json.Unmarshal(*v, &serviceManifestVersion) 13467 if err != nil { 13468 return err 13469 } 13470 sti.ServiceManifestVersion = &serviceManifestVersion 13471 } 13472 case "IsServiceGroup": 13473 if v != nil { 13474 var isServiceGroup bool 13475 err = json.Unmarshal(*v, &isServiceGroup) 13476 if err != nil { 13477 return err 13478 } 13479 sti.IsServiceGroup = &isServiceGroup 13480 } 13481 } 13482 } 13483 13484 return nil 13485} 13486 13487// ServiceTypeManifest contains the manifest describing a service type registered as part of an application in a 13488// Service Fabric cluster. 13489type ServiceTypeManifest struct { 13490 autorest.Response `json:"-"` 13491 // Manifest - The XML manifest as a string. 13492 Manifest *string `json:"Manifest,omitempty"` 13493} 13494 13495// BasicServiceUpdateDescription a ServiceUpdateDescription contains all of the information necessary to update a 13496// service. 13497type BasicServiceUpdateDescription interface { 13498 AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) 13499 AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) 13500 AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) 13501} 13502 13503// ServiceUpdateDescription a ServiceUpdateDescription contains all of the information necessary to update a 13504// service. 13505type ServiceUpdateDescription struct { 13506 // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. 13507 // This property can be a combination of those flags obtained using bitwise 'OR' operator. 13508 // For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. 13509 // - None - Does not indicate any other properties are set. The value is zero. 13510 // - TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property (for Stateful services) or the InstanceCount property (for Stateless services) is set. The value is 1. 13511 // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 2. 13512 // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 4. 13513 // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 8. 13514 // - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. 13515 // - PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. 13516 // - PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is 64. 13517 // - Correlation - Indicates the CorrelationScheme property is set. The value is 128. 13518 // - Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. 13519 // - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. 13520 Flags *string `json:"Flags,omitempty"` 13521 // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". 13522 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 13523 CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` 13524 LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` 13525 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 13526 // DefaultMoveCost - Possible values include: 'DefaultMoveCost1Zero', 'DefaultMoveCost1Low', 'DefaultMoveCost1Medium', 'DefaultMoveCost1High' 13527 DefaultMoveCost DefaultMoveCost1 `json:"DefaultMoveCost,omitempty"` 13528 // ServiceKind - Possible values include: 'ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateful', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateless' 13529 ServiceKind ServiceKindBasicServiceUpdateDescription `json:"ServiceKind,omitempty"` 13530} 13531 13532func unmarshalBasicServiceUpdateDescription(body []byte) (BasicServiceUpdateDescription, error) { 13533 var m map[string]interface{} 13534 err := json.Unmarshal(body, &m) 13535 if err != nil { 13536 return nil, err 13537 } 13538 13539 switch m["ServiceKind"] { 13540 case string(ServiceKindBasicServiceUpdateDescriptionServiceKindStateful): 13541 var ssud StatefulServiceUpdateDescription 13542 err := json.Unmarshal(body, &ssud) 13543 return ssud, err 13544 case string(ServiceKindBasicServiceUpdateDescriptionServiceKindStateless): 13545 var ssud StatelessServiceUpdateDescription 13546 err := json.Unmarshal(body, &ssud) 13547 return ssud, err 13548 default: 13549 var sud ServiceUpdateDescription 13550 err := json.Unmarshal(body, &sud) 13551 return sud, err 13552 } 13553} 13554func unmarshalBasicServiceUpdateDescriptionArray(body []byte) ([]BasicServiceUpdateDescription, error) { 13555 var rawMessages []*json.RawMessage 13556 err := json.Unmarshal(body, &rawMessages) 13557 if err != nil { 13558 return nil, err 13559 } 13560 13561 sudArray := make([]BasicServiceUpdateDescription, len(rawMessages)) 13562 13563 for index, rawMessage := range rawMessages { 13564 sud, err := unmarshalBasicServiceUpdateDescription(*rawMessage) 13565 if err != nil { 13566 return nil, err 13567 } 13568 sudArray[index] = sud 13569 } 13570 return sudArray, nil 13571} 13572 13573// MarshalJSON is the custom marshaler for ServiceUpdateDescription. 13574func (sud ServiceUpdateDescription) MarshalJSON() ([]byte, error) { 13575 sud.ServiceKind = ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription 13576 objectMap := make(map[string]interface{}) 13577 if sud.Flags != nil { 13578 objectMap["Flags"] = sud.Flags 13579 } 13580 if sud.PlacementConstraints != nil { 13581 objectMap["PlacementConstraints"] = sud.PlacementConstraints 13582 } 13583 if sud.CorrelationScheme != nil { 13584 objectMap["CorrelationScheme"] = sud.CorrelationScheme 13585 } 13586 if sud.LoadMetrics != nil { 13587 objectMap["LoadMetrics"] = sud.LoadMetrics 13588 } 13589 if sud.ServicePlacementPolicies != nil { 13590 objectMap["ServicePlacementPolicies"] = sud.ServicePlacementPolicies 13591 } 13592 if sud.DefaultMoveCost != "" { 13593 objectMap["DefaultMoveCost"] = sud.DefaultMoveCost 13594 } 13595 if sud.ServiceKind != "" { 13596 objectMap["ServiceKind"] = sud.ServiceKind 13597 } 13598 return json.Marshal(objectMap) 13599} 13600 13601// AsStatefulServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. 13602func (sud ServiceUpdateDescription) AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) { 13603 return nil, false 13604} 13605 13606// AsStatelessServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. 13607func (sud ServiceUpdateDescription) AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) { 13608 return nil, false 13609} 13610 13611// AsServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. 13612func (sud ServiceUpdateDescription) AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) { 13613 return &sud, true 13614} 13615 13616// AsBasicServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. 13617func (sud ServiceUpdateDescription) AsBasicServiceUpdateDescription() (BasicServiceUpdateDescription, bool) { 13618 return &sud, true 13619} 13620 13621// UnmarshalJSON is the custom unmarshaler for ServiceUpdateDescription struct. 13622func (sud *ServiceUpdateDescription) UnmarshalJSON(body []byte) error { 13623 var m map[string]*json.RawMessage 13624 err := json.Unmarshal(body, &m) 13625 if err != nil { 13626 return err 13627 } 13628 for k, v := range m { 13629 switch k { 13630 case "Flags": 13631 if v != nil { 13632 var flags string 13633 err = json.Unmarshal(*v, &flags) 13634 if err != nil { 13635 return err 13636 } 13637 sud.Flags = &flags 13638 } 13639 case "PlacementConstraints": 13640 if v != nil { 13641 var placementConstraints string 13642 err = json.Unmarshal(*v, &placementConstraints) 13643 if err != nil { 13644 return err 13645 } 13646 sud.PlacementConstraints = &placementConstraints 13647 } 13648 case "CorrelationScheme": 13649 if v != nil { 13650 var correlationScheme []ServiceCorrelationDescription 13651 err = json.Unmarshal(*v, &correlationScheme) 13652 if err != nil { 13653 return err 13654 } 13655 sud.CorrelationScheme = &correlationScheme 13656 } 13657 case "LoadMetrics": 13658 if v != nil { 13659 var loadMetrics []ServiceLoadMetricDescription 13660 err = json.Unmarshal(*v, &loadMetrics) 13661 if err != nil { 13662 return err 13663 } 13664 sud.LoadMetrics = &loadMetrics 13665 } 13666 case "ServicePlacementPolicies": 13667 if v != nil { 13668 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 13669 if err != nil { 13670 return err 13671 } 13672 sud.ServicePlacementPolicies = &servicePlacementPolicies 13673 } 13674 case "DefaultMoveCost": 13675 if v != nil { 13676 var defaultMoveCost DefaultMoveCost1 13677 err = json.Unmarshal(*v, &defaultMoveCost) 13678 if err != nil { 13679 return err 13680 } 13681 sud.DefaultMoveCost = defaultMoveCost 13682 } 13683 case "ServiceKind": 13684 if v != nil { 13685 var serviceKind ServiceKindBasicServiceUpdateDescription 13686 err = json.Unmarshal(*v, &serviceKind) 13687 if err != nil { 13688 return err 13689 } 13690 sud.ServiceKind = serviceKind 13691 } 13692 } 13693 } 13694 13695 return nil 13696} 13697 13698// SingletonPartitionInformation information about a partition that is singleton. The services with singletone 13699// partitioning scheme are effectively non-partitioned. They only have one partition. 13700type SingletonPartitionInformation struct { 13701 ID *uuid.UUID `json:"Id,omitempty"` 13702 // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range', 'ServicePartitionKindNamed', 'ServicePartitionKindSingleton' 13703 ServicePartitionKind ServicePartitionKind `json:"ServicePartitionKind,omitempty"` 13704} 13705 13706// MarshalJSON is the custom marshaler for SingletonPartitionInformation. 13707func (spi SingletonPartitionInformation) MarshalJSON() ([]byte, error) { 13708 spi.ServicePartitionKind = ServicePartitionKindSingleton 13709 objectMap := make(map[string]interface{}) 13710 if spi.ID != nil { 13711 objectMap["Id"] = spi.ID 13712 } 13713 if spi.ServicePartitionKind != "" { 13714 objectMap["ServicePartitionKind"] = spi.ServicePartitionKind 13715 } 13716 return json.Marshal(objectMap) 13717} 13718 13719// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. 13720func (spi SingletonPartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { 13721 return nil, false 13722} 13723 13724// AsNamedPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. 13725func (spi SingletonPartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { 13726 return nil, false 13727} 13728 13729// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. 13730func (spi SingletonPartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { 13731 return &spi, true 13732} 13733 13734// AsPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. 13735func (spi SingletonPartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { 13736 return nil, false 13737} 13738 13739// AsBasicPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. 13740func (spi SingletonPartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { 13741 return &spi, true 13742} 13743 13744// SingletonPartitionSchemeDescription describes the partition scheme of a singleton-partitioned, or 13745// non-partitioned service. 13746type SingletonPartitionSchemeDescription struct { 13747 // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range' 13748 PartitionScheme PartitionScheme `json:"PartitionScheme,omitempty"` 13749} 13750 13751// MarshalJSON is the custom marshaler for SingletonPartitionSchemeDescription. 13752func (spsd SingletonPartitionSchemeDescription) MarshalJSON() ([]byte, error) { 13753 spsd.PartitionScheme = PartitionSchemeSingleton 13754 objectMap := make(map[string]interface{}) 13755 if spsd.PartitionScheme != "" { 13756 objectMap["PartitionScheme"] = spsd.PartitionScheme 13757 } 13758 return json.Marshal(objectMap) 13759} 13760 13761// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. 13762func (spsd SingletonPartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { 13763 return nil, false 13764} 13765 13766// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. 13767func (spsd SingletonPartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { 13768 return &spsd, true 13769} 13770 13771// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. 13772func (spsd SingletonPartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { 13773 return nil, false 13774} 13775 13776// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. 13777func (spsd SingletonPartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { 13778 return nil, false 13779} 13780 13781// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. 13782func (spsd SingletonPartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { 13783 return &spsd, true 13784} 13785 13786// StartClusterUpgradeDescription describes the parameters for starting a cluster upgrade. 13787type StartClusterUpgradeDescription struct { 13788 // CodeVersion - The cluster code version. 13789 CodeVersion *string `json:"CodeVersion,omitempty"` 13790 // ConfigVersion - The cluster configuration version. 13791 ConfigVersion *string `json:"ConfigVersion,omitempty"` 13792 // UpgradeKind - Possible values include: 'UpgradeKind1Invalid', 'UpgradeKind1Rolling' 13793 UpgradeKind UpgradeKind1 `json:"UpgradeKind,omitempty"` 13794 // RollingUpgradeMode - Possible values include: 'RollingUpgradeMode2Invalid', 'RollingUpgradeMode2UnmonitoredAuto', 'RollingUpgradeMode2UnmonitoredManual', 'RollingUpgradeMode2Monitored' 13795 RollingUpgradeMode RollingUpgradeMode2 `json:"RollingUpgradeMode,omitempty"` 13796 UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` 13797 ForceRestart *bool `json:"ForceRestart,omitempty"` 13798 MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` 13799 ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` 13800 // EnableDeltaHealthEvaluation - When true, enables delta health evaluation rather than absolute health evaluation after completion of each upgrade domain. 13801 EnableDeltaHealthEvaluation *bool `json:"EnableDeltaHealthEvaluation,omitempty"` 13802 ClusterUpgradeHealthPolicy *ClusterUpgradeHealthPolicyObject `json:"ClusterUpgradeHealthPolicy,omitempty"` 13803 ApplicationHealthPolicyMap *ApplicationHealthPolicies `json:"ApplicationHealthPolicyMap,omitempty"` 13804} 13805 13806// StartedChaosEvent describes a Chaos event that gets generated when Chaos is started. 13807type StartedChaosEvent struct { 13808 ChaosParameters *ChaosParameters `json:"ChaosParameters,omitempty"` 13809 TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` 13810 // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' 13811 Kind KindBasicChaosEvent `json:"Kind,omitempty"` 13812} 13813 13814// MarshalJSON is the custom marshaler for StartedChaosEvent. 13815func (sce StartedChaosEvent) MarshalJSON() ([]byte, error) { 13816 sce.Kind = KindStarted 13817 objectMap := make(map[string]interface{}) 13818 if sce.ChaosParameters != nil { 13819 objectMap["ChaosParameters"] = sce.ChaosParameters 13820 } 13821 if sce.TimeStampUtc != nil { 13822 objectMap["TimeStampUtc"] = sce.TimeStampUtc 13823 } 13824 if sce.Kind != "" { 13825 objectMap["Kind"] = sce.Kind 13826 } 13827 return json.Marshal(objectMap) 13828} 13829 13830// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13831func (sce StartedChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { 13832 return nil, false 13833} 13834 13835// AsStartedChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13836func (sce StartedChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { 13837 return &sce, true 13838} 13839 13840// AsStoppedChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13841func (sce StartedChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { 13842 return nil, false 13843} 13844 13845// AsTestErrorChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13846func (sce StartedChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { 13847 return nil, false 13848} 13849 13850// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13851func (sce StartedChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { 13852 return nil, false 13853} 13854 13855// AsWaitingChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13856func (sce StartedChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { 13857 return nil, false 13858} 13859 13860// AsChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13861func (sce StartedChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { 13862 return nil, false 13863} 13864 13865// AsBasicChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. 13866func (sce StartedChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { 13867 return &sce, true 13868} 13869 13870// StatefulServiceDescription describes a stateful service. 13871type StatefulServiceDescription struct { 13872 // TargetReplicaSetSize - The target replica set size as a number. 13873 TargetReplicaSetSize *int32 `json:"TargetReplicaSetSize,omitempty"` 13874 // MinReplicaSetSize - The minimum replica set size as a number. 13875 MinReplicaSetSize *int32 `json:"MinReplicaSetSize,omitempty"` 13876 // HasPersistedState - A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. 13877 HasPersistedState *bool `json:"HasPersistedState,omitempty"` 13878 // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. 13879 // This property can be a combination of those flags obtained using bitwise 'OR' operator. 13880 // For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. 13881 // - None - Does not indicate any other properties are set. The value is zero. 13882 // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 1. 13883 // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 2. 13884 // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 4. 13885 Flags *int32 `json:"Flags,omitempty"` 13886 // ReplicaRestartWaitDurationSeconds - The duration, in seconds, between when a replica goes down and when a new replica is created. 13887 ReplicaRestartWaitDurationSeconds *int64 `json:"ReplicaRestartWaitDurationSeconds,omitempty"` 13888 // QuorumLossWaitDurationSeconds - The maximum duration, in seconds, for which a partition is allowed to be in a state of quorum loss. 13889 QuorumLossWaitDurationSeconds *int64 `json:"QuorumLossWaitDurationSeconds,omitempty"` 13890 // StandByReplicaKeepDurationSeconds - The definition on how long StandBy replicas should be maintained before being removed. 13891 StandByReplicaKeepDurationSeconds *int64 `json:"StandByReplicaKeepDurationSeconds,omitempty"` 13892 ApplicationName *string `json:"ApplicationName,omitempty"` 13893 ServiceName *string `json:"ServiceName,omitempty"` 13894 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 13895 InitializationData *[]int32 `json:"InitializationData,omitempty"` 13896 PartitionDescription BasicPartitionSchemeDescription `json:"PartitionDescription,omitempty"` 13897 // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". 13898 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 13899 CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` 13900 ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"ServiceLoadMetrics,omitempty"` 13901 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 13902 // DefaultMoveCost - Possible values include: 'Zero', 'Low', 'Medium', 'High' 13903 DefaultMoveCost DefaultMoveCost `json:"DefaultMoveCost,omitempty"` 13904 // IsDefaultMoveCostSpecified - Indicates if the DefaultMoveCost property is specified. 13905 IsDefaultMoveCostSpecified *bool `json:"IsDefaultMoveCostSpecified,omitempty"` 13906 // ServicePackageActivationMode - Possible values include: 'ServicePackageActivationMode1SharedProcess', 'ServicePackageActivationMode1ExclusiveProcess' 13907 ServicePackageActivationMode ServicePackageActivationMode1 `json:"ServicePackageActivationMode,omitempty"` 13908 // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. 13909 ServiceDNSName *string `json:"ServiceDnsName,omitempty"` 13910 // ServiceKind - Possible values include: 'ServiceKindBasicServiceDescriptionServiceKindServiceDescription', 'ServiceKindBasicServiceDescriptionServiceKindStateful', 'ServiceKindBasicServiceDescriptionServiceKindStateless' 13911 ServiceKind ServiceKindBasicServiceDescription `json:"ServiceKind,omitempty"` 13912} 13913 13914// MarshalJSON is the custom marshaler for StatefulServiceDescription. 13915func (ssd StatefulServiceDescription) MarshalJSON() ([]byte, error) { 13916 ssd.ServiceKind = ServiceKindBasicServiceDescriptionServiceKindStateful 13917 objectMap := make(map[string]interface{}) 13918 if ssd.TargetReplicaSetSize != nil { 13919 objectMap["TargetReplicaSetSize"] = ssd.TargetReplicaSetSize 13920 } 13921 if ssd.MinReplicaSetSize != nil { 13922 objectMap["MinReplicaSetSize"] = ssd.MinReplicaSetSize 13923 } 13924 if ssd.HasPersistedState != nil { 13925 objectMap["HasPersistedState"] = ssd.HasPersistedState 13926 } 13927 if ssd.Flags != nil { 13928 objectMap["Flags"] = ssd.Flags 13929 } 13930 if ssd.ReplicaRestartWaitDurationSeconds != nil { 13931 objectMap["ReplicaRestartWaitDurationSeconds"] = ssd.ReplicaRestartWaitDurationSeconds 13932 } 13933 if ssd.QuorumLossWaitDurationSeconds != nil { 13934 objectMap["QuorumLossWaitDurationSeconds"] = ssd.QuorumLossWaitDurationSeconds 13935 } 13936 if ssd.StandByReplicaKeepDurationSeconds != nil { 13937 objectMap["StandByReplicaKeepDurationSeconds"] = ssd.StandByReplicaKeepDurationSeconds 13938 } 13939 if ssd.ApplicationName != nil { 13940 objectMap["ApplicationName"] = ssd.ApplicationName 13941 } 13942 if ssd.ServiceName != nil { 13943 objectMap["ServiceName"] = ssd.ServiceName 13944 } 13945 if ssd.ServiceTypeName != nil { 13946 objectMap["ServiceTypeName"] = ssd.ServiceTypeName 13947 } 13948 if ssd.InitializationData != nil { 13949 objectMap["InitializationData"] = ssd.InitializationData 13950 } 13951 objectMap["PartitionDescription"] = ssd.PartitionDescription 13952 if ssd.PlacementConstraints != nil { 13953 objectMap["PlacementConstraints"] = ssd.PlacementConstraints 13954 } 13955 if ssd.CorrelationScheme != nil { 13956 objectMap["CorrelationScheme"] = ssd.CorrelationScheme 13957 } 13958 if ssd.ServiceLoadMetrics != nil { 13959 objectMap["ServiceLoadMetrics"] = ssd.ServiceLoadMetrics 13960 } 13961 if ssd.ServicePlacementPolicies != nil { 13962 objectMap["ServicePlacementPolicies"] = ssd.ServicePlacementPolicies 13963 } 13964 if ssd.DefaultMoveCost != "" { 13965 objectMap["DefaultMoveCost"] = ssd.DefaultMoveCost 13966 } 13967 if ssd.IsDefaultMoveCostSpecified != nil { 13968 objectMap["IsDefaultMoveCostSpecified"] = ssd.IsDefaultMoveCostSpecified 13969 } 13970 if ssd.ServicePackageActivationMode != "" { 13971 objectMap["ServicePackageActivationMode"] = ssd.ServicePackageActivationMode 13972 } 13973 if ssd.ServiceDNSName != nil { 13974 objectMap["ServiceDnsName"] = ssd.ServiceDNSName 13975 } 13976 if ssd.ServiceKind != "" { 13977 objectMap["ServiceKind"] = ssd.ServiceKind 13978 } 13979 return json.Marshal(objectMap) 13980} 13981 13982// AsStatefulServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. 13983func (ssd StatefulServiceDescription) AsStatefulServiceDescription() (*StatefulServiceDescription, bool) { 13984 return &ssd, true 13985} 13986 13987// AsStatelessServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. 13988func (ssd StatefulServiceDescription) AsStatelessServiceDescription() (*StatelessServiceDescription, bool) { 13989 return nil, false 13990} 13991 13992// AsServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. 13993func (ssd StatefulServiceDescription) AsServiceDescription() (*ServiceDescription, bool) { 13994 return nil, false 13995} 13996 13997// AsBasicServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. 13998func (ssd StatefulServiceDescription) AsBasicServiceDescription() (BasicServiceDescription, bool) { 13999 return &ssd, true 14000} 14001 14002// UnmarshalJSON is the custom unmarshaler for StatefulServiceDescription struct. 14003func (ssd *StatefulServiceDescription) UnmarshalJSON(body []byte) error { 14004 var m map[string]*json.RawMessage 14005 err := json.Unmarshal(body, &m) 14006 if err != nil { 14007 return err 14008 } 14009 for k, v := range m { 14010 switch k { 14011 case "TargetReplicaSetSize": 14012 if v != nil { 14013 var targetReplicaSetSize int32 14014 err = json.Unmarshal(*v, &targetReplicaSetSize) 14015 if err != nil { 14016 return err 14017 } 14018 ssd.TargetReplicaSetSize = &targetReplicaSetSize 14019 } 14020 case "MinReplicaSetSize": 14021 if v != nil { 14022 var minReplicaSetSize int32 14023 err = json.Unmarshal(*v, &minReplicaSetSize) 14024 if err != nil { 14025 return err 14026 } 14027 ssd.MinReplicaSetSize = &minReplicaSetSize 14028 } 14029 case "HasPersistedState": 14030 if v != nil { 14031 var hasPersistedState bool 14032 err = json.Unmarshal(*v, &hasPersistedState) 14033 if err != nil { 14034 return err 14035 } 14036 ssd.HasPersistedState = &hasPersistedState 14037 } 14038 case "Flags": 14039 if v != nil { 14040 var flags int32 14041 err = json.Unmarshal(*v, &flags) 14042 if err != nil { 14043 return err 14044 } 14045 ssd.Flags = &flags 14046 } 14047 case "ReplicaRestartWaitDurationSeconds": 14048 if v != nil { 14049 var replicaRestartWaitDurationSeconds int64 14050 err = json.Unmarshal(*v, &replicaRestartWaitDurationSeconds) 14051 if err != nil { 14052 return err 14053 } 14054 ssd.ReplicaRestartWaitDurationSeconds = &replicaRestartWaitDurationSeconds 14055 } 14056 case "QuorumLossWaitDurationSeconds": 14057 if v != nil { 14058 var quorumLossWaitDurationSeconds int64 14059 err = json.Unmarshal(*v, &quorumLossWaitDurationSeconds) 14060 if err != nil { 14061 return err 14062 } 14063 ssd.QuorumLossWaitDurationSeconds = &quorumLossWaitDurationSeconds 14064 } 14065 case "StandByReplicaKeepDurationSeconds": 14066 if v != nil { 14067 var standByReplicaKeepDurationSeconds int64 14068 err = json.Unmarshal(*v, &standByReplicaKeepDurationSeconds) 14069 if err != nil { 14070 return err 14071 } 14072 ssd.StandByReplicaKeepDurationSeconds = &standByReplicaKeepDurationSeconds 14073 } 14074 case "ApplicationName": 14075 if v != nil { 14076 var applicationName string 14077 err = json.Unmarshal(*v, &applicationName) 14078 if err != nil { 14079 return err 14080 } 14081 ssd.ApplicationName = &applicationName 14082 } 14083 case "ServiceName": 14084 if v != nil { 14085 var serviceName string 14086 err = json.Unmarshal(*v, &serviceName) 14087 if err != nil { 14088 return err 14089 } 14090 ssd.ServiceName = &serviceName 14091 } 14092 case "ServiceTypeName": 14093 if v != nil { 14094 var serviceTypeName string 14095 err = json.Unmarshal(*v, &serviceTypeName) 14096 if err != nil { 14097 return err 14098 } 14099 ssd.ServiceTypeName = &serviceTypeName 14100 } 14101 case "InitializationData": 14102 if v != nil { 14103 var initializationData []int32 14104 err = json.Unmarshal(*v, &initializationData) 14105 if err != nil { 14106 return err 14107 } 14108 ssd.InitializationData = &initializationData 14109 } 14110 case "PartitionDescription": 14111 if v != nil { 14112 partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v) 14113 if err != nil { 14114 return err 14115 } 14116 ssd.PartitionDescription = partitionDescription 14117 } 14118 case "PlacementConstraints": 14119 if v != nil { 14120 var placementConstraints string 14121 err = json.Unmarshal(*v, &placementConstraints) 14122 if err != nil { 14123 return err 14124 } 14125 ssd.PlacementConstraints = &placementConstraints 14126 } 14127 case "CorrelationScheme": 14128 if v != nil { 14129 var correlationScheme []ServiceCorrelationDescription 14130 err = json.Unmarshal(*v, &correlationScheme) 14131 if err != nil { 14132 return err 14133 } 14134 ssd.CorrelationScheme = &correlationScheme 14135 } 14136 case "ServiceLoadMetrics": 14137 if v != nil { 14138 var serviceLoadMetrics []ServiceLoadMetricDescription 14139 err = json.Unmarshal(*v, &serviceLoadMetrics) 14140 if err != nil { 14141 return err 14142 } 14143 ssd.ServiceLoadMetrics = &serviceLoadMetrics 14144 } 14145 case "ServicePlacementPolicies": 14146 if v != nil { 14147 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 14148 if err != nil { 14149 return err 14150 } 14151 ssd.ServicePlacementPolicies = &servicePlacementPolicies 14152 } 14153 case "DefaultMoveCost": 14154 if v != nil { 14155 var defaultMoveCost DefaultMoveCost 14156 err = json.Unmarshal(*v, &defaultMoveCost) 14157 if err != nil { 14158 return err 14159 } 14160 ssd.DefaultMoveCost = defaultMoveCost 14161 } 14162 case "IsDefaultMoveCostSpecified": 14163 if v != nil { 14164 var isDefaultMoveCostSpecified bool 14165 err = json.Unmarshal(*v, &isDefaultMoveCostSpecified) 14166 if err != nil { 14167 return err 14168 } 14169 ssd.IsDefaultMoveCostSpecified = &isDefaultMoveCostSpecified 14170 } 14171 case "ServicePackageActivationMode": 14172 if v != nil { 14173 var servicePackageActivationMode ServicePackageActivationMode1 14174 err = json.Unmarshal(*v, &servicePackageActivationMode) 14175 if err != nil { 14176 return err 14177 } 14178 ssd.ServicePackageActivationMode = servicePackageActivationMode 14179 } 14180 case "ServiceDnsName": 14181 if v != nil { 14182 var serviceDNSName string 14183 err = json.Unmarshal(*v, &serviceDNSName) 14184 if err != nil { 14185 return err 14186 } 14187 ssd.ServiceDNSName = &serviceDNSName 14188 } 14189 case "ServiceKind": 14190 if v != nil { 14191 var serviceKind ServiceKindBasicServiceDescription 14192 err = json.Unmarshal(*v, &serviceKind) 14193 if err != nil { 14194 return err 14195 } 14196 ssd.ServiceKind = serviceKind 14197 } 14198 } 14199 } 14200 14201 return nil 14202} 14203 14204// StatefulServiceInfo information about a stateful Service Fabric service. 14205type StatefulServiceInfo struct { 14206 // HasPersistedState - Whether the service has persisted state. 14207 HasPersistedState *bool `json:"HasPersistedState,omitempty"` 14208 ID *string `json:"Id,omitempty"` 14209 Name *string `json:"Name,omitempty"` 14210 TypeName *string `json:"TypeName,omitempty"` 14211 // ManifestVersion - The version of the service manifest. 14212 ManifestVersion *string `json:"ManifestVersion,omitempty"` 14213 // HealthState - Possible values include: 'HealthState7Invalid', 'HealthState7Ok', 'HealthState7Warning', 'HealthState7Error', 'HealthState7Unknown' 14214 HealthState HealthState7 `json:"HealthState,omitempty"` 14215 // ServiceStatus - Possible values include: 'ServiceStatusUnknown', 'ServiceStatusActive', 'ServiceStatusUpgrading', 'ServiceStatusDeleting', 'ServiceStatusCreating', 'ServiceStatusFailed' 14216 ServiceStatus ServiceStatus `json:"ServiceStatus,omitempty"` 14217 // IsServiceGroup - Whether the service is in a service group. 14218 IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` 14219 // ServiceKind - Possible values include: 'ServiceKindBasicServiceInfoServiceKindServiceInfo', 'ServiceKindBasicServiceInfoServiceKindStateful', 'ServiceKindBasicServiceInfoServiceKindStateless' 14220 ServiceKind ServiceKindBasicServiceInfo `json:"ServiceKind,omitempty"` 14221} 14222 14223// MarshalJSON is the custom marshaler for StatefulServiceInfo. 14224func (ssi StatefulServiceInfo) MarshalJSON() ([]byte, error) { 14225 ssi.ServiceKind = ServiceKindBasicServiceInfoServiceKindStateful 14226 objectMap := make(map[string]interface{}) 14227 if ssi.HasPersistedState != nil { 14228 objectMap["HasPersistedState"] = ssi.HasPersistedState 14229 } 14230 if ssi.ID != nil { 14231 objectMap["Id"] = ssi.ID 14232 } 14233 if ssi.Name != nil { 14234 objectMap["Name"] = ssi.Name 14235 } 14236 if ssi.TypeName != nil { 14237 objectMap["TypeName"] = ssi.TypeName 14238 } 14239 if ssi.ManifestVersion != nil { 14240 objectMap["ManifestVersion"] = ssi.ManifestVersion 14241 } 14242 if ssi.HealthState != "" { 14243 objectMap["HealthState"] = ssi.HealthState 14244 } 14245 if ssi.ServiceStatus != "" { 14246 objectMap["ServiceStatus"] = ssi.ServiceStatus 14247 } 14248 if ssi.IsServiceGroup != nil { 14249 objectMap["IsServiceGroup"] = ssi.IsServiceGroup 14250 } 14251 if ssi.ServiceKind != "" { 14252 objectMap["ServiceKind"] = ssi.ServiceKind 14253 } 14254 return json.Marshal(objectMap) 14255} 14256 14257// AsStatefulServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. 14258func (ssi StatefulServiceInfo) AsStatefulServiceInfo() (*StatefulServiceInfo, bool) { 14259 return &ssi, true 14260} 14261 14262// AsStatelessServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. 14263func (ssi StatefulServiceInfo) AsStatelessServiceInfo() (*StatelessServiceInfo, bool) { 14264 return nil, false 14265} 14266 14267// AsServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. 14268func (ssi StatefulServiceInfo) AsServiceInfo() (*ServiceInfo, bool) { 14269 return nil, false 14270} 14271 14272// AsBasicServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. 14273func (ssi StatefulServiceInfo) AsBasicServiceInfo() (BasicServiceInfo, bool) { 14274 return &ssi, true 14275} 14276 14277// StatefulServicePartitionInfo information about a partition of a stateful Service Fabric service.. 14278type StatefulServicePartitionInfo struct { 14279 // TargetReplicaSetSize - The target replica set size as a number. 14280 TargetReplicaSetSize *int64 `json:"TargetReplicaSetSize,omitempty"` 14281 // MinReplicaSetSize - The minimum replica set size as a number. 14282 MinReplicaSetSize *int64 `json:"MinReplicaSetSize,omitempty"` 14283 // LastQuorumLossDuration - The duration for which this partition was in quorum loss. If the partition is currently in quorum loss, it returns the duration since it has been in that state. This field is using ISO8601 format for specifying the duration. 14284 LastQuorumLossDuration *string `json:"LastQuorumLossDuration,omitempty"` 14285 CurrentConfigurationEpoch *Epoch `json:"CurrentConfigurationEpoch,omitempty"` 14286 // HealthState - Possible values include: 'HealthState5Invalid', 'HealthState5Ok', 'HealthState5Warning', 'HealthState5Error', 'HealthState5Unknown' 14287 HealthState HealthState5 `json:"HealthState,omitempty"` 14288 // PartitionStatus - Possible values include: 'PartitionStatusInvalid', 'PartitionStatusReady', 'PartitionStatusNotReady', 'PartitionStatusInQuorumLoss', 'PartitionStatusReconfiguring', 'PartitionStatusDeleting' 14289 PartitionStatus PartitionStatus `json:"PartitionStatus,omitempty"` 14290 PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` 14291 // ServiceKind - Possible values include: 'ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo', 'ServiceKindBasicServicePartitionInfoServiceKindStateful', 'ServiceKindBasicServicePartitionInfoServiceKindStateless' 14292 ServiceKind ServiceKindBasicServicePartitionInfo `json:"ServiceKind,omitempty"` 14293} 14294 14295// MarshalJSON is the custom marshaler for StatefulServicePartitionInfo. 14296func (sspi StatefulServicePartitionInfo) MarshalJSON() ([]byte, error) { 14297 sspi.ServiceKind = ServiceKindBasicServicePartitionInfoServiceKindStateful 14298 objectMap := make(map[string]interface{}) 14299 if sspi.TargetReplicaSetSize != nil { 14300 objectMap["TargetReplicaSetSize"] = sspi.TargetReplicaSetSize 14301 } 14302 if sspi.MinReplicaSetSize != nil { 14303 objectMap["MinReplicaSetSize"] = sspi.MinReplicaSetSize 14304 } 14305 if sspi.LastQuorumLossDuration != nil { 14306 objectMap["LastQuorumLossDuration"] = sspi.LastQuorumLossDuration 14307 } 14308 if sspi.CurrentConfigurationEpoch != nil { 14309 objectMap["CurrentConfigurationEpoch"] = sspi.CurrentConfigurationEpoch 14310 } 14311 if sspi.HealthState != "" { 14312 objectMap["HealthState"] = sspi.HealthState 14313 } 14314 if sspi.PartitionStatus != "" { 14315 objectMap["PartitionStatus"] = sspi.PartitionStatus 14316 } 14317 objectMap["PartitionInformation"] = sspi.PartitionInformation 14318 if sspi.ServiceKind != "" { 14319 objectMap["ServiceKind"] = sspi.ServiceKind 14320 } 14321 return json.Marshal(objectMap) 14322} 14323 14324// AsStatefulServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. 14325func (sspi StatefulServicePartitionInfo) AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) { 14326 return &sspi, true 14327} 14328 14329// AsStatelessServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. 14330func (sspi StatefulServicePartitionInfo) AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) { 14331 return nil, false 14332} 14333 14334// AsServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. 14335func (sspi StatefulServicePartitionInfo) AsServicePartitionInfo() (*ServicePartitionInfo, bool) { 14336 return nil, false 14337} 14338 14339// AsBasicServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. 14340func (sspi StatefulServicePartitionInfo) AsBasicServicePartitionInfo() (BasicServicePartitionInfo, bool) { 14341 return &sspi, true 14342} 14343 14344// UnmarshalJSON is the custom unmarshaler for StatefulServicePartitionInfo struct. 14345func (sspi *StatefulServicePartitionInfo) UnmarshalJSON(body []byte) error { 14346 var m map[string]*json.RawMessage 14347 err := json.Unmarshal(body, &m) 14348 if err != nil { 14349 return err 14350 } 14351 for k, v := range m { 14352 switch k { 14353 case "TargetReplicaSetSize": 14354 if v != nil { 14355 var targetReplicaSetSize int64 14356 err = json.Unmarshal(*v, &targetReplicaSetSize) 14357 if err != nil { 14358 return err 14359 } 14360 sspi.TargetReplicaSetSize = &targetReplicaSetSize 14361 } 14362 case "MinReplicaSetSize": 14363 if v != nil { 14364 var minReplicaSetSize int64 14365 err = json.Unmarshal(*v, &minReplicaSetSize) 14366 if err != nil { 14367 return err 14368 } 14369 sspi.MinReplicaSetSize = &minReplicaSetSize 14370 } 14371 case "LastQuorumLossDuration": 14372 if v != nil { 14373 var lastQuorumLossDuration string 14374 err = json.Unmarshal(*v, &lastQuorumLossDuration) 14375 if err != nil { 14376 return err 14377 } 14378 sspi.LastQuorumLossDuration = &lastQuorumLossDuration 14379 } 14380 case "CurrentConfigurationEpoch": 14381 if v != nil { 14382 var currentConfigurationEpoch Epoch 14383 err = json.Unmarshal(*v, ¤tConfigurationEpoch) 14384 if err != nil { 14385 return err 14386 } 14387 sspi.CurrentConfigurationEpoch = ¤tConfigurationEpoch 14388 } 14389 case "HealthState": 14390 if v != nil { 14391 var healthState HealthState5 14392 err = json.Unmarshal(*v, &healthState) 14393 if err != nil { 14394 return err 14395 } 14396 sspi.HealthState = healthState 14397 } 14398 case "PartitionStatus": 14399 if v != nil { 14400 var partitionStatus PartitionStatus 14401 err = json.Unmarshal(*v, &partitionStatus) 14402 if err != nil { 14403 return err 14404 } 14405 sspi.PartitionStatus = partitionStatus 14406 } 14407 case "PartitionInformation": 14408 if v != nil { 14409 partitionInformation, err := unmarshalBasicPartitionInformation(*v) 14410 if err != nil { 14411 return err 14412 } 14413 sspi.PartitionInformation = partitionInformation 14414 } 14415 case "ServiceKind": 14416 if v != nil { 14417 var serviceKind ServiceKindBasicServicePartitionInfo 14418 err = json.Unmarshal(*v, &serviceKind) 14419 if err != nil { 14420 return err 14421 } 14422 sspi.ServiceKind = serviceKind 14423 } 14424 } 14425 } 14426 14427 return nil 14428} 14429 14430// StatefulServiceReplicaHealth represents the health of the stateful service replica. 14431// Contains the replica aggregated health state, the health events and the unhealthy evaluations. 14432type StatefulServiceReplicaHealth struct { 14433 ReplicaID *string `json:"ReplicaId,omitempty"` 14434 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 14435 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthServiceKindReplicaHealth', 'ServiceKindBasicReplicaHealthServiceKindStateful', 'ServiceKindBasicReplicaHealthServiceKindStateless' 14436 ServiceKind ServiceKindBasicReplicaHealth `json:"ServiceKind,omitempty"` 14437 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 14438 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 14439 // HealthEvents - The list of health events reported on the entity. 14440 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 14441 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 14442 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 14443} 14444 14445// MarshalJSON is the custom marshaler for StatefulServiceReplicaHealth. 14446func (ssrh StatefulServiceReplicaHealth) MarshalJSON() ([]byte, error) { 14447 ssrh.ServiceKind = ServiceKindBasicReplicaHealthServiceKindStateful 14448 objectMap := make(map[string]interface{}) 14449 if ssrh.ReplicaID != nil { 14450 objectMap["ReplicaId"] = ssrh.ReplicaID 14451 } 14452 if ssrh.PartitionID != nil { 14453 objectMap["PartitionId"] = ssrh.PartitionID 14454 } 14455 if ssrh.ServiceKind != "" { 14456 objectMap["ServiceKind"] = ssrh.ServiceKind 14457 } 14458 if ssrh.AggregatedHealthState != "" { 14459 objectMap["AggregatedHealthState"] = ssrh.AggregatedHealthState 14460 } 14461 if ssrh.HealthEvents != nil { 14462 objectMap["HealthEvents"] = ssrh.HealthEvents 14463 } 14464 if ssrh.UnhealthyEvaluations != nil { 14465 objectMap["UnhealthyEvaluations"] = ssrh.UnhealthyEvaluations 14466 } 14467 if ssrh.HealthStatistics != nil { 14468 objectMap["HealthStatistics"] = ssrh.HealthStatistics 14469 } 14470 return json.Marshal(objectMap) 14471} 14472 14473// AsStatefulServiceReplicaHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. 14474func (ssrh StatefulServiceReplicaHealth) AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) { 14475 return &ssrh, true 14476} 14477 14478// AsStatelessServiceInstanceHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. 14479func (ssrh StatefulServiceReplicaHealth) AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) { 14480 return nil, false 14481} 14482 14483// AsReplicaHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. 14484func (ssrh StatefulServiceReplicaHealth) AsReplicaHealth() (*ReplicaHealth, bool) { 14485 return nil, false 14486} 14487 14488// AsBasicReplicaHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. 14489func (ssrh StatefulServiceReplicaHealth) AsBasicReplicaHealth() (BasicReplicaHealth, bool) { 14490 return &ssrh, true 14491} 14492 14493// StatefulServiceReplicaHealthState represents the health state of the stateful service replica, which contains 14494// the replica id and the aggregated health state. 14495type StatefulServiceReplicaHealthState struct { 14496 ReplicaID *string `json:"ReplicaId,omitempty"` 14497 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 14498 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState', 'ServiceKindBasicReplicaHealthStateServiceKindStateful', 'ServiceKindBasicReplicaHealthStateServiceKindStateless' 14499 ServiceKind ServiceKindBasicReplicaHealthState `json:"ServiceKind,omitempty"` 14500 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 14501 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 14502} 14503 14504// MarshalJSON is the custom marshaler for StatefulServiceReplicaHealthState. 14505func (ssrhs StatefulServiceReplicaHealthState) MarshalJSON() ([]byte, error) { 14506 ssrhs.ServiceKind = ServiceKindBasicReplicaHealthStateServiceKindStateful 14507 objectMap := make(map[string]interface{}) 14508 if ssrhs.ReplicaID != nil { 14509 objectMap["ReplicaId"] = ssrhs.ReplicaID 14510 } 14511 if ssrhs.PartitionID != nil { 14512 objectMap["PartitionId"] = ssrhs.PartitionID 14513 } 14514 if ssrhs.ServiceKind != "" { 14515 objectMap["ServiceKind"] = ssrhs.ServiceKind 14516 } 14517 if ssrhs.AggregatedHealthState != "" { 14518 objectMap["AggregatedHealthState"] = ssrhs.AggregatedHealthState 14519 } 14520 return json.Marshal(objectMap) 14521} 14522 14523// AsStatefulServiceReplicaHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. 14524func (ssrhs StatefulServiceReplicaHealthState) AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) { 14525 return &ssrhs, true 14526} 14527 14528// AsStatelessServiceInstanceHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. 14529func (ssrhs StatefulServiceReplicaHealthState) AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) { 14530 return nil, false 14531} 14532 14533// AsReplicaHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. 14534func (ssrhs StatefulServiceReplicaHealthState) AsReplicaHealthState() (*ReplicaHealthState, bool) { 14535 return nil, false 14536} 14537 14538// AsBasicReplicaHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. 14539func (ssrhs StatefulServiceReplicaHealthState) AsBasicReplicaHealthState() (BasicReplicaHealthState, bool) { 14540 return &ssrhs, true 14541} 14542 14543// StatefulServiceReplicaInfo represents a stateful service replica. This includes information about the identity, 14544// role, status, health, node name, uptime, and other details about the replica. 14545type StatefulServiceReplicaInfo struct { 14546 // ReplicaRole - Possible values include: 'ReplicaRole1Unknown', 'ReplicaRole1None', 'ReplicaRole1Primary', 'ReplicaRole1IdleSecondary', 'ReplicaRole1ActiveSecondary' 14547 ReplicaRole ReplicaRole1 `json:"ReplicaRole,omitempty"` 14548 ReplicaID *string `json:"ReplicaId,omitempty"` 14549 // ReplicaStatus - Possible values include: 'ReplicaStatus1Invalid', 'ReplicaStatus1InBuild', 'ReplicaStatus1Standby', 'ReplicaStatus1Ready', 'ReplicaStatus1Down', 'ReplicaStatus1Dropped' 14550 ReplicaStatus ReplicaStatus1 `json:"ReplicaStatus,omitempty"` 14551 // HealthState - Possible values include: 'HealthState6Invalid', 'HealthState6Ok', 'HealthState6Warning', 'HealthState6Error', 'HealthState6Unknown' 14552 HealthState HealthState6 `json:"HealthState,omitempty"` 14553 NodeName *string `json:"NodeName,omitempty"` 14554 // Address - The address the replica is listening on. 14555 Address *string `json:"Address,omitempty"` 14556 // LastInBuildDurationInSeconds - The last in build duration of the replica in seconds. 14557 LastInBuildDurationInSeconds *string `json:"LastInBuildDurationInSeconds,omitempty"` 14558 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaInfoServiceKindReplicaInfo', 'ServiceKindBasicReplicaInfoServiceKindStateful', 'ServiceKindBasicReplicaInfoServiceKindStateless' 14559 ServiceKind ServiceKindBasicReplicaInfo `json:"ServiceKind,omitempty"` 14560} 14561 14562// MarshalJSON is the custom marshaler for StatefulServiceReplicaInfo. 14563func (ssri StatefulServiceReplicaInfo) MarshalJSON() ([]byte, error) { 14564 ssri.ServiceKind = ServiceKindBasicReplicaInfoServiceKindStateful 14565 objectMap := make(map[string]interface{}) 14566 if ssri.ReplicaRole != "" { 14567 objectMap["ReplicaRole"] = ssri.ReplicaRole 14568 } 14569 if ssri.ReplicaID != nil { 14570 objectMap["ReplicaId"] = ssri.ReplicaID 14571 } 14572 if ssri.ReplicaStatus != "" { 14573 objectMap["ReplicaStatus"] = ssri.ReplicaStatus 14574 } 14575 if ssri.HealthState != "" { 14576 objectMap["HealthState"] = ssri.HealthState 14577 } 14578 if ssri.NodeName != nil { 14579 objectMap["NodeName"] = ssri.NodeName 14580 } 14581 if ssri.Address != nil { 14582 objectMap["Address"] = ssri.Address 14583 } 14584 if ssri.LastInBuildDurationInSeconds != nil { 14585 objectMap["LastInBuildDurationInSeconds"] = ssri.LastInBuildDurationInSeconds 14586 } 14587 if ssri.ServiceKind != "" { 14588 objectMap["ServiceKind"] = ssri.ServiceKind 14589 } 14590 return json.Marshal(objectMap) 14591} 14592 14593// AsStatefulServiceReplicaInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. 14594func (ssri StatefulServiceReplicaInfo) AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) { 14595 return &ssri, true 14596} 14597 14598// AsStatelessServiceInstanceInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. 14599func (ssri StatefulServiceReplicaInfo) AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) { 14600 return nil, false 14601} 14602 14603// AsReplicaInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. 14604func (ssri StatefulServiceReplicaInfo) AsReplicaInfo() (*ReplicaInfo, bool) { 14605 return nil, false 14606} 14607 14608// AsBasicReplicaInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. 14609func (ssri StatefulServiceReplicaInfo) AsBasicReplicaInfo() (BasicReplicaInfo, bool) { 14610 return &ssri, true 14611} 14612 14613// StatefulServiceTypeDescription describes a stateful service type defined in the service manifest of a 14614// provisioned application type. 14615type StatefulServiceTypeDescription struct { 14616 // HasPersistedState - A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. 14617 HasPersistedState *bool `json:"HasPersistedState,omitempty"` 14618 // IsStateful - Indicates whether the service type is a stateful service type or a stateless service type. This property is true if the service type is a stateful service type, false otherwise. 14619 IsStateful *bool `json:"IsStateful,omitempty"` 14620 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 14621 // PlacementConstraints - The placement constraint to be used when instantiating this service in a Service Fabric cluster. 14622 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 14623 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 14624 Extensions *[]ServiceTypeExtensionDescription `json:"Extensions,omitempty"` 14625 // Kind - Possible values include: 'KindServiceTypeDescription', 'KindStateful', 'KindStateless1' 14626 Kind KindBasicServiceTypeDescription `json:"Kind,omitempty"` 14627} 14628 14629// MarshalJSON is the custom marshaler for StatefulServiceTypeDescription. 14630func (sstd StatefulServiceTypeDescription) MarshalJSON() ([]byte, error) { 14631 sstd.Kind = KindStateful 14632 objectMap := make(map[string]interface{}) 14633 if sstd.HasPersistedState != nil { 14634 objectMap["HasPersistedState"] = sstd.HasPersistedState 14635 } 14636 if sstd.IsStateful != nil { 14637 objectMap["IsStateful"] = sstd.IsStateful 14638 } 14639 if sstd.ServiceTypeName != nil { 14640 objectMap["ServiceTypeName"] = sstd.ServiceTypeName 14641 } 14642 if sstd.PlacementConstraints != nil { 14643 objectMap["PlacementConstraints"] = sstd.PlacementConstraints 14644 } 14645 if sstd.ServicePlacementPolicies != nil { 14646 objectMap["ServicePlacementPolicies"] = sstd.ServicePlacementPolicies 14647 } 14648 if sstd.Extensions != nil { 14649 objectMap["Extensions"] = sstd.Extensions 14650 } 14651 if sstd.Kind != "" { 14652 objectMap["Kind"] = sstd.Kind 14653 } 14654 return json.Marshal(objectMap) 14655} 14656 14657// AsStatefulServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. 14658func (sstd StatefulServiceTypeDescription) AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) { 14659 return &sstd, true 14660} 14661 14662// AsStatelessServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. 14663func (sstd StatefulServiceTypeDescription) AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) { 14664 return nil, false 14665} 14666 14667// AsServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. 14668func (sstd StatefulServiceTypeDescription) AsServiceTypeDescription() (*ServiceTypeDescription, bool) { 14669 return nil, false 14670} 14671 14672// AsBasicServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. 14673func (sstd StatefulServiceTypeDescription) AsBasicServiceTypeDescription() (BasicServiceTypeDescription, bool) { 14674 return &sstd, true 14675} 14676 14677// UnmarshalJSON is the custom unmarshaler for StatefulServiceTypeDescription struct. 14678func (sstd *StatefulServiceTypeDescription) UnmarshalJSON(body []byte) error { 14679 var m map[string]*json.RawMessage 14680 err := json.Unmarshal(body, &m) 14681 if err != nil { 14682 return err 14683 } 14684 for k, v := range m { 14685 switch k { 14686 case "HasPersistedState": 14687 if v != nil { 14688 var hasPersistedState bool 14689 err = json.Unmarshal(*v, &hasPersistedState) 14690 if err != nil { 14691 return err 14692 } 14693 sstd.HasPersistedState = &hasPersistedState 14694 } 14695 case "IsStateful": 14696 if v != nil { 14697 var isStateful bool 14698 err = json.Unmarshal(*v, &isStateful) 14699 if err != nil { 14700 return err 14701 } 14702 sstd.IsStateful = &isStateful 14703 } 14704 case "ServiceTypeName": 14705 if v != nil { 14706 var serviceTypeName string 14707 err = json.Unmarshal(*v, &serviceTypeName) 14708 if err != nil { 14709 return err 14710 } 14711 sstd.ServiceTypeName = &serviceTypeName 14712 } 14713 case "PlacementConstraints": 14714 if v != nil { 14715 var placementConstraints string 14716 err = json.Unmarshal(*v, &placementConstraints) 14717 if err != nil { 14718 return err 14719 } 14720 sstd.PlacementConstraints = &placementConstraints 14721 } 14722 case "ServicePlacementPolicies": 14723 if v != nil { 14724 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 14725 if err != nil { 14726 return err 14727 } 14728 sstd.ServicePlacementPolicies = &servicePlacementPolicies 14729 } 14730 case "Extensions": 14731 if v != nil { 14732 var extensions []ServiceTypeExtensionDescription 14733 err = json.Unmarshal(*v, &extensions) 14734 if err != nil { 14735 return err 14736 } 14737 sstd.Extensions = &extensions 14738 } 14739 case "Kind": 14740 if v != nil { 14741 var kind KindBasicServiceTypeDescription 14742 err = json.Unmarshal(*v, &kind) 14743 if err != nil { 14744 return err 14745 } 14746 sstd.Kind = kind 14747 } 14748 } 14749 } 14750 14751 return nil 14752} 14753 14754// StatefulServiceUpdateDescription describes an update for a stateful service. 14755type StatefulServiceUpdateDescription struct { 14756 // TargetReplicaSetSize - The target replica set size as a number. 14757 TargetReplicaSetSize *int32 `json:"TargetReplicaSetSize,omitempty"` 14758 // MinReplicaSetSize - The minimum replica set size as a number. 14759 MinReplicaSetSize *int32 `json:"MinReplicaSetSize,omitempty"` 14760 // ReplicaRestartWaitDurationSeconds - The duration, in seconds, between when a replica goes down and when a new replica is created. 14761 ReplicaRestartWaitDurationSeconds *string `json:"ReplicaRestartWaitDurationSeconds,omitempty"` 14762 // QuorumLossWaitDurationSeconds - The maximum duration, in seconds, for which a partition is allowed to be in a state of quorum loss. 14763 QuorumLossWaitDurationSeconds *string `json:"QuorumLossWaitDurationSeconds,omitempty"` 14764 // StandByReplicaKeepDurationSeconds - The definition on how long StandBy replicas should be maintained before being removed. 14765 StandByReplicaKeepDurationSeconds *string `json:"StandByReplicaKeepDurationSeconds,omitempty"` 14766 // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. 14767 // This property can be a combination of those flags obtained using bitwise 'OR' operator. 14768 // For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. 14769 // - None - Does not indicate any other properties are set. The value is zero. 14770 // - TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property (for Stateful services) or the InstanceCount property (for Stateless services) is set. The value is 1. 14771 // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 2. 14772 // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 4. 14773 // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 8. 14774 // - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. 14775 // - PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. 14776 // - PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is 64. 14777 // - Correlation - Indicates the CorrelationScheme property is set. The value is 128. 14778 // - Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. 14779 // - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. 14780 Flags *string `json:"Flags,omitempty"` 14781 // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". 14782 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 14783 CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` 14784 LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` 14785 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 14786 // DefaultMoveCost - Possible values include: 'DefaultMoveCost1Zero', 'DefaultMoveCost1Low', 'DefaultMoveCost1Medium', 'DefaultMoveCost1High' 14787 DefaultMoveCost DefaultMoveCost1 `json:"DefaultMoveCost,omitempty"` 14788 // ServiceKind - Possible values include: 'ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateful', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateless' 14789 ServiceKind ServiceKindBasicServiceUpdateDescription `json:"ServiceKind,omitempty"` 14790} 14791 14792// MarshalJSON is the custom marshaler for StatefulServiceUpdateDescription. 14793func (ssud StatefulServiceUpdateDescription) MarshalJSON() ([]byte, error) { 14794 ssud.ServiceKind = ServiceKindBasicServiceUpdateDescriptionServiceKindStateful 14795 objectMap := make(map[string]interface{}) 14796 if ssud.TargetReplicaSetSize != nil { 14797 objectMap["TargetReplicaSetSize"] = ssud.TargetReplicaSetSize 14798 } 14799 if ssud.MinReplicaSetSize != nil { 14800 objectMap["MinReplicaSetSize"] = ssud.MinReplicaSetSize 14801 } 14802 if ssud.ReplicaRestartWaitDurationSeconds != nil { 14803 objectMap["ReplicaRestartWaitDurationSeconds"] = ssud.ReplicaRestartWaitDurationSeconds 14804 } 14805 if ssud.QuorumLossWaitDurationSeconds != nil { 14806 objectMap["QuorumLossWaitDurationSeconds"] = ssud.QuorumLossWaitDurationSeconds 14807 } 14808 if ssud.StandByReplicaKeepDurationSeconds != nil { 14809 objectMap["StandByReplicaKeepDurationSeconds"] = ssud.StandByReplicaKeepDurationSeconds 14810 } 14811 if ssud.Flags != nil { 14812 objectMap["Flags"] = ssud.Flags 14813 } 14814 if ssud.PlacementConstraints != nil { 14815 objectMap["PlacementConstraints"] = ssud.PlacementConstraints 14816 } 14817 if ssud.CorrelationScheme != nil { 14818 objectMap["CorrelationScheme"] = ssud.CorrelationScheme 14819 } 14820 if ssud.LoadMetrics != nil { 14821 objectMap["LoadMetrics"] = ssud.LoadMetrics 14822 } 14823 if ssud.ServicePlacementPolicies != nil { 14824 objectMap["ServicePlacementPolicies"] = ssud.ServicePlacementPolicies 14825 } 14826 if ssud.DefaultMoveCost != "" { 14827 objectMap["DefaultMoveCost"] = ssud.DefaultMoveCost 14828 } 14829 if ssud.ServiceKind != "" { 14830 objectMap["ServiceKind"] = ssud.ServiceKind 14831 } 14832 return json.Marshal(objectMap) 14833} 14834 14835// AsStatefulServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. 14836func (ssud StatefulServiceUpdateDescription) AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) { 14837 return &ssud, true 14838} 14839 14840// AsStatelessServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. 14841func (ssud StatefulServiceUpdateDescription) AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) { 14842 return nil, false 14843} 14844 14845// AsServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. 14846func (ssud StatefulServiceUpdateDescription) AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) { 14847 return nil, false 14848} 14849 14850// AsBasicServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. 14851func (ssud StatefulServiceUpdateDescription) AsBasicServiceUpdateDescription() (BasicServiceUpdateDescription, bool) { 14852 return &ssud, true 14853} 14854 14855// UnmarshalJSON is the custom unmarshaler for StatefulServiceUpdateDescription struct. 14856func (ssud *StatefulServiceUpdateDescription) UnmarshalJSON(body []byte) error { 14857 var m map[string]*json.RawMessage 14858 err := json.Unmarshal(body, &m) 14859 if err != nil { 14860 return err 14861 } 14862 for k, v := range m { 14863 switch k { 14864 case "TargetReplicaSetSize": 14865 if v != nil { 14866 var targetReplicaSetSize int32 14867 err = json.Unmarshal(*v, &targetReplicaSetSize) 14868 if err != nil { 14869 return err 14870 } 14871 ssud.TargetReplicaSetSize = &targetReplicaSetSize 14872 } 14873 case "MinReplicaSetSize": 14874 if v != nil { 14875 var minReplicaSetSize int32 14876 err = json.Unmarshal(*v, &minReplicaSetSize) 14877 if err != nil { 14878 return err 14879 } 14880 ssud.MinReplicaSetSize = &minReplicaSetSize 14881 } 14882 case "ReplicaRestartWaitDurationSeconds": 14883 if v != nil { 14884 var replicaRestartWaitDurationSeconds string 14885 err = json.Unmarshal(*v, &replicaRestartWaitDurationSeconds) 14886 if err != nil { 14887 return err 14888 } 14889 ssud.ReplicaRestartWaitDurationSeconds = &replicaRestartWaitDurationSeconds 14890 } 14891 case "QuorumLossWaitDurationSeconds": 14892 if v != nil { 14893 var quorumLossWaitDurationSeconds string 14894 err = json.Unmarshal(*v, &quorumLossWaitDurationSeconds) 14895 if err != nil { 14896 return err 14897 } 14898 ssud.QuorumLossWaitDurationSeconds = &quorumLossWaitDurationSeconds 14899 } 14900 case "StandByReplicaKeepDurationSeconds": 14901 if v != nil { 14902 var standByReplicaKeepDurationSeconds string 14903 err = json.Unmarshal(*v, &standByReplicaKeepDurationSeconds) 14904 if err != nil { 14905 return err 14906 } 14907 ssud.StandByReplicaKeepDurationSeconds = &standByReplicaKeepDurationSeconds 14908 } 14909 case "Flags": 14910 if v != nil { 14911 var flags string 14912 err = json.Unmarshal(*v, &flags) 14913 if err != nil { 14914 return err 14915 } 14916 ssud.Flags = &flags 14917 } 14918 case "PlacementConstraints": 14919 if v != nil { 14920 var placementConstraints string 14921 err = json.Unmarshal(*v, &placementConstraints) 14922 if err != nil { 14923 return err 14924 } 14925 ssud.PlacementConstraints = &placementConstraints 14926 } 14927 case "CorrelationScheme": 14928 if v != nil { 14929 var correlationScheme []ServiceCorrelationDescription 14930 err = json.Unmarshal(*v, &correlationScheme) 14931 if err != nil { 14932 return err 14933 } 14934 ssud.CorrelationScheme = &correlationScheme 14935 } 14936 case "LoadMetrics": 14937 if v != nil { 14938 var loadMetrics []ServiceLoadMetricDescription 14939 err = json.Unmarshal(*v, &loadMetrics) 14940 if err != nil { 14941 return err 14942 } 14943 ssud.LoadMetrics = &loadMetrics 14944 } 14945 case "ServicePlacementPolicies": 14946 if v != nil { 14947 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 14948 if err != nil { 14949 return err 14950 } 14951 ssud.ServicePlacementPolicies = &servicePlacementPolicies 14952 } 14953 case "DefaultMoveCost": 14954 if v != nil { 14955 var defaultMoveCost DefaultMoveCost1 14956 err = json.Unmarshal(*v, &defaultMoveCost) 14957 if err != nil { 14958 return err 14959 } 14960 ssud.DefaultMoveCost = defaultMoveCost 14961 } 14962 case "ServiceKind": 14963 if v != nil { 14964 var serviceKind ServiceKindBasicServiceUpdateDescription 14965 err = json.Unmarshal(*v, &serviceKind) 14966 if err != nil { 14967 return err 14968 } 14969 ssud.ServiceKind = serviceKind 14970 } 14971 } 14972 } 14973 14974 return nil 14975} 14976 14977// StatelessServiceDescription describes a stateless service. 14978type StatelessServiceDescription struct { 14979 // InstanceCount - The instance count. 14980 InstanceCount *int32 `json:"InstanceCount,omitempty"` 14981 ApplicationName *string `json:"ApplicationName,omitempty"` 14982 ServiceName *string `json:"ServiceName,omitempty"` 14983 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 14984 InitializationData *[]int32 `json:"InitializationData,omitempty"` 14985 PartitionDescription BasicPartitionSchemeDescription `json:"PartitionDescription,omitempty"` 14986 // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". 14987 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 14988 CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` 14989 ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"ServiceLoadMetrics,omitempty"` 14990 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 14991 // DefaultMoveCost - Possible values include: 'Zero', 'Low', 'Medium', 'High' 14992 DefaultMoveCost DefaultMoveCost `json:"DefaultMoveCost,omitempty"` 14993 // IsDefaultMoveCostSpecified - Indicates if the DefaultMoveCost property is specified. 14994 IsDefaultMoveCostSpecified *bool `json:"IsDefaultMoveCostSpecified,omitempty"` 14995 // ServicePackageActivationMode - Possible values include: 'ServicePackageActivationMode1SharedProcess', 'ServicePackageActivationMode1ExclusiveProcess' 14996 ServicePackageActivationMode ServicePackageActivationMode1 `json:"ServicePackageActivationMode,omitempty"` 14997 // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. 14998 ServiceDNSName *string `json:"ServiceDnsName,omitempty"` 14999 // ServiceKind - Possible values include: 'ServiceKindBasicServiceDescriptionServiceKindServiceDescription', 'ServiceKindBasicServiceDescriptionServiceKindStateful', 'ServiceKindBasicServiceDescriptionServiceKindStateless' 15000 ServiceKind ServiceKindBasicServiceDescription `json:"ServiceKind,omitempty"` 15001} 15002 15003// MarshalJSON is the custom marshaler for StatelessServiceDescription. 15004func (ssd StatelessServiceDescription) MarshalJSON() ([]byte, error) { 15005 ssd.ServiceKind = ServiceKindBasicServiceDescriptionServiceKindStateless 15006 objectMap := make(map[string]interface{}) 15007 if ssd.InstanceCount != nil { 15008 objectMap["InstanceCount"] = ssd.InstanceCount 15009 } 15010 if ssd.ApplicationName != nil { 15011 objectMap["ApplicationName"] = ssd.ApplicationName 15012 } 15013 if ssd.ServiceName != nil { 15014 objectMap["ServiceName"] = ssd.ServiceName 15015 } 15016 if ssd.ServiceTypeName != nil { 15017 objectMap["ServiceTypeName"] = ssd.ServiceTypeName 15018 } 15019 if ssd.InitializationData != nil { 15020 objectMap["InitializationData"] = ssd.InitializationData 15021 } 15022 objectMap["PartitionDescription"] = ssd.PartitionDescription 15023 if ssd.PlacementConstraints != nil { 15024 objectMap["PlacementConstraints"] = ssd.PlacementConstraints 15025 } 15026 if ssd.CorrelationScheme != nil { 15027 objectMap["CorrelationScheme"] = ssd.CorrelationScheme 15028 } 15029 if ssd.ServiceLoadMetrics != nil { 15030 objectMap["ServiceLoadMetrics"] = ssd.ServiceLoadMetrics 15031 } 15032 if ssd.ServicePlacementPolicies != nil { 15033 objectMap["ServicePlacementPolicies"] = ssd.ServicePlacementPolicies 15034 } 15035 if ssd.DefaultMoveCost != "" { 15036 objectMap["DefaultMoveCost"] = ssd.DefaultMoveCost 15037 } 15038 if ssd.IsDefaultMoveCostSpecified != nil { 15039 objectMap["IsDefaultMoveCostSpecified"] = ssd.IsDefaultMoveCostSpecified 15040 } 15041 if ssd.ServicePackageActivationMode != "" { 15042 objectMap["ServicePackageActivationMode"] = ssd.ServicePackageActivationMode 15043 } 15044 if ssd.ServiceDNSName != nil { 15045 objectMap["ServiceDnsName"] = ssd.ServiceDNSName 15046 } 15047 if ssd.ServiceKind != "" { 15048 objectMap["ServiceKind"] = ssd.ServiceKind 15049 } 15050 return json.Marshal(objectMap) 15051} 15052 15053// AsStatefulServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. 15054func (ssd StatelessServiceDescription) AsStatefulServiceDescription() (*StatefulServiceDescription, bool) { 15055 return nil, false 15056} 15057 15058// AsStatelessServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. 15059func (ssd StatelessServiceDescription) AsStatelessServiceDescription() (*StatelessServiceDescription, bool) { 15060 return &ssd, true 15061} 15062 15063// AsServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. 15064func (ssd StatelessServiceDescription) AsServiceDescription() (*ServiceDescription, bool) { 15065 return nil, false 15066} 15067 15068// AsBasicServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. 15069func (ssd StatelessServiceDescription) AsBasicServiceDescription() (BasicServiceDescription, bool) { 15070 return &ssd, true 15071} 15072 15073// UnmarshalJSON is the custom unmarshaler for StatelessServiceDescription struct. 15074func (ssd *StatelessServiceDescription) UnmarshalJSON(body []byte) error { 15075 var m map[string]*json.RawMessage 15076 err := json.Unmarshal(body, &m) 15077 if err != nil { 15078 return err 15079 } 15080 for k, v := range m { 15081 switch k { 15082 case "InstanceCount": 15083 if v != nil { 15084 var instanceCount int32 15085 err = json.Unmarshal(*v, &instanceCount) 15086 if err != nil { 15087 return err 15088 } 15089 ssd.InstanceCount = &instanceCount 15090 } 15091 case "ApplicationName": 15092 if v != nil { 15093 var applicationName string 15094 err = json.Unmarshal(*v, &applicationName) 15095 if err != nil { 15096 return err 15097 } 15098 ssd.ApplicationName = &applicationName 15099 } 15100 case "ServiceName": 15101 if v != nil { 15102 var serviceName string 15103 err = json.Unmarshal(*v, &serviceName) 15104 if err != nil { 15105 return err 15106 } 15107 ssd.ServiceName = &serviceName 15108 } 15109 case "ServiceTypeName": 15110 if v != nil { 15111 var serviceTypeName string 15112 err = json.Unmarshal(*v, &serviceTypeName) 15113 if err != nil { 15114 return err 15115 } 15116 ssd.ServiceTypeName = &serviceTypeName 15117 } 15118 case "InitializationData": 15119 if v != nil { 15120 var initializationData []int32 15121 err = json.Unmarshal(*v, &initializationData) 15122 if err != nil { 15123 return err 15124 } 15125 ssd.InitializationData = &initializationData 15126 } 15127 case "PartitionDescription": 15128 if v != nil { 15129 partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v) 15130 if err != nil { 15131 return err 15132 } 15133 ssd.PartitionDescription = partitionDescription 15134 } 15135 case "PlacementConstraints": 15136 if v != nil { 15137 var placementConstraints string 15138 err = json.Unmarshal(*v, &placementConstraints) 15139 if err != nil { 15140 return err 15141 } 15142 ssd.PlacementConstraints = &placementConstraints 15143 } 15144 case "CorrelationScheme": 15145 if v != nil { 15146 var correlationScheme []ServiceCorrelationDescription 15147 err = json.Unmarshal(*v, &correlationScheme) 15148 if err != nil { 15149 return err 15150 } 15151 ssd.CorrelationScheme = &correlationScheme 15152 } 15153 case "ServiceLoadMetrics": 15154 if v != nil { 15155 var serviceLoadMetrics []ServiceLoadMetricDescription 15156 err = json.Unmarshal(*v, &serviceLoadMetrics) 15157 if err != nil { 15158 return err 15159 } 15160 ssd.ServiceLoadMetrics = &serviceLoadMetrics 15161 } 15162 case "ServicePlacementPolicies": 15163 if v != nil { 15164 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 15165 if err != nil { 15166 return err 15167 } 15168 ssd.ServicePlacementPolicies = &servicePlacementPolicies 15169 } 15170 case "DefaultMoveCost": 15171 if v != nil { 15172 var defaultMoveCost DefaultMoveCost 15173 err = json.Unmarshal(*v, &defaultMoveCost) 15174 if err != nil { 15175 return err 15176 } 15177 ssd.DefaultMoveCost = defaultMoveCost 15178 } 15179 case "IsDefaultMoveCostSpecified": 15180 if v != nil { 15181 var isDefaultMoveCostSpecified bool 15182 err = json.Unmarshal(*v, &isDefaultMoveCostSpecified) 15183 if err != nil { 15184 return err 15185 } 15186 ssd.IsDefaultMoveCostSpecified = &isDefaultMoveCostSpecified 15187 } 15188 case "ServicePackageActivationMode": 15189 if v != nil { 15190 var servicePackageActivationMode ServicePackageActivationMode1 15191 err = json.Unmarshal(*v, &servicePackageActivationMode) 15192 if err != nil { 15193 return err 15194 } 15195 ssd.ServicePackageActivationMode = servicePackageActivationMode 15196 } 15197 case "ServiceDnsName": 15198 if v != nil { 15199 var serviceDNSName string 15200 err = json.Unmarshal(*v, &serviceDNSName) 15201 if err != nil { 15202 return err 15203 } 15204 ssd.ServiceDNSName = &serviceDNSName 15205 } 15206 case "ServiceKind": 15207 if v != nil { 15208 var serviceKind ServiceKindBasicServiceDescription 15209 err = json.Unmarshal(*v, &serviceKind) 15210 if err != nil { 15211 return err 15212 } 15213 ssd.ServiceKind = serviceKind 15214 } 15215 } 15216 } 15217 15218 return nil 15219} 15220 15221// StatelessServiceInfo information about a stateless Service Fabric service. 15222type StatelessServiceInfo struct { 15223 ID *string `json:"Id,omitempty"` 15224 Name *string `json:"Name,omitempty"` 15225 TypeName *string `json:"TypeName,omitempty"` 15226 // ManifestVersion - The version of the service manifest. 15227 ManifestVersion *string `json:"ManifestVersion,omitempty"` 15228 // HealthState - Possible values include: 'HealthState7Invalid', 'HealthState7Ok', 'HealthState7Warning', 'HealthState7Error', 'HealthState7Unknown' 15229 HealthState HealthState7 `json:"HealthState,omitempty"` 15230 // ServiceStatus - Possible values include: 'ServiceStatusUnknown', 'ServiceStatusActive', 'ServiceStatusUpgrading', 'ServiceStatusDeleting', 'ServiceStatusCreating', 'ServiceStatusFailed' 15231 ServiceStatus ServiceStatus `json:"ServiceStatus,omitempty"` 15232 // IsServiceGroup - Whether the service is in a service group. 15233 IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` 15234 // ServiceKind - Possible values include: 'ServiceKindBasicServiceInfoServiceKindServiceInfo', 'ServiceKindBasicServiceInfoServiceKindStateful', 'ServiceKindBasicServiceInfoServiceKindStateless' 15235 ServiceKind ServiceKindBasicServiceInfo `json:"ServiceKind,omitempty"` 15236} 15237 15238// MarshalJSON is the custom marshaler for StatelessServiceInfo. 15239func (ssi StatelessServiceInfo) MarshalJSON() ([]byte, error) { 15240 ssi.ServiceKind = ServiceKindBasicServiceInfoServiceKindStateless 15241 objectMap := make(map[string]interface{}) 15242 if ssi.ID != nil { 15243 objectMap["Id"] = ssi.ID 15244 } 15245 if ssi.Name != nil { 15246 objectMap["Name"] = ssi.Name 15247 } 15248 if ssi.TypeName != nil { 15249 objectMap["TypeName"] = ssi.TypeName 15250 } 15251 if ssi.ManifestVersion != nil { 15252 objectMap["ManifestVersion"] = ssi.ManifestVersion 15253 } 15254 if ssi.HealthState != "" { 15255 objectMap["HealthState"] = ssi.HealthState 15256 } 15257 if ssi.ServiceStatus != "" { 15258 objectMap["ServiceStatus"] = ssi.ServiceStatus 15259 } 15260 if ssi.IsServiceGroup != nil { 15261 objectMap["IsServiceGroup"] = ssi.IsServiceGroup 15262 } 15263 if ssi.ServiceKind != "" { 15264 objectMap["ServiceKind"] = ssi.ServiceKind 15265 } 15266 return json.Marshal(objectMap) 15267} 15268 15269// AsStatefulServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. 15270func (ssi StatelessServiceInfo) AsStatefulServiceInfo() (*StatefulServiceInfo, bool) { 15271 return nil, false 15272} 15273 15274// AsStatelessServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. 15275func (ssi StatelessServiceInfo) AsStatelessServiceInfo() (*StatelessServiceInfo, bool) { 15276 return &ssi, true 15277} 15278 15279// AsServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. 15280func (ssi StatelessServiceInfo) AsServiceInfo() (*ServiceInfo, bool) { 15281 return nil, false 15282} 15283 15284// AsBasicServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. 15285func (ssi StatelessServiceInfo) AsBasicServiceInfo() (BasicServiceInfo, bool) { 15286 return &ssi, true 15287} 15288 15289// StatelessServiceInstanceHealth represents the health of the statelss service instance. 15290// Contains the instance aggregated health state, the health events and the unhealthy evaluations. 15291type StatelessServiceInstanceHealth struct { 15292 InstanceID *string `json:"InstanceId,omitempty"` 15293 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 15294 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthServiceKindReplicaHealth', 'ServiceKindBasicReplicaHealthServiceKindStateful', 'ServiceKindBasicReplicaHealthServiceKindStateless' 15295 ServiceKind ServiceKindBasicReplicaHealth `json:"ServiceKind,omitempty"` 15296 // AggregatedHealthState - Possible values include: 'AggregatedHealthState1Invalid', 'AggregatedHealthState1Ok', 'AggregatedHealthState1Warning', 'AggregatedHealthState1Error', 'AggregatedHealthState1Unknown' 15297 AggregatedHealthState AggregatedHealthState1 `json:"AggregatedHealthState,omitempty"` 15298 // HealthEvents - The list of health events reported on the entity. 15299 HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` 15300 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 15301 HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` 15302} 15303 15304// MarshalJSON is the custom marshaler for StatelessServiceInstanceHealth. 15305func (ssih StatelessServiceInstanceHealth) MarshalJSON() ([]byte, error) { 15306 ssih.ServiceKind = ServiceKindBasicReplicaHealthServiceKindStateless 15307 objectMap := make(map[string]interface{}) 15308 if ssih.InstanceID != nil { 15309 objectMap["InstanceId"] = ssih.InstanceID 15310 } 15311 if ssih.PartitionID != nil { 15312 objectMap["PartitionId"] = ssih.PartitionID 15313 } 15314 if ssih.ServiceKind != "" { 15315 objectMap["ServiceKind"] = ssih.ServiceKind 15316 } 15317 if ssih.AggregatedHealthState != "" { 15318 objectMap["AggregatedHealthState"] = ssih.AggregatedHealthState 15319 } 15320 if ssih.HealthEvents != nil { 15321 objectMap["HealthEvents"] = ssih.HealthEvents 15322 } 15323 if ssih.UnhealthyEvaluations != nil { 15324 objectMap["UnhealthyEvaluations"] = ssih.UnhealthyEvaluations 15325 } 15326 if ssih.HealthStatistics != nil { 15327 objectMap["HealthStatistics"] = ssih.HealthStatistics 15328 } 15329 return json.Marshal(objectMap) 15330} 15331 15332// AsStatefulServiceReplicaHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. 15333func (ssih StatelessServiceInstanceHealth) AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) { 15334 return nil, false 15335} 15336 15337// AsStatelessServiceInstanceHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. 15338func (ssih StatelessServiceInstanceHealth) AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) { 15339 return &ssih, true 15340} 15341 15342// AsReplicaHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. 15343func (ssih StatelessServiceInstanceHealth) AsReplicaHealth() (*ReplicaHealth, bool) { 15344 return nil, false 15345} 15346 15347// AsBasicReplicaHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. 15348func (ssih StatelessServiceInstanceHealth) AsBasicReplicaHealth() (BasicReplicaHealth, bool) { 15349 return &ssih, true 15350} 15351 15352// StatelessServiceInstanceHealthState represents the health state of the stateless service instance, which 15353// contains the instance id and the aggregated health state. 15354type StatelessServiceInstanceHealthState struct { 15355 ReplicaID *string `json:"ReplicaId,omitempty"` 15356 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 15357 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState', 'ServiceKindBasicReplicaHealthStateServiceKindStateful', 'ServiceKindBasicReplicaHealthStateServiceKindStateless' 15358 ServiceKind ServiceKindBasicReplicaHealthState `json:"ServiceKind,omitempty"` 15359 // AggregatedHealthState - Possible values include: 'AggregatedHealthState2Invalid', 'AggregatedHealthState2Ok', 'AggregatedHealthState2Warning', 'AggregatedHealthState2Error', 'AggregatedHealthState2Unknown' 15360 AggregatedHealthState AggregatedHealthState2 `json:"AggregatedHealthState,omitempty"` 15361} 15362 15363// MarshalJSON is the custom marshaler for StatelessServiceInstanceHealthState. 15364func (ssihs StatelessServiceInstanceHealthState) MarshalJSON() ([]byte, error) { 15365 ssihs.ServiceKind = ServiceKindBasicReplicaHealthStateServiceKindStateless 15366 objectMap := make(map[string]interface{}) 15367 if ssihs.ReplicaID != nil { 15368 objectMap["ReplicaId"] = ssihs.ReplicaID 15369 } 15370 if ssihs.PartitionID != nil { 15371 objectMap["PartitionId"] = ssihs.PartitionID 15372 } 15373 if ssihs.ServiceKind != "" { 15374 objectMap["ServiceKind"] = ssihs.ServiceKind 15375 } 15376 if ssihs.AggregatedHealthState != "" { 15377 objectMap["AggregatedHealthState"] = ssihs.AggregatedHealthState 15378 } 15379 return json.Marshal(objectMap) 15380} 15381 15382// AsStatefulServiceReplicaHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. 15383func (ssihs StatelessServiceInstanceHealthState) AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) { 15384 return nil, false 15385} 15386 15387// AsStatelessServiceInstanceHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. 15388func (ssihs StatelessServiceInstanceHealthState) AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) { 15389 return &ssihs, true 15390} 15391 15392// AsReplicaHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. 15393func (ssihs StatelessServiceInstanceHealthState) AsReplicaHealthState() (*ReplicaHealthState, bool) { 15394 return nil, false 15395} 15396 15397// AsBasicReplicaHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. 15398func (ssihs StatelessServiceInstanceHealthState) AsBasicReplicaHealthState() (BasicReplicaHealthState, bool) { 15399 return &ssihs, true 15400} 15401 15402// StatelessServiceInstanceInfo represents a stateless service instance. This includes information about the 15403// identity, status, health, node name, uptime, and other details about the instance. 15404type StatelessServiceInstanceInfo struct { 15405 InstanceID *string `json:"InstanceId,omitempty"` 15406 // ReplicaStatus - Possible values include: 'ReplicaStatus1Invalid', 'ReplicaStatus1InBuild', 'ReplicaStatus1Standby', 'ReplicaStatus1Ready', 'ReplicaStatus1Down', 'ReplicaStatus1Dropped' 15407 ReplicaStatus ReplicaStatus1 `json:"ReplicaStatus,omitempty"` 15408 // HealthState - Possible values include: 'HealthState6Invalid', 'HealthState6Ok', 'HealthState6Warning', 'HealthState6Error', 'HealthState6Unknown' 15409 HealthState HealthState6 `json:"HealthState,omitempty"` 15410 NodeName *string `json:"NodeName,omitempty"` 15411 // Address - The address the replica is listening on. 15412 Address *string `json:"Address,omitempty"` 15413 // LastInBuildDurationInSeconds - The last in build duration of the replica in seconds. 15414 LastInBuildDurationInSeconds *string `json:"LastInBuildDurationInSeconds,omitempty"` 15415 // ServiceKind - Possible values include: 'ServiceKindBasicReplicaInfoServiceKindReplicaInfo', 'ServiceKindBasicReplicaInfoServiceKindStateful', 'ServiceKindBasicReplicaInfoServiceKindStateless' 15416 ServiceKind ServiceKindBasicReplicaInfo `json:"ServiceKind,omitempty"` 15417} 15418 15419// MarshalJSON is the custom marshaler for StatelessServiceInstanceInfo. 15420func (ssii StatelessServiceInstanceInfo) MarshalJSON() ([]byte, error) { 15421 ssii.ServiceKind = ServiceKindBasicReplicaInfoServiceKindStateless 15422 objectMap := make(map[string]interface{}) 15423 if ssii.InstanceID != nil { 15424 objectMap["InstanceId"] = ssii.InstanceID 15425 } 15426 if ssii.ReplicaStatus != "" { 15427 objectMap["ReplicaStatus"] = ssii.ReplicaStatus 15428 } 15429 if ssii.HealthState != "" { 15430 objectMap["HealthState"] = ssii.HealthState 15431 } 15432 if ssii.NodeName != nil { 15433 objectMap["NodeName"] = ssii.NodeName 15434 } 15435 if ssii.Address != nil { 15436 objectMap["Address"] = ssii.Address 15437 } 15438 if ssii.LastInBuildDurationInSeconds != nil { 15439 objectMap["LastInBuildDurationInSeconds"] = ssii.LastInBuildDurationInSeconds 15440 } 15441 if ssii.ServiceKind != "" { 15442 objectMap["ServiceKind"] = ssii.ServiceKind 15443 } 15444 return json.Marshal(objectMap) 15445} 15446 15447// AsStatefulServiceReplicaInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. 15448func (ssii StatelessServiceInstanceInfo) AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) { 15449 return nil, false 15450} 15451 15452// AsStatelessServiceInstanceInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. 15453func (ssii StatelessServiceInstanceInfo) AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) { 15454 return &ssii, true 15455} 15456 15457// AsReplicaInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. 15458func (ssii StatelessServiceInstanceInfo) AsReplicaInfo() (*ReplicaInfo, bool) { 15459 return nil, false 15460} 15461 15462// AsBasicReplicaInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. 15463func (ssii StatelessServiceInstanceInfo) AsBasicReplicaInfo() (BasicReplicaInfo, bool) { 15464 return &ssii, true 15465} 15466 15467// StatelessServicePartitionInfo information about a partition of a stateless Service Fabric service. 15468type StatelessServicePartitionInfo struct { 15469 // InstanceCount - Number of instances of this partition. 15470 InstanceCount *int64 `json:"InstanceCount,omitempty"` 15471 // HealthState - Possible values include: 'HealthState5Invalid', 'HealthState5Ok', 'HealthState5Warning', 'HealthState5Error', 'HealthState5Unknown' 15472 HealthState HealthState5 `json:"HealthState,omitempty"` 15473 // PartitionStatus - Possible values include: 'PartitionStatusInvalid', 'PartitionStatusReady', 'PartitionStatusNotReady', 'PartitionStatusInQuorumLoss', 'PartitionStatusReconfiguring', 'PartitionStatusDeleting' 15474 PartitionStatus PartitionStatus `json:"PartitionStatus,omitempty"` 15475 PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` 15476 // ServiceKind - Possible values include: 'ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo', 'ServiceKindBasicServicePartitionInfoServiceKindStateful', 'ServiceKindBasicServicePartitionInfoServiceKindStateless' 15477 ServiceKind ServiceKindBasicServicePartitionInfo `json:"ServiceKind,omitempty"` 15478} 15479 15480// MarshalJSON is the custom marshaler for StatelessServicePartitionInfo. 15481func (sspi StatelessServicePartitionInfo) MarshalJSON() ([]byte, error) { 15482 sspi.ServiceKind = ServiceKindBasicServicePartitionInfoServiceKindStateless 15483 objectMap := make(map[string]interface{}) 15484 if sspi.InstanceCount != nil { 15485 objectMap["InstanceCount"] = sspi.InstanceCount 15486 } 15487 if sspi.HealthState != "" { 15488 objectMap["HealthState"] = sspi.HealthState 15489 } 15490 if sspi.PartitionStatus != "" { 15491 objectMap["PartitionStatus"] = sspi.PartitionStatus 15492 } 15493 objectMap["PartitionInformation"] = sspi.PartitionInformation 15494 if sspi.ServiceKind != "" { 15495 objectMap["ServiceKind"] = sspi.ServiceKind 15496 } 15497 return json.Marshal(objectMap) 15498} 15499 15500// AsStatefulServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. 15501func (sspi StatelessServicePartitionInfo) AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) { 15502 return nil, false 15503} 15504 15505// AsStatelessServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. 15506func (sspi StatelessServicePartitionInfo) AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) { 15507 return &sspi, true 15508} 15509 15510// AsServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. 15511func (sspi StatelessServicePartitionInfo) AsServicePartitionInfo() (*ServicePartitionInfo, bool) { 15512 return nil, false 15513} 15514 15515// AsBasicServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. 15516func (sspi StatelessServicePartitionInfo) AsBasicServicePartitionInfo() (BasicServicePartitionInfo, bool) { 15517 return &sspi, true 15518} 15519 15520// UnmarshalJSON is the custom unmarshaler for StatelessServicePartitionInfo struct. 15521func (sspi *StatelessServicePartitionInfo) UnmarshalJSON(body []byte) error { 15522 var m map[string]*json.RawMessage 15523 err := json.Unmarshal(body, &m) 15524 if err != nil { 15525 return err 15526 } 15527 for k, v := range m { 15528 switch k { 15529 case "InstanceCount": 15530 if v != nil { 15531 var instanceCount int64 15532 err = json.Unmarshal(*v, &instanceCount) 15533 if err != nil { 15534 return err 15535 } 15536 sspi.InstanceCount = &instanceCount 15537 } 15538 case "HealthState": 15539 if v != nil { 15540 var healthState HealthState5 15541 err = json.Unmarshal(*v, &healthState) 15542 if err != nil { 15543 return err 15544 } 15545 sspi.HealthState = healthState 15546 } 15547 case "PartitionStatus": 15548 if v != nil { 15549 var partitionStatus PartitionStatus 15550 err = json.Unmarshal(*v, &partitionStatus) 15551 if err != nil { 15552 return err 15553 } 15554 sspi.PartitionStatus = partitionStatus 15555 } 15556 case "PartitionInformation": 15557 if v != nil { 15558 partitionInformation, err := unmarshalBasicPartitionInformation(*v) 15559 if err != nil { 15560 return err 15561 } 15562 sspi.PartitionInformation = partitionInformation 15563 } 15564 case "ServiceKind": 15565 if v != nil { 15566 var serviceKind ServiceKindBasicServicePartitionInfo 15567 err = json.Unmarshal(*v, &serviceKind) 15568 if err != nil { 15569 return err 15570 } 15571 sspi.ServiceKind = serviceKind 15572 } 15573 } 15574 } 15575 15576 return nil 15577} 15578 15579// StatelessServiceTypeDescription describes a stateless service type defined in the service manifest of a 15580// provisioned application type. 15581type StatelessServiceTypeDescription struct { 15582 // UseImplicitHost - A flag indicating if this type is not implemented and hosted by a user service process, but is implicitly hosted by a system created process. This value is true for services using the guest executable services, false otherwise. 15583 UseImplicitHost *bool `json:"UseImplicitHost,omitempty"` 15584 // IsStateful - Indicates whether the service type is a stateful service type or a stateless service type. This property is true if the service type is a stateful service type, false otherwise. 15585 IsStateful *bool `json:"IsStateful,omitempty"` 15586 ServiceTypeName *string `json:"ServiceTypeName,omitempty"` 15587 // PlacementConstraints - The placement constraint to be used when instantiating this service in a Service Fabric cluster. 15588 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 15589 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 15590 Extensions *[]ServiceTypeExtensionDescription `json:"Extensions,omitempty"` 15591 // Kind - Possible values include: 'KindServiceTypeDescription', 'KindStateful', 'KindStateless1' 15592 Kind KindBasicServiceTypeDescription `json:"Kind,omitempty"` 15593} 15594 15595// MarshalJSON is the custom marshaler for StatelessServiceTypeDescription. 15596func (sstd StatelessServiceTypeDescription) MarshalJSON() ([]byte, error) { 15597 sstd.Kind = KindStateless1 15598 objectMap := make(map[string]interface{}) 15599 if sstd.UseImplicitHost != nil { 15600 objectMap["UseImplicitHost"] = sstd.UseImplicitHost 15601 } 15602 if sstd.IsStateful != nil { 15603 objectMap["IsStateful"] = sstd.IsStateful 15604 } 15605 if sstd.ServiceTypeName != nil { 15606 objectMap["ServiceTypeName"] = sstd.ServiceTypeName 15607 } 15608 if sstd.PlacementConstraints != nil { 15609 objectMap["PlacementConstraints"] = sstd.PlacementConstraints 15610 } 15611 if sstd.ServicePlacementPolicies != nil { 15612 objectMap["ServicePlacementPolicies"] = sstd.ServicePlacementPolicies 15613 } 15614 if sstd.Extensions != nil { 15615 objectMap["Extensions"] = sstd.Extensions 15616 } 15617 if sstd.Kind != "" { 15618 objectMap["Kind"] = sstd.Kind 15619 } 15620 return json.Marshal(objectMap) 15621} 15622 15623// AsStatefulServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. 15624func (sstd StatelessServiceTypeDescription) AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) { 15625 return nil, false 15626} 15627 15628// AsStatelessServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. 15629func (sstd StatelessServiceTypeDescription) AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) { 15630 return &sstd, true 15631} 15632 15633// AsServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. 15634func (sstd StatelessServiceTypeDescription) AsServiceTypeDescription() (*ServiceTypeDescription, bool) { 15635 return nil, false 15636} 15637 15638// AsBasicServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. 15639func (sstd StatelessServiceTypeDescription) AsBasicServiceTypeDescription() (BasicServiceTypeDescription, bool) { 15640 return &sstd, true 15641} 15642 15643// UnmarshalJSON is the custom unmarshaler for StatelessServiceTypeDescription struct. 15644func (sstd *StatelessServiceTypeDescription) UnmarshalJSON(body []byte) error { 15645 var m map[string]*json.RawMessage 15646 err := json.Unmarshal(body, &m) 15647 if err != nil { 15648 return err 15649 } 15650 for k, v := range m { 15651 switch k { 15652 case "UseImplicitHost": 15653 if v != nil { 15654 var useImplicitHost bool 15655 err = json.Unmarshal(*v, &useImplicitHost) 15656 if err != nil { 15657 return err 15658 } 15659 sstd.UseImplicitHost = &useImplicitHost 15660 } 15661 case "IsStateful": 15662 if v != nil { 15663 var isStateful bool 15664 err = json.Unmarshal(*v, &isStateful) 15665 if err != nil { 15666 return err 15667 } 15668 sstd.IsStateful = &isStateful 15669 } 15670 case "ServiceTypeName": 15671 if v != nil { 15672 var serviceTypeName string 15673 err = json.Unmarshal(*v, &serviceTypeName) 15674 if err != nil { 15675 return err 15676 } 15677 sstd.ServiceTypeName = &serviceTypeName 15678 } 15679 case "PlacementConstraints": 15680 if v != nil { 15681 var placementConstraints string 15682 err = json.Unmarshal(*v, &placementConstraints) 15683 if err != nil { 15684 return err 15685 } 15686 sstd.PlacementConstraints = &placementConstraints 15687 } 15688 case "ServicePlacementPolicies": 15689 if v != nil { 15690 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 15691 if err != nil { 15692 return err 15693 } 15694 sstd.ServicePlacementPolicies = &servicePlacementPolicies 15695 } 15696 case "Extensions": 15697 if v != nil { 15698 var extensions []ServiceTypeExtensionDescription 15699 err = json.Unmarshal(*v, &extensions) 15700 if err != nil { 15701 return err 15702 } 15703 sstd.Extensions = &extensions 15704 } 15705 case "Kind": 15706 if v != nil { 15707 var kind KindBasicServiceTypeDescription 15708 err = json.Unmarshal(*v, &kind) 15709 if err != nil { 15710 return err 15711 } 15712 sstd.Kind = kind 15713 } 15714 } 15715 } 15716 15717 return nil 15718} 15719 15720// StatelessServiceUpdateDescription describes an update for a stateless service. 15721type StatelessServiceUpdateDescription struct { 15722 // InstanceCount - The instance count. 15723 InstanceCount *int32 `json:"InstanceCount,omitempty"` 15724 // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. 15725 // This property can be a combination of those flags obtained using bitwise 'OR' operator. 15726 // For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. 15727 // - None - Does not indicate any other properties are set. The value is zero. 15728 // - TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property (for Stateful services) or the InstanceCount property (for Stateless services) is set. The value is 1. 15729 // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 2. 15730 // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 4. 15731 // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 8. 15732 // - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. 15733 // - PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. 15734 // - PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is 64. 15735 // - Correlation - Indicates the CorrelationScheme property is set. The value is 128. 15736 // - Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. 15737 // - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. 15738 Flags *string `json:"Flags,omitempty"` 15739 // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". 15740 PlacementConstraints *string `json:"PlacementConstraints,omitempty"` 15741 CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` 15742 LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` 15743 ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` 15744 // DefaultMoveCost - Possible values include: 'DefaultMoveCost1Zero', 'DefaultMoveCost1Low', 'DefaultMoveCost1Medium', 'DefaultMoveCost1High' 15745 DefaultMoveCost DefaultMoveCost1 `json:"DefaultMoveCost,omitempty"` 15746 // ServiceKind - Possible values include: 'ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateful', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateless' 15747 ServiceKind ServiceKindBasicServiceUpdateDescription `json:"ServiceKind,omitempty"` 15748} 15749 15750// MarshalJSON is the custom marshaler for StatelessServiceUpdateDescription. 15751func (ssud StatelessServiceUpdateDescription) MarshalJSON() ([]byte, error) { 15752 ssud.ServiceKind = ServiceKindBasicServiceUpdateDescriptionServiceKindStateless 15753 objectMap := make(map[string]interface{}) 15754 if ssud.InstanceCount != nil { 15755 objectMap["InstanceCount"] = ssud.InstanceCount 15756 } 15757 if ssud.Flags != nil { 15758 objectMap["Flags"] = ssud.Flags 15759 } 15760 if ssud.PlacementConstraints != nil { 15761 objectMap["PlacementConstraints"] = ssud.PlacementConstraints 15762 } 15763 if ssud.CorrelationScheme != nil { 15764 objectMap["CorrelationScheme"] = ssud.CorrelationScheme 15765 } 15766 if ssud.LoadMetrics != nil { 15767 objectMap["LoadMetrics"] = ssud.LoadMetrics 15768 } 15769 if ssud.ServicePlacementPolicies != nil { 15770 objectMap["ServicePlacementPolicies"] = ssud.ServicePlacementPolicies 15771 } 15772 if ssud.DefaultMoveCost != "" { 15773 objectMap["DefaultMoveCost"] = ssud.DefaultMoveCost 15774 } 15775 if ssud.ServiceKind != "" { 15776 objectMap["ServiceKind"] = ssud.ServiceKind 15777 } 15778 return json.Marshal(objectMap) 15779} 15780 15781// AsStatefulServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. 15782func (ssud StatelessServiceUpdateDescription) AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) { 15783 return nil, false 15784} 15785 15786// AsStatelessServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. 15787func (ssud StatelessServiceUpdateDescription) AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) { 15788 return &ssud, true 15789} 15790 15791// AsServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. 15792func (ssud StatelessServiceUpdateDescription) AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) { 15793 return nil, false 15794} 15795 15796// AsBasicServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. 15797func (ssud StatelessServiceUpdateDescription) AsBasicServiceUpdateDescription() (BasicServiceUpdateDescription, bool) { 15798 return &ssud, true 15799} 15800 15801// UnmarshalJSON is the custom unmarshaler for StatelessServiceUpdateDescription struct. 15802func (ssud *StatelessServiceUpdateDescription) UnmarshalJSON(body []byte) error { 15803 var m map[string]*json.RawMessage 15804 err := json.Unmarshal(body, &m) 15805 if err != nil { 15806 return err 15807 } 15808 for k, v := range m { 15809 switch k { 15810 case "InstanceCount": 15811 if v != nil { 15812 var instanceCount int32 15813 err = json.Unmarshal(*v, &instanceCount) 15814 if err != nil { 15815 return err 15816 } 15817 ssud.InstanceCount = &instanceCount 15818 } 15819 case "Flags": 15820 if v != nil { 15821 var flags string 15822 err = json.Unmarshal(*v, &flags) 15823 if err != nil { 15824 return err 15825 } 15826 ssud.Flags = &flags 15827 } 15828 case "PlacementConstraints": 15829 if v != nil { 15830 var placementConstraints string 15831 err = json.Unmarshal(*v, &placementConstraints) 15832 if err != nil { 15833 return err 15834 } 15835 ssud.PlacementConstraints = &placementConstraints 15836 } 15837 case "CorrelationScheme": 15838 if v != nil { 15839 var correlationScheme []ServiceCorrelationDescription 15840 err = json.Unmarshal(*v, &correlationScheme) 15841 if err != nil { 15842 return err 15843 } 15844 ssud.CorrelationScheme = &correlationScheme 15845 } 15846 case "LoadMetrics": 15847 if v != nil { 15848 var loadMetrics []ServiceLoadMetricDescription 15849 err = json.Unmarshal(*v, &loadMetrics) 15850 if err != nil { 15851 return err 15852 } 15853 ssud.LoadMetrics = &loadMetrics 15854 } 15855 case "ServicePlacementPolicies": 15856 if v != nil { 15857 servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) 15858 if err != nil { 15859 return err 15860 } 15861 ssud.ServicePlacementPolicies = &servicePlacementPolicies 15862 } 15863 case "DefaultMoveCost": 15864 if v != nil { 15865 var defaultMoveCost DefaultMoveCost1 15866 err = json.Unmarshal(*v, &defaultMoveCost) 15867 if err != nil { 15868 return err 15869 } 15870 ssud.DefaultMoveCost = defaultMoveCost 15871 } 15872 case "ServiceKind": 15873 if v != nil { 15874 var serviceKind ServiceKindBasicServiceUpdateDescription 15875 err = json.Unmarshal(*v, &serviceKind) 15876 if err != nil { 15877 return err 15878 } 15879 ssud.ServiceKind = serviceKind 15880 } 15881 } 15882 } 15883 15884 return nil 15885} 15886 15887// StoppedChaosEvent describes a Chaos event that gets generated when Chaos stops because either the user issued a 15888// stop or the time to run was up. 15889type StoppedChaosEvent struct { 15890 Reason *string `json:"Reason,omitempty"` 15891 TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` 15892 // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' 15893 Kind KindBasicChaosEvent `json:"Kind,omitempty"` 15894} 15895 15896// MarshalJSON is the custom marshaler for StoppedChaosEvent. 15897func (sce StoppedChaosEvent) MarshalJSON() ([]byte, error) { 15898 sce.Kind = KindStopped 15899 objectMap := make(map[string]interface{}) 15900 if sce.Reason != nil { 15901 objectMap["Reason"] = sce.Reason 15902 } 15903 if sce.TimeStampUtc != nil { 15904 objectMap["TimeStampUtc"] = sce.TimeStampUtc 15905 } 15906 if sce.Kind != "" { 15907 objectMap["Kind"] = sce.Kind 15908 } 15909 return json.Marshal(objectMap) 15910} 15911 15912// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15913func (sce StoppedChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { 15914 return nil, false 15915} 15916 15917// AsStartedChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15918func (sce StoppedChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { 15919 return nil, false 15920} 15921 15922// AsStoppedChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15923func (sce StoppedChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { 15924 return &sce, true 15925} 15926 15927// AsTestErrorChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15928func (sce StoppedChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { 15929 return nil, false 15930} 15931 15932// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15933func (sce StoppedChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { 15934 return nil, false 15935} 15936 15937// AsWaitingChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15938func (sce StoppedChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { 15939 return nil, false 15940} 15941 15942// AsChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15943func (sce StoppedChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { 15944 return nil, false 15945} 15946 15947// AsBasicChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. 15948func (sce StoppedChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { 15949 return &sce, true 15950} 15951 15952// String ... 15953type String struct { 15954 autorest.Response `json:"-"` 15955 Value *string `json:"value,omitempty"` 15956} 15957 15958// StringPropertyValue describes a Service Fabric property value of type String. 15959type StringPropertyValue struct { 15960 // Data - The data of the property value. 15961 Data *string `json:"Data,omitempty"` 15962 // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' 15963 Kind KindBasicPropertyValue `json:"Kind,omitempty"` 15964} 15965 15966// MarshalJSON is the custom marshaler for StringPropertyValue. 15967func (spv StringPropertyValue) MarshalJSON() ([]byte, error) { 15968 spv.Kind = KindString 15969 objectMap := make(map[string]interface{}) 15970 if spv.Data != nil { 15971 objectMap["Data"] = spv.Data 15972 } 15973 if spv.Kind != "" { 15974 objectMap["Kind"] = spv.Kind 15975 } 15976 return json.Marshal(objectMap) 15977} 15978 15979// AsBinaryPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. 15980func (spv StringPropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { 15981 return nil, false 15982} 15983 15984// AsInt64PropertyValue is the BasicPropertyValue implementation for StringPropertyValue. 15985func (spv StringPropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { 15986 return nil, false 15987} 15988 15989// AsDoublePropertyValue is the BasicPropertyValue implementation for StringPropertyValue. 15990func (spv StringPropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { 15991 return nil, false 15992} 15993 15994// AsStringPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. 15995func (spv StringPropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { 15996 return &spv, true 15997} 15998 15999// AsGUIDPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. 16000func (spv StringPropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { 16001 return nil, false 16002} 16003 16004// AsPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. 16005func (spv StringPropertyValue) AsPropertyValue() (*PropertyValue, bool) { 16006 return nil, false 16007} 16008 16009// AsBasicPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. 16010func (spv StringPropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { 16011 return &spv, true 16012} 16013 16014// SuccessfulPropertyBatchInfo derived from PropertyBatchInfo. Represents the property batch succeeding. Contains 16015// the results of any "Get" operations in the batch. 16016type SuccessfulPropertyBatchInfo struct { 16017 // Properties - A map containing the properties that were requested through any "Get" property batch operations. The key represents the index of the "Get" operation in the original request, in string form. The value is the property. If a property is not found, it will not be in the map. 16018 Properties map[string]*PropertyInfo `json:"Properties"` 16019 // Kind - Possible values include: 'KindPropertyBatchInfo', 'KindSuccessful', 'KindFailed' 16020 Kind KindBasicPropertyBatchInfo `json:"Kind,omitempty"` 16021} 16022 16023// MarshalJSON is the custom marshaler for SuccessfulPropertyBatchInfo. 16024func (spbi SuccessfulPropertyBatchInfo) MarshalJSON() ([]byte, error) { 16025 spbi.Kind = KindSuccessful 16026 objectMap := make(map[string]interface{}) 16027 if spbi.Properties != nil { 16028 objectMap["Properties"] = spbi.Properties 16029 } 16030 if spbi.Kind != "" { 16031 objectMap["Kind"] = spbi.Kind 16032 } 16033 return json.Marshal(objectMap) 16034} 16035 16036// AsSuccessfulPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. 16037func (spbi SuccessfulPropertyBatchInfo) AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) { 16038 return &spbi, true 16039} 16040 16041// AsFailedPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. 16042func (spbi SuccessfulPropertyBatchInfo) AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) { 16043 return nil, false 16044} 16045 16046// AsPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. 16047func (spbi SuccessfulPropertyBatchInfo) AsPropertyBatchInfo() (*PropertyBatchInfo, bool) { 16048 return nil, false 16049} 16050 16051// AsBasicPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. 16052func (spbi SuccessfulPropertyBatchInfo) AsBasicPropertyBatchInfo() (BasicPropertyBatchInfo, bool) { 16053 return &spbi, true 16054} 16055 16056// SystemApplicationHealthEvaluation represents health evaluation for the fabric:/System application, containing 16057// information about the data and the algorithm used by health store to evaluate health. The evaluation is returned 16058// only when the aggregated health state of the cluster is either Error or Warning. 16059type SystemApplicationHealthEvaluation struct { 16060 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 16061 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 16062 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 16063 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 16064 Description *string `json:"Description,omitempty"` 16065 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 16066 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 16067} 16068 16069// MarshalJSON is the custom marshaler for SystemApplicationHealthEvaluation. 16070func (sahe SystemApplicationHealthEvaluation) MarshalJSON() ([]byte, error) { 16071 sahe.Kind = KindSystemApplication 16072 objectMap := make(map[string]interface{}) 16073 if sahe.UnhealthyEvaluations != nil { 16074 objectMap["UnhealthyEvaluations"] = sahe.UnhealthyEvaluations 16075 } 16076 if sahe.AggregatedHealthState != "" { 16077 objectMap["AggregatedHealthState"] = sahe.AggregatedHealthState 16078 } 16079 if sahe.Description != nil { 16080 objectMap["Description"] = sahe.Description 16081 } 16082 if sahe.Kind != "" { 16083 objectMap["Kind"] = sahe.Kind 16084 } 16085 return json.Marshal(objectMap) 16086} 16087 16088// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16089func (sahe SystemApplicationHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 16090 return nil, false 16091} 16092 16093// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16094func (sahe SystemApplicationHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 16095 return nil, false 16096} 16097 16098// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16099func (sahe SystemApplicationHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 16100 return nil, false 16101} 16102 16103// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16104func (sahe SystemApplicationHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 16105 return nil, false 16106} 16107 16108// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16109func (sahe SystemApplicationHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 16110 return nil, false 16111} 16112 16113// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16114func (sahe SystemApplicationHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 16115 return nil, false 16116} 16117 16118// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16119func (sahe SystemApplicationHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 16120 return nil, false 16121} 16122 16123// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16124func (sahe SystemApplicationHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 16125 return nil, false 16126} 16127 16128// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16129func (sahe SystemApplicationHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 16130 return nil, false 16131} 16132 16133// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16134func (sahe SystemApplicationHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 16135 return nil, false 16136} 16137 16138// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16139func (sahe SystemApplicationHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 16140 return nil, false 16141} 16142 16143// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16144func (sahe SystemApplicationHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 16145 return nil, false 16146} 16147 16148// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16149func (sahe SystemApplicationHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 16150 return nil, false 16151} 16152 16153// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16154func (sahe SystemApplicationHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 16155 return nil, false 16156} 16157 16158// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16159func (sahe SystemApplicationHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 16160 return nil, false 16161} 16162 16163// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16164func (sahe SystemApplicationHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 16165 return nil, false 16166} 16167 16168// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16169func (sahe SystemApplicationHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 16170 return nil, false 16171} 16172 16173// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16174func (sahe SystemApplicationHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 16175 return &sahe, true 16176} 16177 16178// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16179func (sahe SystemApplicationHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 16180 return nil, false 16181} 16182 16183// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16184func (sahe SystemApplicationHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 16185 return nil, false 16186} 16187 16188// AsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16189func (sahe SystemApplicationHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 16190 return nil, false 16191} 16192 16193// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. 16194func (sahe SystemApplicationHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 16195 return &sahe, true 16196} 16197 16198// TestErrorChaosEvent describes a Chaos event that gets generated when an unexpected event occurs in the Chaos 16199// engine. 16200// For example, due to the cluster snapshot being inconsistent, while faulting a faultable entity, Chaos found that 16201// the entity was alreay faulted -- which would be an unexpected event. 16202type TestErrorChaosEvent struct { 16203 Reason *string `json:"Reason,omitempty"` 16204 TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` 16205 // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' 16206 Kind KindBasicChaosEvent `json:"Kind,omitempty"` 16207} 16208 16209// MarshalJSON is the custom marshaler for TestErrorChaosEvent. 16210func (tece TestErrorChaosEvent) MarshalJSON() ([]byte, error) { 16211 tece.Kind = KindTestError 16212 objectMap := make(map[string]interface{}) 16213 if tece.Reason != nil { 16214 objectMap["Reason"] = tece.Reason 16215 } 16216 if tece.TimeStampUtc != nil { 16217 objectMap["TimeStampUtc"] = tece.TimeStampUtc 16218 } 16219 if tece.Kind != "" { 16220 objectMap["Kind"] = tece.Kind 16221 } 16222 return json.Marshal(objectMap) 16223} 16224 16225// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16226func (tece TestErrorChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { 16227 return nil, false 16228} 16229 16230// AsStartedChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16231func (tece TestErrorChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { 16232 return nil, false 16233} 16234 16235// AsStoppedChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16236func (tece TestErrorChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { 16237 return nil, false 16238} 16239 16240// AsTestErrorChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16241func (tece TestErrorChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { 16242 return &tece, true 16243} 16244 16245// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16246func (tece TestErrorChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { 16247 return nil, false 16248} 16249 16250// AsWaitingChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16251func (tece TestErrorChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { 16252 return nil, false 16253} 16254 16255// AsChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16256func (tece TestErrorChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { 16257 return nil, false 16258} 16259 16260// AsBasicChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. 16261func (tece TestErrorChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { 16262 return &tece, true 16263} 16264 16265// UniformInt64RangePartitionSchemeDescription describes a partitioning scheme where an integer range is allocated 16266// evenly across a number of partitions. 16267type UniformInt64RangePartitionSchemeDescription struct { 16268 // Count - The number of partitions. 16269 Count *int32 `json:"Count,omitempty"` 16270 // LowKey - String indicating the lower bound of the partition key range that 16271 // should be split between the partition ‘Count’ 16272 LowKey *string `json:"LowKey,omitempty"` 16273 // HighKey - String indicating the upper bound of the partition key range that 16274 // should be split between the partition ‘Count’ 16275 HighKey *string `json:"HighKey,omitempty"` 16276 // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed', 'PartitionSchemeSingleton', 'PartitionSchemeUniformInt64Range' 16277 PartitionScheme PartitionScheme `json:"PartitionScheme,omitempty"` 16278} 16279 16280// MarshalJSON is the custom marshaler for UniformInt64RangePartitionSchemeDescription. 16281func (ui6rpsd UniformInt64RangePartitionSchemeDescription) MarshalJSON() ([]byte, error) { 16282 ui6rpsd.PartitionScheme = PartitionSchemeUniformInt64Range 16283 objectMap := make(map[string]interface{}) 16284 if ui6rpsd.Count != nil { 16285 objectMap["Count"] = ui6rpsd.Count 16286 } 16287 if ui6rpsd.LowKey != nil { 16288 objectMap["LowKey"] = ui6rpsd.LowKey 16289 } 16290 if ui6rpsd.HighKey != nil { 16291 objectMap["HighKey"] = ui6rpsd.HighKey 16292 } 16293 if ui6rpsd.PartitionScheme != "" { 16294 objectMap["PartitionScheme"] = ui6rpsd.PartitionScheme 16295 } 16296 return json.Marshal(objectMap) 16297} 16298 16299// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. 16300func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { 16301 return nil, false 16302} 16303 16304// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. 16305func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { 16306 return nil, false 16307} 16308 16309// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. 16310func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { 16311 return &ui6rpsd, true 16312} 16313 16314// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. 16315func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { 16316 return nil, false 16317} 16318 16319// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. 16320func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { 16321 return &ui6rpsd, true 16322} 16323 16324// UnprovisionFabricDescription describes the parameters for unprovisioning a cluster. 16325type UnprovisionFabricDescription struct { 16326 // CodeVersion - The cluster code package version. 16327 CodeVersion *string `json:"CodeVersion,omitempty"` 16328 // ConfigVersion - The cluster manifest version. 16329 ConfigVersion *string `json:"ConfigVersion,omitempty"` 16330} 16331 16332// UpdateClusterUpgradeDescription parameters for updating a cluster upgrade. 16333type UpdateClusterUpgradeDescription struct { 16334 // UpgradeKind - Possible values include: 'UpgradeKind2Invalid', 'UpgradeKind2Rolling', 'UpgradeKind2RollingForceRestart' 16335 UpgradeKind UpgradeKind2 `json:"UpgradeKind,omitempty"` 16336 UpdateDescription *RollingUpgradeUpdateDescription `json:"UpdateDescription,omitempty"` 16337 ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` 16338 EnableDeltaHealthEvaluation *bool `json:"EnableDeltaHealthEvaluation,omitempty"` 16339 ClusterUpgradeHealthPolicy *ClusterUpgradeHealthPolicyObject `json:"ClusterUpgradeHealthPolicy,omitempty"` 16340 ApplicationHealthPolicyMap *ApplicationHealthPolicies `json:"ApplicationHealthPolicyMap,omitempty"` 16341} 16342 16343// UpgradeDomainDeltaNodesCheckHealthEvaluation represents health evaluation for delta unhealthy cluster nodes in 16344// an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health 16345// state. 16346// Can be returned during cluster upgrade when cluster aggregated health state is Warning or Error. 16347type UpgradeDomainDeltaNodesCheckHealthEvaluation struct { 16348 // UpgradeDomainName - Name of the upgrade domain where nodes health is currently evaluated. 16349 UpgradeDomainName *string `json:"UpgradeDomainName,omitempty"` 16350 // BaselineErrorCount - Number of upgrade domain nodes with aggregated heath state Error in the health store at the beginning of the cluster upgrade. 16351 BaselineErrorCount *int64 `json:"BaselineErrorCount,omitempty"` 16352 // BaselineTotalCount - Total number of upgrade domain nodes in the health store at the beginning of the cluster upgrade. 16353 BaselineTotalCount *int64 `json:"BaselineTotalCount,omitempty"` 16354 // MaxPercentDeltaUnhealthyNodes - Maximum allowed percentage of upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. 16355 MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` 16356 // TotalCount - Total number of upgrade domain nodes in the health store. 16357 TotalCount *int64 `json:"TotalCount,omitempty"` 16358 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 16359 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 16360 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 16361 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 16362 Description *string `json:"Description,omitempty"` 16363 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 16364 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 16365} 16366 16367// MarshalJSON is the custom marshaler for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16368func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) MarshalJSON() ([]byte, error) { 16369 uddnche.Kind = KindUpgradeDomainDeltaNodesCheck 16370 objectMap := make(map[string]interface{}) 16371 if uddnche.UpgradeDomainName != nil { 16372 objectMap["UpgradeDomainName"] = uddnche.UpgradeDomainName 16373 } 16374 if uddnche.BaselineErrorCount != nil { 16375 objectMap["BaselineErrorCount"] = uddnche.BaselineErrorCount 16376 } 16377 if uddnche.BaselineTotalCount != nil { 16378 objectMap["BaselineTotalCount"] = uddnche.BaselineTotalCount 16379 } 16380 if uddnche.MaxPercentDeltaUnhealthyNodes != nil { 16381 objectMap["MaxPercentDeltaUnhealthyNodes"] = uddnche.MaxPercentDeltaUnhealthyNodes 16382 } 16383 if uddnche.TotalCount != nil { 16384 objectMap["TotalCount"] = uddnche.TotalCount 16385 } 16386 if uddnche.UnhealthyEvaluations != nil { 16387 objectMap["UnhealthyEvaluations"] = uddnche.UnhealthyEvaluations 16388 } 16389 if uddnche.AggregatedHealthState != "" { 16390 objectMap["AggregatedHealthState"] = uddnche.AggregatedHealthState 16391 } 16392 if uddnche.Description != nil { 16393 objectMap["Description"] = uddnche.Description 16394 } 16395 if uddnche.Kind != "" { 16396 objectMap["Kind"] = uddnche.Kind 16397 } 16398 return json.Marshal(objectMap) 16399} 16400 16401// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16402func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 16403 return nil, false 16404} 16405 16406// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16407func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 16408 return nil, false 16409} 16410 16411// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16412func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 16413 return nil, false 16414} 16415 16416// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16417func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 16418 return nil, false 16419} 16420 16421// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16422func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 16423 return nil, false 16424} 16425 16426// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16427func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 16428 return nil, false 16429} 16430 16431// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16432func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 16433 return nil, false 16434} 16435 16436// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16437func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 16438 return nil, false 16439} 16440 16441// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16442func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 16443 return nil, false 16444} 16445 16446// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16447func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 16448 return nil, false 16449} 16450 16451// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16452func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 16453 return nil, false 16454} 16455 16456// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16457func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 16458 return nil, false 16459} 16460 16461// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16462func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 16463 return nil, false 16464} 16465 16466// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16467func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 16468 return nil, false 16469} 16470 16471// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16472func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 16473 return nil, false 16474} 16475 16476// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16477func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 16478 return nil, false 16479} 16480 16481// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16482func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 16483 return nil, false 16484} 16485 16486// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16487func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 16488 return nil, false 16489} 16490 16491// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16492func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 16493 return &uddnche, true 16494} 16495 16496// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16497func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 16498 return nil, false 16499} 16500 16501// AsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16502func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 16503 return nil, false 16504} 16505 16506// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. 16507func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 16508 return &uddnche, true 16509} 16510 16511// UpgradeDomainInfo information about an upgrade domain. 16512type UpgradeDomainInfo struct { 16513 Name *string `json:"Name,omitempty"` 16514 // State - Possible values include: 'StateInvalid', 'StatePending', 'StateInProgress', 'StateCompleted' 16515 State State `json:"State,omitempty"` 16516} 16517 16518// UpgradeDomainNodesHealthEvaluation represents health evaluation for cluster nodes in an upgrade domain, 16519// containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be 16520// returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error 16521// or Warning. 16522type UpgradeDomainNodesHealthEvaluation struct { 16523 // UpgradeDomainName - Name of the upgrade domain where nodes health is currently evaluated. 16524 UpgradeDomainName *string `json:"UpgradeDomainName,omitempty"` 16525 // MaxPercentUnhealthyNodes - Maximum allowed percentage of unhealthy nodes from the ClusterHealthPolicy. 16526 MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` 16527 // TotalCount - Total number of nodes in the current upgrade domain. 16528 TotalCount *int64 `json:"TotalCount,omitempty"` 16529 UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` 16530 // AggregatedHealthState - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' 16531 AggregatedHealthState AggregatedHealthState `json:"AggregatedHealthState,omitempty"` 16532 // Description - Description of the health evaluation, which represents a summary of the evaluation process. 16533 Description *string `json:"Description,omitempty"` 16534 // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' 16535 Kind KindBasicHealthEvaluation `json:"Kind,omitempty"` 16536} 16537 16538// MarshalJSON is the custom marshaler for UpgradeDomainNodesHealthEvaluation. 16539func (udnhe UpgradeDomainNodesHealthEvaluation) MarshalJSON() ([]byte, error) { 16540 udnhe.Kind = KindUpgradeDomainNodes 16541 objectMap := make(map[string]interface{}) 16542 if udnhe.UpgradeDomainName != nil { 16543 objectMap["UpgradeDomainName"] = udnhe.UpgradeDomainName 16544 } 16545 if udnhe.MaxPercentUnhealthyNodes != nil { 16546 objectMap["MaxPercentUnhealthyNodes"] = udnhe.MaxPercentUnhealthyNodes 16547 } 16548 if udnhe.TotalCount != nil { 16549 objectMap["TotalCount"] = udnhe.TotalCount 16550 } 16551 if udnhe.UnhealthyEvaluations != nil { 16552 objectMap["UnhealthyEvaluations"] = udnhe.UnhealthyEvaluations 16553 } 16554 if udnhe.AggregatedHealthState != "" { 16555 objectMap["AggregatedHealthState"] = udnhe.AggregatedHealthState 16556 } 16557 if udnhe.Description != nil { 16558 objectMap["Description"] = udnhe.Description 16559 } 16560 if udnhe.Kind != "" { 16561 objectMap["Kind"] = udnhe.Kind 16562 } 16563 return json.Marshal(objectMap) 16564} 16565 16566// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16567func (udnhe UpgradeDomainNodesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { 16568 return nil, false 16569} 16570 16571// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16572func (udnhe UpgradeDomainNodesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { 16573 return nil, false 16574} 16575 16576// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16577func (udnhe UpgradeDomainNodesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { 16578 return nil, false 16579} 16580 16581// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16582func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { 16583 return nil, false 16584} 16585 16586// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16587func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { 16588 return nil, false 16589} 16590 16591// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16592func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { 16593 return nil, false 16594} 16595 16596// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16597func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { 16598 return nil, false 16599} 16600 16601// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16602func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { 16603 return nil, false 16604} 16605 16606// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16607func (udnhe UpgradeDomainNodesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { 16608 return nil, false 16609} 16610 16611// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16612func (udnhe UpgradeDomainNodesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { 16613 return nil, false 16614} 16615 16616// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16617func (udnhe UpgradeDomainNodesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { 16618 return nil, false 16619} 16620 16621// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16622func (udnhe UpgradeDomainNodesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { 16623 return nil, false 16624} 16625 16626// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16627func (udnhe UpgradeDomainNodesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { 16628 return nil, false 16629} 16630 16631// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16632func (udnhe UpgradeDomainNodesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { 16633 return nil, false 16634} 16635 16636// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16637func (udnhe UpgradeDomainNodesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { 16638 return nil, false 16639} 16640 16641// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16642func (udnhe UpgradeDomainNodesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { 16643 return nil, false 16644} 16645 16646// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16647func (udnhe UpgradeDomainNodesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { 16648 return nil, false 16649} 16650 16651// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16652func (udnhe UpgradeDomainNodesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { 16653 return nil, false 16654} 16655 16656// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16657func (udnhe UpgradeDomainNodesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { 16658 return nil, false 16659} 16660 16661// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16662func (udnhe UpgradeDomainNodesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { 16663 return &udnhe, true 16664} 16665 16666// AsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16667func (udnhe UpgradeDomainNodesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { 16668 return nil, false 16669} 16670 16671// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. 16672func (udnhe UpgradeDomainNodesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { 16673 return &udnhe, true 16674} 16675 16676// ValidationFailedChaosEvent chaos event corresponding to a failure during validation. 16677type ValidationFailedChaosEvent struct { 16678 Reason *string `json:"Reason,omitempty"` 16679 TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` 16680 // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' 16681 Kind KindBasicChaosEvent `json:"Kind,omitempty"` 16682} 16683 16684// MarshalJSON is the custom marshaler for ValidationFailedChaosEvent. 16685func (vfce ValidationFailedChaosEvent) MarshalJSON() ([]byte, error) { 16686 vfce.Kind = KindValidationFailed 16687 objectMap := make(map[string]interface{}) 16688 if vfce.Reason != nil { 16689 objectMap["Reason"] = vfce.Reason 16690 } 16691 if vfce.TimeStampUtc != nil { 16692 objectMap["TimeStampUtc"] = vfce.TimeStampUtc 16693 } 16694 if vfce.Kind != "" { 16695 objectMap["Kind"] = vfce.Kind 16696 } 16697 return json.Marshal(objectMap) 16698} 16699 16700// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16701func (vfce ValidationFailedChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { 16702 return nil, false 16703} 16704 16705// AsStartedChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16706func (vfce ValidationFailedChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { 16707 return nil, false 16708} 16709 16710// AsStoppedChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16711func (vfce ValidationFailedChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { 16712 return nil, false 16713} 16714 16715// AsTestErrorChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16716func (vfce ValidationFailedChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { 16717 return nil, false 16718} 16719 16720// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16721func (vfce ValidationFailedChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { 16722 return &vfce, true 16723} 16724 16725// AsWaitingChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16726func (vfce ValidationFailedChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { 16727 return nil, false 16728} 16729 16730// AsChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16731func (vfce ValidationFailedChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { 16732 return nil, false 16733} 16734 16735// AsBasicChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. 16736func (vfce ValidationFailedChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { 16737 return &vfce, true 16738} 16739 16740// WaitForInbuildReplicaSafetyCheck safety check that waits for the replica build operation to finish. This 16741// indiciates that there is a replica that is going through the copy or is providing data for building another 16742// replica. Bring the node down will abort this copy operation which are typoically expensive involving data 16743// movements. 16744type WaitForInbuildReplicaSafetyCheck struct { 16745 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 16746 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 16747 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 16748} 16749 16750// MarshalJSON is the custom marshaler for WaitForInbuildReplicaSafetyCheck. 16751func (wfirsc WaitForInbuildReplicaSafetyCheck) MarshalJSON() ([]byte, error) { 16752 wfirsc.Kind = KindWaitForInbuildReplica 16753 objectMap := make(map[string]interface{}) 16754 if wfirsc.PartitionID != nil { 16755 objectMap["PartitionId"] = wfirsc.PartitionID 16756 } 16757 if wfirsc.Kind != "" { 16758 objectMap["Kind"] = wfirsc.Kind 16759 } 16760 return json.Marshal(objectMap) 16761} 16762 16763// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16764func (wfirsc WaitForInbuildReplicaSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 16765 return nil, false 16766} 16767 16768// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16769func (wfirsc WaitForInbuildReplicaSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 16770 return &wfirsc, true 16771} 16772 16773// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16774func (wfirsc WaitForInbuildReplicaSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 16775 return nil, false 16776} 16777 16778// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16779func (wfirsc WaitForInbuildReplicaSafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 16780 return nil, false 16781} 16782 16783// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16784func (wfirsc WaitForInbuildReplicaSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 16785 return nil, false 16786} 16787 16788// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16789func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 16790 return &wfirsc, true 16791} 16792 16793// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16794func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 16795 return nil, false 16796} 16797 16798// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16799func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 16800 return nil, false 16801} 16802 16803// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16804func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 16805 return nil, false 16806} 16807 16808// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16809func (wfirsc WaitForInbuildReplicaSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 16810 return nil, false 16811} 16812 16813// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. 16814func (wfirsc WaitForInbuildReplicaSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 16815 return &wfirsc, true 16816} 16817 16818// WaitForPrimaryPlacementSafetyCheck safety check that waits for the primary replica that was moved out of the 16819// node due to upgrade to be placed back again on that node. 16820type WaitForPrimaryPlacementSafetyCheck struct { 16821 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 16822 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 16823 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 16824} 16825 16826// MarshalJSON is the custom marshaler for WaitForPrimaryPlacementSafetyCheck. 16827func (wfppsc WaitForPrimaryPlacementSafetyCheck) MarshalJSON() ([]byte, error) { 16828 wfppsc.Kind = KindWaitForPrimaryPlacement 16829 objectMap := make(map[string]interface{}) 16830 if wfppsc.PartitionID != nil { 16831 objectMap["PartitionId"] = wfppsc.PartitionID 16832 } 16833 if wfppsc.Kind != "" { 16834 objectMap["Kind"] = wfppsc.Kind 16835 } 16836 return json.Marshal(objectMap) 16837} 16838 16839// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16840func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 16841 return nil, false 16842} 16843 16844// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16845func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 16846 return &wfppsc, true 16847} 16848 16849// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16850func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 16851 return nil, false 16852} 16853 16854// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16855func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 16856 return nil, false 16857} 16858 16859// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16860func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 16861 return nil, false 16862} 16863 16864// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16865func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 16866 return nil, false 16867} 16868 16869// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16870func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 16871 return &wfppsc, true 16872} 16873 16874// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16875func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 16876 return nil, false 16877} 16878 16879// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16880func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 16881 return nil, false 16882} 16883 16884// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16885func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 16886 return nil, false 16887} 16888 16889// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. 16890func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 16891 return &wfppsc, true 16892} 16893 16894// WaitForPrimarySwapSafetyCheck safety check that waits for the primary replica to be moved out of the node before 16895// starting an upgrade to ensure the availability of the primary replica for the partition. 16896type WaitForPrimarySwapSafetyCheck struct { 16897 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 16898 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 16899 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 16900} 16901 16902// MarshalJSON is the custom marshaler for WaitForPrimarySwapSafetyCheck. 16903func (wfpssc WaitForPrimarySwapSafetyCheck) MarshalJSON() ([]byte, error) { 16904 wfpssc.Kind = KindWaitForPrimarySwap 16905 objectMap := make(map[string]interface{}) 16906 if wfpssc.PartitionID != nil { 16907 objectMap["PartitionId"] = wfpssc.PartitionID 16908 } 16909 if wfpssc.Kind != "" { 16910 objectMap["Kind"] = wfpssc.Kind 16911 } 16912 return json.Marshal(objectMap) 16913} 16914 16915// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16916func (wfpssc WaitForPrimarySwapSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 16917 return nil, false 16918} 16919 16920// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16921func (wfpssc WaitForPrimarySwapSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 16922 return &wfpssc, true 16923} 16924 16925// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16926func (wfpssc WaitForPrimarySwapSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 16927 return nil, false 16928} 16929 16930// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16931func (wfpssc WaitForPrimarySwapSafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 16932 return nil, false 16933} 16934 16935// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16936func (wfpssc WaitForPrimarySwapSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 16937 return nil, false 16938} 16939 16940// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16941func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 16942 return nil, false 16943} 16944 16945// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16946func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 16947 return nil, false 16948} 16949 16950// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16951func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 16952 return &wfpssc, true 16953} 16954 16955// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16956func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 16957 return nil, false 16958} 16959 16960// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16961func (wfpssc WaitForPrimarySwapSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 16962 return nil, false 16963} 16964 16965// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. 16966func (wfpssc WaitForPrimarySwapSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 16967 return &wfpssc, true 16968} 16969 16970// WaitForReconfigurationSafetyCheck safety check that waits for the current reconfiguration of the partition to be 16971// completed before starting an upgrade. 16972type WaitForReconfigurationSafetyCheck struct { 16973 PartitionID *uuid.UUID `json:"PartitionId,omitempty"` 16974 // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' 16975 Kind KindBasicSafetyCheck `json:"Kind,omitempty"` 16976} 16977 16978// MarshalJSON is the custom marshaler for WaitForReconfigurationSafetyCheck. 16979func (wfrsc WaitForReconfigurationSafetyCheck) MarshalJSON() ([]byte, error) { 16980 wfrsc.Kind = KindWaitForReconfiguration 16981 objectMap := make(map[string]interface{}) 16982 if wfrsc.PartitionID != nil { 16983 objectMap["PartitionId"] = wfrsc.PartitionID 16984 } 16985 if wfrsc.Kind != "" { 16986 objectMap["Kind"] = wfrsc.Kind 16987 } 16988 return json.Marshal(objectMap) 16989} 16990 16991// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 16992func (wfrsc WaitForReconfigurationSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { 16993 return nil, false 16994} 16995 16996// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 16997func (wfrsc WaitForReconfigurationSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { 16998 return &wfrsc, true 16999} 17000 17001// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17002func (wfrsc WaitForReconfigurationSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { 17003 return nil, false 17004} 17005 17006// AsEnsurePartitionQurumSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17007func (wfrsc WaitForReconfigurationSafetyCheck) AsEnsurePartitionQurumSafetyCheck() (*EnsurePartitionQurumSafetyCheck, bool) { 17008 return nil, false 17009} 17010 17011// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17012func (wfrsc WaitForReconfigurationSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { 17013 return nil, false 17014} 17015 17016// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17017func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { 17018 return nil, false 17019} 17020 17021// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17022func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { 17023 return nil, false 17024} 17025 17026// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17027func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { 17028 return nil, false 17029} 17030 17031// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17032func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { 17033 return &wfrsc, true 17034} 17035 17036// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17037func (wfrsc WaitForReconfigurationSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { 17038 return nil, false 17039} 17040 17041// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. 17042func (wfrsc WaitForReconfigurationSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { 17043 return &wfrsc, true 17044} 17045 17046// WaitingChaosEvent describes a Chaos event that gets generated when Chaos is waiting for the cluster to become 17047// ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. 17048type WaitingChaosEvent struct { 17049 Reason *string `json:"Reason,omitempty"` 17050 TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` 17051 // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' 17052 Kind KindBasicChaosEvent `json:"Kind,omitempty"` 17053} 17054 17055// MarshalJSON is the custom marshaler for WaitingChaosEvent. 17056func (wce WaitingChaosEvent) MarshalJSON() ([]byte, error) { 17057 wce.Kind = KindWaiting 17058 objectMap := make(map[string]interface{}) 17059 if wce.Reason != nil { 17060 objectMap["Reason"] = wce.Reason 17061 } 17062 if wce.TimeStampUtc != nil { 17063 objectMap["TimeStampUtc"] = wce.TimeStampUtc 17064 } 17065 if wce.Kind != "" { 17066 objectMap["Kind"] = wce.Kind 17067 } 17068 return json.Marshal(objectMap) 17069} 17070 17071// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17072func (wce WaitingChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { 17073 return nil, false 17074} 17075 17076// AsStartedChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17077func (wce WaitingChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { 17078 return nil, false 17079} 17080 17081// AsStoppedChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17082func (wce WaitingChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { 17083 return nil, false 17084} 17085 17086// AsTestErrorChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17087func (wce WaitingChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { 17088 return nil, false 17089} 17090 17091// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17092func (wce WaitingChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { 17093 return nil, false 17094} 17095 17096// AsWaitingChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17097func (wce WaitingChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { 17098 return &wce, true 17099} 17100 17101// AsChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17102func (wce WaitingChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { 17103 return nil, false 17104} 17105 17106// AsBasicChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. 17107func (wce WaitingChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { 17108 return &wce, true 17109} 17110