Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given a binary string s ​​​​​without leading zeros, return true​​​ if s contains at most one contiguous segment of ones. Otherwise, return false.
 
Please complete the following python code precisely:
```python
class Solution:
    def checkOnesSegment(self, s: str) -> bool:
```