public UpdateTrailRequest withName(String name) {
        setName(name);
        return this;
    }
<p>
Specifies the name of the trail or trail ARN. If <code>Name</code> is a trail name, the string must meet the
following requirements:
</p>
<ul>
<li>
<p>
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
</p>
</li>
<li>
<p>
Start with a letter or number, and end with a letter or number
</p>
</li>
<li>
<p>
Be between 3 and 128 characters
</p>
</li>
<li>
<p>
Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code> and
<code>my--namespace</code> are not valid.
</p>
</li>
<li>
<p>
Not be in IP address format (for example, 192.168.5.4)
</p>
</li>
</ul>
<p>
If <code>Name</code> is a trail ARN, it must be in the following format.
</p>
<p>
<code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
</p>

@param name
       Specifies the name of the trail or trail ARN. If <code>Name</code> is a trail name, the string must meet
       the following requirements:</p>
       <ul>
       <li>
       <p>
       Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
       </p>
       </li>
       <li>
       <p>
       Start with a letter or number, and end with a letter or number
       </p>
       </li>
       <li>
       <p>
       Be between 3 and 128 characters
       </p>
       </li>
       <li>
       <p>
       Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code> and
       <code>my--namespace</code> are not valid.
       </p>
       </li>
       <li>
       <p>
       Not be in IP address format (for example, 192.168.5.4)
       </p>
       </li>
       </ul>
       <p>
       If <code>Name</code> is a trail ARN, it must be in the following format.
       </p>
       <p>
       <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cloudtrail/src/main/java/com/amazonaws/services/cloudtrail/model/UpdateTrailRequest.java