Skip to content

Commit 0d95407

Browse files
committed
refactor: switch from public to package access
1 parent c74a28d commit 0d95407

114 files changed

Lines changed: 849 additions & 850 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

GoogleGenAI/Sources/GenerateContentAPI/GenerateContentAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
// limitations under the License.
1414

1515
// Namespace for GenerateContent API Types
16-
public enum GenerateContentAPI {}
16+
package enum GenerateContentAPI {}

GoogleGenAI/Sources/GenerateContentAPI/Generated/AudioResponseFormat+Delivery.gen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
public extension GenerateContentAPI.AudioResponseFormat {
15+
package extension GenerateContentAPI.AudioResponseFormat {
1616
/// Optional. The delivery mode for the audio output.
1717
///
1818
/// ### Gemini Developer API
@@ -39,15 +39,15 @@ public extension GenerateContentAPI.AudioResponseFormat {
3939
// MARK: - RawRepresentable Conformance
4040

4141
extension GenerateContentAPI.AudioResponseFormat.Delivery: RawRepresentable {
42-
public var rawValue: String {
42+
package var rawValue: String {
4343
switch self {
4444
case .inline: "INLINE"
4545
case .uri: "URI"
4646
case let .unrecognized(value): value
4747
}
4848
}
4949

50-
public init(rawValue: String) {
50+
package init(rawValue: String) {
5151
switch rawValue {
5252
case "INLINE": self = .inline
5353
case "URI": self = .uri

GoogleGenAI/Sources/GenerateContentAPI/Generated/AudioResponseFormat+MimeType.gen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
public extension GenerateContentAPI.AudioResponseFormat {
15+
package extension GenerateContentAPI.AudioResponseFormat {
1616
/// Optional. The MIME type of the audio output.
1717
enum MimeType: Codable, Sendable, Equatable, Hashable {
1818
/// MP3 audio format.
@@ -43,7 +43,7 @@ public extension GenerateContentAPI.AudioResponseFormat {
4343
// MARK: - RawRepresentable Conformance
4444

4545
extension GenerateContentAPI.AudioResponseFormat.MimeType: RawRepresentable {
46-
public var rawValue: String {
46+
package var rawValue: String {
4747
switch self {
4848
case .mp3: "AUDIO_MP3"
4949
case .oggOpus: "AUDIO_OGG_OPUS"
@@ -55,7 +55,7 @@ extension GenerateContentAPI.AudioResponseFormat.MimeType: RawRepresentable {
5555
}
5656
}
5757

58-
public init(rawValue: String) {
58+
package init(rawValue: String) {
5959
switch rawValue {
6060
case "AUDIO_MP3": self = .mp3
6161
case "AUDIO_OGG_OPUS": self = .oggOpus

GoogleGenAI/Sources/GenerateContentAPI/Generated/AudioResponseFormat.gen.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
public extension GenerateContentAPI {
15+
package extension GenerateContentAPI {
1616
/// An internal data model for `AudioResponseFormat`.
1717
///
1818
/// ### Gemini Developer API
@@ -28,7 +28,7 @@ public extension GenerateContentAPI {
2828
/// Configuration for audio-specific output formatting.
2929
struct AudioResponseFormat: Codable, Sendable, Equatable, Hashable {
3030
/// Optional. The MIME type of the audio output.
31-
public let mimeType: MimeType?
31+
package let mimeType: MimeType?
3232

3333
/// Optional. The delivery mode for the audio output.
3434
///
@@ -39,7 +39,7 @@ public extension GenerateContentAPI {
3939
/// ### Gemini Enterprise Agent Platform
4040
///
4141
/// Optional. Delivery mode for the generated content.
42-
public let delivery: Delivery?
42+
package let delivery: Delivery?
4343

4444
/// Optional. Sample rate in Hz.
4545
///
@@ -50,11 +50,11 @@ public extension GenerateContentAPI {
5050
/// ### Gemini Enterprise Agent Platform
5151
///
5252
/// Optional. Sample rate for the generated audio in Hertz.
53-
public let sampleRate: Int?
53+
package let sampleRate: Int?
5454

5555
/// Optional. Bit rate in bits per second (bps). Only applicable for compressed formats
5656
/// (MP3, Opus).
57-
public let bitRate: Int?
57+
package let bitRate: Int?
5858

5959
/// Creates a new `AudioResponseFormat`.
6060
///
@@ -66,10 +66,10 @@ public extension GenerateContentAPI {
6666
/// see ``sampleRate``.
6767
/// - bitRate: Optional. Bit rate in bits per second (bps). Only applicable for compressed
6868
/// formats
69-
public init(mimeType: MimeType? = nil,
70-
delivery: Delivery? = nil,
71-
sampleRate: Int? = nil,
72-
bitRate: Int? = nil) {
69+
package init(mimeType: MimeType? = nil,
70+
delivery: Delivery? = nil,
71+
sampleRate: Int? = nil,
72+
bitRate: Int? = nil) {
7373
self.mimeType = mimeType
7474
self.delivery = delivery
7575
self.sampleRate = sampleRate

GoogleGenAI/Sources/GenerateContentAPI/Generated/Blob.gen.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
public import Foundation
15+
package import Foundation
1616

17-
public extension GenerateContentAPI {
17+
package extension GenerateContentAPI {
1818
/// An internal data model for `Blob`.
1919
///
2020
/// ### Gemini Developer API
@@ -44,7 +44,7 @@ public extension GenerateContentAPI {
4444
/// ### Gemini Enterprise Agent Platform
4545
///
4646
/// Required. The IANA standard MIME type of the source data.
47-
public let mimeType: String?
47+
package let mimeType: String?
4848

4949
/// Required. Raw bytes for media formats.
5050
///
@@ -55,7 +55,7 @@ public extension GenerateContentAPI {
5555
/// ### Gemini Enterprise Agent Platform
5656
///
5757
/// Required. The raw bytes of the data.
58-
public let data: Data?
58+
package let data: Data?
5959

6060
/// Optional. The display name of the blob. Used to provide a label or filename
6161
///
@@ -71,7 +71,7 @@ public extension GenerateContentAPI {
7171
/// This field is only returned in `PromptMessage` for prompt management. It is
7272
/// used in the Gemini calls only when server-side tools (`code_execution`,
7373
/// `google_search`, and `url_context`) are enabled.
74-
public let displayName: String?
74+
package let displayName: String?
7575

7676
/// Creates a new `Blob`.
7777
///
@@ -82,9 +82,9 @@ public extension GenerateContentAPI {
8282
/// details, see ``data``.
8383
/// - displayName: Optional. The display name of the blob. Used to provide a label or filename
8484
/// (Gemini Enterprise Agent Platform only). For more details, see ``displayName``.
85-
public init(mimeType: String?,
86-
data: Data?,
87-
displayName: String? = nil) {
85+
package init(mimeType: String?,
86+
data: Data?,
87+
displayName: String? = nil) {
8888
self.mimeType = mimeType
8989
self.data = data
9090
self.displayName = displayName

GoogleGenAI/Sources/GenerateContentAPI/Generated/Candidate+FinishReason.gen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
public extension GenerateContentAPI.Candidate {
15+
package extension GenerateContentAPI.Candidate {
1616
/// Optional. Output only. The reason why the model stopped generating tokens.
1717
///
1818
/// ### Gemini Developer API
@@ -101,7 +101,7 @@ public extension GenerateContentAPI.Candidate {
101101
// MARK: - RawRepresentable Conformance
102102

103103
extension GenerateContentAPI.Candidate.FinishReason: RawRepresentable {
104-
public var rawValue: String {
104+
package var rawValue: String {
105105
switch self {
106106
case .stop: "STOP"
107107
case .maxTokens: "MAX_TOKENS"
@@ -127,7 +127,7 @@ extension GenerateContentAPI.Candidate.FinishReason: RawRepresentable {
127127
}
128128
}
129129

130-
public init(rawValue: String) {
130+
package init(rawValue: String) {
131131
switch rawValue {
132132
case "STOP": self = .stop
133133
case "MAX_TOKENS": self = .maxTokens

GoogleGenAI/Sources/GenerateContentAPI/Generated/Candidate.gen.swift

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
public extension GenerateContentAPI {
15+
package extension GenerateContentAPI {
1616
/// An internal data model for `Candidate`.
1717
///
1818
/// ### Gemini Developer API
@@ -38,7 +38,7 @@ public extension GenerateContentAPI {
3838
/// Output only. The 0-based index of this candidate in the list of generated
3939
/// responses. This is useful for distinguishing between multiple candidates
4040
/// when `candidate_count` > 1.
41-
public let index: Int?
41+
package let index: Int?
4242

4343
/// Output only. Generated content returned from the model.
4444
///
@@ -49,7 +49,7 @@ public extension GenerateContentAPI {
4949
/// ### Gemini Enterprise Agent Platform
5050
///
5151
/// Output only. The content of the candidate.
52-
public let content: Content?
52+
package let content: Content?
5353

5454
/// Optional. Output only. The reason why the model stopped generating tokens.
5555
///
@@ -63,7 +63,7 @@ public extension GenerateContentAPI {
6363
///
6464
/// Output only. The reason why the model stopped generating tokens. If empty,
6565
/// the model has not stopped generating.
66-
public let finishReason: FinishReason?
66+
package let finishReason: FinishReason?
6767

6868
/// Optional. Output only. Details the reason why the model stopped generating tokens.
6969
///
@@ -76,7 +76,7 @@ public extension GenerateContentAPI {
7676
///
7777
/// Output only. Describes the reason the model stopped generating tokens in
7878
/// more detail. This field is returned only when `finish_reason` is set.
79-
public let finishMessage: String?
79+
package let finishMessage: String?
8080

8181
/// List of ratings for the safety of a response candidate.
8282
///
@@ -91,7 +91,7 @@ public extension GenerateContentAPI {
9191
/// Output only. A list of ratings for the safety of a response candidate.
9292
///
9393
/// There is at most one rating per category.
94-
public let safetyRatings: [SafetyRating]?
94+
package let safetyRatings: [SafetyRating]?
9595

9696
/// Output only. Citation information for model-generated candidate.
9797
///
@@ -106,7 +106,7 @@ public extension GenerateContentAPI {
106106
/// ### Gemini Enterprise Agent Platform
107107
///
108108
/// Output only. A collection of citations that apply to the generated content.
109-
public let citationMetadata: CitationMetadata?
109+
package let citationMetadata: CitationMetadata?
110110

111111
/// Output only. Token count for this candidate.
112112
///
@@ -117,7 +117,7 @@ public extension GenerateContentAPI {
117117
/// ### Gemini Enterprise Agent Platform
118118
///
119119
/// > Important: This property is not supported in the Gemini Enterprise Agent Platform.
120-
public let tokenCount: Int?
120+
package let tokenCount: Int?
121121

122122
/// Output only. Grounding metadata for the candidate.
123123
///
@@ -131,7 +131,7 @@ public extension GenerateContentAPI {
131131
///
132132
/// Output only. Metadata returned when grounding is enabled. It contains the
133133
/// sources used to ground the generated content.
134-
public let groundingMetadata: GroundingMetadata?
134+
package let groundingMetadata: GroundingMetadata?
135135

136136
/// Output only. Average log probability score of the candidate.
137137
///
@@ -145,7 +145,7 @@ public extension GenerateContentAPI {
145145
/// This is a length-normalized score that can be used to compare the quality
146146
/// of candidates of different lengths. A higher average log probability
147147
/// suggests a more confident and coherent response.
148-
public let avgLogprobs: Double?
148+
package let avgLogprobs: Double?
149149

150150
/// Output only. Log-likelihood scores for the response tokens and top tokens
151151
///
@@ -158,7 +158,7 @@ public extension GenerateContentAPI {
158158
/// Output only. The detailed log probability information for the tokens in
159159
/// this candidate. This is useful for debugging, understanding model
160160
/// uncertainty, and identifying potential "hallucinations".
161-
public let logprobsResult: LogprobsResult?
161+
package let logprobsResult: LogprobsResult?
162162

163163
/// Output only. Metadata related to url context retrieval tool.
164164
///
@@ -170,7 +170,7 @@ public extension GenerateContentAPI {
170170
///
171171
/// Output only. Metadata returned when the model uses the `url_context` tool
172172
/// to get information from a user-provided URL.
173-
public let urlContextMetadata: UrlContextMetadata?
173+
package let urlContextMetadata: UrlContextMetadata?
174174

175175
/// Creates a new `Candidate`.
176176
///
@@ -197,17 +197,17 @@ public extension GenerateContentAPI {
197197
/// tokens (behavior varies by backend). For more details, see ``logprobsResult``.
198198
/// - urlContextMetadata: Output only. Metadata related to url context retrieval tool.
199199
/// (behavior varies by backend). For more details, see ``urlContextMetadata``.
200-
public init(index: Int? = nil,
201-
content: Content? = nil,
202-
finishReason: FinishReason? = nil,
203-
finishMessage: String? = nil,
204-
safetyRatings: [SafetyRating]? = nil,
205-
citationMetadata: CitationMetadata? = nil,
206-
tokenCount: Int? = nil,
207-
groundingMetadata: GroundingMetadata? = nil,
208-
avgLogprobs: Double? = nil,
209-
logprobsResult: LogprobsResult? = nil,
210-
urlContextMetadata: UrlContextMetadata? = nil) {
200+
package init(index: Int? = nil,
201+
content: Content? = nil,
202+
finishReason: FinishReason? = nil,
203+
finishMessage: String? = nil,
204+
safetyRatings: [SafetyRating]? = nil,
205+
citationMetadata: CitationMetadata? = nil,
206+
tokenCount: Int? = nil,
207+
groundingMetadata: GroundingMetadata? = nil,
208+
avgLogprobs: Double? = nil,
209+
logprobsResult: LogprobsResult? = nil,
210+
urlContextMetadata: UrlContextMetadata? = nil) {
211211
self.index = index
212212
self.content = content
213213
self.finishReason = finishReason

0 commit comments

Comments
 (0)