private static MachineStatus MapVmStatusToMachineStatus(VmStatus status) { switch (status) { case VmStatus.Stopped: return(MachineStatus.Stopped); case VmStatus.Running: return(MachineStatus.Running); case VmStatus.Pending: return(MachineStatus.Pending); case VmStatus.Error: return(MachineStatus.Error); default: throw new ArgumentOutOfRangeException(nameof(status), status, null); } }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (AppEngineRelease.Length != 0) { hash ^= AppEngineRelease.GetHashCode(); } if (Availability != global::Google.Cloud.AppEngine.V1.Instance.Types.Availability.Unspecified) { hash ^= Availability.GetHashCode(); } if (VmName.Length != 0) { hash ^= VmName.GetHashCode(); } if (VmZoneName.Length != 0) { hash ^= VmZoneName.GetHashCode(); } if (VmId.Length != 0) { hash ^= VmId.GetHashCode(); } if (startTime_ != null) { hash ^= StartTime.GetHashCode(); } if (Requests != 0) { hash ^= Requests.GetHashCode(); } if (Errors != 0) { hash ^= Errors.GetHashCode(); } if (Qps != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Qps); } if (AverageLatency != 0) { hash ^= AverageLatency.GetHashCode(); } if (MemoryUsage != 0L) { hash ^= MemoryUsage.GetHashCode(); } if (VmStatus.Length != 0) { hash ^= VmStatus.GetHashCode(); } if (VmDebugEnabled != false) { hash ^= VmDebugEnabled.GetHashCode(); } if (VmIp.Length != 0) { hash ^= VmIp.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public AzureVm(string name, string resourceGroupName, string subscriptionName, string computerName, OsType osType, string privateIp, VmStatus status, List <AzureVmTag> azureVmTags) { Name = name; SubscriptionName = subscriptionName; ResourceGroupName = resourceGroupName; ComputerName = computerName; OsType = osType; PrivateIp = privateIp; Status = status; AzureVmTags = azureVmTags; }