/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.integrations.v1.model;

/**
 * Contains all the execution details for a workflow instance. Next available id: 24
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Application Integration API. For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo extends com.google.api.client.json.GenericJson {

  /**
   * The event data user sends as request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String clientId;

  /**
   * Auto-generated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long createTime;

  /**
   * Final error-code if event failed.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private CrmlogErrorCode errorCode;

  /**
   * Errors, warnings, and informationals associated with the workflow/task. The order in which the
   * errors were added by the workflow/task is maintained.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<EnterpriseCrmEventbusProtoErrorDetail> errors;

  static {
    // hack to force ProGuard to consider EnterpriseCrmEventbusProtoErrorDetail used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(EnterpriseCrmEventbusProtoErrorDetail.class);
  }

  /**
   * The execution info about this event.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private EnterpriseCrmFrontendsEventbusProtoEventExecutionDetails eventExecutionDetails;

  /**
   * Auto-generated primary key.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String eventExecutionInfoId;

  /**
   * Execution trace info to aggregate parent-child executions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private EnterpriseCrmEventbusProtoExecutionTraceInfo executionTraceInfo;

  /**
   * Auto-generated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long lastModifiedTime;

  /**
   * The ways user posts this event.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String postMethod;

  /**
   * Which Google product the execution_info belongs to. If not set, the execution_info belongs to
   * Integration Platform by default.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String product;

  /**
   * Optional. This is used to de-dup incoming request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String requestId;

  /**
   * Event parameters come in as part of the request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private EnterpriseCrmFrontendsEventbusProtoEventParameters requestParams;

  /**
   * Event parameters come out as part of the response.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private EnterpriseCrmFrontendsEventbusProtoEventParameters responseParams;

  /**
   * Workflow snapshot number.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long snapshotNumber;

  /**
   * Tenant this event is created. Used to reschedule the event to correct tenant.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String tenant;

  /**
   * The trigger id of the workflow trigger config. If both trigger_id and client_id is present, the
   * workflow is executed from the start tasks provided by the matching trigger config otherwise it
   * is executed from the default start tasks.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String triggerId;

  /**
   * Required. Pointer to the workflow it is executing.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String workflowId;

  /**
   * Name of the workflow.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String workflowName;

  /**
   * Time interval in seconds to schedule retry of workflow in manifold when workflow is already
   * running
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long workflowRetryBackoffIntervalSeconds;

  /**
   * The event data user sends as request.
   * @return value or {@code null} for none
   */
  public java.lang.String getClientId() {
    return clientId;
  }

  /**
   * The event data user sends as request.
   * @param clientId clientId or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setClientId(java.lang.String clientId) {
    this.clientId = clientId;
    return this;
  }

  /**
   * Auto-generated.
   * @return value or {@code null} for none
   */
  public java.lang.Long getCreateTime() {
    return createTime;
  }

  /**
   * Auto-generated.
   * @param createTime createTime or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setCreateTime(java.lang.Long createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * Final error-code if event failed.
   * @return value or {@code null} for none
   */
  public CrmlogErrorCode getErrorCode() {
    return errorCode;
  }

  /**
   * Final error-code if event failed.
   * @param errorCode errorCode or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setErrorCode(CrmlogErrorCode errorCode) {
    this.errorCode = errorCode;
    return this;
  }

  /**
   * Errors, warnings, and informationals associated with the workflow/task. The order in which the
   * errors were added by the workflow/task is maintained.
   * @return value or {@code null} for none
   */
  public java.util.List<EnterpriseCrmEventbusProtoErrorDetail> getErrors() {
    return errors;
  }

  /**
   * Errors, warnings, and informationals associated with the workflow/task. The order in which the
   * errors were added by the workflow/task is maintained.
   * @param errors errors or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setErrors(java.util.List<EnterpriseCrmEventbusProtoErrorDetail> errors) {
    this.errors = errors;
    return this;
  }

  /**
   * The execution info about this event.
   * @return value or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionDetails getEventExecutionDetails() {
    return eventExecutionDetails;
  }

  /**
   * The execution info about this event.
   * @param eventExecutionDetails eventExecutionDetails or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setEventExecutionDetails(EnterpriseCrmFrontendsEventbusProtoEventExecutionDetails eventExecutionDetails) {
    this.eventExecutionDetails = eventExecutionDetails;
    return this;
  }

  /**
   * Auto-generated primary key.
   * @return value or {@code null} for none
   */
  public java.lang.String getEventExecutionInfoId() {
    return eventExecutionInfoId;
  }

  /**
   * Auto-generated primary key.
   * @param eventExecutionInfoId eventExecutionInfoId or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setEventExecutionInfoId(java.lang.String eventExecutionInfoId) {
    this.eventExecutionInfoId = eventExecutionInfoId;
    return this;
  }

  /**
   * Execution trace info to aggregate parent-child executions.
   * @return value or {@code null} for none
   */
  public EnterpriseCrmEventbusProtoExecutionTraceInfo getExecutionTraceInfo() {
    return executionTraceInfo;
  }

  /**
   * Execution trace info to aggregate parent-child executions.
   * @param executionTraceInfo executionTraceInfo or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setExecutionTraceInfo(EnterpriseCrmEventbusProtoExecutionTraceInfo executionTraceInfo) {
    this.executionTraceInfo = executionTraceInfo;
    return this;
  }

  /**
   * Auto-generated.
   * @return value or {@code null} for none
   */
  public java.lang.Long getLastModifiedTime() {
    return lastModifiedTime;
  }

  /**
   * Auto-generated.
   * @param lastModifiedTime lastModifiedTime or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setLastModifiedTime(java.lang.Long lastModifiedTime) {
    this.lastModifiedTime = lastModifiedTime;
    return this;
  }

  /**
   * The ways user posts this event.
   * @return value or {@code null} for none
   */
  public java.lang.String getPostMethod() {
    return postMethod;
  }

  /**
   * The ways user posts this event.
   * @param postMethod postMethod or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setPostMethod(java.lang.String postMethod) {
    this.postMethod = postMethod;
    return this;
  }

  /**
   * Which Google product the execution_info belongs to. If not set, the execution_info belongs to
   * Integration Platform by default.
   * @return value or {@code null} for none
   */
  public java.lang.String getProduct() {
    return product;
  }

  /**
   * Which Google product the execution_info belongs to. If not set, the execution_info belongs to
   * Integration Platform by default.
   * @param product product or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setProduct(java.lang.String product) {
    this.product = product;
    return this;
  }

  /**
   * Optional. This is used to de-dup incoming request.
   * @return value or {@code null} for none
   */
  public java.lang.String getRequestId() {
    return requestId;
  }

  /**
   * Optional. This is used to de-dup incoming request.
   * @param requestId requestId or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setRequestId(java.lang.String requestId) {
    this.requestId = requestId;
    return this;
  }

  /**
   * Event parameters come in as part of the request.
   * @return value or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventParameters getRequestParams() {
    return requestParams;
  }

  /**
   * Event parameters come in as part of the request.
   * @param requestParams requestParams or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setRequestParams(EnterpriseCrmFrontendsEventbusProtoEventParameters requestParams) {
    this.requestParams = requestParams;
    return this;
  }

  /**
   * Event parameters come out as part of the response.
   * @return value or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventParameters getResponseParams() {
    return responseParams;
  }

  /**
   * Event parameters come out as part of the response.
   * @param responseParams responseParams or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setResponseParams(EnterpriseCrmFrontendsEventbusProtoEventParameters responseParams) {
    this.responseParams = responseParams;
    return this;
  }

  /**
   * Workflow snapshot number.
   * @return value or {@code null} for none
   */
  public java.lang.Long getSnapshotNumber() {
    return snapshotNumber;
  }

  /**
   * Workflow snapshot number.
   * @param snapshotNumber snapshotNumber or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setSnapshotNumber(java.lang.Long snapshotNumber) {
    this.snapshotNumber = snapshotNumber;
    return this;
  }

  /**
   * Tenant this event is created. Used to reschedule the event to correct tenant.
   * @return value or {@code null} for none
   */
  public java.lang.String getTenant() {
    return tenant;
  }

  /**
   * Tenant this event is created. Used to reschedule the event to correct tenant.
   * @param tenant tenant or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setTenant(java.lang.String tenant) {
    this.tenant = tenant;
    return this;
  }

  /**
   * The trigger id of the workflow trigger config. If both trigger_id and client_id is present, the
   * workflow is executed from the start tasks provided by the matching trigger config otherwise it
   * is executed from the default start tasks.
   * @return value or {@code null} for none
   */
  public java.lang.String getTriggerId() {
    return triggerId;
  }

  /**
   * The trigger id of the workflow trigger config. If both trigger_id and client_id is present, the
   * workflow is executed from the start tasks provided by the matching trigger config otherwise it
   * is executed from the default start tasks.
   * @param triggerId triggerId or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setTriggerId(java.lang.String triggerId) {
    this.triggerId = triggerId;
    return this;
  }

  /**
   * Required. Pointer to the workflow it is executing.
   * @return value or {@code null} for none
   */
  public java.lang.String getWorkflowId() {
    return workflowId;
  }

  /**
   * Required. Pointer to the workflow it is executing.
   * @param workflowId workflowId or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setWorkflowId(java.lang.String workflowId) {
    this.workflowId = workflowId;
    return this;
  }

  /**
   * Name of the workflow.
   * @return value or {@code null} for none
   */
  public java.lang.String getWorkflowName() {
    return workflowName;
  }

  /**
   * Name of the workflow.
   * @param workflowName workflowName or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setWorkflowName(java.lang.String workflowName) {
    this.workflowName = workflowName;
    return this;
  }

  /**
   * Time interval in seconds to schedule retry of workflow in manifold when workflow is already
   * running
   * @return value or {@code null} for none
   */
  public java.lang.Long getWorkflowRetryBackoffIntervalSeconds() {
    return workflowRetryBackoffIntervalSeconds;
  }

  /**
   * Time interval in seconds to schedule retry of workflow in manifold when workflow is already
   * running
   * @param workflowRetryBackoffIntervalSeconds workflowRetryBackoffIntervalSeconds or {@code null} for none
   */
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo setWorkflowRetryBackoffIntervalSeconds(java.lang.Long workflowRetryBackoffIntervalSeconds) {
    this.workflowRetryBackoffIntervalSeconds = workflowRetryBackoffIntervalSeconds;
    return this;
  }

  @Override
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo set(String fieldName, Object value) {
    return (EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo) super.set(fieldName, value);
  }

  @Override
  public EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo clone() {
    return (EnterpriseCrmFrontendsEventbusProtoEventExecutionInfo) super.clone();
  }

}
