|
| 1 | +/* |
| 2 | + * Copyright 2025 Google LLC |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +// Auto-generated code. Do not edit. |
| 18 | + |
| 19 | +package com.google.genai.types; |
| 20 | + |
| 21 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 22 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 23 | +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
| 24 | +import com.google.auto.value.AutoValue; |
| 25 | +import com.google.errorprone.annotations.CanIgnoreReturnValue; |
| 26 | +import com.google.genai.JsonSerializable; |
| 27 | +import java.util.Optional; |
| 28 | + |
| 29 | +/** Configures the avatar to be used in the session. */ |
| 30 | +@AutoValue |
| 31 | +@JsonDeserialize(builder = AvatarConfig.Builder.class) |
| 32 | +public abstract class AvatarConfig extends JsonSerializable { |
| 33 | + /** Pre-built avatar id. */ |
| 34 | + @JsonProperty("avatarName") |
| 35 | + public abstract Optional<String> avatarName(); |
| 36 | + |
| 37 | + /** Customized avatar appearance with a reference image. */ |
| 38 | + @JsonProperty("customizedAvatar") |
| 39 | + public abstract Optional<CustomizedAvatar> customizedAvatar(); |
| 40 | + |
| 41 | + /** The bitrate of compressed audio. */ |
| 42 | + @JsonProperty("audioBitrateBps") |
| 43 | + public abstract Optional<Integer> audioBitrateBps(); |
| 44 | + |
| 45 | + /** The bitrate of compressed video output. */ |
| 46 | + @JsonProperty("videoBitrateBps") |
| 47 | + public abstract Optional<Integer> videoBitrateBps(); |
| 48 | + |
| 49 | + /** Instantiates a builder for AvatarConfig. */ |
| 50 | + @ExcludeFromGeneratedCoverageReport |
| 51 | + public static Builder builder() { |
| 52 | + return new AutoValue_AvatarConfig.Builder(); |
| 53 | + } |
| 54 | + |
| 55 | + /** Creates a builder with the same values as this instance. */ |
| 56 | + public abstract Builder toBuilder(); |
| 57 | + |
| 58 | + /** Builder for AvatarConfig. */ |
| 59 | + @AutoValue.Builder |
| 60 | + public abstract static class Builder { |
| 61 | + /** For internal usage. Please use `AvatarConfig.builder()` for instantiation. */ |
| 62 | + @JsonCreator |
| 63 | + private static Builder create() { |
| 64 | + return new AutoValue_AvatarConfig.Builder(); |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * Setter for avatarName. |
| 69 | + * |
| 70 | + * <p>avatarName: Pre-built avatar id. |
| 71 | + */ |
| 72 | + @JsonProperty("avatarName") |
| 73 | + public abstract Builder avatarName(String avatarName); |
| 74 | + |
| 75 | + @ExcludeFromGeneratedCoverageReport |
| 76 | + abstract Builder avatarName(Optional<String> avatarName); |
| 77 | + |
| 78 | + /** Clears the value of avatarName field. */ |
| 79 | + @ExcludeFromGeneratedCoverageReport |
| 80 | + @CanIgnoreReturnValue |
| 81 | + public Builder clearAvatarName() { |
| 82 | + return avatarName(Optional.empty()); |
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | + * Setter for customizedAvatar. |
| 87 | + * |
| 88 | + * <p>customizedAvatar: Customized avatar appearance with a reference image. |
| 89 | + */ |
| 90 | + @JsonProperty("customizedAvatar") |
| 91 | + public abstract Builder customizedAvatar(CustomizedAvatar customizedAvatar); |
| 92 | + |
| 93 | + /** |
| 94 | + * Setter for customizedAvatar builder. |
| 95 | + * |
| 96 | + * <p>customizedAvatar: Customized avatar appearance with a reference image. |
| 97 | + */ |
| 98 | + @CanIgnoreReturnValue |
| 99 | + public Builder customizedAvatar(CustomizedAvatar.Builder customizedAvatarBuilder) { |
| 100 | + return customizedAvatar(customizedAvatarBuilder.build()); |
| 101 | + } |
| 102 | + |
| 103 | + @ExcludeFromGeneratedCoverageReport |
| 104 | + abstract Builder customizedAvatar(Optional<CustomizedAvatar> customizedAvatar); |
| 105 | + |
| 106 | + /** Clears the value of customizedAvatar field. */ |
| 107 | + @ExcludeFromGeneratedCoverageReport |
| 108 | + @CanIgnoreReturnValue |
| 109 | + public Builder clearCustomizedAvatar() { |
| 110 | + return customizedAvatar(Optional.empty()); |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Setter for audioBitrateBps. |
| 115 | + * |
| 116 | + * <p>audioBitrateBps: The bitrate of compressed audio. |
| 117 | + */ |
| 118 | + @JsonProperty("audioBitrateBps") |
| 119 | + public abstract Builder audioBitrateBps(Integer audioBitrateBps); |
| 120 | + |
| 121 | + @ExcludeFromGeneratedCoverageReport |
| 122 | + abstract Builder audioBitrateBps(Optional<Integer> audioBitrateBps); |
| 123 | + |
| 124 | + /** Clears the value of audioBitrateBps field. */ |
| 125 | + @ExcludeFromGeneratedCoverageReport |
| 126 | + @CanIgnoreReturnValue |
| 127 | + public Builder clearAudioBitrateBps() { |
| 128 | + return audioBitrateBps(Optional.empty()); |
| 129 | + } |
| 130 | + |
| 131 | + /** |
| 132 | + * Setter for videoBitrateBps. |
| 133 | + * |
| 134 | + * <p>videoBitrateBps: The bitrate of compressed video output. |
| 135 | + */ |
| 136 | + @JsonProperty("videoBitrateBps") |
| 137 | + public abstract Builder videoBitrateBps(Integer videoBitrateBps); |
| 138 | + |
| 139 | + @ExcludeFromGeneratedCoverageReport |
| 140 | + abstract Builder videoBitrateBps(Optional<Integer> videoBitrateBps); |
| 141 | + |
| 142 | + /** Clears the value of videoBitrateBps field. */ |
| 143 | + @ExcludeFromGeneratedCoverageReport |
| 144 | + @CanIgnoreReturnValue |
| 145 | + public Builder clearVideoBitrateBps() { |
| 146 | + return videoBitrateBps(Optional.empty()); |
| 147 | + } |
| 148 | + |
| 149 | + public abstract AvatarConfig build(); |
| 150 | + } |
| 151 | + |
| 152 | + /** Deserializes a JSON string to a AvatarConfig object. */ |
| 153 | + @ExcludeFromGeneratedCoverageReport |
| 154 | + public static AvatarConfig fromJson(String jsonString) { |
| 155 | + return JsonSerializable.fromJsonString(jsonString, AvatarConfig.class); |
| 156 | + } |
| 157 | +} |
0 commit comments