All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.projectnessie.model.ReferenceHistoryResponse Maven / Gradle / Ivy

There is a newer version: 0.97.1
Show newest version
/*
 * Copyright (C) 2020 Dremio
 *
 * 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 org.projectnessie.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.eclipse.microprofile.openapi.annotations.enums.SchemaType;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.immutables.value.Value;

@Schema(
    type = SchemaType.OBJECT,
    title = "ReferenceHistoryResponse",
    description =
        "Describes the consistency status of a named reference.\n"
            + "\n"
            + "Possible values of the `CommitConsistency` enum:\n"
            + "- `NOT_CHECKED` means: Consistency was not checked.\n"
            + "- `COMMIT_CONSISTENT` means: The commit object, its index information and all reachable content is present.\n"
            + "- `COMMIT_CONTENT_INCONSISTENT` means: The commit object is present and its index is accessible, but "
            + "some content reachable from the commit is not present.\n"
            + "- `COMMIT_INCONSISTENT` means: The commit is inconsistent in a way that makes it impossible to access "
            + "the commit, for example if the commit object itself or its index information is missing.")
@Value.Immutable
@JsonSerialize(as = ImmutableReferenceHistoryResponse.class)
@JsonDeserialize(as = ImmutableReferenceHistoryResponse.class)
public interface ReferenceHistoryResponse {

  static ImmutableReferenceHistoryResponse.Builder builder() {
    return ImmutableReferenceHistoryResponse.builder();
  }

  @NotNull
  @jakarta.validation.constraints.NotNull
  Reference getReference();

  @Schema(description = "Consistency status of the current HEAD commit.")
  @NotNull
  @jakarta.validation.constraints.NotNull
  ReferenceHistoryState current();

  @Schema(
      description =
          "Consistency status of the recorded recent HEADs of the reference, including re-assign operations.")
  @NotNull
  @jakarta.validation.constraints.NotNull
  List previous();

  @Schema(
      description =
          "Combined consistency status of the commit-log of the reference, if requested by the client.")
  @NotNull
  @jakarta.validation.constraints.NotNull
  CommitConsistency commitLogConsistency();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy