/*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.facebook.litho;

/** Data class for params used to log error in LithoView. */
public class ComponentLogParams {
  public final String logProductId;
  public final String logType;
  public final int samplingFrequency;
  public final boolean failHarder;

  public ComponentLogParams(
      String logProductId, String logType, int samplingFrequency, boolean failHarder) {
    this.logProductId = logProductId;
    this.logType = logType;
    this.samplingFrequency = samplingFrequency;
    this.failHarder = failHarder;
  }

  public ComponentLogParams(String logProductId, String logType) {
    this(logProductId, logType, /* take default*/ 0, false);
  }
}

/*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.facebook.litho;

import com.facebook.infer.annotation.Nullsafe;

/** Data class for params used to log error in LithoView. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public class ComponentLogParams {
  public final String logProductId;
  public final String logType;
  public final int samplingFrequency;
  public final boolean failHarder;

  public ComponentLogParams(
      String logProductId, String logType, int samplingFrequency, boolean failHarder) {
    this.logProductId = logProductId;
    this.logType = logType;
    this.samplingFrequency = samplingFrequency;
    this.failHarder = failHarder;
  }

  public ComponentLogParams(String logProductId, String logType) {
    this(logProductId, logType, /* take default*/ 0, false);
  }
}

Annotate clean classes as @Nullsafe:: (7/14) libraries/components/litho-core/src/main/java/com/facebook/litho/
Annotate clean classes as @Nullsafe:: (7/14) libraries/components/litho-core/src/main/java/com/facebook/litho/

Reviewed By: pasqualeanatriello

Differential Revision: D28505831

fbshipit-source-id: e4831c9e49a9c08a495dacb85c3ed82a5ad1b507
