001 002package com.commercetools.api.models.product_type; 003 004import java.time.*; 005import java.util.*; 006import java.util.function.Function; 007 008import javax.annotation.Nullable; 009 010import com.fasterxml.jackson.annotation.*; 011import com.fasterxml.jackson.databind.annotation.*; 012 013import io.vrap.rmf.base.client.utils.Generated; 014 015/** 016 * <p>Attribute type for Boolean values. Valid values for the Attribute are <code>true</code> and <code>false</code> (JSON Boolean).</p> 017 * 018 * <hr> 019 * Example to create an instance using the builder pattern 020 * <div class=code-example> 021 * <pre><code class='java'> 022 * AttributeBooleanType attributeBooleanType = AttributeBooleanType.builder() 023 * .build() 024 * </code></pre> 025 * </div> 026 */ 027@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 028@JsonDeserialize(as = AttributeBooleanTypeImpl.class) 029public interface AttributeBooleanType extends AttributeType { 030 031 /** 032 * discriminator value for AttributeBooleanType 033 */ 034 String BOOLEAN = "boolean"; 035 036 /** 037 * factory method 038 * @return instance of AttributeBooleanType 039 */ 040 public static AttributeBooleanType of() { 041 return new AttributeBooleanTypeImpl(); 042 } 043 044 /** 045 * factory method to create a shallow copy AttributeBooleanType 046 * @param template instance to be copied 047 * @return copy instance 048 */ 049 public static AttributeBooleanType of(final AttributeBooleanType template) { 050 AttributeBooleanTypeImpl instance = new AttributeBooleanTypeImpl(); 051 return instance; 052 } 053 054 /** 055 * factory method to create a deep copy of AttributeBooleanType 056 * @param template instance to be copied 057 * @return copy instance 058 */ 059 @Nullable 060 public static AttributeBooleanType deepCopy(@Nullable final AttributeBooleanType template) { 061 if (template == null) { 062 return null; 063 } 064 AttributeBooleanTypeImpl instance = new AttributeBooleanTypeImpl(); 065 return instance; 066 } 067 068 /** 069 * builder factory method for AttributeBooleanType 070 * @return builder 071 */ 072 public static AttributeBooleanTypeBuilder builder() { 073 return AttributeBooleanTypeBuilder.of(); 074 } 075 076 /** 077 * create builder for AttributeBooleanType instance 078 * @param template instance with prefilled values for the builder 079 * @return builder 080 */ 081 public static AttributeBooleanTypeBuilder builder(final AttributeBooleanType template) { 082 return AttributeBooleanTypeBuilder.of(template); 083 } 084 085 /** 086 * accessor map function 087 * @param <T> mapped type 088 * @param helper function to map the object 089 * @return mapped value 090 */ 091 default <T> T withAttributeBooleanType(Function<AttributeBooleanType, T> helper) { 092 return helper.apply(this); 093 } 094 095 /** 096 * gives a TypeReference for usage with Jackson DataBind 097 * @return TypeReference 098 */ 099 public static com.fasterxml.jackson.core.type.TypeReference<AttributeBooleanType> typeReference() { 100 return new com.fasterxml.jackson.core.type.TypeReference<AttributeBooleanType>() { 101 @Override 102 public String toString() { 103 return "TypeReference<AttributeBooleanType>"; 104 } 105 }; 106 } 107}