code: public final AlertPolicy createAlertPolicy(String name, AlertPolicy alertPolicy) {
  
      CreateAlertPolicyRequest request =
          CreateAlertPolicyRequest.newBuilder().setName(name).setAlertPolicy(alertPolicy).build();
      return createAlertPolicy(request);
    }
docs: Creates a new alerting policy.
  
  <p>Sample code:
  
  <pre><code>
  try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) {
  ProjectName name = ProjectName.of("[PROJECT]");
  AlertPolicy alertPolicy = AlertPolicy.newBuilder().build();
  AlertPolicy response = alertPolicyServiceClient.createAlertPolicy(name.toString(), alertPolicy);
  }
  </code></pre>
  
  @param name The project in which to create the alerting policy. The format is
  `projects/[PROJECT_ID]`.
  <p>Note that this field names the parent container in which the alerting policy will be
  written, not the name of the created policy. The alerting policy that is returned will have
  a name that contains a normalized representation of this name as a prefix but adds a suffix
  of the form `/alertPolicies/[POLICY_ID]`, identifying the policy in the container.
  @param alertPolicy The requested alerting policy. You should omit the `name` field in this
  policy. The name will be returned in the new policy, including a new [ALERT_POLICY_ID]
  value.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails