
io.github.honhimw.ms.model.CreateKeyRequest Maven / Gradle / Ivy
/*
* 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 io.github.honhimw.ms.model;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.annotation.Nonnull;
import lombok.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author hon_him
* @since 2024-01-02
*/
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder(builderClassName = "Builder")
public class CreateKeyRequest implements Serializable {
@Schema(description = "A list of API actions permitted for the key. [\"*\"] for all actions")
@Nonnull
private List actions;
@Schema(description = "An array of indexes the key is authorized to act on. [\"*\"] for all indexes")
@Nonnull
private List indexes;
@Schema(description = "Date and time when the key will expire, represented in RFC 3339 format. null if the key never expires")
private LocalDateTime expiresAt;
@Schema(description = "A human-readable name for the key")
private String name;
@Schema(description = "A uuid v4 to identify the API key. If not specified, it is generated by Meilisearch")
private String uid;
@Schema(description = "An optional description for the key")
private String description;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy