From 48527fc7a3a3028a16e39598068f3f8343f3abe6 Mon Sep 17 00:00:00 2001 From: kd Date: Tue, 27 Jan 2026 11:32:50 -0800 Subject: [PATCH 1/7] feat(backend): wire transfer/preview services and encryption config --- backend/cmd/server/main.go | 20 +++++-- backend/internal/audit/grpc_handler.go | 52 +++++++++++++++---- backend/internal/location/provider_factory.go | 45 ++++++++++++++++ backend/pkg/config/config.go | 7 +++ backend/pkg/config/config_test.go | 22 +++++++- deployments/base/deployment.yaml | 5 ++ deployments/base/secret.yaml | 3 ++ 7 files changed, 141 insertions(+), 13 deletions(-) create mode 100644 backend/internal/location/provider_factory.go diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 2f5b641..dbb14ef 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -20,6 +20,8 @@ import ( "github.com/k8ika0s/s3-web/backend/internal/auth" "github.com/k8ika0s/s3-web/backend/internal/cleanup" "github.com/k8ika0s/s3-web/backend/internal/location" + "github.com/k8ika0s/s3-web/backend/internal/preview" + "github.com/k8ika0s/s3-web/backend/internal/transfer" jwtpkg "github.com/k8ika0s/s3-web/backend/pkg/auth" "github.com/k8ika0s/s3-web/backend/pkg/config" "github.com/k8ika0s/s3-web/backend/pkg/crypto" @@ -31,6 +33,8 @@ import ( authpb "github.com/k8ika0s/s3-web/api/gen/go/auth" cleanuppb "github.com/k8ika0s/s3-web/api/gen/go/cleanup" locationpb "github.com/k8ika0s/s3-web/api/gen/go/location" + previewpb "github.com/k8ika0s/s3-web/api/gen/go/preview" + transferpb "github.com/k8ika0s/s3-web/api/gen/go/transfer" ) const ( @@ -118,9 +122,7 @@ func (s *Server) initializeServices() error { ) // Initialize crypto encryptor (AES-256 for credential encryption) - // TODO: Load encryption key from secure source (Vault, K8s secret, etc.) - encryptionKey := []byte("12345678901234567890123456789012") // 32 bytes for AES-256 - encryptor, err := crypto.NewAESEncryptor(encryptionKey) + encryptor, err := crypto.NewAESEncryptorFromString(s.config.Security.EncryptionKey) if err != nil { return fmt.Errorf("failed to initialize encryptor: %w", err) } @@ -130,12 +132,16 @@ func (s *Server) initializeServices() error { authRepo := auth.NewRepository(s.db.Pool()) locationRepo := location.NewPostgresRepository(s.db.Pool()) cleanupRepo := cleanup.NewRepository(s.db.Pool()) + transferRepo := transfer.NewRepository(s.db.Pool()) // Initialize services auditService := audit.NewService(auditRepo) authService := auth.NewService(authRepo, jwtManager) locationService := location.NewService(locationRepo, encryptor, s.logger) cleanupService := cleanup.NewService(cleanupRepo, locationService) + providerFactory := location.NewProviderFactory(locationRepo, encryptor) + transferService := transfer.NewService(transferRepo, auditService, providerFactory, nil) + previewService := preview.NewService(providerFactory, auditService, nil) // Initialize gRPC handlers authHandler := auth.NewGRPCHandler(authService, s.logger) @@ -143,6 +149,8 @@ func (s *Server) initializeServices() error { locationHandler := location.NewGRPCHandler(locationService, s.logger) // Create cleanup handler cleanupHandler := cleanup.NewGRPCHandler(cleanupService, s.logger) + transferHandler := transfer.NewGRPCHandler(transferService, s.logger) + previewHandler := preview.NewGRPCHandler(previewService, s.logger) // Create cleanup-specific middleware cleanupAuthMiddleware := cleanup.NewAuthorizationMiddleware(authService) @@ -182,6 +190,8 @@ func (s *Server) initializeServices() error { auditpb.RegisterAuditServiceServer(s.grpcServer, auditHandler) locationpb.RegisterLocationServiceServer(s.grpcServer, locationHandler) cleanuppb.RegisterCleanupServiceServer(s.grpcServer, cleanupHandler) + transferpb.RegisterTransferServiceServer(s.grpcServer, transferHandler) + previewpb.RegisterPreviewServiceServer(s.grpcServer, previewHandler) // Register health service grpc_health_v1.RegisterHealthServer(s.grpcServer, s.healthServer) @@ -191,6 +201,8 @@ func (s *Server) initializeServices() error { s.healthServer.SetServingStatus("audit.v1.AuditService", grpc_health_v1.HealthCheckResponse_SERVING) s.healthServer.SetServingStatus("location.v1.LocationService", grpc_health_v1.HealthCheckResponse_SERVING) s.healthServer.SetServingStatus("cleanup.v1.CleanupService", grpc_health_v1.HealthCheckResponse_SERVING) + s.healthServer.SetServingStatus("transfer.v1.TransferService", grpc_health_v1.HealthCheckResponse_SERVING) + s.healthServer.SetServingStatus("preview.v1.PreviewService", grpc_health_v1.HealthCheckResponse_SERVING) // Enable reflection for development if s.config.Service.Environment == "development" { @@ -204,6 +216,8 @@ func (s *Server) initializeServices() error { "audit.v1.AuditService", "location.v1.LocationService", "cleanup.v1.CleanupService", + "transfer.v1.TransferService", + "preview.v1.PreviewService", })) return nil diff --git a/backend/internal/audit/grpc_handler.go b/backend/internal/audit/grpc_handler.go index 1a11623..3cdfe4e 100644 --- a/backend/internal/audit/grpc_handler.go +++ b/backend/internal/audit/grpc_handler.go @@ -3,6 +3,7 @@ package audit import ( "context" "fmt" + "strings" "time" auditpb "github.com/k8ika0s/s3-web/api/gen/go/audit" @@ -71,10 +72,19 @@ func (h *GRPCHandler) LogEvent(ctx context.Context, req *auditpb.LogEventRequest // QueryLogs queries audit logs with filters func (h *GRPCHandler) QueryLogs(ctx context.Context, req *auditpb.QueryLogsRequest) (*auditpb.QueryLogsResponse, error) { - // Build filters + // Build filters with safe pagination defaults + pageSize := int32(50) + page := int32(0) + if pagination := req.GetPagination(); pagination != nil { + if pagination.GetPageSize() > 0 { + pageSize = pagination.GetPageSize() + } + page = pagination.GetPage() + } + filters := &ListFilters{ - Limit: int(req.GetPagination().GetPageSize()), - Offset: int(req.GetPagination().GetPage()) * int(req.GetPagination().GetPageSize()), + Limit: int(pageSize), + Offset: int(page) * int(pageSize), } // Apply time range @@ -95,6 +105,35 @@ func (h *GRPCHandler) QueryLogs(ctx context.Context, req *auditpb.QueryLogsReque filters.BreakGlassMode = &breakGlass } + // Apply user filter (first match only) + if len(req.GetUserIds()) > 0 { + filters.UserID = req.GetUserIds()[0] + } + + // Apply field filters + for _, filter := range req.GetFilters() { + switch strings.ToLower(filter.GetField()) { + case "action": + filters.Action = filter.GetValue() + case "resource_type": + filters.ResourceType = filter.GetValue() + case "resource_id": + filters.ResourceID = filter.GetValue() + case "status": + filters.Status = filter.GetValue() + case "location_id": + filters.LocationID = filter.GetValue() + case "ip_address": + filters.IPAddress = filter.GetValue() + case "break_glass_mode": + value := strings.ToLower(filter.GetValue()) + if value == "true" || value == "false" { + enabled := value == "true" + filters.BreakGlassMode = &enabled + } + } + } + // Query logs logs, total, err := h.service.ListAuditLogs(ctx, filters) if err != nil { @@ -108,15 +147,10 @@ func (h *GRPCHandler) QueryLogs(ctx context.Context, req *auditpb.QueryLogsReque events[i] = auditLogToProto(log) } - pageSize := int32(req.GetPagination().GetPageSize()) - if pageSize == 0 { - pageSize = 50 - } - return &auditpb.QueryLogsResponse{ Events: events, Pagination: &commonpb.PaginationResponse{ - Page: req.GetPagination().GetPage(), + Page: page, PageSize: pageSize, TotalItems: total, TotalPages: int32((total + int64(pageSize) - 1) / int64(pageSize)), diff --git a/backend/internal/location/provider_factory.go b/backend/internal/location/provider_factory.go new file mode 100644 index 0000000..d9ab474 --- /dev/null +++ b/backend/internal/location/provider_factory.go @@ -0,0 +1,45 @@ +package location + +import ( + "context" + "fmt" + + "github.com/k8ika0s/s3-web/backend/pkg/crypto" + "github.com/k8ika0s/s3-web/backend/pkg/s3provider" +) + +// NewProviderFactory returns a provider factory for services that need S3 access without rehydrating full location services. +func NewProviderFactory(repo Repository, encryptor crypto.Encryptor) func(locationID string) (s3provider.Provider, error) { + return func(locationID string) (s3provider.Provider, error) { + if locationID == "" { + return nil, fmt.Errorf("location ID is required") + } + + location, err := repo.GetByID(context.Background(), locationID) + if err != nil { + return nil, fmt.Errorf("failed to get location: %w", err) + } + + accessKey, err := encryptor.Decrypt(location.AccessKeyEncrypted) + if err != nil { + return nil, fmt.Errorf("failed to decrypt access key: %w", err) + } + + secretKey, err := encryptor.Decrypt(location.SecretKeyEncrypted) + if err != nil { + return nil, fmt.Errorf("failed to decrypt secret key: %w", err) + } + + config := &s3provider.ProviderConfig{ + Type: s3provider.ProviderType(location.ProviderType), + Endpoint: location.EndpointURL, + Region: location.Region, + AccessKey: accessKey, + SecretKey: secretKey, + UseSSL: location.UseSSL, + MaxRetries: 3, + } + + return s3provider.NewProvider(config) + } +} diff --git a/backend/pkg/config/config.go b/backend/pkg/config/config.go index fb97632..c880ede 100644 --- a/backend/pkg/config/config.go +++ b/backend/pkg/config/config.go @@ -7,6 +7,8 @@ import ( "time" ) +const defaultEncryptionKey = "Y2hhbmdlLW1lLWluLXByb2R1Y3Rpb24tMzJieXRlcyE=" + // Config holds all application configuration type Config struct { Service ServiceConfig @@ -83,6 +85,7 @@ type VaultConfig struct { // SecurityConfig contains security-related configuration type SecurityConfig struct { JWTSecret string + EncryptionKey string JWTExpiration time.Duration RefreshExpiration time.Duration BreakGlassMaxDuration time.Duration @@ -157,6 +160,7 @@ func LoadConfig(serviceName string) (*Config, error) { }, Security: SecurityConfig{ JWTSecret: getEnv("JWT_SECRET", "change-me-in-production"), + EncryptionKey: getEnv("ENCRYPTION_KEY", defaultEncryptionKey), JWTExpiration: getEnvAsDuration("JWT_EXPIRATION", 1*time.Hour), RefreshExpiration: getEnvAsDuration("REFRESH_EXPIRATION", 24*time.Hour), BreakGlassMaxDuration: getEnvAsDuration("BREAK_GLASS_MAX_DURATION", 4*time.Hour), @@ -188,6 +192,9 @@ func (c *Config) Validate() error { if c.Security.JWTSecret == "change-me-in-production" && c.Service.Environment == "production" { return fmt.Errorf("JWT secret must be changed in production") } + if c.Security.EncryptionKey == defaultEncryptionKey && c.Service.Environment == "production" { + return fmt.Errorf("encryption key must be changed in production") + } if c.Vault.Enabled && c.Vault.Token == "" { return fmt.Errorf("Vault token is required when Vault is enabled") diff --git a/backend/pkg/config/config_test.go b/backend/pkg/config/config_test.go index aa19ab2..6713310 100644 --- a/backend/pkg/config/config_test.go +++ b/backend/pkg/config/config_test.go @@ -49,6 +49,7 @@ func TestLoadConfig_WithDefaults(t *testing.T) { // Verify security defaults assert.Equal(t, "change-me-in-production", cfg.Security.JWTSecret) + assert.Equal(t, defaultEncryptionKey, cfg.Security.EncryptionKey) assert.Equal(t, 1*time.Hour, cfg.Security.JWTExpiration) assert.Equal(t, 24*time.Hour, cfg.Security.RefreshExpiration) assert.Equal(t, 4*time.Hour, cfg.Security.BreakGlassMaxDuration) @@ -82,6 +83,7 @@ func TestLoadConfig_FromEnvironment(t *testing.T) { os.Setenv("REDIS_POOL_SIZE", "20") os.Setenv("JWT_SECRET", "production-secret") + os.Setenv("ENCRYPTION_KEY", "Y2hhbmdlLW1lLWluLXByb2QtMzItYnl0ZXMta2V5ISE=") os.Setenv("JWT_EXPIRATION", "30m") os.Setenv("REFRESH_EXPIRATION", "48h") @@ -118,6 +120,7 @@ func TestLoadConfig_FromEnvironment(t *testing.T) { // Verify security config assert.Equal(t, "production-secret", cfg.Security.JWTSecret) + assert.Equal(t, "Y2hhbmdlLW1lLWluLXByb2QtMzItYnl0ZXMta2V5ISE=", cfg.Security.EncryptionKey) assert.Equal(t, 30*time.Minute, cfg.Security.JWTExpiration) assert.Equal(t, 48*time.Hour, cfg.Security.RefreshExpiration) } @@ -137,6 +140,7 @@ func TestValidate_ProductionWithDefaultSecret(t *testing.T) { os.Setenv("ENVIRONMENT", "production") os.Setenv("DB_PASSWORD", "test-password") + os.Setenv("ENCRYPTION_KEY", "Y2hhbmdlLW1lLWluLXByb2QtMzItYnl0ZXMta2V5ISE=") // Don't set JWT_SECRET, so it uses default _, err := LoadConfig("test-service") @@ -145,6 +149,20 @@ func TestValidate_ProductionWithDefaultSecret(t *testing.T) { assert.Contains(t, err.Error(), "JWT secret must be changed in production") } +func TestValidate_ProductionWithDefaultEncryptionKey(t *testing.T) { + clearEnv(t) + + os.Setenv("ENVIRONMENT", "production") + os.Setenv("DB_PASSWORD", "test-password") + os.Setenv("JWT_SECRET", "custom-secret") + // Don't set ENCRYPTION_KEY, so it uses default + + _, err := LoadConfig("test-service") + + assert.Error(t, err) + assert.Contains(t, err.Error(), "encryption key must be changed in production") +} + func TestValidate_VaultEnabledWithoutToken(t *testing.T) { clearEnv(t) @@ -267,6 +285,7 @@ func TestSecurityConfig_FromEnvironment(t *testing.T) { os.Setenv("DB_PASSWORD", "test-password") os.Setenv("JWT_SECRET", "custom-jwt-secret") + os.Setenv("ENCRYPTION_KEY", "Y2hhbmdlLW1lLWluLXByb2QtMzItYnl0ZXMta2V5ISE=") os.Setenv("JWT_EXPIRATION", "2h") os.Setenv("REFRESH_EXPIRATION", "72h") os.Setenv("BREAK_GLASS_MAX_DURATION", "8h") @@ -278,6 +297,7 @@ func TestSecurityConfig_FromEnvironment(t *testing.T) { require.NoError(t, err) assert.Equal(t, "custom-jwt-secret", cfg.Security.JWTSecret) + assert.Equal(t, "Y2hhbmdlLW1lLWluLXByb2QtMzItYnl0ZXMta2V5ISE=", cfg.Security.EncryptionKey) assert.Equal(t, 2*time.Hour, cfg.Security.JWTExpiration) assert.Equal(t, 72*time.Hour, cfg.Security.RefreshExpiration) assert.Equal(t, 8*time.Hour, cfg.Security.BreakGlassMaxDuration) @@ -496,7 +516,7 @@ func clearEnv(t *testing.T) { "TEMPORAL_HOST_PORT", "TEMPORAL_NAMESPACE", "TEMPORAL_TASK_QUEUE", "REDIS_ENABLED", "REDIS_HOST", "REDIS_PORT", "REDIS_PASSWORD", "REDIS_DB", "REDIS_POOL_SIZE", "VAULT_ENABLED", "VAULT_ADDR", "VAULT_TOKEN", "VAULT_NAMESPACE", "VAULT_KV_PATH", "VAULT_TRANSIT_PATH", - "JWT_SECRET", "JWT_EXPIRATION", "REFRESH_EXPIRATION", "BREAK_GLASS_MAX_DURATION", + "JWT_SECRET", "ENCRYPTION_KEY", "JWT_EXPIRATION", "REFRESH_EXPIRATION", "BREAK_GLASS_MAX_DURATION", "MAX_UPLOAD_SIZE", "MAX_PREVIEW_SIZE", "ALLOWED_ORIGINS", "LOG_LEVEL", "LOG_FORMAT", "LOG_OUTPUT_PATH", "HOSTNAME", diff --git a/deployments/base/deployment.yaml b/deployments/base/deployment.yaml index e51fc27..13c9d64 100644 --- a/deployments/base/deployment.yaml +++ b/deployments/base/deployment.yaml @@ -91,6 +91,11 @@ spec: secretKeyRef: name: s3-web-secrets key: jwt-secret + - name: ENCRYPTION_KEY + valueFrom: + secretKeyRef: + name: s3-web-secrets + key: encryption-key - name: NATS_URL value: "nats://nats:4222" - name: TEMPORAL_HOST_PORT diff --git a/deployments/base/secret.yaml b/deployments/base/secret.yaml index a768919..0fddf5b 100644 --- a/deployments/base/secret.yaml +++ b/deployments/base/secret.yaml @@ -12,6 +12,9 @@ stringData: # JWT Secret - MUST be changed in production # Generate with: openssl rand -base64 32 jwt-secret: "CHANGE_ME_IN_PRODUCTION_USE_STRONG_SECRET" + # Encryption Key (base64-encoded 32 bytes) - MUST be changed in production + # Generate with: openssl rand -base64 32 + encryption-key: "Y2hhbmdlLW1lLWluLXByb2R1Y3Rpb24tMzJieXRlcyE=" --- apiVersion: v1 kind: Secret From 433af22d7d9411dbd341d21cb0362b8d4c0982f9 Mon Sep 17 00:00:00 2001 From: kd Date: Tue, 27 Jan 2026 11:34:13 -0800 Subject: [PATCH 2/7] feat(frontend): add grpc-web client integration --- .gitignore | 5 +- frontend/.env.example | 8 +- frontend/package-lock.json | 14 + frontend/package.json | 6 +- .../src/gen/audit/AuditServiceClientPb.ts | 281 + frontend/src/gen/audit/audit_pb.d.ts | 518 + frontend/src/gen/audit/audit_pb.js | 4015 +++++++ frontend/src/gen/auth/AuthServiceClientPb.ts | 474 + frontend/src/gen/auth/auth_pb.d.ts | 756 ++ frontend/src/gen/auth/auth_pb.js | 6136 ++++++++++ .../src/gen/cleanup/CleanupServiceClientPb.ts | 603 + frontend/src/gen/cleanup/cleanup_pb.d.ts | 1228 ++ frontend/src/gen/cleanup/cleanup_pb.js | 9905 +++++++++++++++++ frontend/src/gen/common/common_pb.d.ts | 458 + frontend/src/gen/common/common_pb.js | 3628 ++++++ .../gen/location/LocationServiceClientPb.ts | 646 ++ frontend/src/gen/location/location_pb.d.ts | 1093 ++ frontend/src/gen/location/location_pb.js | 8972 +++++++++++++++ .../src/gen/preview/PreviewServiceClientPb.ts | 238 + frontend/src/gen/preview/preview_pb.d.ts | 595 + frontend/src/gen/preview/preview_pb.js | 4668 ++++++++ .../gen/transfer/TransferServiceClientPb.ts | 539 + frontend/src/gen/transfer/transfer_pb.d.ts | 998 ++ frontend/src/gen/transfer/transfer_pb.js | 8219 ++++++++++++++ frontend/src/lib/api.ts | 1453 ++- frontend/src/store/authStore.test.ts | 1 + frontend/src/store/authStore.ts | 6 + frontend/src/types/index.ts | 1 + frontend/vite.config.ts | 8 + scripts/generate-grpc-web.sh | 61 + 30 files changed, 55494 insertions(+), 39 deletions(-) create mode 100644 frontend/src/gen/audit/AuditServiceClientPb.ts create mode 100644 frontend/src/gen/audit/audit_pb.d.ts create mode 100644 frontend/src/gen/audit/audit_pb.js create mode 100644 frontend/src/gen/auth/AuthServiceClientPb.ts create mode 100644 frontend/src/gen/auth/auth_pb.d.ts create mode 100644 frontend/src/gen/auth/auth_pb.js create mode 100644 frontend/src/gen/cleanup/CleanupServiceClientPb.ts create mode 100644 frontend/src/gen/cleanup/cleanup_pb.d.ts create mode 100644 frontend/src/gen/cleanup/cleanup_pb.js create mode 100644 frontend/src/gen/common/common_pb.d.ts create mode 100644 frontend/src/gen/common/common_pb.js create mode 100644 frontend/src/gen/location/LocationServiceClientPb.ts create mode 100644 frontend/src/gen/location/location_pb.d.ts create mode 100644 frontend/src/gen/location/location_pb.js create mode 100644 frontend/src/gen/preview/PreviewServiceClientPb.ts create mode 100644 frontend/src/gen/preview/preview_pb.d.ts create mode 100644 frontend/src/gen/preview/preview_pb.js create mode 100644 frontend/src/gen/transfer/TransferServiceClientPb.ts create mode 100644 frontend/src/gen/transfer/transfer_pb.d.ts create mode 100644 frontend/src/gen/transfer/transfer_pb.js create mode 100755 scripts/generate-grpc-web.sh diff --git a/.gitignore b/.gitignore index 3e85467..165d94f 100644 --- a/.gitignore +++ b/.gitignore @@ -65,4 +65,7 @@ coverage/ # Local development .local/ -local-data/ \ No newline at end of file +local-data/ + +# Generated tooling +scripts/.tools/ diff --git a/frontend/.env.example b/frontend/.env.example index 71d35e5..a27e948 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -2,7 +2,11 @@ # Set to 'true' to use mock data instead of real backend VITE_USE_MOCK_API=false -# Backend API URL (when not using mock) +# grpc-web base URL (when not using mock) +# Example for local Envoy: http://localhost:8081 +VITE_GRPC_WEB_URL=http://localhost:8081 + +# REST API base URL (used for mock mode fallback) VITE_API_URL=http://localhost:8080/api/v1 -# Made with Bob \ No newline at end of file +# Made with Bob diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d960df0..c168553 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -13,6 +13,8 @@ "@tanstack/react-query": "^5.62.11", "clsx": "^2.1.1", "date-fns": "^4.1.0", + "google-protobuf": "^3.21.4", + "grpc-web": "^1.5.0", "lucide-react": "^0.468.0", "react": "^19.2.0", "react-dom": "^19.2.0", @@ -4076,6 +4078,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-protobuf": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", + "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", + "license": "(BSD-3-Clause AND Apache-2.0)" + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -4099,6 +4107,12 @@ "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, + "node_modules/grpc-web": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/grpc-web/-/grpc-web-1.5.0.tgz", + "integrity": "sha512-y1tS3BBIoiVSzKTDF3Hm7E8hV2n7YY7pO0Uo7depfWJqKzWE+SKr0jvHNIJsJJYILQlpYShpi/DRJJMbosgDMQ==", + "license": "Apache-2.0" + }, "node_modules/happy-dom": { "version": "15.11.7", "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-15.11.7.tgz", diff --git a/frontend/package.json b/frontend/package.json index 64c0114..bb502c3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,7 +26,9 @@ "zustand": "^5.0.3", "clsx": "^2.1.1", "date-fns": "^4.1.0", - "lucide-react": "^0.468.0" + "lucide-react": "^0.468.0", + "grpc-web": "^1.5.0", + "google-protobuf": "^3.21.4" }, "devDependencies": { "@eslint/js": "^9.39.1", @@ -60,4 +62,4 @@ "public" ] } -} \ No newline at end of file +} diff --git a/frontend/src/gen/audit/AuditServiceClientPb.ts b/frontend/src/gen/audit/AuditServiceClientPb.ts new file mode 100644 index 0000000..f9a0aa9 --- /dev/null +++ b/frontend/src/gen/audit/AuditServiceClientPb.ts @@ -0,0 +1,281 @@ +/** + * @fileoverview gRPC-Web generated client stub for s3web.audit + * @enhanceable + * @public + */ + +// Code generated by protoc-gen-grpc-web. DO NOT EDIT. +// versions: +// protoc-gen-grpc-web v1.5.0 +// protoc v3.14.0 +// source: audit/audit.proto + + +/* eslint-disable */ +// @ts-nocheck + + +import * as grpcWeb from 'grpc-web'; + +import * as audit_audit_pb from '../audit/audit_pb'; // proto import: "audit/audit.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class AuditServiceClient { + client_: grpcWeb.AbstractClientBase; + hostname_: string; + credentials_: null | { [index: string]: string; }; + options_: null | { [index: string]: any; }; + + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: any; }) { + if (!options) options = {}; + if (!credentials) credentials = {}; + options['format'] = 'binary'; + + this.client_ = new grpcWeb.GrpcWebClientBase(options); + this.hostname_ = hostname.replace(/\/+$/, ''); + this.credentials_ = credentials; + this.options_ = options; + } + + methodDescriptorLogEvent = new grpcWeb.MethodDescriptor( + '/s3web.audit.AuditService/LogEvent', + grpcWeb.MethodType.UNARY, + audit_audit_pb.LogEventRequest, + audit_audit_pb.LogEventResponse, + (request: audit_audit_pb.LogEventRequest) => { + return request.serializeBinary(); + }, + audit_audit_pb.LogEventResponse.deserializeBinary + ); + + logEvent( + request: audit_audit_pb.LogEventRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + logEvent( + request: audit_audit_pb.LogEventRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: audit_audit_pb.LogEventResponse) => void): grpcWeb.ClientReadableStream; + + logEvent( + request: audit_audit_pb.LogEventRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: audit_audit_pb.LogEventResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.audit.AuditService/LogEvent', + request, + metadata || {}, + this.methodDescriptorLogEvent, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.audit.AuditService/LogEvent', + request, + metadata || {}, + this.methodDescriptorLogEvent); + } + + methodDescriptorQueryLogs = new grpcWeb.MethodDescriptor( + '/s3web.audit.AuditService/QueryLogs', + grpcWeb.MethodType.UNARY, + audit_audit_pb.QueryLogsRequest, + audit_audit_pb.QueryLogsResponse, + (request: audit_audit_pb.QueryLogsRequest) => { + return request.serializeBinary(); + }, + audit_audit_pb.QueryLogsResponse.deserializeBinary + ); + + queryLogs( + request: audit_audit_pb.QueryLogsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + queryLogs( + request: audit_audit_pb.QueryLogsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: audit_audit_pb.QueryLogsResponse) => void): grpcWeb.ClientReadableStream; + + queryLogs( + request: audit_audit_pb.QueryLogsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: audit_audit_pb.QueryLogsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.audit.AuditService/QueryLogs', + request, + metadata || {}, + this.methodDescriptorQueryLogs, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.audit.AuditService/QueryLogs', + request, + metadata || {}, + this.methodDescriptorQueryLogs); + } + + methodDescriptorStreamLogs = new grpcWeb.MethodDescriptor( + '/s3web.audit.AuditService/StreamLogs', + grpcWeb.MethodType.SERVER_STREAMING, + audit_audit_pb.StreamLogsRequest, + audit_audit_pb.AuditEvent, + (request: audit_audit_pb.StreamLogsRequest) => { + return request.serializeBinary(); + }, + audit_audit_pb.AuditEvent.deserializeBinary + ); + + streamLogs( + request: audit_audit_pb.StreamLogsRequest, + metadata?: grpcWeb.Metadata): grpcWeb.ClientReadableStream { + return this.client_.serverStreaming( + this.hostname_ + + '/s3web.audit.AuditService/StreamLogs', + request, + metadata || {}, + this.methodDescriptorStreamLogs); + } + + methodDescriptorGetStatistics = new grpcWeb.MethodDescriptor( + '/s3web.audit.AuditService/GetStatistics', + grpcWeb.MethodType.UNARY, + audit_audit_pb.GetStatisticsRequest, + audit_audit_pb.GetStatisticsResponse, + (request: audit_audit_pb.GetStatisticsRequest) => { + return request.serializeBinary(); + }, + audit_audit_pb.GetStatisticsResponse.deserializeBinary + ); + + getStatistics( + request: audit_audit_pb.GetStatisticsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getStatistics( + request: audit_audit_pb.GetStatisticsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: audit_audit_pb.GetStatisticsResponse) => void): grpcWeb.ClientReadableStream; + + getStatistics( + request: audit_audit_pb.GetStatisticsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: audit_audit_pb.GetStatisticsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.audit.AuditService/GetStatistics', + request, + metadata || {}, + this.methodDescriptorGetStatistics, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.audit.AuditService/GetStatistics', + request, + metadata || {}, + this.methodDescriptorGetStatistics); + } + + methodDescriptorExportLogs = new grpcWeb.MethodDescriptor( + '/s3web.audit.AuditService/ExportLogs', + grpcWeb.MethodType.UNARY, + audit_audit_pb.ExportLogsRequest, + audit_audit_pb.ExportLogsResponse, + (request: audit_audit_pb.ExportLogsRequest) => { + return request.serializeBinary(); + }, + audit_audit_pb.ExportLogsResponse.deserializeBinary + ); + + exportLogs( + request: audit_audit_pb.ExportLogsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + exportLogs( + request: audit_audit_pb.ExportLogsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: audit_audit_pb.ExportLogsResponse) => void): grpcWeb.ClientReadableStream; + + exportLogs( + request: audit_audit_pb.ExportLogsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: audit_audit_pb.ExportLogsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.audit.AuditService/ExportLogs', + request, + metadata || {}, + this.methodDescriptorExportLogs, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.audit.AuditService/ExportLogs', + request, + metadata || {}, + this.methodDescriptorExportLogs); + } + + methodDescriptorHealthCheck = new grpcWeb.MethodDescriptor( + '/s3web.audit.AuditService/HealthCheck', + grpcWeb.MethodType.UNARY, + common_common_pb.HealthCheckResponse, + common_common_pb.HealthCheckResponse, + (request: common_common_pb.HealthCheckResponse) => { + return request.serializeBinary(); + }, + common_common_pb.HealthCheckResponse.deserializeBinary + ); + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null): Promise; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void): grpcWeb.ClientReadableStream; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.audit.AuditService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.audit.AuditService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck); + } + +} + diff --git a/frontend/src/gen/audit/audit_pb.d.ts b/frontend/src/gen/audit/audit_pb.d.ts new file mode 100644 index 0000000..be1d95d --- /dev/null +++ b/frontend/src/gen/audit/audit_pb.d.ts @@ -0,0 +1,518 @@ +import * as jspb from 'google-protobuf' + +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class AuditEvent extends jspb.Message { + getId(): string; + setId(value: string): AuditEvent; + + getType(): EventType; + setType(value: EventType): AuditEvent; + + getSeverity(): EventSeverity; + setSeverity(value: EventSeverity): AuditEvent; + + getResult(): EventResult; + setResult(value: EventResult): AuditEvent; + + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): AuditEvent; + hasTimestamp(): boolean; + clearTimestamp(): AuditEvent; + + getUserId(): string; + setUserId(value: string): AuditEvent; + + getUsername(): string; + setUsername(value: string): AuditEvent; + + getSourceIp(): string; + setSourceIp(value: string): AuditEvent; + + getUserAgent(): string; + setUserAgent(value: string): AuditEvent; + + getResourceType(): string; + setResourceType(value: string): AuditEvent; + + getResourceId(): string; + setResourceId(value: string): AuditEvent; + + getAction(): string; + setAction(value: string): AuditEvent; + + getDescription(): string; + setDescription(value: string): AuditEvent; + + getBreakGlassMode(): boolean; + setBreakGlassMode(value: boolean): AuditEvent; + + getBreakGlassJustification(): string; + setBreakGlassJustification(value: string): AuditEvent; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): AuditEvent; + + getRequestId(): string; + setRequestId(value: string): AuditEvent; + + getSessionId(): string; + setSessionId(value: string): AuditEvent; + + getDurationMs(): number; + setDurationMs(value: number): AuditEvent; + + getErrorMessage(): string; + setErrorMessage(value: string): AuditEvent; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuditEvent.AsObject; + static toObject(includeInstance: boolean, msg: AuditEvent): AuditEvent.AsObject; + static serializeBinaryToWriter(message: AuditEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuditEvent; + static deserializeBinaryFromReader(message: AuditEvent, reader: jspb.BinaryReader): AuditEvent; +} + +export namespace AuditEvent { + export type AsObject = { + id: string, + type: EventType, + severity: EventSeverity, + result: EventResult, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + userId: string, + username: string, + sourceIp: string, + userAgent: string, + resourceType: string, + resourceId: string, + action: string, + description: string, + breakGlassMode: boolean, + breakGlassJustification: string, + metadataMap: Array<[string, string]>, + requestId: string, + sessionId: string, + durationMs: number, + errorMessage: string, + } +} + +export class AuditStatistics extends jspb.Message { + getTotalEvents(): number; + setTotalEvents(value: number): AuditStatistics; + + getEventsByTypeMap(): jspb.Map; + clearEventsByTypeMap(): AuditStatistics; + + getEventsByUserMap(): jspb.Map; + clearEventsByUserMap(): AuditStatistics; + + getEventsByResultMap(): jspb.Map; + clearEventsByResultMap(): AuditStatistics; + + getBreakGlassEvents(): number; + setBreakGlassEvents(value: number): AuditStatistics; + + getFailedAuthAttempts(): number; + setFailedAuthAttempts(value: number): AuditStatistics; + + getPeriodStart(): google_protobuf_timestamp_pb.Timestamp | undefined; + setPeriodStart(value?: google_protobuf_timestamp_pb.Timestamp): AuditStatistics; + hasPeriodStart(): boolean; + clearPeriodStart(): AuditStatistics; + + getPeriodEnd(): google_protobuf_timestamp_pb.Timestamp | undefined; + setPeriodEnd(value?: google_protobuf_timestamp_pb.Timestamp): AuditStatistics; + hasPeriodEnd(): boolean; + clearPeriodEnd(): AuditStatistics; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuditStatistics.AsObject; + static toObject(includeInstance: boolean, msg: AuditStatistics): AuditStatistics.AsObject; + static serializeBinaryToWriter(message: AuditStatistics, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuditStatistics; + static deserializeBinaryFromReader(message: AuditStatistics, reader: jspb.BinaryReader): AuditStatistics; +} + +export namespace AuditStatistics { + export type AsObject = { + totalEvents: number, + eventsByTypeMap: Array<[string, number]>, + eventsByUserMap: Array<[string, number]>, + eventsByResultMap: Array<[string, number]>, + breakGlassEvents: number, + failedAuthAttempts: number, + periodStart?: google_protobuf_timestamp_pb.Timestamp.AsObject, + periodEnd?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class LogEventRequest extends jspb.Message { + getType(): EventType; + setType(value: EventType): LogEventRequest; + + getSeverity(): EventSeverity; + setSeverity(value: EventSeverity): LogEventRequest; + + getResult(): EventResult; + setResult(value: EventResult): LogEventRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): LogEventRequest; + hasAuditContext(): boolean; + clearAuditContext(): LogEventRequest; + + getResourceType(): string; + setResourceType(value: string): LogEventRequest; + + getResourceId(): string; + setResourceId(value: string): LogEventRequest; + + getAction(): string; + setAction(value: string): LogEventRequest; + + getDescription(): string; + setDescription(value: string): LogEventRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): LogEventRequest; + + getDurationMs(): number; + setDurationMs(value: number): LogEventRequest; + + getErrorMessage(): string; + setErrorMessage(value: string): LogEventRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogEventRequest.AsObject; + static toObject(includeInstance: boolean, msg: LogEventRequest): LogEventRequest.AsObject; + static serializeBinaryToWriter(message: LogEventRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogEventRequest; + static deserializeBinaryFromReader(message: LogEventRequest, reader: jspb.BinaryReader): LogEventRequest; +} + +export namespace LogEventRequest { + export type AsObject = { + type: EventType, + severity: EventSeverity, + result: EventResult, + auditContext?: common_common_pb.AuditContext.AsObject, + resourceType: string, + resourceId: string, + action: string, + description: string, + metadataMap: Array<[string, string]>, + durationMs: number, + errorMessage: string, + } +} + +export class LogEventResponse extends jspb.Message { + getEventId(): string; + setEventId(value: string): LogEventResponse; + + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): LogEventResponse; + hasTimestamp(): boolean; + clearTimestamp(): LogEventResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogEventResponse.AsObject; + static toObject(includeInstance: boolean, msg: LogEventResponse): LogEventResponse.AsObject; + static serializeBinaryToWriter(message: LogEventResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogEventResponse; + static deserializeBinaryFromReader(message: LogEventResponse, reader: jspb.BinaryReader): LogEventResponse; +} + +export namespace LogEventResponse { + export type AsObject = { + eventId: string, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class QueryLogsRequest extends jspb.Message { + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): QueryLogsRequest; + hasAuditContext(): boolean; + clearAuditContext(): QueryLogsRequest; + + getPagination(): common_common_pb.PaginationRequest | undefined; + setPagination(value?: common_common_pb.PaginationRequest): QueryLogsRequest; + hasPagination(): boolean; + clearPagination(): QueryLogsRequest; + + getFiltersList(): Array; + setFiltersList(value: Array): QueryLogsRequest; + clearFiltersList(): QueryLogsRequest; + addFilters(value?: common_common_pb.Filter, index?: number): common_common_pb.Filter; + + getTimeRange(): common_common_pb.TimeRange | undefined; + setTimeRange(value?: common_common_pb.TimeRange): QueryLogsRequest; + hasTimeRange(): boolean; + clearTimeRange(): QueryLogsRequest; + + getEventTypesList(): Array; + setEventTypesList(value: Array): QueryLogsRequest; + clearEventTypesList(): QueryLogsRequest; + addEventTypes(value: EventType, index?: number): QueryLogsRequest; + + getUserIdsList(): Array; + setUserIdsList(value: Array): QueryLogsRequest; + clearUserIdsList(): QueryLogsRequest; + addUserIds(value: string, index?: number): QueryLogsRequest; + + getBreakGlassOnly(): boolean; + setBreakGlassOnly(value: boolean): QueryLogsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryLogsRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryLogsRequest): QueryLogsRequest.AsObject; + static serializeBinaryToWriter(message: QueryLogsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryLogsRequest; + static deserializeBinaryFromReader(message: QueryLogsRequest, reader: jspb.BinaryReader): QueryLogsRequest; +} + +export namespace QueryLogsRequest { + export type AsObject = { + auditContext?: common_common_pb.AuditContext.AsObject, + pagination?: common_common_pb.PaginationRequest.AsObject, + filtersList: Array, + timeRange?: common_common_pb.TimeRange.AsObject, + eventTypesList: Array, + userIdsList: Array, + breakGlassOnly: boolean, + } +} + +export class QueryLogsResponse extends jspb.Message { + getEventsList(): Array; + setEventsList(value: Array): QueryLogsResponse; + clearEventsList(): QueryLogsResponse; + addEvents(value?: AuditEvent, index?: number): AuditEvent; + + getPagination(): common_common_pb.PaginationResponse | undefined; + setPagination(value?: common_common_pb.PaginationResponse): QueryLogsResponse; + hasPagination(): boolean; + clearPagination(): QueryLogsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryLogsResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryLogsResponse): QueryLogsResponse.AsObject; + static serializeBinaryToWriter(message: QueryLogsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryLogsResponse; + static deserializeBinaryFromReader(message: QueryLogsResponse, reader: jspb.BinaryReader): QueryLogsResponse; +} + +export namespace QueryLogsResponse { + export type AsObject = { + eventsList: Array, + pagination?: common_common_pb.PaginationResponse.AsObject, + } +} + +export class StreamLogsRequest extends jspb.Message { + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): StreamLogsRequest; + hasAuditContext(): boolean; + clearAuditContext(): StreamLogsRequest; + + getFiltersList(): Array; + setFiltersList(value: Array): StreamLogsRequest; + clearFiltersList(): StreamLogsRequest; + addFilters(value?: common_common_pb.Filter, index?: number): common_common_pb.Filter; + + getEventTypesList(): Array; + setEventTypesList(value: Array): StreamLogsRequest; + clearEventTypesList(): StreamLogsRequest; + addEventTypes(value: EventType, index?: number): StreamLogsRequest; + + getFollow(): boolean; + setFollow(value: boolean): StreamLogsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamLogsRequest.AsObject; + static toObject(includeInstance: boolean, msg: StreamLogsRequest): StreamLogsRequest.AsObject; + static serializeBinaryToWriter(message: StreamLogsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamLogsRequest; + static deserializeBinaryFromReader(message: StreamLogsRequest, reader: jspb.BinaryReader): StreamLogsRequest; +} + +export namespace StreamLogsRequest { + export type AsObject = { + auditContext?: common_common_pb.AuditContext.AsObject, + filtersList: Array, + eventTypesList: Array, + follow: boolean, + } +} + +export class GetStatisticsRequest extends jspb.Message { + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetStatisticsRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetStatisticsRequest; + + getTimeRange(): common_common_pb.TimeRange | undefined; + setTimeRange(value?: common_common_pb.TimeRange): GetStatisticsRequest; + hasTimeRange(): boolean; + clearTimeRange(): GetStatisticsRequest; + + getUserIdsList(): Array; + setUserIdsList(value: Array): GetStatisticsRequest; + clearUserIdsList(): GetStatisticsRequest; + addUserIds(value: string, index?: number): GetStatisticsRequest; + + getEventTypesList(): Array; + setEventTypesList(value: Array): GetStatisticsRequest; + clearEventTypesList(): GetStatisticsRequest; + addEventTypes(value: EventType, index?: number): GetStatisticsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatisticsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetStatisticsRequest): GetStatisticsRequest.AsObject; + static serializeBinaryToWriter(message: GetStatisticsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatisticsRequest; + static deserializeBinaryFromReader(message: GetStatisticsRequest, reader: jspb.BinaryReader): GetStatisticsRequest; +} + +export namespace GetStatisticsRequest { + export type AsObject = { + auditContext?: common_common_pb.AuditContext.AsObject, + timeRange?: common_common_pb.TimeRange.AsObject, + userIdsList: Array, + eventTypesList: Array, + } +} + +export class GetStatisticsResponse extends jspb.Message { + getStatistics(): AuditStatistics | undefined; + setStatistics(value?: AuditStatistics): GetStatisticsResponse; + hasStatistics(): boolean; + clearStatistics(): GetStatisticsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatisticsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetStatisticsResponse): GetStatisticsResponse.AsObject; + static serializeBinaryToWriter(message: GetStatisticsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatisticsResponse; + static deserializeBinaryFromReader(message: GetStatisticsResponse, reader: jspb.BinaryReader): GetStatisticsResponse; +} + +export namespace GetStatisticsResponse { + export type AsObject = { + statistics?: AuditStatistics.AsObject, + } +} + +export class ExportLogsRequest extends jspb.Message { + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ExportLogsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ExportLogsRequest; + + getFiltersList(): Array; + setFiltersList(value: Array): ExportLogsRequest; + clearFiltersList(): ExportLogsRequest; + addFilters(value?: common_common_pb.Filter, index?: number): common_common_pb.Filter; + + getTimeRange(): common_common_pb.TimeRange | undefined; + setTimeRange(value?: common_common_pb.TimeRange): ExportLogsRequest; + hasTimeRange(): boolean; + clearTimeRange(): ExportLogsRequest; + + getFormat(): ExportFormat; + setFormat(value: ExportFormat): ExportLogsRequest; + + getIncludeMetadata(): boolean; + setIncludeMetadata(value: boolean): ExportLogsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExportLogsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ExportLogsRequest): ExportLogsRequest.AsObject; + static serializeBinaryToWriter(message: ExportLogsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExportLogsRequest; + static deserializeBinaryFromReader(message: ExportLogsRequest, reader: jspb.BinaryReader): ExportLogsRequest; +} + +export namespace ExportLogsRequest { + export type AsObject = { + auditContext?: common_common_pb.AuditContext.AsObject, + filtersList: Array, + timeRange?: common_common_pb.TimeRange.AsObject, + format: ExportFormat, + includeMetadata: boolean, + } +} + +export class ExportLogsResponse extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): ExportLogsResponse; + + getContentType(): string; + setContentType(value: string): ExportLogsResponse; + + getEventCount(): number; + setEventCount(value: number): ExportLogsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExportLogsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ExportLogsResponse): ExportLogsResponse.AsObject; + static serializeBinaryToWriter(message: ExportLogsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExportLogsResponse; + static deserializeBinaryFromReader(message: ExportLogsResponse, reader: jspb.BinaryReader): ExportLogsResponse; +} + +export namespace ExportLogsResponse { + export type AsObject = { + data: Uint8Array | string, + contentType: string, + eventCount: number, + } +} + +export enum EventType { + EVENT_UNKNOWN = 0, + EVENT_AUTH_LOGIN = 1, + EVENT_AUTH_LOGOUT = 2, + EVENT_AUTH_FAILED = 3, + EVENT_BREAK_GLASS_ENTER = 4, + EVENT_BREAK_GLASS_EXIT = 5, + EVENT_LOCATION_CREATE = 10, + EVENT_LOCATION_UPDATE = 11, + EVENT_LOCATION_DELETE = 12, + EVENT_LOCATION_ACCESS = 13, + EVENT_OBJECT_READ = 20, + EVENT_OBJECT_WRITE = 21, + EVENT_OBJECT_DELETE = 22, + EVENT_OBJECT_METADATA_UPDATE = 23, + EVENT_TRANSFER_INITIATE = 30, + EVENT_TRANSFER_COMPLETE = 31, + EVENT_TRANSFER_FAIL = 32, + EVENT_TRANSFER_CANCEL = 33, + EVENT_PERMISSION_GRANT = 40, + EVENT_PERMISSION_REVOKE = 41, + EVENT_CONFIG_CHANGE = 50, +} +export enum EventSeverity { + SEVERITY_INFO = 0, + SEVERITY_WARNING = 1, + SEVERITY_ERROR = 2, + SEVERITY_CRITICAL = 3, +} +export enum EventResult { + RESULT_UNKNOWN = 0, + RESULT_SUCCESS = 1, + RESULT_FAILURE = 2, + RESULT_PARTIAL = 3, +} +export enum ExportFormat { + FORMAT_JSON = 0, + FORMAT_CSV = 1, + FORMAT_JSONL = 2, +} diff --git a/frontend/src/gen/audit/audit_pb.js b/frontend/src/gen/audit/audit_pb.js new file mode 100644 index 0000000..369ab6a --- /dev/null +++ b/frontend/src/gen/audit/audit_pb.js @@ -0,0 +1,4015 @@ +// source: audit/audit.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var common_common_pb = require('../common/common_pb.js'); +goog.object.extend(proto, common_common_pb); +goog.exportSymbol('proto.s3web.audit.AuditEvent', null, global); +goog.exportSymbol('proto.s3web.audit.AuditStatistics', null, global); +goog.exportSymbol('proto.s3web.audit.EventResult', null, global); +goog.exportSymbol('proto.s3web.audit.EventSeverity', null, global); +goog.exportSymbol('proto.s3web.audit.EventType', null, global); +goog.exportSymbol('proto.s3web.audit.ExportFormat', null, global); +goog.exportSymbol('proto.s3web.audit.ExportLogsRequest', null, global); +goog.exportSymbol('proto.s3web.audit.ExportLogsResponse', null, global); +goog.exportSymbol('proto.s3web.audit.GetStatisticsRequest', null, global); +goog.exportSymbol('proto.s3web.audit.GetStatisticsResponse', null, global); +goog.exportSymbol('proto.s3web.audit.LogEventRequest', null, global); +goog.exportSymbol('proto.s3web.audit.LogEventResponse', null, global); +goog.exportSymbol('proto.s3web.audit.QueryLogsRequest', null, global); +goog.exportSymbol('proto.s3web.audit.QueryLogsResponse', null, global); +goog.exportSymbol('proto.s3web.audit.StreamLogsRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.AuditEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.audit.AuditEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.AuditEvent.displayName = 'proto.s3web.audit.AuditEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.AuditStatistics = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.audit.AuditStatistics, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.AuditStatistics.displayName = 'proto.s3web.audit.AuditStatistics'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.LogEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.audit.LogEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.LogEventRequest.displayName = 'proto.s3web.audit.LogEventRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.LogEventResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.audit.LogEventResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.LogEventResponse.displayName = 'proto.s3web.audit.LogEventResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.QueryLogsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.audit.QueryLogsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.audit.QueryLogsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.QueryLogsRequest.displayName = 'proto.s3web.audit.QueryLogsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.QueryLogsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.audit.QueryLogsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.audit.QueryLogsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.QueryLogsResponse.displayName = 'proto.s3web.audit.QueryLogsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.StreamLogsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.audit.StreamLogsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.audit.StreamLogsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.StreamLogsRequest.displayName = 'proto.s3web.audit.StreamLogsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.GetStatisticsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.audit.GetStatisticsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.audit.GetStatisticsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.GetStatisticsRequest.displayName = 'proto.s3web.audit.GetStatisticsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.GetStatisticsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.audit.GetStatisticsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.GetStatisticsResponse.displayName = 'proto.s3web.audit.GetStatisticsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.ExportLogsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.audit.ExportLogsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.audit.ExportLogsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.ExportLogsRequest.displayName = 'proto.s3web.audit.ExportLogsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.audit.ExportLogsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.audit.ExportLogsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.audit.ExportLogsResponse.displayName = 'proto.s3web.audit.ExportLogsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.AuditEvent.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.AuditEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.AuditEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.AuditEvent.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + severity: jspb.Message.getFieldWithDefault(msg, 3, 0), + result: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + userId: jspb.Message.getFieldWithDefault(msg, 6, ""), + username: jspb.Message.getFieldWithDefault(msg, 7, ""), + sourceIp: jspb.Message.getFieldWithDefault(msg, 8, ""), + userAgent: jspb.Message.getFieldWithDefault(msg, 9, ""), + resourceType: jspb.Message.getFieldWithDefault(msg, 10, ""), + resourceId: jspb.Message.getFieldWithDefault(msg, 11, ""), + action: jspb.Message.getFieldWithDefault(msg, 12, ""), + description: jspb.Message.getFieldWithDefault(msg, 13, ""), + breakGlassMode: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + breakGlassJustification: jspb.Message.getFieldWithDefault(msg, 15, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + requestId: jspb.Message.getFieldWithDefault(msg, 17, ""), + sessionId: jspb.Message.getFieldWithDefault(msg, 18, ""), + durationMs: jspb.Message.getFieldWithDefault(msg, 19, 0), + errorMessage: jspb.Message.getFieldWithDefault(msg, 20, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.AuditEvent} + */ +proto.s3web.audit.AuditEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.AuditEvent; + return proto.s3web.audit.AuditEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.AuditEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.AuditEvent} + */ +proto.s3web.audit.AuditEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {!proto.s3web.audit.EventType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: + var value = /** @type {!proto.s3web.audit.EventSeverity} */ (reader.readEnum()); + msg.setSeverity(value); + break; + case 4: + var value = /** @type {!proto.s3web.audit.EventResult} */ (reader.readEnum()); + msg.setResult(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setUserId(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceIp(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setUserAgent(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceType(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceId(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setAction(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBreakGlassMode(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setBreakGlassJustification(value); + break; + case 16: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestId(value); + break; + case 18: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDurationMs(value); + break; + case 20: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.AuditEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.AuditEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.AuditEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.AuditEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getSeverity(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUserId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getSourceIp(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getUserAgent(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getResourceType(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getResourceId(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getAction(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } + f = message.getBreakGlassMode(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getBreakGlassJustification(); + if (f.length > 0) { + writer.writeString( + 15, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(16, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString( + 18, + f + ); + } + f = message.getDurationMs(); + if (f !== 0) { + writer.writeInt64( + 19, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 20, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional EventType type = 2; + * @return {!proto.s3web.audit.EventType} + */ +proto.s3web.audit.AuditEvent.prototype.getType = function() { + return /** @type {!proto.s3web.audit.EventType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.audit.EventType} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional EventSeverity severity = 3; + * @return {!proto.s3web.audit.EventSeverity} + */ +proto.s3web.audit.AuditEvent.prototype.getSeverity = function() { + return /** @type {!proto.s3web.audit.EventSeverity} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.s3web.audit.EventSeverity} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setSeverity = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional EventResult result = 4; + * @return {!proto.s3web.audit.EventResult} + */ +proto.s3web.audit.AuditEvent.prototype.getResult = function() { + return /** @type {!proto.s3web.audit.EventResult} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.s3web.audit.EventResult} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.audit.AuditEvent.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.audit.AuditEvent} returns this +*/ +proto.s3web.audit.AuditEvent.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.AuditEvent.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string user_id = 6; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getUserId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setUserId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string username = 7; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string source_ip = 8; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getSourceIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setSourceIp = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string user_agent = 9; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getUserAgent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setUserAgent = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string resource_type = 10; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getResourceType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setResourceType = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string resource_id = 11; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getResourceId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setResourceId = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional string action = 12; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getAction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setAction = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional string description = 13; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + +/** + * optional bool break_glass_mode = 14; + * @return {boolean} + */ +proto.s3web.audit.AuditEvent.prototype.getBreakGlassMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setBreakGlassMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional string break_glass_justification = 15; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getBreakGlassJustification = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setBreakGlassJustification = function(value) { + return jspb.Message.setProto3StringField(this, 15, value); +}; + + +/** + * map metadata = 16; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.audit.AuditEvent.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 16, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * optional string request_id = 17; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setRequestId = function(value) { + return jspb.Message.setProto3StringField(this, 17, value); +}; + + +/** + * optional string session_id = 18; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getSessionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setSessionId = function(value) { + return jspb.Message.setProto3StringField(this, 18, value); +}; + + +/** + * optional int64 duration_ms = 19; + * @return {number} + */ +proto.s3web.audit.AuditEvent.prototype.getDurationMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setDurationMs = function(value) { + return jspb.Message.setProto3IntField(this, 19, value); +}; + + +/** + * optional string error_message = 20; + * @return {string} + */ +proto.s3web.audit.AuditEvent.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.AuditEvent} returns this + */ +proto.s3web.audit.AuditEvent.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 20, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.AuditStatistics.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.AuditStatistics.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.AuditStatistics} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.AuditStatistics.toObject = function(includeInstance, msg) { + var f, obj = { + totalEvents: jspb.Message.getFieldWithDefault(msg, 1, 0), + eventsByTypeMap: (f = msg.getEventsByTypeMap()) ? f.toObject(includeInstance, undefined) : [], + eventsByUserMap: (f = msg.getEventsByUserMap()) ? f.toObject(includeInstance, undefined) : [], + eventsByResultMap: (f = msg.getEventsByResultMap()) ? f.toObject(includeInstance, undefined) : [], + breakGlassEvents: jspb.Message.getFieldWithDefault(msg, 5, 0), + failedAuthAttempts: jspb.Message.getFieldWithDefault(msg, 6, 0), + periodStart: (f = msg.getPeriodStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + periodEnd: (f = msg.getPeriodEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.AuditStatistics} + */ +proto.s3web.audit.AuditStatistics.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.AuditStatistics; + return proto.s3web.audit.AuditStatistics.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.AuditStatistics} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.AuditStatistics} + */ +proto.s3web.audit.AuditStatistics.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalEvents(value); + break; + case 2: + var value = msg.getEventsByTypeMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); + }); + break; + case 3: + var value = msg.getEventsByUserMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); + }); + break; + case 4: + var value = msg.getEventsByResultMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); + }); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBreakGlassEvents(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFailedAuthAttempts(value); + break; + case 7: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setPeriodStart(value); + break; + case 8: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setPeriodEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.AuditStatistics.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.AuditStatistics.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.AuditStatistics} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.AuditStatistics.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalEvents(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getEventsByTypeMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getEventsByUserMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getEventsByResultMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getBreakGlassEvents(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getFailedAuthAttempts(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getPeriodStart(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getPeriodEnd(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 total_events = 1; + * @return {number} + */ +proto.s3web.audit.AuditStatistics.prototype.getTotalEvents = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.setTotalEvents = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * map events_by_type = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.audit.AuditStatistics.prototype.getEventsByTypeMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.clearEventsByTypeMap = function() { + this.getEventsByTypeMap().clear(); + return this;}; + + +/** + * map events_by_user = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.audit.AuditStatistics.prototype.getEventsByUserMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.clearEventsByUserMap = function() { + this.getEventsByUserMap().clear(); + return this;}; + + +/** + * map events_by_result = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.audit.AuditStatistics.prototype.getEventsByResultMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.clearEventsByResultMap = function() { + this.getEventsByResultMap().clear(); + return this;}; + + +/** + * optional int64 break_glass_events = 5; + * @return {number} + */ +proto.s3web.audit.AuditStatistics.prototype.getBreakGlassEvents = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.setBreakGlassEvents = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 failed_auth_attempts = 6; + * @return {number} + */ +proto.s3web.audit.AuditStatistics.prototype.getFailedAuthAttempts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.setFailedAuthAttempts = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional google.protobuf.Timestamp period_start = 7; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.audit.AuditStatistics.prototype.getPeriodStart = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.audit.AuditStatistics} returns this +*/ +proto.s3web.audit.AuditStatistics.prototype.setPeriodStart = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.clearPeriodStart = function() { + return this.setPeriodStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.AuditStatistics.prototype.hasPeriodStart = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional google.protobuf.Timestamp period_end = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.audit.AuditStatistics.prototype.getPeriodEnd = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.audit.AuditStatistics} returns this +*/ +proto.s3web.audit.AuditStatistics.prototype.setPeriodEnd = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.AuditStatistics} returns this + */ +proto.s3web.audit.AuditStatistics.prototype.clearPeriodEnd = function() { + return this.setPeriodEnd(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.AuditStatistics.prototype.hasPeriodEnd = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.LogEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.LogEventRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.LogEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.LogEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + severity: jspb.Message.getFieldWithDefault(msg, 2, 0), + result: jspb.Message.getFieldWithDefault(msg, 3, 0), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + resourceType: jspb.Message.getFieldWithDefault(msg, 5, ""), + resourceId: jspb.Message.getFieldWithDefault(msg, 6, ""), + action: jspb.Message.getFieldWithDefault(msg, 7, ""), + description: jspb.Message.getFieldWithDefault(msg, 8, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + durationMs: jspb.Message.getFieldWithDefault(msg, 10, 0), + errorMessage: jspb.Message.getFieldWithDefault(msg, 11, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.LogEventRequest} + */ +proto.s3web.audit.LogEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.LogEventRequest; + return proto.s3web.audit.LogEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.LogEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.LogEventRequest} + */ +proto.s3web.audit.LogEventRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.audit.EventType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {!proto.s3web.audit.EventSeverity} */ (reader.readEnum()); + msg.setSeverity(value); + break; + case 3: + var value = /** @type {!proto.s3web.audit.EventResult} */ (reader.readEnum()); + msg.setResult(value); + break; + case 4: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceType(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceId(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setAction(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 9: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDurationMs(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.LogEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.LogEventRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.LogEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.LogEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSeverity(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getResourceType(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getResourceId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAction(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getDurationMs(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * optional EventType type = 1; + * @return {!proto.s3web.audit.EventType} + */ +proto.s3web.audit.LogEventRequest.prototype.getType = function() { + return /** @type {!proto.s3web.audit.EventType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.audit.EventType} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional EventSeverity severity = 2; + * @return {!proto.s3web.audit.EventSeverity} + */ +proto.s3web.audit.LogEventRequest.prototype.getSeverity = function() { + return /** @type {!proto.s3web.audit.EventSeverity} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.audit.EventSeverity} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setSeverity = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional EventResult result = 3; + * @return {!proto.s3web.audit.EventResult} + */ +proto.s3web.audit.LogEventRequest.prototype.getResult = function() { + return /** @type {!proto.s3web.audit.EventResult} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.s3web.audit.EventResult} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 4; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.audit.LogEventRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 4)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.audit.LogEventRequest} returns this +*/ +proto.s3web.audit.LogEventRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.LogEventRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string resource_type = 5; + * @return {string} + */ +proto.s3web.audit.LogEventRequest.prototype.getResourceType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setResourceType = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string resource_id = 6; + * @return {string} + */ +proto.s3web.audit.LogEventRequest.prototype.getResourceId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setResourceId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string action = 7; + * @return {string} + */ +proto.s3web.audit.LogEventRequest.prototype.getAction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setAction = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string description = 8; + * @return {string} + */ +proto.s3web.audit.LogEventRequest.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * map metadata = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.audit.LogEventRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * optional int64 duration_ms = 10; + * @return {number} + */ +proto.s3web.audit.LogEventRequest.prototype.getDurationMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setDurationMs = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional string error_message = 11; + * @return {string} + */ +proto.s3web.audit.LogEventRequest.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.LogEventRequest} returns this + */ +proto.s3web.audit.LogEventRequest.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.LogEventResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.LogEventResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.LogEventResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.LogEventResponse.toObject = function(includeInstance, msg) { + var f, obj = { + eventId: jspb.Message.getFieldWithDefault(msg, 1, ""), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.LogEventResponse} + */ +proto.s3web.audit.LogEventResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.LogEventResponse; + return proto.s3web.audit.LogEventResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.LogEventResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.LogEventResponse} + */ +proto.s3web.audit.LogEventResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setEventId(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.LogEventResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.LogEventResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.LogEventResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.LogEventResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string event_id = 1; + * @return {string} + */ +proto.s3web.audit.LogEventResponse.prototype.getEventId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.LogEventResponse} returns this + */ +proto.s3web.audit.LogEventResponse.prototype.setEventId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.audit.LogEventResponse.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.audit.LogEventResponse} returns this +*/ +proto.s3web.audit.LogEventResponse.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.LogEventResponse} returns this + */ +proto.s3web.audit.LogEventResponse.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.LogEventResponse.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.audit.QueryLogsRequest.repeatedFields_ = [3,5,6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.QueryLogsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.QueryLogsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.QueryLogsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.QueryLogsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationRequest.toObject(includeInstance, f), + filtersList: jspb.Message.toObjectList(msg.getFiltersList(), + common_common_pb.Filter.toObject, includeInstance), + timeRange: (f = msg.getTimeRange()) && common_common_pb.TimeRange.toObject(includeInstance, f), + eventTypesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + userIdsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + breakGlassOnly: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.QueryLogsRequest} + */ +proto.s3web.audit.QueryLogsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.QueryLogsRequest; + return proto.s3web.audit.QueryLogsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.QueryLogsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.QueryLogsRequest} + */ +proto.s3web.audit.QueryLogsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 2: + var value = new common_common_pb.PaginationRequest; + reader.readMessage(value,common_common_pb.PaginationRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + case 3: + var value = new common_common_pb.Filter; + reader.readMessage(value,common_common_pb.Filter.deserializeBinaryFromReader); + msg.addFilters(value); + break; + case 4: + var value = new common_common_pb.TimeRange; + reader.readMessage(value,common_common_pb.TimeRange.deserializeBinaryFromReader); + msg.setTimeRange(value); + break; + case 5: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addEventTypes(values[i]); + } + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addUserIds(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBreakGlassOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.QueryLogsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.QueryLogsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.QueryLogsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.QueryLogsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationRequest.serializeBinaryToWriter + ); + } + f = message.getFiltersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + common_common_pb.Filter.serializeBinaryToWriter + ); + } + f = message.getTimeRange(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_common_pb.TimeRange.serializeBinaryToWriter + ); + } + f = message.getEventTypesList(); + if (f.length > 0) { + writer.writePackedEnum( + 5, + f + ); + } + f = message.getUserIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getBreakGlassOnly(); + if (f) { + writer.writeBool( + 7, + f + ); + } +}; + + +/** + * optional s3web.common.AuditContext audit_context = 1; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.audit.QueryLogsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 1)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.audit.QueryLogsRequest} returns this +*/ +proto.s3web.audit.QueryLogsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.QueryLogsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional s3web.common.PaginationRequest pagination = 2; + * @return {?proto.s3web.common.PaginationRequest} + */ +proto.s3web.audit.QueryLogsRequest.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationRequest} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationRequest, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationRequest|undefined} value + * @return {!proto.s3web.audit.QueryLogsRequest} returns this +*/ +proto.s3web.audit.QueryLogsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.QueryLogsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated s3web.common.Filter filters = 3; + * @return {!Array} + */ +proto.s3web.audit.QueryLogsRequest.prototype.getFiltersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_common_pb.Filter, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.QueryLogsRequest} returns this +*/ +proto.s3web.audit.QueryLogsRequest.prototype.setFiltersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.s3web.common.Filter=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.common.Filter} + */ +proto.s3web.audit.QueryLogsRequest.prototype.addFilters = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.s3web.common.Filter, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.clearFiltersList = function() { + return this.setFiltersList([]); +}; + + +/** + * optional s3web.common.TimeRange time_range = 4; + * @return {?proto.s3web.common.TimeRange} + */ +proto.s3web.audit.QueryLogsRequest.prototype.getTimeRange = function() { + return /** @type{?proto.s3web.common.TimeRange} */ ( + jspb.Message.getWrapperField(this, common_common_pb.TimeRange, 4)); +}; + + +/** + * @param {?proto.s3web.common.TimeRange|undefined} value + * @return {!proto.s3web.audit.QueryLogsRequest} returns this +*/ +proto.s3web.audit.QueryLogsRequest.prototype.setTimeRange = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.clearTimeRange = function() { + return this.setTimeRange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.QueryLogsRequest.prototype.hasTimeRange = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated EventType event_types = 5; + * @return {!Array} + */ +proto.s3web.audit.QueryLogsRequest.prototype.getEventTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.setEventTypesList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!proto.s3web.audit.EventType} value + * @param {number=} opt_index + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.addEventTypes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.clearEventTypesList = function() { + return this.setEventTypesList([]); +}; + + +/** + * repeated string user_ids = 6; + * @return {!Array} + */ +proto.s3web.audit.QueryLogsRequest.prototype.getUserIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.setUserIdsList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.addUserIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.clearUserIdsList = function() { + return this.setUserIdsList([]); +}; + + +/** + * optional bool break_glass_only = 7; + * @return {boolean} + */ +proto.s3web.audit.QueryLogsRequest.prototype.getBreakGlassOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.audit.QueryLogsRequest} returns this + */ +proto.s3web.audit.QueryLogsRequest.prototype.setBreakGlassOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.audit.QueryLogsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.QueryLogsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.QueryLogsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.QueryLogsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.QueryLogsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.s3web.audit.AuditEvent.toObject, includeInstance), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.QueryLogsResponse} + */ +proto.s3web.audit.QueryLogsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.QueryLogsResponse; + return proto.s3web.audit.QueryLogsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.QueryLogsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.QueryLogsResponse} + */ +proto.s3web.audit.QueryLogsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.audit.AuditEvent; + reader.readMessage(value,proto.s3web.audit.AuditEvent.deserializeBinaryFromReader); + msg.addEvents(value); + break; + case 2: + var value = new common_common_pb.PaginationResponse; + reader.readMessage(value,common_common_pb.PaginationResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.QueryLogsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.QueryLogsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.QueryLogsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.QueryLogsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.audit.AuditEvent.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated AuditEvent events = 1; + * @return {!Array} + */ +proto.s3web.audit.QueryLogsResponse.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.audit.AuditEvent, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.QueryLogsResponse} returns this +*/ +proto.s3web.audit.QueryLogsResponse.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.audit.AuditEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.audit.AuditEvent} + */ +proto.s3web.audit.QueryLogsResponse.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.audit.AuditEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.QueryLogsResponse} returns this + */ +proto.s3web.audit.QueryLogsResponse.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional s3web.common.PaginationResponse pagination = 2; + * @return {?proto.s3web.common.PaginationResponse} + */ +proto.s3web.audit.QueryLogsResponse.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationResponse} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationResponse, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationResponse|undefined} value + * @return {!proto.s3web.audit.QueryLogsResponse} returns this +*/ +proto.s3web.audit.QueryLogsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.QueryLogsResponse} returns this + */ +proto.s3web.audit.QueryLogsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.QueryLogsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.audit.StreamLogsRequest.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.StreamLogsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.StreamLogsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.StreamLogsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.StreamLogsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + filtersList: jspb.Message.toObjectList(msg.getFiltersList(), + common_common_pb.Filter.toObject, includeInstance), + eventTypesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + follow: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.StreamLogsRequest} + */ +proto.s3web.audit.StreamLogsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.StreamLogsRequest; + return proto.s3web.audit.StreamLogsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.StreamLogsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.StreamLogsRequest} + */ +proto.s3web.audit.StreamLogsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 2: + var value = new common_common_pb.Filter; + reader.readMessage(value,common_common_pb.Filter.deserializeBinaryFromReader); + msg.addFilters(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addEventTypes(values[i]); + } + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFollow(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.StreamLogsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.StreamLogsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.StreamLogsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.StreamLogsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getFiltersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + common_common_pb.Filter.serializeBinaryToWriter + ); + } + f = message.getEventTypesList(); + if (f.length > 0) { + writer.writePackedEnum( + 3, + f + ); + } + f = message.getFollow(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional s3web.common.AuditContext audit_context = 1; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.audit.StreamLogsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 1)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.audit.StreamLogsRequest} returns this +*/ +proto.s3web.audit.StreamLogsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.StreamLogsRequest} returns this + */ +proto.s3web.audit.StreamLogsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.StreamLogsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated s3web.common.Filter filters = 2; + * @return {!Array} + */ +proto.s3web.audit.StreamLogsRequest.prototype.getFiltersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_common_pb.Filter, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.StreamLogsRequest} returns this +*/ +proto.s3web.audit.StreamLogsRequest.prototype.setFiltersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.s3web.common.Filter=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.common.Filter} + */ +proto.s3web.audit.StreamLogsRequest.prototype.addFilters = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.s3web.common.Filter, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.StreamLogsRequest} returns this + */ +proto.s3web.audit.StreamLogsRequest.prototype.clearFiltersList = function() { + return this.setFiltersList([]); +}; + + +/** + * repeated EventType event_types = 3; + * @return {!Array} + */ +proto.s3web.audit.StreamLogsRequest.prototype.getEventTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.StreamLogsRequest} returns this + */ +proto.s3web.audit.StreamLogsRequest.prototype.setEventTypesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!proto.s3web.audit.EventType} value + * @param {number=} opt_index + * @return {!proto.s3web.audit.StreamLogsRequest} returns this + */ +proto.s3web.audit.StreamLogsRequest.prototype.addEventTypes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.StreamLogsRequest} returns this + */ +proto.s3web.audit.StreamLogsRequest.prototype.clearEventTypesList = function() { + return this.setEventTypesList([]); +}; + + +/** + * optional bool follow = 4; + * @return {boolean} + */ +proto.s3web.audit.StreamLogsRequest.prototype.getFollow = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.audit.StreamLogsRequest} returns this + */ +proto.s3web.audit.StreamLogsRequest.prototype.setFollow = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.audit.GetStatisticsRequest.repeatedFields_ = [3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.GetStatisticsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.GetStatisticsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.GetStatisticsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + timeRange: (f = msg.getTimeRange()) && common_common_pb.TimeRange.toObject(includeInstance, f), + userIdsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + eventTypesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.GetStatisticsRequest} + */ +proto.s3web.audit.GetStatisticsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.GetStatisticsRequest; + return proto.s3web.audit.GetStatisticsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.GetStatisticsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.GetStatisticsRequest} + */ +proto.s3web.audit.GetStatisticsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 2: + var value = new common_common_pb.TimeRange; + reader.readMessage(value,common_common_pb.TimeRange.deserializeBinaryFromReader); + msg.setTimeRange(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addUserIds(value); + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addEventTypes(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.GetStatisticsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.GetStatisticsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.GetStatisticsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getTimeRange(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.TimeRange.serializeBinaryToWriter + ); + } + f = message.getUserIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getEventTypesList(); + if (f.length > 0) { + writer.writePackedEnum( + 4, + f + ); + } +}; + + +/** + * optional s3web.common.AuditContext audit_context = 1; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 1)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this +*/ +proto.s3web.audit.GetStatisticsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional s3web.common.TimeRange time_range = 2; + * @return {?proto.s3web.common.TimeRange} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.getTimeRange = function() { + return /** @type{?proto.s3web.common.TimeRange} */ ( + jspb.Message.getWrapperField(this, common_common_pb.TimeRange, 2)); +}; + + +/** + * @param {?proto.s3web.common.TimeRange|undefined} value + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this +*/ +proto.s3web.audit.GetStatisticsRequest.prototype.setTimeRange = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.clearTimeRange = function() { + return this.setTimeRange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.hasTimeRange = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated string user_ids = 3; + * @return {!Array} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.getUserIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.setUserIdsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.addUserIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.clearUserIdsList = function() { + return this.setUserIdsList([]); +}; + + +/** + * repeated EventType event_types = 4; + * @return {!Array} + */ +proto.s3web.audit.GetStatisticsRequest.prototype.getEventTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.setEventTypesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!proto.s3web.audit.EventType} value + * @param {number=} opt_index + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.addEventTypes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.GetStatisticsRequest} returns this + */ +proto.s3web.audit.GetStatisticsRequest.prototype.clearEventTypesList = function() { + return this.setEventTypesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.GetStatisticsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.GetStatisticsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.GetStatisticsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.GetStatisticsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + statistics: (f = msg.getStatistics()) && proto.s3web.audit.AuditStatistics.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.GetStatisticsResponse} + */ +proto.s3web.audit.GetStatisticsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.GetStatisticsResponse; + return proto.s3web.audit.GetStatisticsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.GetStatisticsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.GetStatisticsResponse} + */ +proto.s3web.audit.GetStatisticsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.audit.AuditStatistics; + reader.readMessage(value,proto.s3web.audit.AuditStatistics.deserializeBinaryFromReader); + msg.setStatistics(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.GetStatisticsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.GetStatisticsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.GetStatisticsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.GetStatisticsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatistics(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.audit.AuditStatistics.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AuditStatistics statistics = 1; + * @return {?proto.s3web.audit.AuditStatistics} + */ +proto.s3web.audit.GetStatisticsResponse.prototype.getStatistics = function() { + return /** @type{?proto.s3web.audit.AuditStatistics} */ ( + jspb.Message.getWrapperField(this, proto.s3web.audit.AuditStatistics, 1)); +}; + + +/** + * @param {?proto.s3web.audit.AuditStatistics|undefined} value + * @return {!proto.s3web.audit.GetStatisticsResponse} returns this +*/ +proto.s3web.audit.GetStatisticsResponse.prototype.setStatistics = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.GetStatisticsResponse} returns this + */ +proto.s3web.audit.GetStatisticsResponse.prototype.clearStatistics = function() { + return this.setStatistics(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.GetStatisticsResponse.prototype.hasStatistics = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.audit.ExportLogsRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.ExportLogsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.ExportLogsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.ExportLogsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.ExportLogsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + filtersList: jspb.Message.toObjectList(msg.getFiltersList(), + common_common_pb.Filter.toObject, includeInstance), + timeRange: (f = msg.getTimeRange()) && common_common_pb.TimeRange.toObject(includeInstance, f), + format: jspb.Message.getFieldWithDefault(msg, 4, 0), + includeMetadata: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.ExportLogsRequest} + */ +proto.s3web.audit.ExportLogsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.ExportLogsRequest; + return proto.s3web.audit.ExportLogsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.ExportLogsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.ExportLogsRequest} + */ +proto.s3web.audit.ExportLogsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 2: + var value = new common_common_pb.Filter; + reader.readMessage(value,common_common_pb.Filter.deserializeBinaryFromReader); + msg.addFilters(value); + break; + case 3: + var value = new common_common_pb.TimeRange; + reader.readMessage(value,common_common_pb.TimeRange.deserializeBinaryFromReader); + msg.setTimeRange(value); + break; + case 4: + var value = /** @type {!proto.s3web.audit.ExportFormat} */ (reader.readEnum()); + msg.setFormat(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.ExportLogsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.ExportLogsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.ExportLogsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.ExportLogsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getFiltersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + common_common_pb.Filter.serializeBinaryToWriter + ); + } + f = message.getTimeRange(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.TimeRange.serializeBinaryToWriter + ); + } + f = message.getFormat(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getIncludeMetadata(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional s3web.common.AuditContext audit_context = 1; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.audit.ExportLogsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 1)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.audit.ExportLogsRequest} returns this +*/ +proto.s3web.audit.ExportLogsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.ExportLogsRequest} returns this + */ +proto.s3web.audit.ExportLogsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.ExportLogsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated s3web.common.Filter filters = 2; + * @return {!Array} + */ +proto.s3web.audit.ExportLogsRequest.prototype.getFiltersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_common_pb.Filter, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.audit.ExportLogsRequest} returns this +*/ +proto.s3web.audit.ExportLogsRequest.prototype.setFiltersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.s3web.common.Filter=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.common.Filter} + */ +proto.s3web.audit.ExportLogsRequest.prototype.addFilters = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.s3web.common.Filter, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.audit.ExportLogsRequest} returns this + */ +proto.s3web.audit.ExportLogsRequest.prototype.clearFiltersList = function() { + return this.setFiltersList([]); +}; + + +/** + * optional s3web.common.TimeRange time_range = 3; + * @return {?proto.s3web.common.TimeRange} + */ +proto.s3web.audit.ExportLogsRequest.prototype.getTimeRange = function() { + return /** @type{?proto.s3web.common.TimeRange} */ ( + jspb.Message.getWrapperField(this, common_common_pb.TimeRange, 3)); +}; + + +/** + * @param {?proto.s3web.common.TimeRange|undefined} value + * @return {!proto.s3web.audit.ExportLogsRequest} returns this +*/ +proto.s3web.audit.ExportLogsRequest.prototype.setTimeRange = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.audit.ExportLogsRequest} returns this + */ +proto.s3web.audit.ExportLogsRequest.prototype.clearTimeRange = function() { + return this.setTimeRange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.audit.ExportLogsRequest.prototype.hasTimeRange = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ExportFormat format = 4; + * @return {!proto.s3web.audit.ExportFormat} + */ +proto.s3web.audit.ExportLogsRequest.prototype.getFormat = function() { + return /** @type {!proto.s3web.audit.ExportFormat} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.s3web.audit.ExportFormat} value + * @return {!proto.s3web.audit.ExportLogsRequest} returns this + */ +proto.s3web.audit.ExportLogsRequest.prototype.setFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional bool include_metadata = 5; + * @return {boolean} + */ +proto.s3web.audit.ExportLogsRequest.prototype.getIncludeMetadata = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.audit.ExportLogsRequest} returns this + */ +proto.s3web.audit.ExportLogsRequest.prototype.setIncludeMetadata = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.audit.ExportLogsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.audit.ExportLogsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.audit.ExportLogsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.ExportLogsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + contentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + eventCount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.audit.ExportLogsResponse} + */ +proto.s3web.audit.ExportLogsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.audit.ExportLogsResponse; + return proto.s3web.audit.ExportLogsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.audit.ExportLogsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.audit.ExportLogsResponse} + */ +proto.s3web.audit.ExportLogsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEventCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.audit.ExportLogsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.audit.ExportLogsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.audit.ExportLogsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.audit.ExportLogsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEventCount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.s3web.audit.ExportLogsResponse.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.s3web.audit.ExportLogsResponse.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.s3web.audit.ExportLogsResponse.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.s3web.audit.ExportLogsResponse} returns this + */ +proto.s3web.audit.ExportLogsResponse.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string content_type = 2; + * @return {string} + */ +proto.s3web.audit.ExportLogsResponse.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.audit.ExportLogsResponse} returns this + */ +proto.s3web.audit.ExportLogsResponse.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 event_count = 3; + * @return {number} + */ +proto.s3web.audit.ExportLogsResponse.prototype.getEventCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.audit.ExportLogsResponse} returns this + */ +proto.s3web.audit.ExportLogsResponse.prototype.setEventCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.s3web.audit.EventType = { + EVENT_UNKNOWN: 0, + EVENT_AUTH_LOGIN: 1, + EVENT_AUTH_LOGOUT: 2, + EVENT_AUTH_FAILED: 3, + EVENT_BREAK_GLASS_ENTER: 4, + EVENT_BREAK_GLASS_EXIT: 5, + EVENT_LOCATION_CREATE: 10, + EVENT_LOCATION_UPDATE: 11, + EVENT_LOCATION_DELETE: 12, + EVENT_LOCATION_ACCESS: 13, + EVENT_OBJECT_READ: 20, + EVENT_OBJECT_WRITE: 21, + EVENT_OBJECT_DELETE: 22, + EVENT_OBJECT_METADATA_UPDATE: 23, + EVENT_TRANSFER_INITIATE: 30, + EVENT_TRANSFER_COMPLETE: 31, + EVENT_TRANSFER_FAIL: 32, + EVENT_TRANSFER_CANCEL: 33, + EVENT_PERMISSION_GRANT: 40, + EVENT_PERMISSION_REVOKE: 41, + EVENT_CONFIG_CHANGE: 50 +}; + +/** + * @enum {number} + */ +proto.s3web.audit.EventSeverity = { + SEVERITY_INFO: 0, + SEVERITY_WARNING: 1, + SEVERITY_ERROR: 2, + SEVERITY_CRITICAL: 3 +}; + +/** + * @enum {number} + */ +proto.s3web.audit.EventResult = { + RESULT_UNKNOWN: 0, + RESULT_SUCCESS: 1, + RESULT_FAILURE: 2, + RESULT_PARTIAL: 3 +}; + +/** + * @enum {number} + */ +proto.s3web.audit.ExportFormat = { + FORMAT_JSON: 0, + FORMAT_CSV: 1, + FORMAT_JSONL: 2 +}; + +goog.object.extend(exports, proto.s3web.audit); diff --git a/frontend/src/gen/auth/AuthServiceClientPb.ts b/frontend/src/gen/auth/AuthServiceClientPb.ts new file mode 100644 index 0000000..ffeb142 --- /dev/null +++ b/frontend/src/gen/auth/AuthServiceClientPb.ts @@ -0,0 +1,474 @@ +/** + * @fileoverview gRPC-Web generated client stub for s3web.auth + * @enhanceable + * @public + */ + +// Code generated by protoc-gen-grpc-web. DO NOT EDIT. +// versions: +// protoc-gen-grpc-web v1.5.0 +// protoc v3.14.0 +// source: auth/auth.proto + + +/* eslint-disable */ +// @ts-nocheck + + +import * as grpcWeb from 'grpc-web'; + +import * as auth_auth_pb from '../auth/auth_pb'; // proto import: "auth/auth.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class AuthServiceClient { + client_: grpcWeb.AbstractClientBase; + hostname_: string; + credentials_: null | { [index: string]: string; }; + options_: null | { [index: string]: any; }; + + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: any; }) { + if (!options) options = {}; + if (!credentials) credentials = {}; + options['format'] = 'binary'; + + this.client_ = new grpcWeb.GrpcWebClientBase(options); + this.hostname_ = hostname.replace(/\/+$/, ''); + this.credentials_ = credentials; + this.options_ = options; + } + + methodDescriptorAuthenticate = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/Authenticate', + grpcWeb.MethodType.UNARY, + auth_auth_pb.AuthenticateRequest, + auth_auth_pb.AuthenticateResponse, + (request: auth_auth_pb.AuthenticateRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.AuthenticateResponse.deserializeBinary + ); + + authenticate( + request: auth_auth_pb.AuthenticateRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + authenticate( + request: auth_auth_pb.AuthenticateRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.AuthenticateResponse) => void): grpcWeb.ClientReadableStream; + + authenticate( + request: auth_auth_pb.AuthenticateRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.AuthenticateResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/Authenticate', + request, + metadata || {}, + this.methodDescriptorAuthenticate, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/Authenticate', + request, + metadata || {}, + this.methodDescriptorAuthenticate); + } + + methodDescriptorValidateToken = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/ValidateToken', + grpcWeb.MethodType.UNARY, + auth_auth_pb.ValidateTokenRequest, + auth_auth_pb.ValidateTokenResponse, + (request: auth_auth_pb.ValidateTokenRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.ValidateTokenResponse.deserializeBinary + ); + + validateToken( + request: auth_auth_pb.ValidateTokenRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + validateToken( + request: auth_auth_pb.ValidateTokenRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.ValidateTokenResponse) => void): grpcWeb.ClientReadableStream; + + validateToken( + request: auth_auth_pb.ValidateTokenRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.ValidateTokenResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/ValidateToken', + request, + metadata || {}, + this.methodDescriptorValidateToken, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/ValidateToken', + request, + metadata || {}, + this.methodDescriptorValidateToken); + } + + methodDescriptorRefreshToken = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/RefreshToken', + grpcWeb.MethodType.UNARY, + auth_auth_pb.RefreshTokenRequest, + auth_auth_pb.RefreshTokenResponse, + (request: auth_auth_pb.RefreshTokenRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.RefreshTokenResponse.deserializeBinary + ); + + refreshToken( + request: auth_auth_pb.RefreshTokenRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + refreshToken( + request: auth_auth_pb.RefreshTokenRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.RefreshTokenResponse) => void): grpcWeb.ClientReadableStream; + + refreshToken( + request: auth_auth_pb.RefreshTokenRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.RefreshTokenResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/RefreshToken', + request, + metadata || {}, + this.methodDescriptorRefreshToken, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/RefreshToken', + request, + metadata || {}, + this.methodDescriptorRefreshToken); + } + + methodDescriptorLogout = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/Logout', + grpcWeb.MethodType.UNARY, + auth_auth_pb.LogoutRequest, + auth_auth_pb.LogoutResponse, + (request: auth_auth_pb.LogoutRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.LogoutResponse.deserializeBinary + ); + + logout( + request: auth_auth_pb.LogoutRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + logout( + request: auth_auth_pb.LogoutRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.LogoutResponse) => void): grpcWeb.ClientReadableStream; + + logout( + request: auth_auth_pb.LogoutRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.LogoutResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/Logout', + request, + metadata || {}, + this.methodDescriptorLogout, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/Logout', + request, + metadata || {}, + this.methodDescriptorLogout); + } + + methodDescriptorCheckPermission = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/CheckPermission', + grpcWeb.MethodType.UNARY, + auth_auth_pb.CheckPermissionRequest, + auth_auth_pb.CheckPermissionResponse, + (request: auth_auth_pb.CheckPermissionRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.CheckPermissionResponse.deserializeBinary + ); + + checkPermission( + request: auth_auth_pb.CheckPermissionRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + checkPermission( + request: auth_auth_pb.CheckPermissionRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.CheckPermissionResponse) => void): grpcWeb.ClientReadableStream; + + checkPermission( + request: auth_auth_pb.CheckPermissionRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.CheckPermissionResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/CheckPermission', + request, + metadata || {}, + this.methodDescriptorCheckPermission, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/CheckPermission', + request, + metadata || {}, + this.methodDescriptorCheckPermission); + } + + methodDescriptorEnterBreakGlass = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/EnterBreakGlass', + grpcWeb.MethodType.UNARY, + auth_auth_pb.EnterBreakGlassRequest, + auth_auth_pb.EnterBreakGlassResponse, + (request: auth_auth_pb.EnterBreakGlassRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.EnterBreakGlassResponse.deserializeBinary + ); + + enterBreakGlass( + request: auth_auth_pb.EnterBreakGlassRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + enterBreakGlass( + request: auth_auth_pb.EnterBreakGlassRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.EnterBreakGlassResponse) => void): grpcWeb.ClientReadableStream; + + enterBreakGlass( + request: auth_auth_pb.EnterBreakGlassRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.EnterBreakGlassResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/EnterBreakGlass', + request, + metadata || {}, + this.methodDescriptorEnterBreakGlass, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/EnterBreakGlass', + request, + metadata || {}, + this.methodDescriptorEnterBreakGlass); + } + + methodDescriptorExitBreakGlass = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/ExitBreakGlass', + grpcWeb.MethodType.UNARY, + auth_auth_pb.ExitBreakGlassRequest, + auth_auth_pb.ExitBreakGlassResponse, + (request: auth_auth_pb.ExitBreakGlassRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.ExitBreakGlassResponse.deserializeBinary + ); + + exitBreakGlass( + request: auth_auth_pb.ExitBreakGlassRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + exitBreakGlass( + request: auth_auth_pb.ExitBreakGlassRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.ExitBreakGlassResponse) => void): grpcWeb.ClientReadableStream; + + exitBreakGlass( + request: auth_auth_pb.ExitBreakGlassRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.ExitBreakGlassResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/ExitBreakGlass', + request, + metadata || {}, + this.methodDescriptorExitBreakGlass, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/ExitBreakGlass', + request, + metadata || {}, + this.methodDescriptorExitBreakGlass); + } + + methodDescriptorGetCurrentUser = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/GetCurrentUser', + grpcWeb.MethodType.UNARY, + auth_auth_pb.GetCurrentUserRequest, + auth_auth_pb.GetCurrentUserResponse, + (request: auth_auth_pb.GetCurrentUserRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.GetCurrentUserResponse.deserializeBinary + ); + + getCurrentUser( + request: auth_auth_pb.GetCurrentUserRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getCurrentUser( + request: auth_auth_pb.GetCurrentUserRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.GetCurrentUserResponse) => void): grpcWeb.ClientReadableStream; + + getCurrentUser( + request: auth_auth_pb.GetCurrentUserRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.GetCurrentUserResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/GetCurrentUser', + request, + metadata || {}, + this.methodDescriptorGetCurrentUser, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/GetCurrentUser', + request, + metadata || {}, + this.methodDescriptorGetCurrentUser); + } + + methodDescriptorListUserPermissions = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/ListUserPermissions', + grpcWeb.MethodType.UNARY, + auth_auth_pb.ListUserPermissionsRequest, + auth_auth_pb.ListUserPermissionsResponse, + (request: auth_auth_pb.ListUserPermissionsRequest) => { + return request.serializeBinary(); + }, + auth_auth_pb.ListUserPermissionsResponse.deserializeBinary + ); + + listUserPermissions( + request: auth_auth_pb.ListUserPermissionsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + listUserPermissions( + request: auth_auth_pb.ListUserPermissionsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: auth_auth_pb.ListUserPermissionsResponse) => void): grpcWeb.ClientReadableStream; + + listUserPermissions( + request: auth_auth_pb.ListUserPermissionsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: auth_auth_pb.ListUserPermissionsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/ListUserPermissions', + request, + metadata || {}, + this.methodDescriptorListUserPermissions, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/ListUserPermissions', + request, + metadata || {}, + this.methodDescriptorListUserPermissions); + } + + methodDescriptorHealthCheck = new grpcWeb.MethodDescriptor( + '/s3web.auth.AuthService/HealthCheck', + grpcWeb.MethodType.UNARY, + common_common_pb.HealthCheckResponse, + common_common_pb.HealthCheckResponse, + (request: common_common_pb.HealthCheckResponse) => { + return request.serializeBinary(); + }, + common_common_pb.HealthCheckResponse.deserializeBinary + ); + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null): Promise; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void): grpcWeb.ClientReadableStream; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.auth.AuthService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.auth.AuthService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck); + } + +} + diff --git a/frontend/src/gen/auth/auth_pb.d.ts b/frontend/src/gen/auth/auth_pb.d.ts new file mode 100644 index 0000000..48f6c6a --- /dev/null +++ b/frontend/src/gen/auth/auth_pb.d.ts @@ -0,0 +1,756 @@ +import * as jspb from 'google-protobuf' + +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class User extends jspb.Message { + getId(): string; + setId(value: string): User; + + getUsername(): string; + setUsername(value: string): User; + + getEmail(): string; + setEmail(value: string): User; + + getDisplayName(): string; + setDisplayName(value: string): User; + + getRolesList(): Array; + setRolesList(value: Array): User; + clearRolesList(): User; + addRoles(value: Role, index?: number): User; + + getPermissionsList(): Array; + setPermissionsList(value: Array): User; + clearPermissionsList(): User; + addPermissions(value?: Permission, index?: number): Permission; + + getLocationAccessList(): Array; + setLocationAccessList(value: Array): User; + clearLocationAccessList(): User; + addLocationAccess(value?: LocationAccess, index?: number): LocationAccess; + + getIsActive(): boolean; + setIsActive(value: boolean): User; + + getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): User; + hasCreatedAt(): boolean; + clearCreatedAt(): User; + + getLastLogin(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastLogin(value?: google_protobuf_timestamp_pb.Timestamp): User; + hasLastLogin(): boolean; + clearLastLogin(): User; + + getAttributesMap(): jspb.Map; + clearAttributesMap(): User; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): User.AsObject; + static toObject(includeInstance: boolean, msg: User): User.AsObject; + static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): User; + static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User; +} + +export namespace User { + export type AsObject = { + id: string, + username: string, + email: string, + displayName: string, + rolesList: Array, + permissionsList: Array, + locationAccessList: Array, + isActive: boolean, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lastLogin?: google_protobuf_timestamp_pb.Timestamp.AsObject, + attributesMap: Array<[string, string]>, + } +} + +export class Permission extends jspb.Message { + getResourceType(): ResourceType; + setResourceType(value: ResourceType): Permission; + + getResourceId(): string; + setResourceId(value: string): Permission; + + getActionsList(): Array; + setActionsList(value: Array): Permission; + clearActionsList(): Permission; + addActions(value: Action, index?: number): Permission; + + getScopesList(): Array; + setScopesList(value: Array): Permission; + clearScopesList(): Permission; + addScopes(value: string, index?: number): Permission; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Permission.AsObject; + static toObject(includeInstance: boolean, msg: Permission): Permission.AsObject; + static serializeBinaryToWriter(message: Permission, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Permission; + static deserializeBinaryFromReader(message: Permission, reader: jspb.BinaryReader): Permission; +} + +export namespace Permission { + export type AsObject = { + resourceType: ResourceType, + resourceId: string, + actionsList: Array, + scopesList: Array, + } +} + +export class LocationAccess extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): LocationAccess; + + getAllowedBucketsList(): Array; + setAllowedBucketsList(value: Array): LocationAccess; + clearAllowedBucketsList(): LocationAccess; + addAllowedBuckets(value: string, index?: number): LocationAccess; + + getAllowedPrefixesList(): Array; + setAllowedPrefixesList(value: Array): LocationAccess; + clearAllowedPrefixesList(): LocationAccess; + addAllowedPrefixes(value: string, index?: number): LocationAccess; + + getActionsList(): Array; + setActionsList(value: Array): LocationAccess; + clearActionsList(): LocationAccess; + addActions(value: Action, index?: number): LocationAccess; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocationAccess.AsObject; + static toObject(includeInstance: boolean, msg: LocationAccess): LocationAccess.AsObject; + static serializeBinaryToWriter(message: LocationAccess, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocationAccess; + static deserializeBinaryFromReader(message: LocationAccess, reader: jspb.BinaryReader): LocationAccess; +} + +export namespace LocationAccess { + export type AsObject = { + locationId: string, + allowedBucketsList: Array, + allowedPrefixesList: Array, + actionsList: Array, + } +} + +export class AuthToken extends jspb.Message { + getAccessToken(): string; + setAccessToken(value: string): AuthToken; + + getRefreshToken(): string; + setRefreshToken(value: string): AuthToken; + + getTokenType(): string; + setTokenType(value: string): AuthToken; + + getExpiresIn(): number; + setExpiresIn(value: number): AuthToken; + + getIssuedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setIssuedAt(value?: google_protobuf_timestamp_pb.Timestamp): AuthToken; + hasIssuedAt(): boolean; + clearIssuedAt(): AuthToken; + + getExpiresAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExpiresAt(value?: google_protobuf_timestamp_pb.Timestamp): AuthToken; + hasExpiresAt(): boolean; + clearExpiresAt(): AuthToken; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuthToken.AsObject; + static toObject(includeInstance: boolean, msg: AuthToken): AuthToken.AsObject; + static serializeBinaryToWriter(message: AuthToken, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuthToken; + static deserializeBinaryFromReader(message: AuthToken, reader: jspb.BinaryReader): AuthToken; +} + +export namespace AuthToken { + export type AsObject = { + accessToken: string, + refreshToken: string, + tokenType: string, + expiresIn: number, + issuedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + expiresAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class BreakGlassSession extends jspb.Message { + getSessionId(): string; + setSessionId(value: string): BreakGlassSession; + + getUserId(): string; + setUserId(value: string): BreakGlassSession; + + getJustification(): string; + setJustification(value: string): BreakGlassSession; + + getDurationSeconds(): number; + setDurationSeconds(value: number): BreakGlassSession; + + getStartedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStartedAt(value?: google_protobuf_timestamp_pb.Timestamp): BreakGlassSession; + hasStartedAt(): boolean; + clearStartedAt(): BreakGlassSession; + + getExpiresAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExpiresAt(value?: google_protobuf_timestamp_pb.Timestamp): BreakGlassSession; + hasExpiresAt(): boolean; + clearExpiresAt(): BreakGlassSession; + + getIsActive(): boolean; + setIsActive(value: boolean): BreakGlassSession; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BreakGlassSession.AsObject; + static toObject(includeInstance: boolean, msg: BreakGlassSession): BreakGlassSession.AsObject; + static serializeBinaryToWriter(message: BreakGlassSession, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BreakGlassSession; + static deserializeBinaryFromReader(message: BreakGlassSession, reader: jspb.BinaryReader): BreakGlassSession; +} + +export namespace BreakGlassSession { + export type AsObject = { + sessionId: string, + userId: string, + justification: string, + durationSeconds: number, + startedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + expiresAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + isActive: boolean, + } +} + +export class AuthenticateRequest extends jspb.Message { + getPassword(): PasswordCredentials | undefined; + setPassword(value?: PasswordCredentials): AuthenticateRequest; + hasPassword(): boolean; + clearPassword(): AuthenticateRequest; + + getOauth(): OAuthCredentials | undefined; + setOauth(value?: OAuthCredentials): AuthenticateRequest; + hasOauth(): boolean; + clearOauth(): AuthenticateRequest; + + getSaml(): SAMLCredentials | undefined; + setSaml(value?: SAMLCredentials): AuthenticateRequest; + hasSaml(): boolean; + clearSaml(): AuthenticateRequest; + + getCredentialsCase(): AuthenticateRequest.CredentialsCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuthenticateRequest.AsObject; + static toObject(includeInstance: boolean, msg: AuthenticateRequest): AuthenticateRequest.AsObject; + static serializeBinaryToWriter(message: AuthenticateRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuthenticateRequest; + static deserializeBinaryFromReader(message: AuthenticateRequest, reader: jspb.BinaryReader): AuthenticateRequest; +} + +export namespace AuthenticateRequest { + export type AsObject = { + password?: PasswordCredentials.AsObject, + oauth?: OAuthCredentials.AsObject, + saml?: SAMLCredentials.AsObject, + } + + export enum CredentialsCase { + CREDENTIALS_NOT_SET = 0, + PASSWORD = 1, + OAUTH = 2, + SAML = 3, + } +} + +export class PasswordCredentials extends jspb.Message { + getUsername(): string; + setUsername(value: string): PasswordCredentials; + + getPassword(): string; + setPassword(value: string): PasswordCredentials; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PasswordCredentials.AsObject; + static toObject(includeInstance: boolean, msg: PasswordCredentials): PasswordCredentials.AsObject; + static serializeBinaryToWriter(message: PasswordCredentials, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PasswordCredentials; + static deserializeBinaryFromReader(message: PasswordCredentials, reader: jspb.BinaryReader): PasswordCredentials; +} + +export namespace PasswordCredentials { + export type AsObject = { + username: string, + password: string, + } +} + +export class OAuthCredentials extends jspb.Message { + getProvider(): string; + setProvider(value: string): OAuthCredentials; + + getCode(): string; + setCode(value: string): OAuthCredentials; + + getRedirectUri(): string; + setRedirectUri(value: string): OAuthCredentials; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OAuthCredentials.AsObject; + static toObject(includeInstance: boolean, msg: OAuthCredentials): OAuthCredentials.AsObject; + static serializeBinaryToWriter(message: OAuthCredentials, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OAuthCredentials; + static deserializeBinaryFromReader(message: OAuthCredentials, reader: jspb.BinaryReader): OAuthCredentials; +} + +export namespace OAuthCredentials { + export type AsObject = { + provider: string, + code: string, + redirectUri: string, + } +} + +export class SAMLCredentials extends jspb.Message { + getAssertion(): string; + setAssertion(value: string): SAMLCredentials; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SAMLCredentials.AsObject; + static toObject(includeInstance: boolean, msg: SAMLCredentials): SAMLCredentials.AsObject; + static serializeBinaryToWriter(message: SAMLCredentials, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SAMLCredentials; + static deserializeBinaryFromReader(message: SAMLCredentials, reader: jspb.BinaryReader): SAMLCredentials; +} + +export namespace SAMLCredentials { + export type AsObject = { + assertion: string, + } +} + +export class AuthenticateResponse extends jspb.Message { + getUser(): User | undefined; + setUser(value?: User): AuthenticateResponse; + hasUser(): boolean; + clearUser(): AuthenticateResponse; + + getToken(): AuthToken | undefined; + setToken(value?: AuthToken): AuthenticateResponse; + hasToken(): boolean; + clearToken(): AuthenticateResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuthenticateResponse.AsObject; + static toObject(includeInstance: boolean, msg: AuthenticateResponse): AuthenticateResponse.AsObject; + static serializeBinaryToWriter(message: AuthenticateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuthenticateResponse; + static deserializeBinaryFromReader(message: AuthenticateResponse, reader: jspb.BinaryReader): AuthenticateResponse; +} + +export namespace AuthenticateResponse { + export type AsObject = { + user?: User.AsObject, + token?: AuthToken.AsObject, + } +} + +export class ValidateTokenRequest extends jspb.Message { + getToken(): string; + setToken(value: string): ValidateTokenRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidateTokenRequest.AsObject; + static toObject(includeInstance: boolean, msg: ValidateTokenRequest): ValidateTokenRequest.AsObject; + static serializeBinaryToWriter(message: ValidateTokenRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidateTokenRequest; + static deserializeBinaryFromReader(message: ValidateTokenRequest, reader: jspb.BinaryReader): ValidateTokenRequest; +} + +export namespace ValidateTokenRequest { + export type AsObject = { + token: string, + } +} + +export class ValidateTokenResponse extends jspb.Message { + getValid(): boolean; + setValid(value: boolean): ValidateTokenResponse; + + getUser(): User | undefined; + setUser(value?: User): ValidateTokenResponse; + hasUser(): boolean; + clearUser(): ValidateTokenResponse; + + getExpiresAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExpiresAt(value?: google_protobuf_timestamp_pb.Timestamp): ValidateTokenResponse; + hasExpiresAt(): boolean; + clearExpiresAt(): ValidateTokenResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValidateTokenResponse.AsObject; + static toObject(includeInstance: boolean, msg: ValidateTokenResponse): ValidateTokenResponse.AsObject; + static serializeBinaryToWriter(message: ValidateTokenResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValidateTokenResponse; + static deserializeBinaryFromReader(message: ValidateTokenResponse, reader: jspb.BinaryReader): ValidateTokenResponse; +} + +export namespace ValidateTokenResponse { + export type AsObject = { + valid: boolean, + user?: User.AsObject, + expiresAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class RefreshTokenRequest extends jspb.Message { + getRefreshToken(): string; + setRefreshToken(value: string): RefreshTokenRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RefreshTokenRequest.AsObject; + static toObject(includeInstance: boolean, msg: RefreshTokenRequest): RefreshTokenRequest.AsObject; + static serializeBinaryToWriter(message: RefreshTokenRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RefreshTokenRequest; + static deserializeBinaryFromReader(message: RefreshTokenRequest, reader: jspb.BinaryReader): RefreshTokenRequest; +} + +export namespace RefreshTokenRequest { + export type AsObject = { + refreshToken: string, + } +} + +export class RefreshTokenResponse extends jspb.Message { + getToken(): AuthToken | undefined; + setToken(value?: AuthToken): RefreshTokenResponse; + hasToken(): boolean; + clearToken(): RefreshTokenResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RefreshTokenResponse.AsObject; + static toObject(includeInstance: boolean, msg: RefreshTokenResponse): RefreshTokenResponse.AsObject; + static serializeBinaryToWriter(message: RefreshTokenResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RefreshTokenResponse; + static deserializeBinaryFromReader(message: RefreshTokenResponse, reader: jspb.BinaryReader): RefreshTokenResponse; +} + +export namespace RefreshTokenResponse { + export type AsObject = { + token?: AuthToken.AsObject, + } +} + +export class LogoutRequest extends jspb.Message { + getToken(): string; + setToken(value: string): LogoutRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): LogoutRequest; + hasAuditContext(): boolean; + clearAuditContext(): LogoutRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogoutRequest.AsObject; + static toObject(includeInstance: boolean, msg: LogoutRequest): LogoutRequest.AsObject; + static serializeBinaryToWriter(message: LogoutRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogoutRequest; + static deserializeBinaryFromReader(message: LogoutRequest, reader: jspb.BinaryReader): LogoutRequest; +} + +export namespace LogoutRequest { + export type AsObject = { + token: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class LogoutResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): LogoutResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogoutResponse.AsObject; + static toObject(includeInstance: boolean, msg: LogoutResponse): LogoutResponse.AsObject; + static serializeBinaryToWriter(message: LogoutResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogoutResponse; + static deserializeBinaryFromReader(message: LogoutResponse, reader: jspb.BinaryReader): LogoutResponse; +} + +export namespace LogoutResponse { + export type AsObject = { + success: boolean, + } +} + +export class CheckPermissionRequest extends jspb.Message { + getUserId(): string; + setUserId(value: string): CheckPermissionRequest; + + getResourceType(): ResourceType; + setResourceType(value: ResourceType): CheckPermissionRequest; + + getResourceId(): string; + setResourceId(value: string): CheckPermissionRequest; + + getAction(): Action; + setAction(value: Action): CheckPermissionRequest; + + getContextMap(): jspb.Map; + clearContextMap(): CheckPermissionRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckPermissionRequest.AsObject; + static toObject(includeInstance: boolean, msg: CheckPermissionRequest): CheckPermissionRequest.AsObject; + static serializeBinaryToWriter(message: CheckPermissionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckPermissionRequest; + static deserializeBinaryFromReader(message: CheckPermissionRequest, reader: jspb.BinaryReader): CheckPermissionRequest; +} + +export namespace CheckPermissionRequest { + export type AsObject = { + userId: string, + resourceType: ResourceType, + resourceId: string, + action: Action, + contextMap: Array<[string, string]>, + } +} + +export class CheckPermissionResponse extends jspb.Message { + getAllowed(): boolean; + setAllowed(value: boolean): CheckPermissionResponse; + + getReason(): string; + setReason(value: string): CheckPermissionResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckPermissionResponse.AsObject; + static toObject(includeInstance: boolean, msg: CheckPermissionResponse): CheckPermissionResponse.AsObject; + static serializeBinaryToWriter(message: CheckPermissionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckPermissionResponse; + static deserializeBinaryFromReader(message: CheckPermissionResponse, reader: jspb.BinaryReader): CheckPermissionResponse; +} + +export namespace CheckPermissionResponse { + export type AsObject = { + allowed: boolean, + reason: string, + } +} + +export class EnterBreakGlassRequest extends jspb.Message { + getJustification(): string; + setJustification(value: string): EnterBreakGlassRequest; + + getDurationSeconds(): number; + setDurationSeconds(value: number): EnterBreakGlassRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): EnterBreakGlassRequest; + hasAuditContext(): boolean; + clearAuditContext(): EnterBreakGlassRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnterBreakGlassRequest.AsObject; + static toObject(includeInstance: boolean, msg: EnterBreakGlassRequest): EnterBreakGlassRequest.AsObject; + static serializeBinaryToWriter(message: EnterBreakGlassRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnterBreakGlassRequest; + static deserializeBinaryFromReader(message: EnterBreakGlassRequest, reader: jspb.BinaryReader): EnterBreakGlassRequest; +} + +export namespace EnterBreakGlassRequest { + export type AsObject = { + justification: string, + durationSeconds: number, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class EnterBreakGlassResponse extends jspb.Message { + getSession(): BreakGlassSession | undefined; + setSession(value?: BreakGlassSession): EnterBreakGlassResponse; + hasSession(): boolean; + clearSession(): EnterBreakGlassResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnterBreakGlassResponse.AsObject; + static toObject(includeInstance: boolean, msg: EnterBreakGlassResponse): EnterBreakGlassResponse.AsObject; + static serializeBinaryToWriter(message: EnterBreakGlassResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnterBreakGlassResponse; + static deserializeBinaryFromReader(message: EnterBreakGlassResponse, reader: jspb.BinaryReader): EnterBreakGlassResponse; +} + +export namespace EnterBreakGlassResponse { + export type AsObject = { + session?: BreakGlassSession.AsObject, + } +} + +export class ExitBreakGlassRequest extends jspb.Message { + getSessionId(): string; + setSessionId(value: string): ExitBreakGlassRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ExitBreakGlassRequest; + hasAuditContext(): boolean; + clearAuditContext(): ExitBreakGlassRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExitBreakGlassRequest.AsObject; + static toObject(includeInstance: boolean, msg: ExitBreakGlassRequest): ExitBreakGlassRequest.AsObject; + static serializeBinaryToWriter(message: ExitBreakGlassRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExitBreakGlassRequest; + static deserializeBinaryFromReader(message: ExitBreakGlassRequest, reader: jspb.BinaryReader): ExitBreakGlassRequest; +} + +export namespace ExitBreakGlassRequest { + export type AsObject = { + sessionId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ExitBreakGlassResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): ExitBreakGlassResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExitBreakGlassResponse.AsObject; + static toObject(includeInstance: boolean, msg: ExitBreakGlassResponse): ExitBreakGlassResponse.AsObject; + static serializeBinaryToWriter(message: ExitBreakGlassResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExitBreakGlassResponse; + static deserializeBinaryFromReader(message: ExitBreakGlassResponse, reader: jspb.BinaryReader): ExitBreakGlassResponse; +} + +export namespace ExitBreakGlassResponse { + export type AsObject = { + success: boolean, + } +} + +export class GetCurrentUserRequest extends jspb.Message { + getToken(): string; + setToken(value: string): GetCurrentUserRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetCurrentUserRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetCurrentUserRequest): GetCurrentUserRequest.AsObject; + static serializeBinaryToWriter(message: GetCurrentUserRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetCurrentUserRequest; + static deserializeBinaryFromReader(message: GetCurrentUserRequest, reader: jspb.BinaryReader): GetCurrentUserRequest; +} + +export namespace GetCurrentUserRequest { + export type AsObject = { + token: string, + } +} + +export class GetCurrentUserResponse extends jspb.Message { + getUser(): User | undefined; + setUser(value?: User): GetCurrentUserResponse; + hasUser(): boolean; + clearUser(): GetCurrentUserResponse; + + getBreakGlassSession(): BreakGlassSession | undefined; + setBreakGlassSession(value?: BreakGlassSession): GetCurrentUserResponse; + hasBreakGlassSession(): boolean; + clearBreakGlassSession(): GetCurrentUserResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetCurrentUserResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetCurrentUserResponse): GetCurrentUserResponse.AsObject; + static serializeBinaryToWriter(message: GetCurrentUserResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetCurrentUserResponse; + static deserializeBinaryFromReader(message: GetCurrentUserResponse, reader: jspb.BinaryReader): GetCurrentUserResponse; +} + +export namespace GetCurrentUserResponse { + export type AsObject = { + user?: User.AsObject, + breakGlassSession?: BreakGlassSession.AsObject, + } +} + +export class ListUserPermissionsRequest extends jspb.Message { + getUserId(): string; + setUserId(value: string): ListUserPermissionsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ListUserPermissionsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ListUserPermissionsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListUserPermissionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListUserPermissionsRequest): ListUserPermissionsRequest.AsObject; + static serializeBinaryToWriter(message: ListUserPermissionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListUserPermissionsRequest; + static deserializeBinaryFromReader(message: ListUserPermissionsRequest, reader: jspb.BinaryReader): ListUserPermissionsRequest; +} + +export namespace ListUserPermissionsRequest { + export type AsObject = { + userId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ListUserPermissionsResponse extends jspb.Message { + getPermissionsList(): Array; + setPermissionsList(value: Array): ListUserPermissionsResponse; + clearPermissionsList(): ListUserPermissionsResponse; + addPermissions(value?: Permission, index?: number): Permission; + + getLocationAccessList(): Array; + setLocationAccessList(value: Array): ListUserPermissionsResponse; + clearLocationAccessList(): ListUserPermissionsResponse; + addLocationAccess(value?: LocationAccess, index?: number): LocationAccess; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListUserPermissionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListUserPermissionsResponse): ListUserPermissionsResponse.AsObject; + static serializeBinaryToWriter(message: ListUserPermissionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListUserPermissionsResponse; + static deserializeBinaryFromReader(message: ListUserPermissionsResponse, reader: jspb.BinaryReader): ListUserPermissionsResponse; +} + +export namespace ListUserPermissionsResponse { + export type AsObject = { + permissionsList: Array, + locationAccessList: Array, + } +} + +export enum Role { + ROLE_UNKNOWN = 0, + ROLE_VIEWER = 1, + ROLE_EDITOR = 2, + ROLE_TENANT_ADMIN = 3, + ROLE_SYSTEM_ADMIN = 4, +} +export enum Action { + ACTION_UNKNOWN = 0, + ACTION_READ = 1, + ACTION_WRITE = 2, + ACTION_DELETE = 3, + ACTION_ADMIN = 4, +} +export enum ResourceType { + RESOURCE_UNKNOWN = 0, + RESOURCE_LOCATION = 1, + RESOURCE_BUCKET = 2, + RESOURCE_OBJECT = 3, + RESOURCE_TRANSFER = 4, + RESOURCE_USER = 5, + RESOURCE_AUDIT = 6, +} diff --git a/frontend/src/gen/auth/auth_pb.js b/frontend/src/gen/auth/auth_pb.js new file mode 100644 index 0000000..42d642f --- /dev/null +++ b/frontend/src/gen/auth/auth_pb.js @@ -0,0 +1,6136 @@ +// source: auth/auth.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var common_common_pb = require('../common/common_pb.js'); +goog.object.extend(proto, common_common_pb); +goog.exportSymbol('proto.s3web.auth.Action', null, global); +goog.exportSymbol('proto.s3web.auth.AuthToken', null, global); +goog.exportSymbol('proto.s3web.auth.AuthenticateRequest', null, global); +goog.exportSymbol('proto.s3web.auth.AuthenticateRequest.CredentialsCase', null, global); +goog.exportSymbol('proto.s3web.auth.AuthenticateResponse', null, global); +goog.exportSymbol('proto.s3web.auth.BreakGlassSession', null, global); +goog.exportSymbol('proto.s3web.auth.CheckPermissionRequest', null, global); +goog.exportSymbol('proto.s3web.auth.CheckPermissionResponse', null, global); +goog.exportSymbol('proto.s3web.auth.EnterBreakGlassRequest', null, global); +goog.exportSymbol('proto.s3web.auth.EnterBreakGlassResponse', null, global); +goog.exportSymbol('proto.s3web.auth.ExitBreakGlassRequest', null, global); +goog.exportSymbol('proto.s3web.auth.ExitBreakGlassResponse', null, global); +goog.exportSymbol('proto.s3web.auth.GetCurrentUserRequest', null, global); +goog.exportSymbol('proto.s3web.auth.GetCurrentUserResponse', null, global); +goog.exportSymbol('proto.s3web.auth.ListUserPermissionsRequest', null, global); +goog.exportSymbol('proto.s3web.auth.ListUserPermissionsResponse', null, global); +goog.exportSymbol('proto.s3web.auth.LocationAccess', null, global); +goog.exportSymbol('proto.s3web.auth.LogoutRequest', null, global); +goog.exportSymbol('proto.s3web.auth.LogoutResponse', null, global); +goog.exportSymbol('proto.s3web.auth.OAuthCredentials', null, global); +goog.exportSymbol('proto.s3web.auth.PasswordCredentials', null, global); +goog.exportSymbol('proto.s3web.auth.Permission', null, global); +goog.exportSymbol('proto.s3web.auth.RefreshTokenRequest', null, global); +goog.exportSymbol('proto.s3web.auth.RefreshTokenResponse', null, global); +goog.exportSymbol('proto.s3web.auth.ResourceType', null, global); +goog.exportSymbol('proto.s3web.auth.Role', null, global); +goog.exportSymbol('proto.s3web.auth.SAMLCredentials', null, global); +goog.exportSymbol('proto.s3web.auth.User', null, global); +goog.exportSymbol('proto.s3web.auth.ValidateTokenRequest', null, global); +goog.exportSymbol('proto.s3web.auth.ValidateTokenResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.User = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.auth.User.repeatedFields_, null); +}; +goog.inherits(proto.s3web.auth.User, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.User.displayName = 'proto.s3web.auth.User'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.Permission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.auth.Permission.repeatedFields_, null); +}; +goog.inherits(proto.s3web.auth.Permission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.Permission.displayName = 'proto.s3web.auth.Permission'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.LocationAccess = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.auth.LocationAccess.repeatedFields_, null); +}; +goog.inherits(proto.s3web.auth.LocationAccess, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.LocationAccess.displayName = 'proto.s3web.auth.LocationAccess'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.AuthToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.AuthToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.AuthToken.displayName = 'proto.s3web.auth.AuthToken'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.BreakGlassSession = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.BreakGlassSession, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.BreakGlassSession.displayName = 'proto.s3web.auth.BreakGlassSession'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.AuthenticateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.s3web.auth.AuthenticateRequest.oneofGroups_); +}; +goog.inherits(proto.s3web.auth.AuthenticateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.AuthenticateRequest.displayName = 'proto.s3web.auth.AuthenticateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.PasswordCredentials = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.PasswordCredentials, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.PasswordCredentials.displayName = 'proto.s3web.auth.PasswordCredentials'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.OAuthCredentials = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.OAuthCredentials, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.OAuthCredentials.displayName = 'proto.s3web.auth.OAuthCredentials'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.SAMLCredentials = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.SAMLCredentials, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.SAMLCredentials.displayName = 'proto.s3web.auth.SAMLCredentials'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.AuthenticateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.AuthenticateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.AuthenticateResponse.displayName = 'proto.s3web.auth.AuthenticateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.ValidateTokenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.ValidateTokenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.ValidateTokenRequest.displayName = 'proto.s3web.auth.ValidateTokenRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.ValidateTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.ValidateTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.ValidateTokenResponse.displayName = 'proto.s3web.auth.ValidateTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.RefreshTokenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.RefreshTokenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.RefreshTokenRequest.displayName = 'proto.s3web.auth.RefreshTokenRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.RefreshTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.RefreshTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.RefreshTokenResponse.displayName = 'proto.s3web.auth.RefreshTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.LogoutRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.LogoutRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.LogoutRequest.displayName = 'proto.s3web.auth.LogoutRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.LogoutResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.LogoutResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.LogoutResponse.displayName = 'proto.s3web.auth.LogoutResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.CheckPermissionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.CheckPermissionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.CheckPermissionRequest.displayName = 'proto.s3web.auth.CheckPermissionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.CheckPermissionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.CheckPermissionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.CheckPermissionResponse.displayName = 'proto.s3web.auth.CheckPermissionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.EnterBreakGlassRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.EnterBreakGlassRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.EnterBreakGlassRequest.displayName = 'proto.s3web.auth.EnterBreakGlassRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.EnterBreakGlassResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.EnterBreakGlassResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.EnterBreakGlassResponse.displayName = 'proto.s3web.auth.EnterBreakGlassResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.ExitBreakGlassRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.ExitBreakGlassRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.ExitBreakGlassRequest.displayName = 'proto.s3web.auth.ExitBreakGlassRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.ExitBreakGlassResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.ExitBreakGlassResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.ExitBreakGlassResponse.displayName = 'proto.s3web.auth.ExitBreakGlassResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.GetCurrentUserRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.GetCurrentUserRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.GetCurrentUserRequest.displayName = 'proto.s3web.auth.GetCurrentUserRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.GetCurrentUserResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.GetCurrentUserResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.GetCurrentUserResponse.displayName = 'proto.s3web.auth.GetCurrentUserResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.ListUserPermissionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.auth.ListUserPermissionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.ListUserPermissionsRequest.displayName = 'proto.s3web.auth.ListUserPermissionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.auth.ListUserPermissionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.auth.ListUserPermissionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.auth.ListUserPermissionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.auth.ListUserPermissionsResponse.displayName = 'proto.s3web.auth.ListUserPermissionsResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.auth.User.repeatedFields_ = [5,6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.User.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.User.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.User} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.User.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + username: jspb.Message.getFieldWithDefault(msg, 2, ""), + email: jspb.Message.getFieldWithDefault(msg, 3, ""), + displayName: jspb.Message.getFieldWithDefault(msg, 4, ""), + rolesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + proto.s3web.auth.Permission.toObject, includeInstance), + locationAccessList: jspb.Message.toObjectList(msg.getLocationAccessList(), + proto.s3web.auth.LocationAccess.toObject, includeInstance), + isActive: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + lastLogin: (f = msg.getLastLogin()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.User} + */ +proto.s3web.auth.User.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.User; + return proto.s3web.auth.User.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.User} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.User} + */ +proto.s3web.auth.User.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setEmail(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplayName(value); + break; + case 5: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addRoles(values[i]); + } + break; + case 6: + var value = new proto.s3web.auth.Permission; + reader.readMessage(value,proto.s3web.auth.Permission.deserializeBinaryFromReader); + msg.addPermissions(value); + break; + case 7: + var value = new proto.s3web.auth.LocationAccess; + reader.readMessage(value,proto.s3web.auth.LocationAccess.deserializeBinaryFromReader); + msg.addLocationAccess(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsActive(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedAt(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastLogin(value); + break; + case 11: + var value = msg.getAttributesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.User.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.User.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.User} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.User.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEmail(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDisplayName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRolesList(); + if (f.length > 0) { + writer.writePackedEnum( + 5, + f + ); + } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.s3web.auth.Permission.serializeBinaryToWriter + ); + } + f = message.getLocationAccessList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.s3web.auth.LocationAccess.serializeBinaryToWriter + ); + } + f = message.getIsActive(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getCreatedAt(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLastLogin(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getAttributesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.s3web.auth.User.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string username = 2; + * @return {string} + */ +proto.s3web.auth.User.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string email = 3; + * @return {string} + */ +proto.s3web.auth.User.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.setEmail = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string display_name = 4; + * @return {string} + */ +proto.s3web.auth.User.prototype.getDisplayName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.setDisplayName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated Role roles = 5; + * @return {!Array} + */ +proto.s3web.auth.User.prototype.getRolesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.setRolesList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!proto.s3web.auth.Role} value + * @param {number=} opt_index + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.addRoles = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.clearRolesList = function() { + return this.setRolesList([]); +}; + + +/** + * repeated Permission permissions = 6; + * @return {!Array} + */ +proto.s3web.auth.User.prototype.getPermissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.auth.Permission, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.User} returns this +*/ +proto.s3web.auth.User.prototype.setPermissionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.s3web.auth.Permission=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.auth.Permission} + */ +proto.s3web.auth.User.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.s3web.auth.Permission, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.clearPermissionsList = function() { + return this.setPermissionsList([]); +}; + + +/** + * repeated LocationAccess location_access = 7; + * @return {!Array} + */ +proto.s3web.auth.User.prototype.getLocationAccessList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.auth.LocationAccess, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.User} returns this +*/ +proto.s3web.auth.User.prototype.setLocationAccessList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.s3web.auth.LocationAccess=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.auth.LocationAccess} + */ +proto.s3web.auth.User.prototype.addLocationAccess = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.s3web.auth.LocationAccess, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.clearLocationAccessList = function() { + return this.setLocationAccessList([]); +}; + + +/** + * optional bool is_active = 8; + * @return {boolean} + */ +proto.s3web.auth.User.prototype.getIsActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.setIsActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional google.protobuf.Timestamp created_at = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.auth.User.prototype.getCreatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.auth.User} returns this +*/ +proto.s3web.auth.User.prototype.setCreatedAt = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.clearCreatedAt = function() { + return this.setCreatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.User.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Timestamp last_login = 10; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.auth.User.prototype.getLastLogin = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.auth.User} returns this +*/ +proto.s3web.auth.User.prototype.setLastLogin = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.clearLastLogin = function() { + return this.setLastLogin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.User.prototype.hasLastLogin = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * map attributes = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.auth.User.prototype.getAttributesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.auth.User} returns this + */ +proto.s3web.auth.User.prototype.clearAttributesMap = function() { + this.getAttributesMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.auth.Permission.repeatedFields_ = [3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.Permission.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.Permission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.Permission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.Permission.toObject = function(includeInstance, msg) { + var f, obj = { + resourceType: jspb.Message.getFieldWithDefault(msg, 1, 0), + resourceId: jspb.Message.getFieldWithDefault(msg, 2, ""), + actionsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + scopesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.Permission} + */ +proto.s3web.auth.Permission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.Permission; + return proto.s3web.auth.Permission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.Permission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.Permission} + */ +proto.s3web.auth.Permission.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.auth.ResourceType} */ (reader.readEnum()); + msg.setResourceType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceId(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addActions(values[i]); + } + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addScopes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.Permission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.Permission.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.Permission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.Permission.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourceType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getResourceId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getActionsList(); + if (f.length > 0) { + writer.writePackedEnum( + 3, + f + ); + } + f = message.getScopesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } +}; + + +/** + * optional ResourceType resource_type = 1; + * @return {!proto.s3web.auth.ResourceType} + */ +proto.s3web.auth.Permission.prototype.getResourceType = function() { + return /** @type {!proto.s3web.auth.ResourceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.auth.ResourceType} value + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.setResourceType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string resource_id = 2; + * @return {string} + */ +proto.s3web.auth.Permission.prototype.getResourceId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.setResourceId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Action actions = 3; + * @return {!Array} + */ +proto.s3web.auth.Permission.prototype.getActionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.setActionsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!proto.s3web.auth.Action} value + * @param {number=} opt_index + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.addActions = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.clearActionsList = function() { + return this.setActionsList([]); +}; + + +/** + * repeated string scopes = 4; + * @return {!Array} + */ +proto.s3web.auth.Permission.prototype.getScopesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.setScopesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.addScopes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.Permission} returns this + */ +proto.s3web.auth.Permission.prototype.clearScopesList = function() { + return this.setScopesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.auth.LocationAccess.repeatedFields_ = [2,3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.LocationAccess.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.LocationAccess.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.LocationAccess} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.LocationAccess.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + allowedBucketsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + allowedPrefixesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + actionsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.LocationAccess} + */ +proto.s3web.auth.LocationAccess.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.LocationAccess; + return proto.s3web.auth.LocationAccess.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.LocationAccess} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.LocationAccess} + */ +proto.s3web.auth.LocationAccess.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowedBuckets(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addAllowedPrefixes(value); + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addActions(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.LocationAccess.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.LocationAccess.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.LocationAccess} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.LocationAccess.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAllowedBucketsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getAllowedPrefixesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getActionsList(); + if (f.length > 0) { + writer.writePackedEnum( + 4, + f + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.auth.LocationAccess.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string allowed_buckets = 2; + * @return {!Array} + */ +proto.s3web.auth.LocationAccess.prototype.getAllowedBucketsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.setAllowedBucketsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.addAllowedBuckets = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.clearAllowedBucketsList = function() { + return this.setAllowedBucketsList([]); +}; + + +/** + * repeated string allowed_prefixes = 3; + * @return {!Array} + */ +proto.s3web.auth.LocationAccess.prototype.getAllowedPrefixesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.setAllowedPrefixesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.addAllowedPrefixes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.clearAllowedPrefixesList = function() { + return this.setAllowedPrefixesList([]); +}; + + +/** + * repeated Action actions = 4; + * @return {!Array} + */ +proto.s3web.auth.LocationAccess.prototype.getActionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.setActionsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!proto.s3web.auth.Action} value + * @param {number=} opt_index + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.addActions = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.LocationAccess} returns this + */ +proto.s3web.auth.LocationAccess.prototype.clearActionsList = function() { + return this.setActionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.AuthToken.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.AuthToken.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.AuthToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.AuthToken.toObject = function(includeInstance, msg) { + var f, obj = { + accessToken: jspb.Message.getFieldWithDefault(msg, 1, ""), + refreshToken: jspb.Message.getFieldWithDefault(msg, 2, ""), + tokenType: jspb.Message.getFieldWithDefault(msg, 3, ""), + expiresIn: jspb.Message.getFieldWithDefault(msg, 4, 0), + issuedAt: (f = msg.getIssuedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.AuthToken} + */ +proto.s3web.auth.AuthToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.AuthToken; + return proto.s3web.auth.AuthToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.AuthToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.AuthToken} + */ +proto.s3web.auth.AuthToken.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAccessToken(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRefreshToken(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTokenType(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setExpiresIn(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setIssuedAt(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiresAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.AuthToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.AuthToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.AuthToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.AuthToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccessToken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRefreshToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTokenType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getExpiresIn(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getIssuedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getExpiresAt(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string access_token = 1; + * @return {string} + */ +proto.s3web.auth.AuthToken.prototype.getAccessToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.AuthToken} returns this + */ +proto.s3web.auth.AuthToken.prototype.setAccessToken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string refresh_token = 2; + * @return {string} + */ +proto.s3web.auth.AuthToken.prototype.getRefreshToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.AuthToken} returns this + */ +proto.s3web.auth.AuthToken.prototype.setRefreshToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string token_type = 3; + * @return {string} + */ +proto.s3web.auth.AuthToken.prototype.getTokenType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.AuthToken} returns this + */ +proto.s3web.auth.AuthToken.prototype.setTokenType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 expires_in = 4; + * @return {number} + */ +proto.s3web.auth.AuthToken.prototype.getExpiresIn = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.auth.AuthToken} returns this + */ +proto.s3web.auth.AuthToken.prototype.setExpiresIn = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp issued_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.auth.AuthToken.prototype.getIssuedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.auth.AuthToken} returns this +*/ +proto.s3web.auth.AuthToken.prototype.setIssuedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.AuthToken} returns this + */ +proto.s3web.auth.AuthToken.prototype.clearIssuedAt = function() { + return this.setIssuedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.AuthToken.prototype.hasIssuedAt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp expires_at = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.auth.AuthToken.prototype.getExpiresAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.auth.AuthToken} returns this +*/ +proto.s3web.auth.AuthToken.prototype.setExpiresAt = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.AuthToken} returns this + */ +proto.s3web.auth.AuthToken.prototype.clearExpiresAt = function() { + return this.setExpiresAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.AuthToken.prototype.hasExpiresAt = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.BreakGlassSession.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.BreakGlassSession.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.BreakGlassSession} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.BreakGlassSession.toObject = function(includeInstance, msg) { + var f, obj = { + sessionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + userId: jspb.Message.getFieldWithDefault(msg, 2, ""), + justification: jspb.Message.getFieldWithDefault(msg, 3, ""), + durationSeconds: jspb.Message.getFieldWithDefault(msg, 4, 0), + startedAt: (f = msg.getStartedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + isActive: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.BreakGlassSession} + */ +proto.s3web.auth.BreakGlassSession.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.BreakGlassSession; + return proto.s3web.auth.BreakGlassSession.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.BreakGlassSession} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.BreakGlassSession} + */ +proto.s3web.auth.BreakGlassSession.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setJustification(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDurationSeconds(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStartedAt(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiresAt(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsActive(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.BreakGlassSession.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.BreakGlassSession.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.BreakGlassSession} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.BreakGlassSession.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUserId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getJustification(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDurationSeconds(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getStartedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getExpiresAt(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getIsActive(); + if (f) { + writer.writeBool( + 7, + f + ); + } +}; + + +/** + * optional string session_id = 1; + * @return {string} + */ +proto.s3web.auth.BreakGlassSession.prototype.getSessionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.BreakGlassSession} returns this + */ +proto.s3web.auth.BreakGlassSession.prototype.setSessionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string user_id = 2; + * @return {string} + */ +proto.s3web.auth.BreakGlassSession.prototype.getUserId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.BreakGlassSession} returns this + */ +proto.s3web.auth.BreakGlassSession.prototype.setUserId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string justification = 3; + * @return {string} + */ +proto.s3web.auth.BreakGlassSession.prototype.getJustification = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.BreakGlassSession} returns this + */ +proto.s3web.auth.BreakGlassSession.prototype.setJustification = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 duration_seconds = 4; + * @return {number} + */ +proto.s3web.auth.BreakGlassSession.prototype.getDurationSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.auth.BreakGlassSession} returns this + */ +proto.s3web.auth.BreakGlassSession.prototype.setDurationSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp started_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.auth.BreakGlassSession.prototype.getStartedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.auth.BreakGlassSession} returns this +*/ +proto.s3web.auth.BreakGlassSession.prototype.setStartedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.BreakGlassSession} returns this + */ +proto.s3web.auth.BreakGlassSession.prototype.clearStartedAt = function() { + return this.setStartedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.BreakGlassSession.prototype.hasStartedAt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp expires_at = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.auth.BreakGlassSession.prototype.getExpiresAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.auth.BreakGlassSession} returns this +*/ +proto.s3web.auth.BreakGlassSession.prototype.setExpiresAt = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.BreakGlassSession} returns this + */ +proto.s3web.auth.BreakGlassSession.prototype.clearExpiresAt = function() { + return this.setExpiresAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.BreakGlassSession.prototype.hasExpiresAt = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool is_active = 7; + * @return {boolean} + */ +proto.s3web.auth.BreakGlassSession.prototype.getIsActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.auth.BreakGlassSession} returns this + */ +proto.s3web.auth.BreakGlassSession.prototype.setIsActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.s3web.auth.AuthenticateRequest.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.s3web.auth.AuthenticateRequest.CredentialsCase = { + CREDENTIALS_NOT_SET: 0, + PASSWORD: 1, + OAUTH: 2, + SAML: 3 +}; + +/** + * @return {proto.s3web.auth.AuthenticateRequest.CredentialsCase} + */ +proto.s3web.auth.AuthenticateRequest.prototype.getCredentialsCase = function() { + return /** @type {proto.s3web.auth.AuthenticateRequest.CredentialsCase} */(jspb.Message.computeOneofCase(this, proto.s3web.auth.AuthenticateRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.AuthenticateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.AuthenticateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.AuthenticateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.AuthenticateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + password: (f = msg.getPassword()) && proto.s3web.auth.PasswordCredentials.toObject(includeInstance, f), + oauth: (f = msg.getOauth()) && proto.s3web.auth.OAuthCredentials.toObject(includeInstance, f), + saml: (f = msg.getSaml()) && proto.s3web.auth.SAMLCredentials.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.AuthenticateRequest} + */ +proto.s3web.auth.AuthenticateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.AuthenticateRequest; + return proto.s3web.auth.AuthenticateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.AuthenticateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.AuthenticateRequest} + */ +proto.s3web.auth.AuthenticateRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.auth.PasswordCredentials; + reader.readMessage(value,proto.s3web.auth.PasswordCredentials.deserializeBinaryFromReader); + msg.setPassword(value); + break; + case 2: + var value = new proto.s3web.auth.OAuthCredentials; + reader.readMessage(value,proto.s3web.auth.OAuthCredentials.deserializeBinaryFromReader); + msg.setOauth(value); + break; + case 3: + var value = new proto.s3web.auth.SAMLCredentials; + reader.readMessage(value,proto.s3web.auth.SAMLCredentials.deserializeBinaryFromReader); + msg.setSaml(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.AuthenticateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.AuthenticateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.AuthenticateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.AuthenticateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPassword(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.auth.PasswordCredentials.serializeBinaryToWriter + ); + } + f = message.getOauth(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.auth.OAuthCredentials.serializeBinaryToWriter + ); + } + f = message.getSaml(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.s3web.auth.SAMLCredentials.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PasswordCredentials password = 1; + * @return {?proto.s3web.auth.PasswordCredentials} + */ +proto.s3web.auth.AuthenticateRequest.prototype.getPassword = function() { + return /** @type{?proto.s3web.auth.PasswordCredentials} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.PasswordCredentials, 1)); +}; + + +/** + * @param {?proto.s3web.auth.PasswordCredentials|undefined} value + * @return {!proto.s3web.auth.AuthenticateRequest} returns this +*/ +proto.s3web.auth.AuthenticateRequest.prototype.setPassword = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.s3web.auth.AuthenticateRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.AuthenticateRequest} returns this + */ +proto.s3web.auth.AuthenticateRequest.prototype.clearPassword = function() { + return this.setPassword(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.AuthenticateRequest.prototype.hasPassword = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional OAuthCredentials oauth = 2; + * @return {?proto.s3web.auth.OAuthCredentials} + */ +proto.s3web.auth.AuthenticateRequest.prototype.getOauth = function() { + return /** @type{?proto.s3web.auth.OAuthCredentials} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.OAuthCredentials, 2)); +}; + + +/** + * @param {?proto.s3web.auth.OAuthCredentials|undefined} value + * @return {!proto.s3web.auth.AuthenticateRequest} returns this +*/ +proto.s3web.auth.AuthenticateRequest.prototype.setOauth = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.s3web.auth.AuthenticateRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.AuthenticateRequest} returns this + */ +proto.s3web.auth.AuthenticateRequest.prototype.clearOauth = function() { + return this.setOauth(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.AuthenticateRequest.prototype.hasOauth = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SAMLCredentials saml = 3; + * @return {?proto.s3web.auth.SAMLCredentials} + */ +proto.s3web.auth.AuthenticateRequest.prototype.getSaml = function() { + return /** @type{?proto.s3web.auth.SAMLCredentials} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.SAMLCredentials, 3)); +}; + + +/** + * @param {?proto.s3web.auth.SAMLCredentials|undefined} value + * @return {!proto.s3web.auth.AuthenticateRequest} returns this +*/ +proto.s3web.auth.AuthenticateRequest.prototype.setSaml = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.s3web.auth.AuthenticateRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.AuthenticateRequest} returns this + */ +proto.s3web.auth.AuthenticateRequest.prototype.clearSaml = function() { + return this.setSaml(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.AuthenticateRequest.prototype.hasSaml = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.PasswordCredentials.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.PasswordCredentials.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.PasswordCredentials} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.PasswordCredentials.toObject = function(includeInstance, msg) { + var f, obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + password: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.PasswordCredentials} + */ +proto.s3web.auth.PasswordCredentials.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.PasswordCredentials; + return proto.s3web.auth.PasswordCredentials.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.PasswordCredentials} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.PasswordCredentials} + */ +proto.s3web.auth.PasswordCredentials.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.PasswordCredentials.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.PasswordCredentials.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.PasswordCredentials} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.PasswordCredentials.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUsername(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string username = 1; + * @return {string} + */ +proto.s3web.auth.PasswordCredentials.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.PasswordCredentials} returns this + */ +proto.s3web.auth.PasswordCredentials.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string password = 2; + * @return {string} + */ +proto.s3web.auth.PasswordCredentials.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.PasswordCredentials} returns this + */ +proto.s3web.auth.PasswordCredentials.prototype.setPassword = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.OAuthCredentials.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.OAuthCredentials.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.OAuthCredentials} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.OAuthCredentials.toObject = function(includeInstance, msg) { + var f, obj = { + provider: jspb.Message.getFieldWithDefault(msg, 1, ""), + code: jspb.Message.getFieldWithDefault(msg, 2, ""), + redirectUri: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.OAuthCredentials} + */ +proto.s3web.auth.OAuthCredentials.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.OAuthCredentials; + return proto.s3web.auth.OAuthCredentials.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.OAuthCredentials} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.OAuthCredentials} + */ +proto.s3web.auth.OAuthCredentials.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRedirectUri(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.OAuthCredentials.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.OAuthCredentials.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.OAuthCredentials} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.OAuthCredentials.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCode(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRedirectUri(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string provider = 1; + * @return {string} + */ +proto.s3web.auth.OAuthCredentials.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.OAuthCredentials} returns this + */ +proto.s3web.auth.OAuthCredentials.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string code = 2; + * @return {string} + */ +proto.s3web.auth.OAuthCredentials.prototype.getCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.OAuthCredentials} returns this + */ +proto.s3web.auth.OAuthCredentials.prototype.setCode = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string redirect_uri = 3; + * @return {string} + */ +proto.s3web.auth.OAuthCredentials.prototype.getRedirectUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.OAuthCredentials} returns this + */ +proto.s3web.auth.OAuthCredentials.prototype.setRedirectUri = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.SAMLCredentials.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.SAMLCredentials.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.SAMLCredentials} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.SAMLCredentials.toObject = function(includeInstance, msg) { + var f, obj = { + assertion: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.SAMLCredentials} + */ +proto.s3web.auth.SAMLCredentials.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.SAMLCredentials; + return proto.s3web.auth.SAMLCredentials.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.SAMLCredentials} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.SAMLCredentials} + */ +proto.s3web.auth.SAMLCredentials.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAssertion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.SAMLCredentials.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.SAMLCredentials.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.SAMLCredentials} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.SAMLCredentials.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAssertion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string assertion = 1; + * @return {string} + */ +proto.s3web.auth.SAMLCredentials.prototype.getAssertion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.SAMLCredentials} returns this + */ +proto.s3web.auth.SAMLCredentials.prototype.setAssertion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.AuthenticateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.AuthenticateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.AuthenticateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.AuthenticateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + user: (f = msg.getUser()) && proto.s3web.auth.User.toObject(includeInstance, f), + token: (f = msg.getToken()) && proto.s3web.auth.AuthToken.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.AuthenticateResponse} + */ +proto.s3web.auth.AuthenticateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.AuthenticateResponse; + return proto.s3web.auth.AuthenticateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.AuthenticateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.AuthenticateResponse} + */ +proto.s3web.auth.AuthenticateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.auth.User; + reader.readMessage(value,proto.s3web.auth.User.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 2: + var value = new proto.s3web.auth.AuthToken; + reader.readMessage(value,proto.s3web.auth.AuthToken.deserializeBinaryFromReader); + msg.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.AuthenticateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.AuthenticateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.AuthenticateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.AuthenticateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUser(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.auth.User.serializeBinaryToWriter + ); + } + f = message.getToken(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.auth.AuthToken.serializeBinaryToWriter + ); + } +}; + + +/** + * optional User user = 1; + * @return {?proto.s3web.auth.User} + */ +proto.s3web.auth.AuthenticateResponse.prototype.getUser = function() { + return /** @type{?proto.s3web.auth.User} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.User, 1)); +}; + + +/** + * @param {?proto.s3web.auth.User|undefined} value + * @return {!proto.s3web.auth.AuthenticateResponse} returns this +*/ +proto.s3web.auth.AuthenticateResponse.prototype.setUser = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.AuthenticateResponse} returns this + */ +proto.s3web.auth.AuthenticateResponse.prototype.clearUser = function() { + return this.setUser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.AuthenticateResponse.prototype.hasUser = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional AuthToken token = 2; + * @return {?proto.s3web.auth.AuthToken} + */ +proto.s3web.auth.AuthenticateResponse.prototype.getToken = function() { + return /** @type{?proto.s3web.auth.AuthToken} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.AuthToken, 2)); +}; + + +/** + * @param {?proto.s3web.auth.AuthToken|undefined} value + * @return {!proto.s3web.auth.AuthenticateResponse} returns this +*/ +proto.s3web.auth.AuthenticateResponse.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.AuthenticateResponse} returns this + */ +proto.s3web.auth.AuthenticateResponse.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.AuthenticateResponse.prototype.hasToken = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.ValidateTokenRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.ValidateTokenRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.ValidateTokenRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ValidateTokenRequest.toObject = function(includeInstance, msg) { + var f, obj = { + token: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.ValidateTokenRequest} + */ +proto.s3web.auth.ValidateTokenRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.ValidateTokenRequest; + return proto.s3web.auth.ValidateTokenRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.ValidateTokenRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.ValidateTokenRequest} + */ +proto.s3web.auth.ValidateTokenRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.ValidateTokenRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.ValidateTokenRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.ValidateTokenRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ValidateTokenRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string token = 1; + * @return {string} + */ +proto.s3web.auth.ValidateTokenRequest.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.ValidateTokenRequest} returns this + */ +proto.s3web.auth.ValidateTokenRequest.prototype.setToken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.ValidateTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.ValidateTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.ValidateTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ValidateTokenResponse.toObject = function(includeInstance, msg) { + var f, obj = { + valid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + user: (f = msg.getUser()) && proto.s3web.auth.User.toObject(includeInstance, f), + expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.ValidateTokenResponse} + */ +proto.s3web.auth.ValidateTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.ValidateTokenResponse; + return proto.s3web.auth.ValidateTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.ValidateTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.ValidateTokenResponse} + */ +proto.s3web.auth.ValidateTokenResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValid(value); + break; + case 2: + var value = new proto.s3web.auth.User; + reader.readMessage(value,proto.s3web.auth.User.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiresAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.ValidateTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.ValidateTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.ValidateTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ValidateTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValid(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getUser(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.auth.User.serializeBinaryToWriter + ); + } + f = message.getExpiresAt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool valid = 1; + * @return {boolean} + */ +proto.s3web.auth.ValidateTokenResponse.prototype.getValid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.auth.ValidateTokenResponse} returns this + */ +proto.s3web.auth.ValidateTokenResponse.prototype.setValid = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional User user = 2; + * @return {?proto.s3web.auth.User} + */ +proto.s3web.auth.ValidateTokenResponse.prototype.getUser = function() { + return /** @type{?proto.s3web.auth.User} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.User, 2)); +}; + + +/** + * @param {?proto.s3web.auth.User|undefined} value + * @return {!proto.s3web.auth.ValidateTokenResponse} returns this +*/ +proto.s3web.auth.ValidateTokenResponse.prototype.setUser = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.ValidateTokenResponse} returns this + */ +proto.s3web.auth.ValidateTokenResponse.prototype.clearUser = function() { + return this.setUser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.ValidateTokenResponse.prototype.hasUser = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Timestamp expires_at = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.auth.ValidateTokenResponse.prototype.getExpiresAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.auth.ValidateTokenResponse} returns this +*/ +proto.s3web.auth.ValidateTokenResponse.prototype.setExpiresAt = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.ValidateTokenResponse} returns this + */ +proto.s3web.auth.ValidateTokenResponse.prototype.clearExpiresAt = function() { + return this.setExpiresAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.ValidateTokenResponse.prototype.hasExpiresAt = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.RefreshTokenRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.RefreshTokenRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.RefreshTokenRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.RefreshTokenRequest.toObject = function(includeInstance, msg) { + var f, obj = { + refreshToken: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.RefreshTokenRequest} + */ +proto.s3web.auth.RefreshTokenRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.RefreshTokenRequest; + return proto.s3web.auth.RefreshTokenRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.RefreshTokenRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.RefreshTokenRequest} + */ +proto.s3web.auth.RefreshTokenRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setRefreshToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.RefreshTokenRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.RefreshTokenRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.RefreshTokenRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.RefreshTokenRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRefreshToken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string refresh_token = 1; + * @return {string} + */ +proto.s3web.auth.RefreshTokenRequest.prototype.getRefreshToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.RefreshTokenRequest} returns this + */ +proto.s3web.auth.RefreshTokenRequest.prototype.setRefreshToken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.RefreshTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.RefreshTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.RefreshTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.RefreshTokenResponse.toObject = function(includeInstance, msg) { + var f, obj = { + token: (f = msg.getToken()) && proto.s3web.auth.AuthToken.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.RefreshTokenResponse} + */ +proto.s3web.auth.RefreshTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.RefreshTokenResponse; + return proto.s3web.auth.RefreshTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.RefreshTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.RefreshTokenResponse} + */ +proto.s3web.auth.RefreshTokenResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.auth.AuthToken; + reader.readMessage(value,proto.s3web.auth.AuthToken.deserializeBinaryFromReader); + msg.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.RefreshTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.RefreshTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.RefreshTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.RefreshTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.auth.AuthToken.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AuthToken token = 1; + * @return {?proto.s3web.auth.AuthToken} + */ +proto.s3web.auth.RefreshTokenResponse.prototype.getToken = function() { + return /** @type{?proto.s3web.auth.AuthToken} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.AuthToken, 1)); +}; + + +/** + * @param {?proto.s3web.auth.AuthToken|undefined} value + * @return {!proto.s3web.auth.RefreshTokenResponse} returns this +*/ +proto.s3web.auth.RefreshTokenResponse.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.RefreshTokenResponse} returns this + */ +proto.s3web.auth.RefreshTokenResponse.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.RefreshTokenResponse.prototype.hasToken = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.LogoutRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.LogoutRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.LogoutRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.LogoutRequest.toObject = function(includeInstance, msg) { + var f, obj = { + token: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.LogoutRequest} + */ +proto.s3web.auth.LogoutRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.LogoutRequest; + return proto.s3web.auth.LogoutRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.LogoutRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.LogoutRequest} + */ +proto.s3web.auth.LogoutRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.LogoutRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.LogoutRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.LogoutRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.LogoutRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string token = 1; + * @return {string} + */ +proto.s3web.auth.LogoutRequest.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.LogoutRequest} returns this + */ +proto.s3web.auth.LogoutRequest.prototype.setToken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.auth.LogoutRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.auth.LogoutRequest} returns this +*/ +proto.s3web.auth.LogoutRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.LogoutRequest} returns this + */ +proto.s3web.auth.LogoutRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.LogoutRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.LogoutResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.LogoutResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.LogoutResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.LogoutResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.LogoutResponse} + */ +proto.s3web.auth.LogoutResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.LogoutResponse; + return proto.s3web.auth.LogoutResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.LogoutResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.LogoutResponse} + */ +proto.s3web.auth.LogoutResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.LogoutResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.LogoutResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.LogoutResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.LogoutResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.s3web.auth.LogoutResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.auth.LogoutResponse} returns this + */ +proto.s3web.auth.LogoutResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.CheckPermissionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.CheckPermissionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.CheckPermissionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.CheckPermissionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + userId: jspb.Message.getFieldWithDefault(msg, 1, ""), + resourceType: jspb.Message.getFieldWithDefault(msg, 2, 0), + resourceId: jspb.Message.getFieldWithDefault(msg, 3, ""), + action: jspb.Message.getFieldWithDefault(msg, 4, 0), + contextMap: (f = msg.getContextMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.CheckPermissionRequest} + */ +proto.s3web.auth.CheckPermissionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.CheckPermissionRequest; + return proto.s3web.auth.CheckPermissionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.CheckPermissionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.CheckPermissionRequest} + */ +proto.s3web.auth.CheckPermissionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserId(value); + break; + case 2: + var value = /** @type {!proto.s3web.auth.ResourceType} */ (reader.readEnum()); + msg.setResourceType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceId(value); + break; + case 4: + var value = /** @type {!proto.s3web.auth.Action} */ (reader.readEnum()); + msg.setAction(value); + break; + case 5: + var value = msg.getContextMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.CheckPermissionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.CheckPermissionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.CheckPermissionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.CheckPermissionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getResourceType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getResourceId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAction(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getContextMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string user_id = 1; + * @return {string} + */ +proto.s3web.auth.CheckPermissionRequest.prototype.getUserId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.CheckPermissionRequest} returns this + */ +proto.s3web.auth.CheckPermissionRequest.prototype.setUserId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ResourceType resource_type = 2; + * @return {!proto.s3web.auth.ResourceType} + */ +proto.s3web.auth.CheckPermissionRequest.prototype.getResourceType = function() { + return /** @type {!proto.s3web.auth.ResourceType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.auth.ResourceType} value + * @return {!proto.s3web.auth.CheckPermissionRequest} returns this + */ +proto.s3web.auth.CheckPermissionRequest.prototype.setResourceType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional string resource_id = 3; + * @return {string} + */ +proto.s3web.auth.CheckPermissionRequest.prototype.getResourceId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.CheckPermissionRequest} returns this + */ +proto.s3web.auth.CheckPermissionRequest.prototype.setResourceId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Action action = 4; + * @return {!proto.s3web.auth.Action} + */ +proto.s3web.auth.CheckPermissionRequest.prototype.getAction = function() { + return /** @type {!proto.s3web.auth.Action} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.s3web.auth.Action} value + * @return {!proto.s3web.auth.CheckPermissionRequest} returns this + */ +proto.s3web.auth.CheckPermissionRequest.prototype.setAction = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * map context = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.auth.CheckPermissionRequest.prototype.getContextMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.auth.CheckPermissionRequest} returns this + */ +proto.s3web.auth.CheckPermissionRequest.prototype.clearContextMap = function() { + this.getContextMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.CheckPermissionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.CheckPermissionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.CheckPermissionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.CheckPermissionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + allowed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + reason: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.CheckPermissionResponse} + */ +proto.s3web.auth.CheckPermissionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.CheckPermissionResponse; + return proto.s3web.auth.CheckPermissionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.CheckPermissionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.CheckPermissionResponse} + */ +proto.s3web.auth.CheckPermissionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowed(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReason(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.CheckPermissionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.CheckPermissionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.CheckPermissionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.CheckPermissionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowed(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getReason(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bool allowed = 1; + * @return {boolean} + */ +proto.s3web.auth.CheckPermissionResponse.prototype.getAllowed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.auth.CheckPermissionResponse} returns this + */ +proto.s3web.auth.CheckPermissionResponse.prototype.setAllowed = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional string reason = 2; + * @return {string} + */ +proto.s3web.auth.CheckPermissionResponse.prototype.getReason = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.CheckPermissionResponse} returns this + */ +proto.s3web.auth.CheckPermissionResponse.prototype.setReason = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.EnterBreakGlassRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.EnterBreakGlassRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.EnterBreakGlassRequest.toObject = function(includeInstance, msg) { + var f, obj = { + justification: jspb.Message.getFieldWithDefault(msg, 1, ""), + durationSeconds: jspb.Message.getFieldWithDefault(msg, 2, 0), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.EnterBreakGlassRequest} + */ +proto.s3web.auth.EnterBreakGlassRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.EnterBreakGlassRequest; + return proto.s3web.auth.EnterBreakGlassRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.EnterBreakGlassRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.EnterBreakGlassRequest} + */ +proto.s3web.auth.EnterBreakGlassRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJustification(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDurationSeconds(value); + break; + case 3: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.EnterBreakGlassRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.EnterBreakGlassRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.EnterBreakGlassRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJustification(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDurationSeconds(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string justification = 1; + * @return {string} + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.getJustification = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.EnterBreakGlassRequest} returns this + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.setJustification = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 duration_seconds = 2; + * @return {number} + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.getDurationSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.auth.EnterBreakGlassRequest} returns this + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.setDurationSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 3; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 3)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.auth.EnterBreakGlassRequest} returns this +*/ +proto.s3web.auth.EnterBreakGlassRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.EnterBreakGlassRequest} returns this + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.EnterBreakGlassRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.EnterBreakGlassResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.EnterBreakGlassResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.EnterBreakGlassResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.EnterBreakGlassResponse.toObject = function(includeInstance, msg) { + var f, obj = { + session: (f = msg.getSession()) && proto.s3web.auth.BreakGlassSession.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.EnterBreakGlassResponse} + */ +proto.s3web.auth.EnterBreakGlassResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.EnterBreakGlassResponse; + return proto.s3web.auth.EnterBreakGlassResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.EnterBreakGlassResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.EnterBreakGlassResponse} + */ +proto.s3web.auth.EnterBreakGlassResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.auth.BreakGlassSession; + reader.readMessage(value,proto.s3web.auth.BreakGlassSession.deserializeBinaryFromReader); + msg.setSession(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.EnterBreakGlassResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.EnterBreakGlassResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.EnterBreakGlassResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.EnterBreakGlassResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSession(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.auth.BreakGlassSession.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BreakGlassSession session = 1; + * @return {?proto.s3web.auth.BreakGlassSession} + */ +proto.s3web.auth.EnterBreakGlassResponse.prototype.getSession = function() { + return /** @type{?proto.s3web.auth.BreakGlassSession} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.BreakGlassSession, 1)); +}; + + +/** + * @param {?proto.s3web.auth.BreakGlassSession|undefined} value + * @return {!proto.s3web.auth.EnterBreakGlassResponse} returns this +*/ +proto.s3web.auth.EnterBreakGlassResponse.prototype.setSession = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.EnterBreakGlassResponse} returns this + */ +proto.s3web.auth.EnterBreakGlassResponse.prototype.clearSession = function() { + return this.setSession(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.EnterBreakGlassResponse.prototype.hasSession = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.ExitBreakGlassRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.ExitBreakGlassRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.ExitBreakGlassRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ExitBreakGlassRequest.toObject = function(includeInstance, msg) { + var f, obj = { + sessionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.ExitBreakGlassRequest} + */ +proto.s3web.auth.ExitBreakGlassRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.ExitBreakGlassRequest; + return proto.s3web.auth.ExitBreakGlassRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.ExitBreakGlassRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.ExitBreakGlassRequest} + */ +proto.s3web.auth.ExitBreakGlassRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.ExitBreakGlassRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.ExitBreakGlassRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.ExitBreakGlassRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ExitBreakGlassRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string session_id = 1; + * @return {string} + */ +proto.s3web.auth.ExitBreakGlassRequest.prototype.getSessionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.ExitBreakGlassRequest} returns this + */ +proto.s3web.auth.ExitBreakGlassRequest.prototype.setSessionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.auth.ExitBreakGlassRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.auth.ExitBreakGlassRequest} returns this +*/ +proto.s3web.auth.ExitBreakGlassRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.ExitBreakGlassRequest} returns this + */ +proto.s3web.auth.ExitBreakGlassRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.ExitBreakGlassRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.ExitBreakGlassResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.ExitBreakGlassResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.ExitBreakGlassResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ExitBreakGlassResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.ExitBreakGlassResponse} + */ +proto.s3web.auth.ExitBreakGlassResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.ExitBreakGlassResponse; + return proto.s3web.auth.ExitBreakGlassResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.ExitBreakGlassResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.ExitBreakGlassResponse} + */ +proto.s3web.auth.ExitBreakGlassResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.ExitBreakGlassResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.ExitBreakGlassResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.ExitBreakGlassResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ExitBreakGlassResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.s3web.auth.ExitBreakGlassResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.auth.ExitBreakGlassResponse} returns this + */ +proto.s3web.auth.ExitBreakGlassResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.GetCurrentUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.GetCurrentUserRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.GetCurrentUserRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.GetCurrentUserRequest.toObject = function(includeInstance, msg) { + var f, obj = { + token: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.GetCurrentUserRequest} + */ +proto.s3web.auth.GetCurrentUserRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.GetCurrentUserRequest; + return proto.s3web.auth.GetCurrentUserRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.GetCurrentUserRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.GetCurrentUserRequest} + */ +proto.s3web.auth.GetCurrentUserRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.GetCurrentUserRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.GetCurrentUserRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.GetCurrentUserRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.GetCurrentUserRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string token = 1; + * @return {string} + */ +proto.s3web.auth.GetCurrentUserRequest.prototype.getToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.GetCurrentUserRequest} returns this + */ +proto.s3web.auth.GetCurrentUserRequest.prototype.setToken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.GetCurrentUserResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.GetCurrentUserResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.GetCurrentUserResponse.toObject = function(includeInstance, msg) { + var f, obj = { + user: (f = msg.getUser()) && proto.s3web.auth.User.toObject(includeInstance, f), + breakGlassSession: (f = msg.getBreakGlassSession()) && proto.s3web.auth.BreakGlassSession.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.GetCurrentUserResponse} + */ +proto.s3web.auth.GetCurrentUserResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.GetCurrentUserResponse; + return proto.s3web.auth.GetCurrentUserResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.GetCurrentUserResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.GetCurrentUserResponse} + */ +proto.s3web.auth.GetCurrentUserResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.auth.User; + reader.readMessage(value,proto.s3web.auth.User.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 2: + var value = new proto.s3web.auth.BreakGlassSession; + reader.readMessage(value,proto.s3web.auth.BreakGlassSession.deserializeBinaryFromReader); + msg.setBreakGlassSession(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.GetCurrentUserResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.GetCurrentUserResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.GetCurrentUserResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUser(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.auth.User.serializeBinaryToWriter + ); + } + f = message.getBreakGlassSession(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.auth.BreakGlassSession.serializeBinaryToWriter + ); + } +}; + + +/** + * optional User user = 1; + * @return {?proto.s3web.auth.User} + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.getUser = function() { + return /** @type{?proto.s3web.auth.User} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.User, 1)); +}; + + +/** + * @param {?proto.s3web.auth.User|undefined} value + * @return {!proto.s3web.auth.GetCurrentUserResponse} returns this +*/ +proto.s3web.auth.GetCurrentUserResponse.prototype.setUser = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.GetCurrentUserResponse} returns this + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.clearUser = function() { + return this.setUser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.hasUser = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional BreakGlassSession break_glass_session = 2; + * @return {?proto.s3web.auth.BreakGlassSession} + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.getBreakGlassSession = function() { + return /** @type{?proto.s3web.auth.BreakGlassSession} */ ( + jspb.Message.getWrapperField(this, proto.s3web.auth.BreakGlassSession, 2)); +}; + + +/** + * @param {?proto.s3web.auth.BreakGlassSession|undefined} value + * @return {!proto.s3web.auth.GetCurrentUserResponse} returns this +*/ +proto.s3web.auth.GetCurrentUserResponse.prototype.setBreakGlassSession = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.GetCurrentUserResponse} returns this + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.clearBreakGlassSession = function() { + return this.setBreakGlassSession(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.GetCurrentUserResponse.prototype.hasBreakGlassSession = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.ListUserPermissionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.ListUserPermissionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.ListUserPermissionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ListUserPermissionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + userId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.ListUserPermissionsRequest} + */ +proto.s3web.auth.ListUserPermissionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.ListUserPermissionsRequest; + return proto.s3web.auth.ListUserPermissionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.ListUserPermissionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.ListUserPermissionsRequest} + */ +proto.s3web.auth.ListUserPermissionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.ListUserPermissionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.ListUserPermissionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.ListUserPermissionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ListUserPermissionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string user_id = 1; + * @return {string} + */ +proto.s3web.auth.ListUserPermissionsRequest.prototype.getUserId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.auth.ListUserPermissionsRequest} returns this + */ +proto.s3web.auth.ListUserPermissionsRequest.prototype.setUserId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.auth.ListUserPermissionsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.auth.ListUserPermissionsRequest} returns this +*/ +proto.s3web.auth.ListUserPermissionsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.auth.ListUserPermissionsRequest} returns this + */ +proto.s3web.auth.ListUserPermissionsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.auth.ListUserPermissionsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.auth.ListUserPermissionsResponse.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.auth.ListUserPermissionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.auth.ListUserPermissionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ListUserPermissionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), + proto.s3web.auth.Permission.toObject, includeInstance), + locationAccessList: jspb.Message.toObjectList(msg.getLocationAccessList(), + proto.s3web.auth.LocationAccess.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.auth.ListUserPermissionsResponse} + */ +proto.s3web.auth.ListUserPermissionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.auth.ListUserPermissionsResponse; + return proto.s3web.auth.ListUserPermissionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.auth.ListUserPermissionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.auth.ListUserPermissionsResponse} + */ +proto.s3web.auth.ListUserPermissionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.auth.Permission; + reader.readMessage(value,proto.s3web.auth.Permission.deserializeBinaryFromReader); + msg.addPermissions(value); + break; + case 2: + var value = new proto.s3web.auth.LocationAccess; + reader.readMessage(value,proto.s3web.auth.LocationAccess.deserializeBinaryFromReader); + msg.addLocationAccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.auth.ListUserPermissionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.auth.ListUserPermissionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.auth.ListUserPermissionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.auth.Permission.serializeBinaryToWriter + ); + } + f = message.getLocationAccessList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.s3web.auth.LocationAccess.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Permission permissions = 1; + * @return {!Array} + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.getPermissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.auth.Permission, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.ListUserPermissionsResponse} returns this +*/ +proto.s3web.auth.ListUserPermissionsResponse.prototype.setPermissionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.auth.Permission=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.auth.Permission} + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.addPermissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.auth.Permission, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.ListUserPermissionsResponse} returns this + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.clearPermissionsList = function() { + return this.setPermissionsList([]); +}; + + +/** + * repeated LocationAccess location_access = 2; + * @return {!Array} + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.getLocationAccessList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.auth.LocationAccess, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.auth.ListUserPermissionsResponse} returns this +*/ +proto.s3web.auth.ListUserPermissionsResponse.prototype.setLocationAccessList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.s3web.auth.LocationAccess=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.auth.LocationAccess} + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.addLocationAccess = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.s3web.auth.LocationAccess, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.auth.ListUserPermissionsResponse} returns this + */ +proto.s3web.auth.ListUserPermissionsResponse.prototype.clearLocationAccessList = function() { + return this.setLocationAccessList([]); +}; + + +/** + * @enum {number} + */ +proto.s3web.auth.Role = { + ROLE_UNKNOWN: 0, + ROLE_VIEWER: 1, + ROLE_EDITOR: 2, + ROLE_TENANT_ADMIN: 3, + ROLE_SYSTEM_ADMIN: 4 +}; + +/** + * @enum {number} + */ +proto.s3web.auth.Action = { + ACTION_UNKNOWN: 0, + ACTION_READ: 1, + ACTION_WRITE: 2, + ACTION_DELETE: 3, + ACTION_ADMIN: 4 +}; + +/** + * @enum {number} + */ +proto.s3web.auth.ResourceType = { + RESOURCE_UNKNOWN: 0, + RESOURCE_LOCATION: 1, + RESOURCE_BUCKET: 2, + RESOURCE_OBJECT: 3, + RESOURCE_TRANSFER: 4, + RESOURCE_USER: 5, + RESOURCE_AUDIT: 6 +}; + +goog.object.extend(exports, proto.s3web.auth); diff --git a/frontend/src/gen/cleanup/CleanupServiceClientPb.ts b/frontend/src/gen/cleanup/CleanupServiceClientPb.ts new file mode 100644 index 0000000..d241ddd --- /dev/null +++ b/frontend/src/gen/cleanup/CleanupServiceClientPb.ts @@ -0,0 +1,603 @@ +/** + * @fileoverview gRPC-Web generated client stub for s3web.cleanup + * @enhanceable + * @public + */ + +// Code generated by protoc-gen-grpc-web. DO NOT EDIT. +// versions: +// protoc-gen-grpc-web v1.5.0 +// protoc v3.14.0 +// source: cleanup/cleanup.proto + + +/* eslint-disable */ +// @ts-nocheck + + +import * as grpcWeb from 'grpc-web'; + +import * as cleanup_cleanup_pb from '../cleanup/cleanup_pb'; // proto import: "cleanup/cleanup.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class CleanupServiceClient { + client_: grpcWeb.AbstractClientBase; + hostname_: string; + credentials_: null | { [index: string]: string; }; + options_: null | { [index: string]: any; }; + + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: any; }) { + if (!options) options = {}; + if (!credentials) credentials = {}; + options['format'] = 'binary'; + + this.client_ = new grpcWeb.GrpcWebClientBase(options); + this.hostname_ = hostname.replace(/\/+$/, ''); + this.credentials_ = credentials; + this.options_ = options; + } + + methodDescriptorScanOrphanedUploads = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/ScanOrphanedUploads', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.ScanOrphanedUploadsRequest, + cleanup_cleanup_pb.ScanOrphanedUploadsResponse, + (request: cleanup_cleanup_pb.ScanOrphanedUploadsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.ScanOrphanedUploadsResponse.deserializeBinary + ); + + scanOrphanedUploads( + request: cleanup_cleanup_pb.ScanOrphanedUploadsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + scanOrphanedUploads( + request: cleanup_cleanup_pb.ScanOrphanedUploadsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanOrphanedUploadsResponse) => void): grpcWeb.ClientReadableStream; + + scanOrphanedUploads( + request: cleanup_cleanup_pb.ScanOrphanedUploadsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanOrphanedUploadsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanOrphanedUploads', + request, + metadata || {}, + this.methodDescriptorScanOrphanedUploads, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanOrphanedUploads', + request, + metadata || {}, + this.methodDescriptorScanOrphanedUploads); + } + + methodDescriptorCleanupOrphanedUploads = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/CleanupOrphanedUploads', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.CleanupOrphanedUploadsRequest, + cleanup_cleanup_pb.CleanupOrphanedUploadsResponse, + (request: cleanup_cleanup_pb.CleanupOrphanedUploadsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.CleanupOrphanedUploadsResponse.deserializeBinary + ); + + cleanupOrphanedUploads( + request: cleanup_cleanup_pb.CleanupOrphanedUploadsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + cleanupOrphanedUploads( + request: cleanup_cleanup_pb.CleanupOrphanedUploadsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.CleanupOrphanedUploadsResponse) => void): grpcWeb.ClientReadableStream; + + cleanupOrphanedUploads( + request: cleanup_cleanup_pb.CleanupOrphanedUploadsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.CleanupOrphanedUploadsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/CleanupOrphanedUploads', + request, + metadata || {}, + this.methodDescriptorCleanupOrphanedUploads, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/CleanupOrphanedUploads', + request, + metadata || {}, + this.methodDescriptorCleanupOrphanedUploads); + } + + methodDescriptorScanCorruptObjects = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/ScanCorruptObjects', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.ScanCorruptObjectsRequest, + cleanup_cleanup_pb.ScanCorruptObjectsResponse, + (request: cleanup_cleanup_pb.ScanCorruptObjectsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.ScanCorruptObjectsResponse.deserializeBinary + ); + + scanCorruptObjects( + request: cleanup_cleanup_pb.ScanCorruptObjectsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + scanCorruptObjects( + request: cleanup_cleanup_pb.ScanCorruptObjectsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanCorruptObjectsResponse) => void): grpcWeb.ClientReadableStream; + + scanCorruptObjects( + request: cleanup_cleanup_pb.ScanCorruptObjectsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanCorruptObjectsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanCorruptObjects', + request, + metadata || {}, + this.methodDescriptorScanCorruptObjects, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanCorruptObjects', + request, + metadata || {}, + this.methodDescriptorScanCorruptObjects); + } + + methodDescriptorVerifyObjectIntegrity = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/VerifyObjectIntegrity', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.VerifyObjectIntegrityRequest, + cleanup_cleanup_pb.VerifyObjectIntegrityResponse, + (request: cleanup_cleanup_pb.VerifyObjectIntegrityRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.VerifyObjectIntegrityResponse.deserializeBinary + ); + + verifyObjectIntegrity( + request: cleanup_cleanup_pb.VerifyObjectIntegrityRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + verifyObjectIntegrity( + request: cleanup_cleanup_pb.VerifyObjectIntegrityRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.VerifyObjectIntegrityResponse) => void): grpcWeb.ClientReadableStream; + + verifyObjectIntegrity( + request: cleanup_cleanup_pb.VerifyObjectIntegrityRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.VerifyObjectIntegrityResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/VerifyObjectIntegrity', + request, + metadata || {}, + this.methodDescriptorVerifyObjectIntegrity, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/VerifyObjectIntegrity', + request, + metadata || {}, + this.methodDescriptorVerifyObjectIntegrity); + } + + methodDescriptorScanOrphanedVersions = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/ScanOrphanedVersions', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.ScanOrphanedVersionsRequest, + cleanup_cleanup_pb.ScanOrphanedVersionsResponse, + (request: cleanup_cleanup_pb.ScanOrphanedVersionsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.ScanOrphanedVersionsResponse.deserializeBinary + ); + + scanOrphanedVersions( + request: cleanup_cleanup_pb.ScanOrphanedVersionsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + scanOrphanedVersions( + request: cleanup_cleanup_pb.ScanOrphanedVersionsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanOrphanedVersionsResponse) => void): grpcWeb.ClientReadableStream; + + scanOrphanedVersions( + request: cleanup_cleanup_pb.ScanOrphanedVersionsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanOrphanedVersionsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanOrphanedVersions', + request, + metadata || {}, + this.methodDescriptorScanOrphanedVersions, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanOrphanedVersions', + request, + metadata || {}, + this.methodDescriptorScanOrphanedVersions); + } + + methodDescriptorCleanupOldVersions = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/CleanupOldVersions', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.CleanupOldVersionsRequest, + cleanup_cleanup_pb.CleanupOldVersionsResponse, + (request: cleanup_cleanup_pb.CleanupOldVersionsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.CleanupOldVersionsResponse.deserializeBinary + ); + + cleanupOldVersions( + request: cleanup_cleanup_pb.CleanupOldVersionsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + cleanupOldVersions( + request: cleanup_cleanup_pb.CleanupOldVersionsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.CleanupOldVersionsResponse) => void): grpcWeb.ClientReadableStream; + + cleanupOldVersions( + request: cleanup_cleanup_pb.CleanupOldVersionsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.CleanupOldVersionsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/CleanupOldVersions', + request, + metadata || {}, + this.methodDescriptorCleanupOldVersions, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/CleanupOldVersions', + request, + metadata || {}, + this.methodDescriptorCleanupOldVersions); + } + + methodDescriptorScanEmptyObjects = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/ScanEmptyObjects', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.ScanEmptyObjectsRequest, + cleanup_cleanup_pb.ScanEmptyObjectsResponse, + (request: cleanup_cleanup_pb.ScanEmptyObjectsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.ScanEmptyObjectsResponse.deserializeBinary + ); + + scanEmptyObjects( + request: cleanup_cleanup_pb.ScanEmptyObjectsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + scanEmptyObjects( + request: cleanup_cleanup_pb.ScanEmptyObjectsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanEmptyObjectsResponse) => void): grpcWeb.ClientReadableStream; + + scanEmptyObjects( + request: cleanup_cleanup_pb.ScanEmptyObjectsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ScanEmptyObjectsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanEmptyObjects', + request, + metadata || {}, + this.methodDescriptorScanEmptyObjects, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ScanEmptyObjects', + request, + metadata || {}, + this.methodDescriptorScanEmptyObjects); + } + + methodDescriptorGetStorageAnalytics = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/GetStorageAnalytics', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.GetStorageAnalyticsRequest, + cleanup_cleanup_pb.GetStorageAnalyticsResponse, + (request: cleanup_cleanup_pb.GetStorageAnalyticsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.GetStorageAnalyticsResponse.deserializeBinary + ); + + getStorageAnalytics( + request: cleanup_cleanup_pb.GetStorageAnalyticsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getStorageAnalytics( + request: cleanup_cleanup_pb.GetStorageAnalyticsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.GetStorageAnalyticsResponse) => void): grpcWeb.ClientReadableStream; + + getStorageAnalytics( + request: cleanup_cleanup_pb.GetStorageAnalyticsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.GetStorageAnalyticsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/GetStorageAnalytics', + request, + metadata || {}, + this.methodDescriptorGetStorageAnalytics, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/GetStorageAnalytics', + request, + metadata || {}, + this.methodDescriptorGetStorageAnalytics); + } + + methodDescriptorGetCleanupJobStatus = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/GetCleanupJobStatus', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.GetCleanupJobStatusRequest, + cleanup_cleanup_pb.GetCleanupJobStatusResponse, + (request: cleanup_cleanup_pb.GetCleanupJobStatusRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.GetCleanupJobStatusResponse.deserializeBinary + ); + + getCleanupJobStatus( + request: cleanup_cleanup_pb.GetCleanupJobStatusRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getCleanupJobStatus( + request: cleanup_cleanup_pb.GetCleanupJobStatusRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.GetCleanupJobStatusResponse) => void): grpcWeb.ClientReadableStream; + + getCleanupJobStatus( + request: cleanup_cleanup_pb.GetCleanupJobStatusRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.GetCleanupJobStatusResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/GetCleanupJobStatus', + request, + metadata || {}, + this.methodDescriptorGetCleanupJobStatus, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/GetCleanupJobStatus', + request, + metadata || {}, + this.methodDescriptorGetCleanupJobStatus); + } + + methodDescriptorListCleanupJobs = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/ListCleanupJobs', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.ListCleanupJobsRequest, + cleanup_cleanup_pb.ListCleanupJobsResponse, + (request: cleanup_cleanup_pb.ListCleanupJobsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.ListCleanupJobsResponse.deserializeBinary + ); + + listCleanupJobs( + request: cleanup_cleanup_pb.ListCleanupJobsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + listCleanupJobs( + request: cleanup_cleanup_pb.ListCleanupJobsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ListCleanupJobsResponse) => void): grpcWeb.ClientReadableStream; + + listCleanupJobs( + request: cleanup_cleanup_pb.ListCleanupJobsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.ListCleanupJobsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ListCleanupJobs', + request, + metadata || {}, + this.methodDescriptorListCleanupJobs, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/ListCleanupJobs', + request, + metadata || {}, + this.methodDescriptorListCleanupJobs); + } + + methodDescriptorCancelCleanupJob = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/CancelCleanupJob', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.CancelCleanupJobRequest, + cleanup_cleanup_pb.CancelCleanupJobResponse, + (request: cleanup_cleanup_pb.CancelCleanupJobRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.CancelCleanupJobResponse.deserializeBinary + ); + + cancelCleanupJob( + request: cleanup_cleanup_pb.CancelCleanupJobRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + cancelCleanupJob( + request: cleanup_cleanup_pb.CancelCleanupJobRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.CancelCleanupJobResponse) => void): grpcWeb.ClientReadableStream; + + cancelCleanupJob( + request: cleanup_cleanup_pb.CancelCleanupJobRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.CancelCleanupJobResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/CancelCleanupJob', + request, + metadata || {}, + this.methodDescriptorCancelCleanupJob, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/CancelCleanupJob', + request, + metadata || {}, + this.methodDescriptorCancelCleanupJob); + } + + methodDescriptorGetProviderDiagnostics = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/GetProviderDiagnostics', + grpcWeb.MethodType.UNARY, + cleanup_cleanup_pb.GetProviderDiagnosticsRequest, + cleanup_cleanup_pb.GetProviderDiagnosticsResponse, + (request: cleanup_cleanup_pb.GetProviderDiagnosticsRequest) => { + return request.serializeBinary(); + }, + cleanup_cleanup_pb.GetProviderDiagnosticsResponse.deserializeBinary + ); + + getProviderDiagnostics( + request: cleanup_cleanup_pb.GetProviderDiagnosticsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getProviderDiagnostics( + request: cleanup_cleanup_pb.GetProviderDiagnosticsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.GetProviderDiagnosticsResponse) => void): grpcWeb.ClientReadableStream; + + getProviderDiagnostics( + request: cleanup_cleanup_pb.GetProviderDiagnosticsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: cleanup_cleanup_pb.GetProviderDiagnosticsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/GetProviderDiagnostics', + request, + metadata || {}, + this.methodDescriptorGetProviderDiagnostics, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/GetProviderDiagnostics', + request, + metadata || {}, + this.methodDescriptorGetProviderDiagnostics); + } + + methodDescriptorHealthCheck = new grpcWeb.MethodDescriptor( + '/s3web.cleanup.CleanupService/HealthCheck', + grpcWeb.MethodType.UNARY, + common_common_pb.HealthCheckResponse, + common_common_pb.HealthCheckResponse, + (request: common_common_pb.HealthCheckResponse) => { + return request.serializeBinary(); + }, + common_common_pb.HealthCheckResponse.deserializeBinary + ); + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null): Promise; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void): grpcWeb.ClientReadableStream; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.cleanup.CleanupService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck); + } + +} + diff --git a/frontend/src/gen/cleanup/cleanup_pb.d.ts b/frontend/src/gen/cleanup/cleanup_pb.d.ts new file mode 100644 index 0000000..c8b15cd --- /dev/null +++ b/frontend/src/gen/cleanup/cleanup_pb.d.ts @@ -0,0 +1,1228 @@ +import * as jspb from 'google-protobuf' + +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class OrphanedUpload extends jspb.Message { + getUploadId(): string; + setUploadId(value: string): OrphanedUpload; + + getBucket(): string; + setBucket(value: string): OrphanedUpload; + + getKey(): string; + setKey(value: string): OrphanedUpload; + + getInitiated(): google_protobuf_timestamp_pb.Timestamp | undefined; + setInitiated(value?: google_protobuf_timestamp_pb.Timestamp): OrphanedUpload; + hasInitiated(): boolean; + clearInitiated(): OrphanedUpload; + + getEstimatedSizeBytes(): number; + setEstimatedSizeBytes(value: number): OrphanedUpload; + + getPartCount(): number; + setPartCount(value: number): OrphanedUpload; + + getStorageClass(): string; + setStorageClass(value: string): OrphanedUpload; + + getAgeDays(): number; + setAgeDays(value: number): OrphanedUpload; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OrphanedUpload.AsObject; + static toObject(includeInstance: boolean, msg: OrphanedUpload): OrphanedUpload.AsObject; + static serializeBinaryToWriter(message: OrphanedUpload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OrphanedUpload; + static deserializeBinaryFromReader(message: OrphanedUpload, reader: jspb.BinaryReader): OrphanedUpload; +} + +export namespace OrphanedUpload { + export type AsObject = { + uploadId: string, + bucket: string, + key: string, + initiated?: google_protobuf_timestamp_pb.Timestamp.AsObject, + estimatedSizeBytes: number, + partCount: number, + storageClass: string, + ageDays: number, + } +} + +export class CorruptObject extends jspb.Message { + getBucket(): string; + setBucket(value: string): CorruptObject; + + getKey(): string; + setKey(value: string): CorruptObject; + + getVersionId(): string; + setVersionId(value: string): CorruptObject; + + getSize(): number; + setSize(value: number): CorruptObject; + + getLastModified(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastModified(value?: google_protobuf_timestamp_pb.Timestamp): CorruptObject; + hasLastModified(): boolean; + clearLastModified(): CorruptObject; + + getCorruptionType(): string; + setCorruptionType(value: string): CorruptObject; + + getErrorMessage(): string; + setErrorMessage(value: string): CorruptObject; + + getIsRecoverable(): boolean; + setIsRecoverable(value: boolean): CorruptObject; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CorruptObject.AsObject; + static toObject(includeInstance: boolean, msg: CorruptObject): CorruptObject.AsObject; + static serializeBinaryToWriter(message: CorruptObject, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CorruptObject; + static deserializeBinaryFromReader(message: CorruptObject, reader: jspb.BinaryReader): CorruptObject; +} + +export namespace CorruptObject { + export type AsObject = { + bucket: string, + key: string, + versionId: string, + size: number, + lastModified?: google_protobuf_timestamp_pb.Timestamp.AsObject, + corruptionType: string, + errorMessage: string, + isRecoverable: boolean, + } +} + +export class ObjectVersionInfo extends jspb.Message { + getBucket(): string; + setBucket(value: string): ObjectVersionInfo; + + getKey(): string; + setKey(value: string): ObjectVersionInfo; + + getVersionId(): string; + setVersionId(value: string): ObjectVersionInfo; + + getSize(): number; + setSize(value: number): ObjectVersionInfo; + + getLastModified(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastModified(value?: google_protobuf_timestamp_pb.Timestamp): ObjectVersionInfo; + hasLastModified(): boolean; + clearLastModified(): ObjectVersionInfo; + + getIsLatest(): boolean; + setIsLatest(value: boolean): ObjectVersionInfo; + + getIsDeleteMarker(): boolean; + setIsDeleteMarker(value: boolean): ObjectVersionInfo; + + getAgeDays(): number; + setAgeDays(value: number): ObjectVersionInfo; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ObjectVersionInfo.AsObject; + static toObject(includeInstance: boolean, msg: ObjectVersionInfo): ObjectVersionInfo.AsObject; + static serializeBinaryToWriter(message: ObjectVersionInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ObjectVersionInfo; + static deserializeBinaryFromReader(message: ObjectVersionInfo, reader: jspb.BinaryReader): ObjectVersionInfo; +} + +export namespace ObjectVersionInfo { + export type AsObject = { + bucket: string, + key: string, + versionId: string, + size: number, + lastModified?: google_protobuf_timestamp_pb.Timestamp.AsObject, + isLatest: boolean, + isDeleteMarker: boolean, + ageDays: number, + } +} + +export class EmptyObject extends jspb.Message { + getBucket(): string; + setBucket(value: string): EmptyObject; + + getKey(): string; + setKey(value: string): EmptyObject; + + getVersionId(): string; + setVersionId(value: string): EmptyObject; + + getLastModified(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastModified(value?: google_protobuf_timestamp_pb.Timestamp): EmptyObject; + hasLastModified(): boolean; + clearLastModified(): EmptyObject; + + getAgeDays(): number; + setAgeDays(value: number): EmptyObject; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EmptyObject.AsObject; + static toObject(includeInstance: boolean, msg: EmptyObject): EmptyObject.AsObject; + static serializeBinaryToWriter(message: EmptyObject, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EmptyObject; + static deserializeBinaryFromReader(message: EmptyObject, reader: jspb.BinaryReader): EmptyObject; +} + +export namespace EmptyObject { + export type AsObject = { + bucket: string, + key: string, + versionId: string, + lastModified?: google_protobuf_timestamp_pb.Timestamp.AsObject, + ageDays: number, + } +} + +export class CleanupJob extends jspb.Message { + getJobId(): string; + setJobId(value: string): CleanupJob; + + getType(): CleanupJobType; + setType(value: CleanupJobType): CleanupJob; + + getStatus(): CleanupJobStatus; + setStatus(value: CleanupJobStatus): CleanupJob; + + getLocationId(): string; + setLocationId(value: string): CleanupJob; + + getBucket(): string; + setBucket(value: string): CleanupJob; + + getPrefix(): string; + setPrefix(value: string): CleanupJob; + + getAction(): CleanupAction; + setAction(value: CleanupAction): CleanupJob; + + getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CleanupJob; + hasCreatedAt(): boolean; + clearCreatedAt(): CleanupJob; + + getStartedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStartedAt(value?: google_protobuf_timestamp_pb.Timestamp): CleanupJob; + hasStartedAt(): boolean; + clearStartedAt(): CleanupJob; + + getCompletedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCompletedAt(value?: google_protobuf_timestamp_pb.Timestamp): CleanupJob; + hasCompletedAt(): boolean; + clearCompletedAt(): CleanupJob; + + getProgress(): common_common_pb.Progress | undefined; + setProgress(value?: common_common_pb.Progress): CleanupJob; + hasProgress(): boolean; + clearProgress(): CleanupJob; + + getStats(): CleanupJobStats | undefined; + setStats(value?: CleanupJobStats): CleanupJob; + hasStats(): boolean; + clearStats(): CleanupJob; + + getErrorMessage(): string; + setErrorMessage(value: string): CleanupJob; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CleanupJob; + hasAuditContext(): boolean; + clearAuditContext(): CleanupJob; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CleanupJob.AsObject; + static toObject(includeInstance: boolean, msg: CleanupJob): CleanupJob.AsObject; + static serializeBinaryToWriter(message: CleanupJob, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CleanupJob; + static deserializeBinaryFromReader(message: CleanupJob, reader: jspb.BinaryReader): CleanupJob; +} + +export namespace CleanupJob { + export type AsObject = { + jobId: string, + type: CleanupJobType, + status: CleanupJobStatus, + locationId: string, + bucket: string, + prefix: string, + action: CleanupAction, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + startedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + completedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + progress?: common_common_pb.Progress.AsObject, + stats?: CleanupJobStats.AsObject, + errorMessage: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CleanupJobStats extends jspb.Message { + getItemsScanned(): number; + setItemsScanned(value: number): CleanupJobStats; + + getItemsFound(): number; + setItemsFound(value: number): CleanupJobStats; + + getItemsCleaned(): number; + setItemsCleaned(value: number): CleanupJobStats; + + getItemsFailed(): number; + setItemsFailed(value: number): CleanupJobStats; + + getBytesScanned(): number; + setBytesScanned(value: number): CleanupJobStats; + + getBytesFreed(): number; + setBytesFreed(value: number): CleanupJobStats; + + getBytesFailed(): number; + setBytesFailed(value: number): CleanupJobStats; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CleanupJobStats.AsObject; + static toObject(includeInstance: boolean, msg: CleanupJobStats): CleanupJobStats.AsObject; + static serializeBinaryToWriter(message: CleanupJobStats, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CleanupJobStats; + static deserializeBinaryFromReader(message: CleanupJobStats, reader: jspb.BinaryReader): CleanupJobStats; +} + +export namespace CleanupJobStats { + export type AsObject = { + itemsScanned: number, + itemsFound: number, + itemsCleaned: number, + itemsFailed: number, + bytesScanned: number, + bytesFreed: number, + bytesFailed: number, + } +} + +export class StorageAnalytics extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): StorageAnalytics; + + getBucket(): string; + setBucket(value: string): StorageAnalytics; + + getTotalObjects(): number; + setTotalObjects(value: number): StorageAnalytics; + + getTotalSizeBytes(): number; + setTotalSizeBytes(value: number): StorageAnalytics; + + getOrphanedUploadsCount(): number; + setOrphanedUploadsCount(value: number): StorageAnalytics; + + getOrphanedUploadsSizeBytes(): number; + setOrphanedUploadsSizeBytes(value: number): StorageAnalytics; + + getOldVersionsCount(): number; + setOldVersionsCount(value: number): StorageAnalytics; + + getOldVersionsSizeBytes(): number; + setOldVersionsSizeBytes(value: number): StorageAnalytics; + + getEmptyObjectsCount(): number; + setEmptyObjectsCount(value: number): StorageAnalytics; + + getCorruptObjectsCount(): number; + setCorruptObjectsCount(value: number): StorageAnalytics; + + getLastUpdated(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastUpdated(value?: google_protobuf_timestamp_pb.Timestamp): StorageAnalytics; + hasLastUpdated(): boolean; + clearLastUpdated(): StorageAnalytics; + + getStorageClassDistributionMap(): jspb.Map; + clearStorageClassDistributionMap(): StorageAnalytics; + + getAgeDistributionMap(): jspb.Map; + clearAgeDistributionMap(): StorageAnalytics; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StorageAnalytics.AsObject; + static toObject(includeInstance: boolean, msg: StorageAnalytics): StorageAnalytics.AsObject; + static serializeBinaryToWriter(message: StorageAnalytics, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StorageAnalytics; + static deserializeBinaryFromReader(message: StorageAnalytics, reader: jspb.BinaryReader): StorageAnalytics; +} + +export namespace StorageAnalytics { + export type AsObject = { + locationId: string, + bucket: string, + totalObjects: number, + totalSizeBytes: number, + orphanedUploadsCount: number, + orphanedUploadsSizeBytes: number, + oldVersionsCount: number, + oldVersionsSizeBytes: number, + emptyObjectsCount: number, + corruptObjectsCount: number, + lastUpdated?: google_protobuf_timestamp_pb.Timestamp.AsObject, + storageClassDistributionMap: Array<[string, number]>, + ageDistributionMap: Array<[string, number]>, + } +} + +export class ProviderDiagnostics extends jspb.Message { + getProviderType(): string; + setProviderType(value: string): ProviderDiagnostics; + + getProviderVersion(): string; + setProviderVersion(value: string): ProviderDiagnostics; + + getCapabilitiesMap(): jspb.Map; + clearCapabilitiesMap(): ProviderDiagnostics; + + getConfigurationMap(): jspb.Map; + clearConfigurationMap(): ProviderDiagnostics; + + getWarningsList(): Array; + setWarningsList(value: Array): ProviderDiagnostics; + clearWarningsList(): ProviderDiagnostics; + addWarnings(value: string, index?: number): ProviderDiagnostics; + + getRecommendationsList(): Array; + setRecommendationsList(value: Array): ProviderDiagnostics; + clearRecommendationsList(): ProviderDiagnostics; + addRecommendations(value: string, index?: number): ProviderDiagnostics; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProviderDiagnostics.AsObject; + static toObject(includeInstance: boolean, msg: ProviderDiagnostics): ProviderDiagnostics.AsObject; + static serializeBinaryToWriter(message: ProviderDiagnostics, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProviderDiagnostics; + static deserializeBinaryFromReader(message: ProviderDiagnostics, reader: jspb.BinaryReader): ProviderDiagnostics; +} + +export namespace ProviderDiagnostics { + export type AsObject = { + providerType: string, + providerVersion: string, + capabilitiesMap: Array<[string, string]>, + configurationMap: Array<[string, string]>, + warningsList: Array, + recommendationsList: Array, + } +} + +export class ScanOrphanedUploadsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ScanOrphanedUploadsRequest; + + getBucket(): string; + setBucket(value: string): ScanOrphanedUploadsRequest; + + getPrefix(): string; + setPrefix(value: string): ScanOrphanedUploadsRequest; + + getMinAgeDays(): number; + setMinAgeDays(value: number): ScanOrphanedUploadsRequest; + + getMaxResults(): number; + setMaxResults(value: number): ScanOrphanedUploadsRequest; + + getContinuationToken(): string; + setContinuationToken(value: string): ScanOrphanedUploadsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ScanOrphanedUploadsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ScanOrphanedUploadsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanOrphanedUploadsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ScanOrphanedUploadsRequest): ScanOrphanedUploadsRequest.AsObject; + static serializeBinaryToWriter(message: ScanOrphanedUploadsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanOrphanedUploadsRequest; + static deserializeBinaryFromReader(message: ScanOrphanedUploadsRequest, reader: jspb.BinaryReader): ScanOrphanedUploadsRequest; +} + +export namespace ScanOrphanedUploadsRequest { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + minAgeDays: number, + maxResults: number, + continuationToken: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ScanOrphanedUploadsResponse extends jspb.Message { + getUploadsList(): Array; + setUploadsList(value: Array): ScanOrphanedUploadsResponse; + clearUploadsList(): ScanOrphanedUploadsResponse; + addUploads(value?: OrphanedUpload, index?: number): OrphanedUpload; + + getNextContinuationToken(): string; + setNextContinuationToken(value: string): ScanOrphanedUploadsResponse; + + getTotalCount(): number; + setTotalCount(value: number): ScanOrphanedUploadsResponse; + + getTotalSizeBytes(): number; + setTotalSizeBytes(value: number): ScanOrphanedUploadsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanOrphanedUploadsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ScanOrphanedUploadsResponse): ScanOrphanedUploadsResponse.AsObject; + static serializeBinaryToWriter(message: ScanOrphanedUploadsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanOrphanedUploadsResponse; + static deserializeBinaryFromReader(message: ScanOrphanedUploadsResponse, reader: jspb.BinaryReader): ScanOrphanedUploadsResponse; +} + +export namespace ScanOrphanedUploadsResponse { + export type AsObject = { + uploadsList: Array, + nextContinuationToken: string, + totalCount: number, + totalSizeBytes: number, + } +} + +export class CleanupOrphanedUploadsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): CleanupOrphanedUploadsRequest; + + getBucket(): string; + setBucket(value: string): CleanupOrphanedUploadsRequest; + + getPrefix(): string; + setPrefix(value: string): CleanupOrphanedUploadsRequest; + + getMinAgeDays(): number; + setMinAgeDays(value: number): CleanupOrphanedUploadsRequest; + + getUploadIdsList(): Array; + setUploadIdsList(value: Array): CleanupOrphanedUploadsRequest; + clearUploadIdsList(): CleanupOrphanedUploadsRequest; + addUploadIds(value: string, index?: number): CleanupOrphanedUploadsRequest; + + getDryRun(): boolean; + setDryRun(value: boolean): CleanupOrphanedUploadsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CleanupOrphanedUploadsRequest; + hasAuditContext(): boolean; + clearAuditContext(): CleanupOrphanedUploadsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CleanupOrphanedUploadsRequest.AsObject; + static toObject(includeInstance: boolean, msg: CleanupOrphanedUploadsRequest): CleanupOrphanedUploadsRequest.AsObject; + static serializeBinaryToWriter(message: CleanupOrphanedUploadsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CleanupOrphanedUploadsRequest; + static deserializeBinaryFromReader(message: CleanupOrphanedUploadsRequest, reader: jspb.BinaryReader): CleanupOrphanedUploadsRequest; +} + +export namespace CleanupOrphanedUploadsRequest { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + minAgeDays: number, + uploadIdsList: Array, + dryRun: boolean, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CleanupOrphanedUploadsResponse extends jspb.Message { + getJobId(): string; + setJobId(value: string): CleanupOrphanedUploadsResponse; + + getJob(): CleanupJob | undefined; + setJob(value?: CleanupJob): CleanupOrphanedUploadsResponse; + hasJob(): boolean; + clearJob(): CleanupOrphanedUploadsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CleanupOrphanedUploadsResponse.AsObject; + static toObject(includeInstance: boolean, msg: CleanupOrphanedUploadsResponse): CleanupOrphanedUploadsResponse.AsObject; + static serializeBinaryToWriter(message: CleanupOrphanedUploadsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CleanupOrphanedUploadsResponse; + static deserializeBinaryFromReader(message: CleanupOrphanedUploadsResponse, reader: jspb.BinaryReader): CleanupOrphanedUploadsResponse; +} + +export namespace CleanupOrphanedUploadsResponse { + export type AsObject = { + jobId: string, + job?: CleanupJob.AsObject, + } +} + +export class ScanCorruptObjectsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ScanCorruptObjectsRequest; + + getBucket(): string; + setBucket(value: string): ScanCorruptObjectsRequest; + + getPrefix(): string; + setPrefix(value: string): ScanCorruptObjectsRequest; + + getVerifyChecksums(): boolean; + setVerifyChecksums(value: boolean): ScanCorruptObjectsRequest; + + getMaxResults(): number; + setMaxResults(value: number): ScanCorruptObjectsRequest; + + getContinuationToken(): string; + setContinuationToken(value: string): ScanCorruptObjectsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ScanCorruptObjectsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ScanCorruptObjectsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanCorruptObjectsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ScanCorruptObjectsRequest): ScanCorruptObjectsRequest.AsObject; + static serializeBinaryToWriter(message: ScanCorruptObjectsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanCorruptObjectsRequest; + static deserializeBinaryFromReader(message: ScanCorruptObjectsRequest, reader: jspb.BinaryReader): ScanCorruptObjectsRequest; +} + +export namespace ScanCorruptObjectsRequest { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + verifyChecksums: boolean, + maxResults: number, + continuationToken: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ScanCorruptObjectsResponse extends jspb.Message { + getObjectsList(): Array; + setObjectsList(value: Array): ScanCorruptObjectsResponse; + clearObjectsList(): ScanCorruptObjectsResponse; + addObjects(value?: CorruptObject, index?: number): CorruptObject; + + getNextContinuationToken(): string; + setNextContinuationToken(value: string): ScanCorruptObjectsResponse; + + getTotalCount(): number; + setTotalCount(value: number): ScanCorruptObjectsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanCorruptObjectsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ScanCorruptObjectsResponse): ScanCorruptObjectsResponse.AsObject; + static serializeBinaryToWriter(message: ScanCorruptObjectsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanCorruptObjectsResponse; + static deserializeBinaryFromReader(message: ScanCorruptObjectsResponse, reader: jspb.BinaryReader): ScanCorruptObjectsResponse; +} + +export namespace ScanCorruptObjectsResponse { + export type AsObject = { + objectsList: Array, + nextContinuationToken: string, + totalCount: number, + } +} + +export class VerifyObjectIntegrityRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): VerifyObjectIntegrityRequest; + + getBucket(): string; + setBucket(value: string): VerifyObjectIntegrityRequest; + + getKey(): string; + setKey(value: string): VerifyObjectIntegrityRequest; + + getVersionId(): string; + setVersionId(value: string): VerifyObjectIntegrityRequest; + + getDeepVerify(): boolean; + setDeepVerify(value: boolean): VerifyObjectIntegrityRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): VerifyObjectIntegrityRequest; + hasAuditContext(): boolean; + clearAuditContext(): VerifyObjectIntegrityRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VerifyObjectIntegrityRequest.AsObject; + static toObject(includeInstance: boolean, msg: VerifyObjectIntegrityRequest): VerifyObjectIntegrityRequest.AsObject; + static serializeBinaryToWriter(message: VerifyObjectIntegrityRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyObjectIntegrityRequest; + static deserializeBinaryFromReader(message: VerifyObjectIntegrityRequest, reader: jspb.BinaryReader): VerifyObjectIntegrityRequest; +} + +export namespace VerifyObjectIntegrityRequest { + export type AsObject = { + locationId: string, + bucket: string, + key: string, + versionId: string, + deepVerify: boolean, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class VerifyObjectIntegrityResponse extends jspb.Message { + getIsValid(): boolean; + setIsValid(value: boolean): VerifyObjectIntegrityResponse; + + getChecksumAlgorithm(): string; + setChecksumAlgorithm(value: string): VerifyObjectIntegrityResponse; + + getExpectedChecksum(): string; + setExpectedChecksum(value: string): VerifyObjectIntegrityResponse; + + getActualChecksum(): string; + setActualChecksum(value: string): VerifyObjectIntegrityResponse; + + getErrorMessage(): string; + setErrorMessage(value: string): VerifyObjectIntegrityResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VerifyObjectIntegrityResponse.AsObject; + static toObject(includeInstance: boolean, msg: VerifyObjectIntegrityResponse): VerifyObjectIntegrityResponse.AsObject; + static serializeBinaryToWriter(message: VerifyObjectIntegrityResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyObjectIntegrityResponse; + static deserializeBinaryFromReader(message: VerifyObjectIntegrityResponse, reader: jspb.BinaryReader): VerifyObjectIntegrityResponse; +} + +export namespace VerifyObjectIntegrityResponse { + export type AsObject = { + isValid: boolean, + checksumAlgorithm: string, + expectedChecksum: string, + actualChecksum: string, + errorMessage: string, + } +} + +export class ScanOrphanedVersionsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ScanOrphanedVersionsRequest; + + getBucket(): string; + setBucket(value: string): ScanOrphanedVersionsRequest; + + getPrefix(): string; + setPrefix(value: string): ScanOrphanedVersionsRequest; + + getMinAgeDays(): number; + setMinAgeDays(value: number): ScanOrphanedVersionsRequest; + + getMaxVersionsPerObject(): number; + setMaxVersionsPerObject(value: number): ScanOrphanedVersionsRequest; + + getMaxResults(): number; + setMaxResults(value: number): ScanOrphanedVersionsRequest; + + getContinuationToken(): string; + setContinuationToken(value: string): ScanOrphanedVersionsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ScanOrphanedVersionsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ScanOrphanedVersionsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanOrphanedVersionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ScanOrphanedVersionsRequest): ScanOrphanedVersionsRequest.AsObject; + static serializeBinaryToWriter(message: ScanOrphanedVersionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanOrphanedVersionsRequest; + static deserializeBinaryFromReader(message: ScanOrphanedVersionsRequest, reader: jspb.BinaryReader): ScanOrphanedVersionsRequest; +} + +export namespace ScanOrphanedVersionsRequest { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + minAgeDays: number, + maxVersionsPerObject: number, + maxResults: number, + continuationToken: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ScanOrphanedVersionsResponse extends jspb.Message { + getVersionsList(): Array; + setVersionsList(value: Array): ScanOrphanedVersionsResponse; + clearVersionsList(): ScanOrphanedVersionsResponse; + addVersions(value?: ObjectVersionInfo, index?: number): ObjectVersionInfo; + + getNextContinuationToken(): string; + setNextContinuationToken(value: string): ScanOrphanedVersionsResponse; + + getTotalCount(): number; + setTotalCount(value: number): ScanOrphanedVersionsResponse; + + getTotalSizeBytes(): number; + setTotalSizeBytes(value: number): ScanOrphanedVersionsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanOrphanedVersionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ScanOrphanedVersionsResponse): ScanOrphanedVersionsResponse.AsObject; + static serializeBinaryToWriter(message: ScanOrphanedVersionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanOrphanedVersionsResponse; + static deserializeBinaryFromReader(message: ScanOrphanedVersionsResponse, reader: jspb.BinaryReader): ScanOrphanedVersionsResponse; +} + +export namespace ScanOrphanedVersionsResponse { + export type AsObject = { + versionsList: Array, + nextContinuationToken: string, + totalCount: number, + totalSizeBytes: number, + } +} + +export class CleanupOldVersionsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): CleanupOldVersionsRequest; + + getBucket(): string; + setBucket(value: string): CleanupOldVersionsRequest; + + getPrefix(): string; + setPrefix(value: string): CleanupOldVersionsRequest; + + getMinAgeDays(): number; + setMinAgeDays(value: number): CleanupOldVersionsRequest; + + getKeepVersions(): number; + setKeepVersions(value: number): CleanupOldVersionsRequest; + + getVersionIdsList(): Array; + setVersionIdsList(value: Array): CleanupOldVersionsRequest; + clearVersionIdsList(): CleanupOldVersionsRequest; + addVersionIds(value: string, index?: number): CleanupOldVersionsRequest; + + getDryRun(): boolean; + setDryRun(value: boolean): CleanupOldVersionsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CleanupOldVersionsRequest; + hasAuditContext(): boolean; + clearAuditContext(): CleanupOldVersionsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CleanupOldVersionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: CleanupOldVersionsRequest): CleanupOldVersionsRequest.AsObject; + static serializeBinaryToWriter(message: CleanupOldVersionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CleanupOldVersionsRequest; + static deserializeBinaryFromReader(message: CleanupOldVersionsRequest, reader: jspb.BinaryReader): CleanupOldVersionsRequest; +} + +export namespace CleanupOldVersionsRequest { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + minAgeDays: number, + keepVersions: number, + versionIdsList: Array, + dryRun: boolean, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CleanupOldVersionsResponse extends jspb.Message { + getJobId(): string; + setJobId(value: string): CleanupOldVersionsResponse; + + getJob(): CleanupJob | undefined; + setJob(value?: CleanupJob): CleanupOldVersionsResponse; + hasJob(): boolean; + clearJob(): CleanupOldVersionsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CleanupOldVersionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: CleanupOldVersionsResponse): CleanupOldVersionsResponse.AsObject; + static serializeBinaryToWriter(message: CleanupOldVersionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CleanupOldVersionsResponse; + static deserializeBinaryFromReader(message: CleanupOldVersionsResponse, reader: jspb.BinaryReader): CleanupOldVersionsResponse; +} + +export namespace CleanupOldVersionsResponse { + export type AsObject = { + jobId: string, + job?: CleanupJob.AsObject, + } +} + +export class ScanEmptyObjectsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ScanEmptyObjectsRequest; + + getBucket(): string; + setBucket(value: string): ScanEmptyObjectsRequest; + + getPrefix(): string; + setPrefix(value: string): ScanEmptyObjectsRequest; + + getMinAgeDays(): number; + setMinAgeDays(value: number): ScanEmptyObjectsRequest; + + getMaxResults(): number; + setMaxResults(value: number): ScanEmptyObjectsRequest; + + getContinuationToken(): string; + setContinuationToken(value: string): ScanEmptyObjectsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ScanEmptyObjectsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ScanEmptyObjectsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanEmptyObjectsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ScanEmptyObjectsRequest): ScanEmptyObjectsRequest.AsObject; + static serializeBinaryToWriter(message: ScanEmptyObjectsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanEmptyObjectsRequest; + static deserializeBinaryFromReader(message: ScanEmptyObjectsRequest, reader: jspb.BinaryReader): ScanEmptyObjectsRequest; +} + +export namespace ScanEmptyObjectsRequest { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + minAgeDays: number, + maxResults: number, + continuationToken: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ScanEmptyObjectsResponse extends jspb.Message { + getObjectsList(): Array; + setObjectsList(value: Array): ScanEmptyObjectsResponse; + clearObjectsList(): ScanEmptyObjectsResponse; + addObjects(value?: EmptyObject, index?: number): EmptyObject; + + getNextContinuationToken(): string; + setNextContinuationToken(value: string): ScanEmptyObjectsResponse; + + getTotalCount(): number; + setTotalCount(value: number): ScanEmptyObjectsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ScanEmptyObjectsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ScanEmptyObjectsResponse): ScanEmptyObjectsResponse.AsObject; + static serializeBinaryToWriter(message: ScanEmptyObjectsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ScanEmptyObjectsResponse; + static deserializeBinaryFromReader(message: ScanEmptyObjectsResponse, reader: jspb.BinaryReader): ScanEmptyObjectsResponse; +} + +export namespace ScanEmptyObjectsResponse { + export type AsObject = { + objectsList: Array, + nextContinuationToken: string, + totalCount: number, + } +} + +export class GetStorageAnalyticsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetStorageAnalyticsRequest; + + getBucket(): string; + setBucket(value: string): GetStorageAnalyticsRequest; + + getPrefix(): string; + setPrefix(value: string): GetStorageAnalyticsRequest; + + getIncludeVersions(): boolean; + setIncludeVersions(value: boolean): GetStorageAnalyticsRequest; + + getIncludeMultipart(): boolean; + setIncludeMultipart(value: boolean): GetStorageAnalyticsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetStorageAnalyticsRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetStorageAnalyticsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStorageAnalyticsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetStorageAnalyticsRequest): GetStorageAnalyticsRequest.AsObject; + static serializeBinaryToWriter(message: GetStorageAnalyticsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStorageAnalyticsRequest; + static deserializeBinaryFromReader(message: GetStorageAnalyticsRequest, reader: jspb.BinaryReader): GetStorageAnalyticsRequest; +} + +export namespace GetStorageAnalyticsRequest { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + includeVersions: boolean, + includeMultipart: boolean, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetStorageAnalyticsResponse extends jspb.Message { + getAnalytics(): StorageAnalytics | undefined; + setAnalytics(value?: StorageAnalytics): GetStorageAnalyticsResponse; + hasAnalytics(): boolean; + clearAnalytics(): GetStorageAnalyticsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStorageAnalyticsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetStorageAnalyticsResponse): GetStorageAnalyticsResponse.AsObject; + static serializeBinaryToWriter(message: GetStorageAnalyticsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStorageAnalyticsResponse; + static deserializeBinaryFromReader(message: GetStorageAnalyticsResponse, reader: jspb.BinaryReader): GetStorageAnalyticsResponse; +} + +export namespace GetStorageAnalyticsResponse { + export type AsObject = { + analytics?: StorageAnalytics.AsObject, + } +} + +export class GetCleanupJobStatusRequest extends jspb.Message { + getJobId(): string; + setJobId(value: string): GetCleanupJobStatusRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetCleanupJobStatusRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetCleanupJobStatusRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetCleanupJobStatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetCleanupJobStatusRequest): GetCleanupJobStatusRequest.AsObject; + static serializeBinaryToWriter(message: GetCleanupJobStatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetCleanupJobStatusRequest; + static deserializeBinaryFromReader(message: GetCleanupJobStatusRequest, reader: jspb.BinaryReader): GetCleanupJobStatusRequest; +} + +export namespace GetCleanupJobStatusRequest { + export type AsObject = { + jobId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetCleanupJobStatusResponse extends jspb.Message { + getJob(): CleanupJob | undefined; + setJob(value?: CleanupJob): GetCleanupJobStatusResponse; + hasJob(): boolean; + clearJob(): GetCleanupJobStatusResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetCleanupJobStatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetCleanupJobStatusResponse): GetCleanupJobStatusResponse.AsObject; + static serializeBinaryToWriter(message: GetCleanupJobStatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetCleanupJobStatusResponse; + static deserializeBinaryFromReader(message: GetCleanupJobStatusResponse, reader: jspb.BinaryReader): GetCleanupJobStatusResponse; +} + +export namespace GetCleanupJobStatusResponse { + export type AsObject = { + job?: CleanupJob.AsObject, + } +} + +export class ListCleanupJobsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ListCleanupJobsRequest; + + getType(): CleanupJobType; + setType(value: CleanupJobType): ListCleanupJobsRequest; + + getStatus(): CleanupJobStatus; + setStatus(value: CleanupJobStatus): ListCleanupJobsRequest; + + getTimeRange(): common_common_pb.TimeRange | undefined; + setTimeRange(value?: common_common_pb.TimeRange): ListCleanupJobsRequest; + hasTimeRange(): boolean; + clearTimeRange(): ListCleanupJobsRequest; + + getPagination(): common_common_pb.PaginationRequest | undefined; + setPagination(value?: common_common_pb.PaginationRequest): ListCleanupJobsRequest; + hasPagination(): boolean; + clearPagination(): ListCleanupJobsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ListCleanupJobsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ListCleanupJobsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListCleanupJobsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListCleanupJobsRequest): ListCleanupJobsRequest.AsObject; + static serializeBinaryToWriter(message: ListCleanupJobsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListCleanupJobsRequest; + static deserializeBinaryFromReader(message: ListCleanupJobsRequest, reader: jspb.BinaryReader): ListCleanupJobsRequest; +} + +export namespace ListCleanupJobsRequest { + export type AsObject = { + locationId: string, + type: CleanupJobType, + status: CleanupJobStatus, + timeRange?: common_common_pb.TimeRange.AsObject, + pagination?: common_common_pb.PaginationRequest.AsObject, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ListCleanupJobsResponse extends jspb.Message { + getJobsList(): Array; + setJobsList(value: Array): ListCleanupJobsResponse; + clearJobsList(): ListCleanupJobsResponse; + addJobs(value?: CleanupJob, index?: number): CleanupJob; + + getPagination(): common_common_pb.PaginationResponse | undefined; + setPagination(value?: common_common_pb.PaginationResponse): ListCleanupJobsResponse; + hasPagination(): boolean; + clearPagination(): ListCleanupJobsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListCleanupJobsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListCleanupJobsResponse): ListCleanupJobsResponse.AsObject; + static serializeBinaryToWriter(message: ListCleanupJobsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListCleanupJobsResponse; + static deserializeBinaryFromReader(message: ListCleanupJobsResponse, reader: jspb.BinaryReader): ListCleanupJobsResponse; +} + +export namespace ListCleanupJobsResponse { + export type AsObject = { + jobsList: Array, + pagination?: common_common_pb.PaginationResponse.AsObject, + } +} + +export class CancelCleanupJobRequest extends jspb.Message { + getJobId(): string; + setJobId(value: string): CancelCleanupJobRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CancelCleanupJobRequest; + hasAuditContext(): boolean; + clearAuditContext(): CancelCleanupJobRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelCleanupJobRequest.AsObject; + static toObject(includeInstance: boolean, msg: CancelCleanupJobRequest): CancelCleanupJobRequest.AsObject; + static serializeBinaryToWriter(message: CancelCleanupJobRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelCleanupJobRequest; + static deserializeBinaryFromReader(message: CancelCleanupJobRequest, reader: jspb.BinaryReader): CancelCleanupJobRequest; +} + +export namespace CancelCleanupJobRequest { + export type AsObject = { + jobId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CancelCleanupJobResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): CancelCleanupJobResponse; + + getJob(): CleanupJob | undefined; + setJob(value?: CleanupJob): CancelCleanupJobResponse; + hasJob(): boolean; + clearJob(): CancelCleanupJobResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelCleanupJobResponse.AsObject; + static toObject(includeInstance: boolean, msg: CancelCleanupJobResponse): CancelCleanupJobResponse.AsObject; + static serializeBinaryToWriter(message: CancelCleanupJobResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelCleanupJobResponse; + static deserializeBinaryFromReader(message: CancelCleanupJobResponse, reader: jspb.BinaryReader): CancelCleanupJobResponse; +} + +export namespace CancelCleanupJobResponse { + export type AsObject = { + success: boolean, + job?: CleanupJob.AsObject, + } +} + +export class GetProviderDiagnosticsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetProviderDiagnosticsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetProviderDiagnosticsRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetProviderDiagnosticsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetProviderDiagnosticsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetProviderDiagnosticsRequest): GetProviderDiagnosticsRequest.AsObject; + static serializeBinaryToWriter(message: GetProviderDiagnosticsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetProviderDiagnosticsRequest; + static deserializeBinaryFromReader(message: GetProviderDiagnosticsRequest, reader: jspb.BinaryReader): GetProviderDiagnosticsRequest; +} + +export namespace GetProviderDiagnosticsRequest { + export type AsObject = { + locationId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetProviderDiagnosticsResponse extends jspb.Message { + getDiagnostics(): ProviderDiagnostics | undefined; + setDiagnostics(value?: ProviderDiagnostics): GetProviderDiagnosticsResponse; + hasDiagnostics(): boolean; + clearDiagnostics(): GetProviderDiagnosticsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetProviderDiagnosticsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetProviderDiagnosticsResponse): GetProviderDiagnosticsResponse.AsObject; + static serializeBinaryToWriter(message: GetProviderDiagnosticsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetProviderDiagnosticsResponse; + static deserializeBinaryFromReader(message: GetProviderDiagnosticsResponse, reader: jspb.BinaryReader): GetProviderDiagnosticsResponse; +} + +export namespace GetProviderDiagnosticsResponse { + export type AsObject = { + diagnostics?: ProviderDiagnostics.AsObject, + } +} + +export enum CleanupJobType { + CLEANUP_JOB_TYPE_UNKNOWN = 0, + CLEANUP_JOB_TYPE_ORPHANED_UPLOADS = 1, + CLEANUP_JOB_TYPE_CORRUPT_OBJECTS = 2, + CLEANUP_JOB_TYPE_OLD_VERSIONS = 3, + CLEANUP_JOB_TYPE_EMPTY_OBJECTS = 4, + CLEANUP_JOB_TYPE_INTEGRITY_VERIFICATION = 5, +} +export enum CleanupJobStatus { + CLEANUP_JOB_STATUS_UNKNOWN = 0, + CLEANUP_JOB_STATUS_PENDING = 1, + CLEANUP_JOB_STATUS_RUNNING = 2, + CLEANUP_JOB_STATUS_COMPLETED = 3, + CLEANUP_JOB_STATUS_FAILED = 4, + CLEANUP_JOB_STATUS_CANCELLED = 5, + CLEANUP_JOB_STATUS_PAUSED = 6, +} +export enum CleanupAction { + CLEANUP_ACTION_UNKNOWN = 0, + CLEANUP_ACTION_SCAN_ONLY = 1, + CLEANUP_ACTION_DELETE = 2, + CLEANUP_ACTION_ARCHIVE = 3, + CLEANUP_ACTION_VERIFY = 4, +} diff --git a/frontend/src/gen/cleanup/cleanup_pb.js b/frontend/src/gen/cleanup/cleanup_pb.js new file mode 100644 index 0000000..cb2ce7d --- /dev/null +++ b/frontend/src/gen/cleanup/cleanup_pb.js @@ -0,0 +1,9905 @@ +// source: cleanup/cleanup.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var common_common_pb = require('../common/common_pb.js'); +goog.object.extend(proto, common_common_pb); +goog.exportSymbol('proto.s3web.cleanup.CancelCleanupJobRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.CancelCleanupJobResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupAction', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupJob', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupJobStats', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupJobStatus', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupJobType', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupOldVersionsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupOldVersionsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupOrphanedUploadsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.CleanupOrphanedUploadsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.CorruptObject', null, global); +goog.exportSymbol('proto.s3web.cleanup.EmptyObject', null, global); +goog.exportSymbol('proto.s3web.cleanup.GetCleanupJobStatusRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.GetCleanupJobStatusResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.GetProviderDiagnosticsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.GetProviderDiagnosticsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.GetStorageAnalyticsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.GetStorageAnalyticsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.ListCleanupJobsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.ListCleanupJobsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.ObjectVersionInfo', null, global); +goog.exportSymbol('proto.s3web.cleanup.OrphanedUpload', null, global); +goog.exportSymbol('proto.s3web.cleanup.ProviderDiagnostics', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanCorruptObjectsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanCorruptObjectsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanEmptyObjectsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanEmptyObjectsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanOrphanedUploadsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanOrphanedUploadsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanOrphanedVersionsRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.ScanOrphanedVersionsResponse', null, global); +goog.exportSymbol('proto.s3web.cleanup.StorageAnalytics', null, global); +goog.exportSymbol('proto.s3web.cleanup.VerifyObjectIntegrityRequest', null, global); +goog.exportSymbol('proto.s3web.cleanup.VerifyObjectIntegrityResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.OrphanedUpload = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.OrphanedUpload, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.OrphanedUpload.displayName = 'proto.s3web.cleanup.OrphanedUpload'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CorruptObject = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.CorruptObject, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CorruptObject.displayName = 'proto.s3web.cleanup.CorruptObject'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ObjectVersionInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.ObjectVersionInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ObjectVersionInfo.displayName = 'proto.s3web.cleanup.ObjectVersionInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.EmptyObject = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.EmptyObject, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.EmptyObject.displayName = 'proto.s3web.cleanup.EmptyObject'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CleanupJob = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.CleanupJob, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CleanupJob.displayName = 'proto.s3web.cleanup.CleanupJob'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CleanupJobStats = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.CleanupJobStats, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CleanupJobStats.displayName = 'proto.s3web.cleanup.CleanupJobStats'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.StorageAnalytics = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.StorageAnalytics, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.StorageAnalytics.displayName = 'proto.s3web.cleanup.StorageAnalytics'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ProviderDiagnostics = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.ProviderDiagnostics.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.ProviderDiagnostics, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ProviderDiagnostics.displayName = 'proto.s3web.cleanup.ProviderDiagnostics'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.ScanOrphanedUploadsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanOrphanedUploadsRequest.displayName = 'proto.s3web.cleanup.ScanOrphanedUploadsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.ScanOrphanedUploadsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.ScanOrphanedUploadsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanOrphanedUploadsResponse.displayName = 'proto.s3web.cleanup.ScanOrphanedUploadsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.CleanupOrphanedUploadsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.CleanupOrphanedUploadsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CleanupOrphanedUploadsRequest.displayName = 'proto.s3web.cleanup.CleanupOrphanedUploadsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.CleanupOrphanedUploadsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CleanupOrphanedUploadsResponse.displayName = 'proto.s3web.cleanup.CleanupOrphanedUploadsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.ScanCorruptObjectsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanCorruptObjectsRequest.displayName = 'proto.s3web.cleanup.ScanCorruptObjectsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.ScanCorruptObjectsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.ScanCorruptObjectsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanCorruptObjectsResponse.displayName = 'proto.s3web.cleanup.ScanCorruptObjectsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.VerifyObjectIntegrityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.VerifyObjectIntegrityRequest.displayName = 'proto.s3web.cleanup.VerifyObjectIntegrityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.VerifyObjectIntegrityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.VerifyObjectIntegrityResponse.displayName = 'proto.s3web.cleanup.VerifyObjectIntegrityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.ScanOrphanedVersionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanOrphanedVersionsRequest.displayName = 'proto.s3web.cleanup.ScanOrphanedVersionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.ScanOrphanedVersionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.ScanOrphanedVersionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanOrphanedVersionsResponse.displayName = 'proto.s3web.cleanup.ScanOrphanedVersionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CleanupOldVersionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.CleanupOldVersionsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.CleanupOldVersionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CleanupOldVersionsRequest.displayName = 'proto.s3web.cleanup.CleanupOldVersionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CleanupOldVersionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.CleanupOldVersionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CleanupOldVersionsResponse.displayName = 'proto.s3web.cleanup.CleanupOldVersionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.ScanEmptyObjectsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanEmptyObjectsRequest.displayName = 'proto.s3web.cleanup.ScanEmptyObjectsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.ScanEmptyObjectsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.ScanEmptyObjectsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ScanEmptyObjectsResponse.displayName = 'proto.s3web.cleanup.ScanEmptyObjectsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.GetStorageAnalyticsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.GetStorageAnalyticsRequest.displayName = 'proto.s3web.cleanup.GetStorageAnalyticsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.GetStorageAnalyticsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.GetStorageAnalyticsResponse.displayName = 'proto.s3web.cleanup.GetStorageAnalyticsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.GetCleanupJobStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.GetCleanupJobStatusRequest.displayName = 'proto.s3web.cleanup.GetCleanupJobStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.GetCleanupJobStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.GetCleanupJobStatusResponse.displayName = 'proto.s3web.cleanup.GetCleanupJobStatusResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ListCleanupJobsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.ListCleanupJobsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ListCleanupJobsRequest.displayName = 'proto.s3web.cleanup.ListCleanupJobsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.ListCleanupJobsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.cleanup.ListCleanupJobsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.cleanup.ListCleanupJobsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.ListCleanupJobsResponse.displayName = 'proto.s3web.cleanup.ListCleanupJobsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CancelCleanupJobRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.CancelCleanupJobRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CancelCleanupJobRequest.displayName = 'proto.s3web.cleanup.CancelCleanupJobRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.CancelCleanupJobResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.CancelCleanupJobResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.CancelCleanupJobResponse.displayName = 'proto.s3web.cleanup.CancelCleanupJobResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.GetProviderDiagnosticsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.GetProviderDiagnosticsRequest.displayName = 'proto.s3web.cleanup.GetProviderDiagnosticsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.cleanup.GetProviderDiagnosticsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.cleanup.GetProviderDiagnosticsResponse.displayName = 'proto.s3web.cleanup.GetProviderDiagnosticsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.OrphanedUpload.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.OrphanedUpload} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.OrphanedUpload.toObject = function(includeInstance, msg) { + var f, obj = { + uploadId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + key: jspb.Message.getFieldWithDefault(msg, 3, ""), + initiated: (f = msg.getInitiated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + estimatedSizeBytes: jspb.Message.getFieldWithDefault(msg, 5, 0), + partCount: jspb.Message.getFieldWithDefault(msg, 6, 0), + storageClass: jspb.Message.getFieldWithDefault(msg, 7, ""), + ageDays: jspb.Message.getFieldWithDefault(msg, 8, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.OrphanedUpload} + */ +proto.s3web.cleanup.OrphanedUpload.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.OrphanedUpload; + return proto.s3web.cleanup.OrphanedUpload.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.OrphanedUpload} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.OrphanedUpload} + */ +proto.s3web.cleanup.OrphanedUpload.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUploadId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setInitiated(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEstimatedSizeBytes(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPartCount(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setStorageClass(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAgeDays(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.OrphanedUpload.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.OrphanedUpload} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.OrphanedUpload.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUploadId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInitiated(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEstimatedSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getPartCount(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getStorageClass(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getAgeDays(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } +}; + + +/** + * optional string upload_id = 1; + * @return {string} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getUploadId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.setUploadId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string key = 3; + * @return {string} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp initiated = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getInitiated = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this +*/ +proto.s3web.cleanup.OrphanedUpload.prototype.setInitiated = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.clearInitiated = function() { + return this.setInitiated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.hasInitiated = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 estimated_size_bytes = 5; + * @return {number} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getEstimatedSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.setEstimatedSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 part_count = 6; + * @return {number} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getPartCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.setPartCount = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional string storage_class = 7; + * @return {string} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getStorageClass = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.setStorageClass = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional int64 age_days = 8; + * @return {number} + */ +proto.s3web.cleanup.OrphanedUpload.prototype.getAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.OrphanedUpload} returns this + */ +proto.s3web.cleanup.OrphanedUpload.prototype.setAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CorruptObject.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CorruptObject.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CorruptObject} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CorruptObject.toObject = function(includeInstance, msg) { + var f, obj = { + bucket: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 3, ""), + size: jspb.Message.getFieldWithDefault(msg, 4, 0), + lastModified: (f = msg.getLastModified()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + corruptionType: jspb.Message.getFieldWithDefault(msg, 6, ""), + errorMessage: jspb.Message.getFieldWithDefault(msg, 7, ""), + isRecoverable: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CorruptObject} + */ +proto.s3web.cleanup.CorruptObject.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CorruptObject; + return proto.s3web.cleanup.CorruptObject.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CorruptObject} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CorruptObject} + */ +proto.s3web.cleanup.CorruptObject.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastModified(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setCorruptionType(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsRecoverable(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CorruptObject.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CorruptObject.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CorruptObject} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CorruptObject.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getLastModified(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getCorruptionType(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getIsRecoverable(); + if (f) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional string bucket = 1; + * @return {string} + */ +proto.s3web.cleanup.CorruptObject.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.s3web.cleanup.CorruptObject.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version_id = 3; + * @return {string} + */ +proto.s3web.cleanup.CorruptObject.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 size = 4; + * @return {number} + */ +proto.s3web.cleanup.CorruptObject.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp last_modified = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.CorruptObject.prototype.getLastModified = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this +*/ +proto.s3web.cleanup.CorruptObject.prototype.setLastModified = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.clearLastModified = function() { + return this.setLastModified(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CorruptObject.prototype.hasLastModified = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string corruption_type = 6; + * @return {string} + */ +proto.s3web.cleanup.CorruptObject.prototype.getCorruptionType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.setCorruptionType = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string error_message = 7; + * @return {string} + */ +proto.s3web.cleanup.CorruptObject.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional bool is_recoverable = 8; + * @return {boolean} + */ +proto.s3web.cleanup.CorruptObject.prototype.getIsRecoverable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.CorruptObject} returns this + */ +proto.s3web.cleanup.CorruptObject.prototype.setIsRecoverable = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ObjectVersionInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ObjectVersionInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ObjectVersionInfo.toObject = function(includeInstance, msg) { + var f, obj = { + bucket: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 3, ""), + size: jspb.Message.getFieldWithDefault(msg, 4, 0), + lastModified: (f = msg.getLastModified()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + isLatest: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + isDeleteMarker: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + ageDays: jspb.Message.getFieldWithDefault(msg, 8, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ObjectVersionInfo} + */ +proto.s3web.cleanup.ObjectVersionInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ObjectVersionInfo; + return proto.s3web.cleanup.ObjectVersionInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ObjectVersionInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ObjectVersionInfo} + */ +proto.s3web.cleanup.ObjectVersionInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastModified(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsLatest(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsDeleteMarker(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAgeDays(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ObjectVersionInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ObjectVersionInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ObjectVersionInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getLastModified(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getIsLatest(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getIsDeleteMarker(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getAgeDays(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } +}; + + +/** + * optional string bucket = 1; + * @return {string} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version_id = 3; + * @return {string} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 size = 4; + * @return {number} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp last_modified = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getLastModified = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this +*/ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setLastModified = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.clearLastModified = function() { + return this.setLastModified(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.hasLastModified = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool is_latest = 6; + * @return {boolean} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getIsLatest = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setIsLatest = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool is_delete_marker = 7; + * @return {boolean} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getIsDeleteMarker = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setIsDeleteMarker = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional int64 age_days = 8; + * @return {number} + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.getAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ObjectVersionInfo} returns this + */ +proto.s3web.cleanup.ObjectVersionInfo.prototype.setAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.EmptyObject.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.EmptyObject.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.EmptyObject} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.EmptyObject.toObject = function(includeInstance, msg) { + var f, obj = { + bucket: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 3, ""), + lastModified: (f = msg.getLastModified()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + ageDays: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.EmptyObject} + */ +proto.s3web.cleanup.EmptyObject.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.EmptyObject; + return proto.s3web.cleanup.EmptyObject.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.EmptyObject} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.EmptyObject} + */ +proto.s3web.cleanup.EmptyObject.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastModified(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAgeDays(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.EmptyObject.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.EmptyObject.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.EmptyObject} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.EmptyObject.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLastModified(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getAgeDays(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string bucket = 1; + * @return {string} + */ +proto.s3web.cleanup.EmptyObject.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.EmptyObject} returns this + */ +proto.s3web.cleanup.EmptyObject.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.s3web.cleanup.EmptyObject.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.EmptyObject} returns this + */ +proto.s3web.cleanup.EmptyObject.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version_id = 3; + * @return {string} + */ +proto.s3web.cleanup.EmptyObject.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.EmptyObject} returns this + */ +proto.s3web.cleanup.EmptyObject.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp last_modified = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.EmptyObject.prototype.getLastModified = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.EmptyObject} returns this +*/ +proto.s3web.cleanup.EmptyObject.prototype.setLastModified = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.EmptyObject} returns this + */ +proto.s3web.cleanup.EmptyObject.prototype.clearLastModified = function() { + return this.setLastModified(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.EmptyObject.prototype.hasLastModified = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 age_days = 5; + * @return {number} + */ +proto.s3web.cleanup.EmptyObject.prototype.getAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.EmptyObject} returns this + */ +proto.s3web.cleanup.EmptyObject.prototype.setAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CleanupJob.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CleanupJob.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CleanupJob} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupJob.toObject = function(includeInstance, msg) { + var f, obj = { + jobId: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + locationId: jspb.Message.getFieldWithDefault(msg, 4, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 5, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 6, ""), + action: jspb.Message.getFieldWithDefault(msg, 7, 0), + createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + startedAt: (f = msg.getStartedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + completedAt: (f = msg.getCompletedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + progress: (f = msg.getProgress()) && common_common_pb.Progress.toObject(includeInstance, f), + stats: (f = msg.getStats()) && proto.s3web.cleanup.CleanupJobStats.toObject(includeInstance, f), + errorMessage: jspb.Message.getFieldWithDefault(msg, 13, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CleanupJob} + */ +proto.s3web.cleanup.CleanupJob.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CleanupJob; + return proto.s3web.cleanup.CleanupJob.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CleanupJob} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CleanupJob} + */ +proto.s3web.cleanup.CleanupJob.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJobId(value); + break; + case 2: + var value = /** @type {!proto.s3web.cleanup.CleanupJobType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: + var value = /** @type {!proto.s3web.cleanup.CleanupJobStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 7: + var value = /** @type {!proto.s3web.cleanup.CleanupAction} */ (reader.readEnum()); + msg.setAction(value); + break; + case 8: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedAt(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStartedAt(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletedAt(value); + break; + case 11: + var value = new common_common_pb.Progress; + reader.readMessage(value,common_common_pb.Progress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 12: + var value = new proto.s3web.cleanup.CleanupJobStats; + reader.readMessage(value,proto.s3web.cleanup.CleanupJobStats.deserializeBinaryFromReader); + msg.setStats(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + case 14: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CleanupJob.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CleanupJob.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CleanupJob} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupJob.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAction(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f + ); + } + f = message.getCreatedAt(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getStartedAt(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getCompletedAt(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 11, + f, + common_common_pb.Progress.serializeBinaryToWriter + ); + } + f = message.getStats(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.s3web.cleanup.CleanupJobStats.serializeBinaryToWriter + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 14, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string job_id = 1; + * @return {string} + */ +proto.s3web.cleanup.CleanupJob.prototype.getJobId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setJobId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional CleanupJobType type = 2; + * @return {!proto.s3web.cleanup.CleanupJobType} + */ +proto.s3web.cleanup.CleanupJob.prototype.getType = function() { + return /** @type {!proto.s3web.cleanup.CleanupJobType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.cleanup.CleanupJobType} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional CleanupJobStatus status = 3; + * @return {!proto.s3web.cleanup.CleanupJobStatus} + */ +proto.s3web.cleanup.CleanupJob.prototype.getStatus = function() { + return /** @type {!proto.s3web.cleanup.CleanupJobStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.s3web.cleanup.CleanupJobStatus} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional string location_id = 4; + * @return {string} + */ +proto.s3web.cleanup.CleanupJob.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string bucket = 5; + * @return {string} + */ +proto.s3web.cleanup.CleanupJob.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string prefix = 6; + * @return {string} + */ +proto.s3web.cleanup.CleanupJob.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional CleanupAction action = 7; + * @return {!proto.s3web.cleanup.CleanupAction} + */ +proto.s3web.cleanup.CleanupJob.prototype.getAction = function() { + return /** @type {!proto.s3web.cleanup.CleanupAction} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {!proto.s3web.cleanup.CleanupAction} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setAction = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); +}; + + +/** + * optional google.protobuf.Timestamp created_at = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.CleanupJob.prototype.getCreatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this +*/ +proto.s3web.cleanup.CleanupJob.prototype.setCreatedAt = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.clearCreatedAt = function() { + return this.setCreatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupJob.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Timestamp started_at = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.CleanupJob.prototype.getStartedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this +*/ +proto.s3web.cleanup.CleanupJob.prototype.setStartedAt = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.clearStartedAt = function() { + return this.setStartedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupJob.prototype.hasStartedAt = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Timestamp completed_at = 10; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.CleanupJob.prototype.getCompletedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this +*/ +proto.s3web.cleanup.CleanupJob.prototype.setCompletedAt = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.clearCompletedAt = function() { + return this.setCompletedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupJob.prototype.hasCompletedAt = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional s3web.common.Progress progress = 11; + * @return {?proto.s3web.common.Progress} + */ +proto.s3web.cleanup.CleanupJob.prototype.getProgress = function() { + return /** @type{?proto.s3web.common.Progress} */ ( + jspb.Message.getWrapperField(this, common_common_pb.Progress, 11)); +}; + + +/** + * @param {?proto.s3web.common.Progress|undefined} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this +*/ +proto.s3web.cleanup.CleanupJob.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupJob.prototype.hasProgress = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional CleanupJobStats stats = 12; + * @return {?proto.s3web.cleanup.CleanupJobStats} + */ +proto.s3web.cleanup.CleanupJob.prototype.getStats = function() { + return /** @type{?proto.s3web.cleanup.CleanupJobStats} */ ( + jspb.Message.getWrapperField(this, proto.s3web.cleanup.CleanupJobStats, 12)); +}; + + +/** + * @param {?proto.s3web.cleanup.CleanupJobStats|undefined} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this +*/ +proto.s3web.cleanup.CleanupJob.prototype.setStats = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.clearStats = function() { + return this.setStats(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupJob.prototype.hasStats = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional string error_message = 13; + * @return {string} + */ +proto.s3web.cleanup.CleanupJob.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 14; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.CleanupJob.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 14)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.CleanupJob} returns this +*/ +proto.s3web.cleanup.CleanupJob.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupJob} returns this + */ +proto.s3web.cleanup.CleanupJob.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupJob.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CleanupJobStats.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CleanupJobStats} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupJobStats.toObject = function(includeInstance, msg) { + var f, obj = { + itemsScanned: jspb.Message.getFieldWithDefault(msg, 1, 0), + itemsFound: jspb.Message.getFieldWithDefault(msg, 2, 0), + itemsCleaned: jspb.Message.getFieldWithDefault(msg, 3, 0), + itemsFailed: jspb.Message.getFieldWithDefault(msg, 4, 0), + bytesScanned: jspb.Message.getFieldWithDefault(msg, 5, 0), + bytesFreed: jspb.Message.getFieldWithDefault(msg, 6, 0), + bytesFailed: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CleanupJobStats} + */ +proto.s3web.cleanup.CleanupJobStats.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CleanupJobStats; + return proto.s3web.cleanup.CleanupJobStats.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CleanupJobStats} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CleanupJobStats} + */ +proto.s3web.cleanup.CleanupJobStats.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setItemsScanned(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setItemsFound(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setItemsCleaned(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setItemsFailed(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBytesScanned(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBytesFreed(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBytesFailed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CleanupJobStats.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CleanupJobStats} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupJobStats.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemsScanned(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getItemsFound(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getItemsCleaned(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getItemsFailed(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getBytesScanned(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getBytesFreed(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getBytesFailed(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } +}; + + +/** + * optional int64 items_scanned = 1; + * @return {number} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.getItemsScanned = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupJobStats} returns this + */ +proto.s3web.cleanup.CleanupJobStats.prototype.setItemsScanned = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 items_found = 2; + * @return {number} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.getItemsFound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupJobStats} returns this + */ +proto.s3web.cleanup.CleanupJobStats.prototype.setItemsFound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 items_cleaned = 3; + * @return {number} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.getItemsCleaned = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupJobStats} returns this + */ +proto.s3web.cleanup.CleanupJobStats.prototype.setItemsCleaned = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 items_failed = 4; + * @return {number} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.getItemsFailed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupJobStats} returns this + */ +proto.s3web.cleanup.CleanupJobStats.prototype.setItemsFailed = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 bytes_scanned = 5; + * @return {number} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.getBytesScanned = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupJobStats} returns this + */ +proto.s3web.cleanup.CleanupJobStats.prototype.setBytesScanned = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 bytes_freed = 6; + * @return {number} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.getBytesFreed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupJobStats} returns this + */ +proto.s3web.cleanup.CleanupJobStats.prototype.setBytesFreed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 bytes_failed = 7; + * @return {number} + */ +proto.s3web.cleanup.CleanupJobStats.prototype.getBytesFailed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupJobStats} returns this + */ +proto.s3web.cleanup.CleanupJobStats.prototype.setBytesFailed = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.StorageAnalytics.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.StorageAnalytics} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.StorageAnalytics.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + totalObjects: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalSizeBytes: jspb.Message.getFieldWithDefault(msg, 4, 0), + orphanedUploadsCount: jspb.Message.getFieldWithDefault(msg, 5, 0), + orphanedUploadsSizeBytes: jspb.Message.getFieldWithDefault(msg, 6, 0), + oldVersionsCount: jspb.Message.getFieldWithDefault(msg, 7, 0), + oldVersionsSizeBytes: jspb.Message.getFieldWithDefault(msg, 8, 0), + emptyObjectsCount: jspb.Message.getFieldWithDefault(msg, 9, 0), + corruptObjectsCount: jspb.Message.getFieldWithDefault(msg, 10, 0), + lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + storageClassDistributionMap: (f = msg.getStorageClassDistributionMap()) ? f.toObject(includeInstance, undefined) : [], + ageDistributionMap: (f = msg.getAgeDistributionMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.StorageAnalytics} + */ +proto.s3web.cleanup.StorageAnalytics.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.StorageAnalytics; + return proto.s3web.cleanup.StorageAnalytics.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.StorageAnalytics} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.StorageAnalytics} + */ +proto.s3web.cleanup.StorageAnalytics.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalObjects(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSizeBytes(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOrphanedUploadsCount(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOrphanedUploadsSizeBytes(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOldVersionsCount(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOldVersionsSizeBytes(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEmptyObjectsCount(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCorruptObjectsCount(value); + break; + case 11: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastUpdated(value); + break; + case 12: + var value = msg.getStorageClassDistributionMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); + }); + break; + case 13: + var value = msg.getAgeDistributionMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt64, null, "", 0); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.StorageAnalytics.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.StorageAnalytics} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.StorageAnalytics.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTotalObjects(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTotalSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getOrphanedUploadsCount(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getOrphanedUploadsSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getOldVersionsCount(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getOldVersionsSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getEmptyObjectsCount(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getCorruptObjectsCount(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } + f = message.getLastUpdated(); + if (f != null) { + writer.writeMessage( + 11, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getStorageClassDistributionMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(12, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getAgeDistributionMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt64); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 total_objects = 3; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getTotalObjects = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setTotalObjects = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 total_size_bytes = 4; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getTotalSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setTotalSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 orphaned_uploads_count = 5; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getOrphanedUploadsCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setOrphanedUploadsCount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 orphaned_uploads_size_bytes = 6; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getOrphanedUploadsSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setOrphanedUploadsSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 old_versions_count = 7; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getOldVersionsCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setOldVersionsCount = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int64 old_versions_size_bytes = 8; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getOldVersionsSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setOldVersionsSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int64 empty_objects_count = 9; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getEmptyObjectsCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setEmptyObjectsCount = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 corrupt_objects_count = 10; + * @return {number} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getCorruptObjectsCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.setCorruptObjectsCount = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional google.protobuf.Timestamp last_updated = 11; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getLastUpdated = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this +*/ +proto.s3web.cleanup.StorageAnalytics.prototype.setLastUpdated = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.clearLastUpdated = function() { + return this.setLastUpdated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.hasLastUpdated = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * map storage_class_distribution = 12; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getStorageClassDistributionMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 12, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.clearStorageClassDistributionMap = function() { + this.getStorageClassDistributionMap().clear(); + return this;}; + + +/** + * map age_distribution = 13; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.cleanup.StorageAnalytics.prototype.getAgeDistributionMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 13, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.cleanup.StorageAnalytics} returns this + */ +proto.s3web.cleanup.StorageAnalytics.prototype.clearAgeDistributionMap = function() { + this.getAgeDistributionMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.ProviderDiagnostics.repeatedFields_ = [5,6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ProviderDiagnostics.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ProviderDiagnostics} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ProviderDiagnostics.toObject = function(includeInstance, msg) { + var f, obj = { + providerType: jspb.Message.getFieldWithDefault(msg, 1, ""), + providerVersion: jspb.Message.getFieldWithDefault(msg, 2, ""), + capabilitiesMap: (f = msg.getCapabilitiesMap()) ? f.toObject(includeInstance, undefined) : [], + configurationMap: (f = msg.getConfigurationMap()) ? f.toObject(includeInstance, undefined) : [], + warningsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + recommendationsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ProviderDiagnostics} + */ +proto.s3web.cleanup.ProviderDiagnostics.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ProviderDiagnostics; + return proto.s3web.cleanup.ProviderDiagnostics.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ProviderDiagnostics} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ProviderDiagnostics} + */ +proto.s3web.cleanup.ProviderDiagnostics.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setProviderType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProviderVersion(value); + break; + case 3: + var value = msg.getCapabilitiesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 4: + var value = msg.getConfigurationMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addWarnings(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addRecommendations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ProviderDiagnostics.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ProviderDiagnostics} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ProviderDiagnostics.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProviderType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProviderVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCapabilitiesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getConfigurationMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getWarningsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getRecommendationsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } +}; + + +/** + * optional string provider_type = 1; + * @return {string} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.getProviderType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.setProviderType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider_version = 2; + * @return {string} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.getProviderVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.setProviderVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map capabilities = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.getCapabilitiesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.clearCapabilitiesMap = function() { + this.getCapabilitiesMap().clear(); + return this;}; + + +/** + * map configuration = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.getConfigurationMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.clearConfigurationMap = function() { + this.getConfigurationMap().clear(); + return this;}; + + +/** + * repeated string warnings = 5; + * @return {!Array} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.getWarningsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.setWarningsList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.addWarnings = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.clearWarningsList = function() { + return this.setWarningsList([]); +}; + + +/** + * repeated string recommendations = 6; + * @return {!Array} + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.getRecommendationsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.setRecommendationsList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.addRecommendations = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.ProviderDiagnostics} returns this + */ +proto.s3web.cleanup.ProviderDiagnostics.prototype.clearRecommendationsList = function() { + return this.setRecommendationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanOrphanedUploadsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + minAgeDays: jspb.Message.getFieldWithDefault(msg, 4, 0), + maxResults: jspb.Message.getFieldWithDefault(msg, 5, 0), + continuationToken: jspb.Message.getFieldWithDefault(msg, 6, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanOrphanedUploadsRequest; + return proto.s3web.cleanup.ScanOrphanedUploadsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinAgeDays(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxResults(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setContinuationToken(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanOrphanedUploadsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMinAgeDays(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getMaxResults(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getContinuationToken(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 min_age_days = 4; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.getMinAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.setMinAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 max_results = 5; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.getMaxResults = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.setMaxResults = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string continuation_token = 6; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.getContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.setContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this +*/ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ScanOrphanedUploadsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanOrphanedUploadsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + uploadsList: jspb.Message.toObjectList(msg.getUploadsList(), + proto.s3web.cleanup.OrphanedUpload.toObject, includeInstance), + nextContinuationToken: jspb.Message.getFieldWithDefault(msg, 2, ""), + totalCount: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalSizeBytes: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanOrphanedUploadsResponse; + return proto.s3web.cleanup.ScanOrphanedUploadsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.OrphanedUpload; + reader.readMessage(value,proto.s3web.cleanup.OrphanedUpload.deserializeBinaryFromReader); + msg.addUploads(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNextContinuationToken(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalCount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSizeBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanOrphanedUploadsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUploadsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.cleanup.OrphanedUpload.serializeBinaryToWriter + ); + } + f = message.getNextContinuationToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTotalCount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTotalSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * repeated OrphanedUpload uploads = 1; + * @return {!Array} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.getUploadsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.cleanup.OrphanedUpload, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} returns this +*/ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.setUploadsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.cleanup.OrphanedUpload=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.OrphanedUpload} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.addUploads = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.cleanup.OrphanedUpload, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.clearUploadsList = function() { + return this.setUploadsList([]); +}; + + +/** + * optional string next_continuation_token = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.getNextContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.setNextContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 total_count = 3; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.getTotalCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.setTotalCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 total_size_bytes = 4; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.getTotalSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedUploadsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedUploadsResponse.prototype.setTotalSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CleanupOrphanedUploadsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + minAgeDays: jspb.Message.getFieldWithDefault(msg, 4, 0), + uploadIdsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CleanupOrphanedUploadsRequest; + return proto.s3web.cleanup.CleanupOrphanedUploadsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinAgeDays(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addUploadIds(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDryRun(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CleanupOrphanedUploadsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMinAgeDays(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getUploadIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getDryRun(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 min_age_days = 4; + * @return {number} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.getMinAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.setMinAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * repeated string upload_ids = 5; + * @return {!Array} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.getUploadIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.setUploadIdsList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.addUploadIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.clearUploadIdsList = function() { + return this.setUploadIdsList([]); +}; + + +/** + * optional bool dry_run = 6; + * @return {boolean} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.getDryRun = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.setDryRun = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this +*/ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsRequest} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CleanupOrphanedUploadsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + jobId: jspb.Message.getFieldWithDefault(msg, 1, ""), + job: (f = msg.getJob()) && proto.s3web.cleanup.CleanupJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CleanupOrphanedUploadsResponse; + return proto.s3web.cleanup.CleanupOrphanedUploadsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJobId(value); + break; + case 2: + var value = new proto.s3web.cleanup.CleanupJob; + reader.readMessage(value,proto.s3web.cleanup.CleanupJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CleanupOrphanedUploadsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.cleanup.CleanupJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string job_id = 1; + * @return {string} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.getJobId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.setJobId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional CleanupJob job = 2; + * @return {?proto.s3web.cleanup.CleanupJob} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.cleanup.CleanupJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.cleanup.CleanupJob, 2)); +}; + + +/** + * @param {?proto.s3web.cleanup.CleanupJob|undefined} value + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} returns this +*/ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupOrphanedUploadsResponse} returns this + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupOrphanedUploadsResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanCorruptObjectsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanCorruptObjectsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + verifyChecksums: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + maxResults: jspb.Message.getFieldWithDefault(msg, 5, 0), + continuationToken: jspb.Message.getFieldWithDefault(msg, 6, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanCorruptObjectsRequest; + return proto.s3web.cleanup.ScanCorruptObjectsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanCorruptObjectsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerifyChecksums(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxResults(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setContinuationToken(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanCorruptObjectsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanCorruptObjectsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVerifyChecksums(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getMaxResults(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getContinuationToken(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool verify_checksums = 4; + * @return {boolean} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.getVerifyChecksums = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.setVerifyChecksums = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional int32 max_results = 5; + * @return {number} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.getMaxResults = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.setMaxResults = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string continuation_token = 6; + * @return {string} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.getContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.setContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this +*/ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ScanCorruptObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ScanCorruptObjectsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanCorruptObjectsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanCorruptObjectsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + objectsList: jspb.Message.toObjectList(msg.getObjectsList(), + proto.s3web.cleanup.CorruptObject.toObject, includeInstance), + nextContinuationToken: jspb.Message.getFieldWithDefault(msg, 2, ""), + totalCount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanCorruptObjectsResponse} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanCorruptObjectsResponse; + return proto.s3web.cleanup.ScanCorruptObjectsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanCorruptObjectsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanCorruptObjectsResponse} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.CorruptObject; + reader.readMessage(value,proto.s3web.cleanup.CorruptObject.deserializeBinaryFromReader); + msg.addObjects(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNextContinuationToken(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanCorruptObjectsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanCorruptObjectsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getObjectsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.cleanup.CorruptObject.serializeBinaryToWriter + ); + } + f = message.getNextContinuationToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTotalCount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * repeated CorruptObject objects = 1; + * @return {!Array} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.getObjectsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.cleanup.CorruptObject, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsResponse} returns this +*/ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.setObjectsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.cleanup.CorruptObject=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.CorruptObject} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.addObjects = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.cleanup.CorruptObject, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.ScanCorruptObjectsResponse} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.clearObjectsList = function() { + return this.setObjectsList([]); +}; + + +/** + * optional string next_continuation_token = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.getNextContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsResponse} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.setNextContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 total_count = 3; + * @return {number} + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.getTotalCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanCorruptObjectsResponse} returns this + */ +proto.s3web.cleanup.ScanCorruptObjectsResponse.prototype.setTotalCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.VerifyObjectIntegrityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + key: jspb.Message.getFieldWithDefault(msg, 3, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 4, ""), + deepVerify: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.VerifyObjectIntegrityRequest; + return proto.s3web.cleanup.VerifyObjectIntegrityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeepVerify(value); + break; + case 6: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.VerifyObjectIntegrityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDeepVerify(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 6, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string key = 3; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version_id = 4; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool deep_verify = 5; + * @return {boolean} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.getDeepVerify = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.setDeepVerify = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 6; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 6)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} returns this +*/ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityRequest} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.VerifyObjectIntegrityRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.VerifyObjectIntegrityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + isValid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + checksumAlgorithm: jspb.Message.getFieldWithDefault(msg, 2, ""), + expectedChecksum: jspb.Message.getFieldWithDefault(msg, 3, ""), + actualChecksum: jspb.Message.getFieldWithDefault(msg, 4, ""), + errorMessage: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.VerifyObjectIntegrityResponse; + return proto.s3web.cleanup.VerifyObjectIntegrityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsValid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChecksumAlgorithm(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setExpectedChecksum(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setActualChecksum(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.VerifyObjectIntegrityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsValid(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getChecksumAlgorithm(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExpectedChecksum(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getActualChecksum(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional bool is_valid = 1; + * @return {boolean} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.getIsValid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.setIsValid = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional string checksum_algorithm = 2; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.getChecksumAlgorithm = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.setChecksumAlgorithm = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string expected_checksum = 3; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.getExpectedChecksum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.setExpectedChecksum = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string actual_checksum = 4; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.getActualChecksum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.setActualChecksum = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string error_message = 5; + * @return {string} + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.VerifyObjectIntegrityResponse} returns this + */ +proto.s3web.cleanup.VerifyObjectIntegrityResponse.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanOrphanedVersionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + minAgeDays: jspb.Message.getFieldWithDefault(msg, 4, 0), + maxVersionsPerObject: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxResults: jspb.Message.getFieldWithDefault(msg, 6, 0), + continuationToken: jspb.Message.getFieldWithDefault(msg, 7, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanOrphanedVersionsRequest; + return proto.s3web.cleanup.ScanOrphanedVersionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinAgeDays(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxVersionsPerObject(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxResults(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setContinuationToken(value); + break; + case 8: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanOrphanedVersionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMinAgeDays(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getMaxVersionsPerObject(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getMaxResults(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getContinuationToken(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 8, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 min_age_days = 4; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getMinAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setMinAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 max_versions_per_object = 5; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getMaxVersionsPerObject = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setMaxVersionsPerObject = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 max_results = 6; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getMaxResults = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setMaxResults = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional string continuation_token = 7; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 8; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 8)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this +*/ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsRequest} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ScanOrphanedVersionsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanOrphanedVersionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.s3web.cleanup.ObjectVersionInfo.toObject, includeInstance), + nextContinuationToken: jspb.Message.getFieldWithDefault(msg, 2, ""), + totalCount: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalSizeBytes: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanOrphanedVersionsResponse; + return proto.s3web.cleanup.ScanOrphanedVersionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.ObjectVersionInfo; + reader.readMessage(value,proto.s3web.cleanup.ObjectVersionInfo.deserializeBinaryFromReader); + msg.addVersions(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNextContinuationToken(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalCount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSizeBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanOrphanedVersionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.cleanup.ObjectVersionInfo.serializeBinaryToWriter + ); + } + f = message.getNextContinuationToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTotalCount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTotalSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * repeated ObjectVersionInfo versions = 1; + * @return {!Array} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.cleanup.ObjectVersionInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} returns this +*/ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.cleanup.ObjectVersionInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.ObjectVersionInfo} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.cleanup.ObjectVersionInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + +/** + * optional string next_continuation_token = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.getNextContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.setNextContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 total_count = 3; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.getTotalCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.setTotalCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 total_size_bytes = 4; + * @return {number} + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.getTotalSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanOrphanedVersionsResponse} returns this + */ +proto.s3web.cleanup.ScanOrphanedVersionsResponse.prototype.setTotalSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.repeatedFields_ = [6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CleanupOldVersionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CleanupOldVersionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + minAgeDays: jspb.Message.getFieldWithDefault(msg, 4, 0), + keepVersions: jspb.Message.getFieldWithDefault(msg, 5, 0), + versionIdsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CleanupOldVersionsRequest; + return proto.s3web.cleanup.CleanupOldVersionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CleanupOldVersionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinAgeDays(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setKeepVersions(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addVersionIds(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDryRun(value); + break; + case 8: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CleanupOldVersionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CleanupOldVersionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMinAgeDays(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getKeepVersions(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getVersionIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getDryRun(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 8, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 min_age_days = 4; + * @return {number} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getMinAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setMinAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 keep_versions = 5; + * @return {number} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getKeepVersions = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setKeepVersions = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated string version_ids = 6; + * @return {!Array} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getVersionIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setVersionIdsList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.addVersionIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.clearVersionIdsList = function() { + return this.setVersionIdsList([]); +}; + + +/** + * optional bool dry_run = 7; + * @return {boolean} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getDryRun = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setDryRun = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 8; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 8)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this +*/ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupOldVersionsRequest} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupOldVersionsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CleanupOldVersionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CleanupOldVersionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + jobId: jspb.Message.getFieldWithDefault(msg, 1, ""), + job: (f = msg.getJob()) && proto.s3web.cleanup.CleanupJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CleanupOldVersionsResponse} + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CleanupOldVersionsResponse; + return proto.s3web.cleanup.CleanupOldVersionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CleanupOldVersionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CleanupOldVersionsResponse} + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJobId(value); + break; + case 2: + var value = new proto.s3web.cleanup.CleanupJob; + reader.readMessage(value,proto.s3web.cleanup.CleanupJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CleanupOldVersionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CleanupOldVersionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.cleanup.CleanupJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string job_id = 1; + * @return {string} + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.getJobId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsResponse} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.setJobId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional CleanupJob job = 2; + * @return {?proto.s3web.cleanup.CleanupJob} + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.cleanup.CleanupJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.cleanup.CleanupJob, 2)); +}; + + +/** + * @param {?proto.s3web.cleanup.CleanupJob|undefined} value + * @return {!proto.s3web.cleanup.CleanupOldVersionsResponse} returns this +*/ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CleanupOldVersionsResponse} returns this + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CleanupOldVersionsResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanEmptyObjectsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanEmptyObjectsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + minAgeDays: jspb.Message.getFieldWithDefault(msg, 4, 0), + maxResults: jspb.Message.getFieldWithDefault(msg, 5, 0), + continuationToken: jspb.Message.getFieldWithDefault(msg, 6, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanEmptyObjectsRequest; + return proto.s3web.cleanup.ScanEmptyObjectsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanEmptyObjectsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinAgeDays(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxResults(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setContinuationToken(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanEmptyObjectsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanEmptyObjectsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMinAgeDays(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getMaxResults(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getContinuationToken(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 min_age_days = 4; + * @return {number} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.getMinAgeDays = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.setMinAgeDays = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 max_results = 5; + * @return {number} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.getMaxResults = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.setMaxResults = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string continuation_token = 6; + * @return {string} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.getContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.setContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this +*/ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ScanEmptyObjectsRequest} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ScanEmptyObjectsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ScanEmptyObjectsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ScanEmptyObjectsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + objectsList: jspb.Message.toObjectList(msg.getObjectsList(), + proto.s3web.cleanup.EmptyObject.toObject, includeInstance), + nextContinuationToken: jspb.Message.getFieldWithDefault(msg, 2, ""), + totalCount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ScanEmptyObjectsResponse} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ScanEmptyObjectsResponse; + return proto.s3web.cleanup.ScanEmptyObjectsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ScanEmptyObjectsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ScanEmptyObjectsResponse} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.EmptyObject; + reader.readMessage(value,proto.s3web.cleanup.EmptyObject.deserializeBinaryFromReader); + msg.addObjects(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNextContinuationToken(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ScanEmptyObjectsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ScanEmptyObjectsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getObjectsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.cleanup.EmptyObject.serializeBinaryToWriter + ); + } + f = message.getNextContinuationToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTotalCount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * repeated EmptyObject objects = 1; + * @return {!Array} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.getObjectsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.cleanup.EmptyObject, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsResponse} returns this +*/ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.setObjectsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.cleanup.EmptyObject=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.EmptyObject} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.addObjects = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.cleanup.EmptyObject, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.ScanEmptyObjectsResponse} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.clearObjectsList = function() { + return this.setObjectsList([]); +}; + + +/** + * optional string next_continuation_token = 2; + * @return {string} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.getNextContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsResponse} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.setNextContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 total_count = 3; + * @return {number} + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.getTotalCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.cleanup.ScanEmptyObjectsResponse} returns this + */ +proto.s3web.cleanup.ScanEmptyObjectsResponse.prototype.setTotalCount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.GetStorageAnalyticsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.GetStorageAnalyticsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + includeVersions: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + includeMultipart: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.GetStorageAnalyticsRequest; + return proto.s3web.cleanup.GetStorageAnalyticsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.GetStorageAnalyticsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeVersions(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeMultipart(value); + break; + case 6: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.GetStorageAnalyticsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.GetStorageAnalyticsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIncludeVersions(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getIncludeMultipart(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 6, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} returns this + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} returns this + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} returns this + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool include_versions = 4; + * @return {boolean} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.getIncludeVersions = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} returns this + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.setIncludeVersions = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool include_multipart = 5; + * @return {boolean} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.getIncludeMultipart = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} returns this + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.setIncludeMultipart = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 6; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 6)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} returns this +*/ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.GetStorageAnalyticsRequest} returns this + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.GetStorageAnalyticsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.GetStorageAnalyticsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.GetStorageAnalyticsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + analytics: (f = msg.getAnalytics()) && proto.s3web.cleanup.StorageAnalytics.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.GetStorageAnalyticsResponse} + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.GetStorageAnalyticsResponse; + return proto.s3web.cleanup.GetStorageAnalyticsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.GetStorageAnalyticsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.GetStorageAnalyticsResponse} + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.StorageAnalytics; + reader.readMessage(value,proto.s3web.cleanup.StorageAnalytics.deserializeBinaryFromReader); + msg.setAnalytics(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.GetStorageAnalyticsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.GetStorageAnalyticsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnalytics(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.cleanup.StorageAnalytics.serializeBinaryToWriter + ); + } +}; + + +/** + * optional StorageAnalytics analytics = 1; + * @return {?proto.s3web.cleanup.StorageAnalytics} + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.prototype.getAnalytics = function() { + return /** @type{?proto.s3web.cleanup.StorageAnalytics} */ ( + jspb.Message.getWrapperField(this, proto.s3web.cleanup.StorageAnalytics, 1)); +}; + + +/** + * @param {?proto.s3web.cleanup.StorageAnalytics|undefined} value + * @return {!proto.s3web.cleanup.GetStorageAnalyticsResponse} returns this +*/ +proto.s3web.cleanup.GetStorageAnalyticsResponse.prototype.setAnalytics = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.GetStorageAnalyticsResponse} returns this + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.prototype.clearAnalytics = function() { + return this.setAnalytics(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.GetStorageAnalyticsResponse.prototype.hasAnalytics = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.GetCleanupJobStatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.GetCleanupJobStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + jobId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.GetCleanupJobStatusRequest} + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.GetCleanupJobStatusRequest; + return proto.s3web.cleanup.GetCleanupJobStatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.GetCleanupJobStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.GetCleanupJobStatusRequest} + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJobId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.GetCleanupJobStatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.GetCleanupJobStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string job_id = 1; + * @return {string} + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.getJobId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.GetCleanupJobStatusRequest} returns this + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.setJobId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.GetCleanupJobStatusRequest} returns this +*/ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.GetCleanupJobStatusRequest} returns this + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.GetCleanupJobStatusRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.GetCleanupJobStatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.GetCleanupJobStatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + job: (f = msg.getJob()) && proto.s3web.cleanup.CleanupJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.GetCleanupJobStatusResponse} + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.GetCleanupJobStatusResponse; + return proto.s3web.cleanup.GetCleanupJobStatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.GetCleanupJobStatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.GetCleanupJobStatusResponse} + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.CleanupJob; + reader.readMessage(value,proto.s3web.cleanup.CleanupJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.GetCleanupJobStatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.GetCleanupJobStatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.cleanup.CleanupJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CleanupJob job = 1; + * @return {?proto.s3web.cleanup.CleanupJob} + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.cleanup.CleanupJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.cleanup.CleanupJob, 1)); +}; + + +/** + * @param {?proto.s3web.cleanup.CleanupJob|undefined} value + * @return {!proto.s3web.cleanup.GetCleanupJobStatusResponse} returns this +*/ +proto.s3web.cleanup.GetCleanupJobStatusResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.GetCleanupJobStatusResponse} returns this + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.GetCleanupJobStatusResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ListCleanupJobsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ListCleanupJobsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ListCleanupJobsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + timeRange: (f = msg.getTimeRange()) && common_common_pb.TimeRange.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationRequest.toObject(includeInstance, f), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ListCleanupJobsRequest; + return proto.s3web.cleanup.ListCleanupJobsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ListCleanupJobsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {!proto.s3web.cleanup.CleanupJobType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: + var value = /** @type {!proto.s3web.cleanup.CleanupJobStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = new common_common_pb.TimeRange; + reader.readMessage(value,common_common_pb.TimeRange.deserializeBinaryFromReader); + msg.setTimeRange(value); + break; + case 5: + var value = new common_common_pb.PaginationRequest; + reader.readMessage(value,common_common_pb.PaginationRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + case 6: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ListCleanupJobsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ListCleanupJobsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ListCleanupJobsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getTimeRange(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_common_pb.TimeRange.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_common_pb.PaginationRequest.serializeBinaryToWriter + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 6, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional CleanupJobType type = 2; + * @return {!proto.s3web.cleanup.CleanupJobType} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.getType = function() { + return /** @type {!proto.s3web.cleanup.CleanupJobType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.cleanup.CleanupJobType} value + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional CleanupJobStatus status = 3; + * @return {!proto.s3web.cleanup.CleanupJobStatus} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.getStatus = function() { + return /** @type {!proto.s3web.cleanup.CleanupJobStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.s3web.cleanup.CleanupJobStatus} value + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional s3web.common.TimeRange time_range = 4; + * @return {?proto.s3web.common.TimeRange} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.getTimeRange = function() { + return /** @type{?proto.s3web.common.TimeRange} */ ( + jspb.Message.getWrapperField(this, common_common_pb.TimeRange, 4)); +}; + + +/** + * @param {?proto.s3web.common.TimeRange|undefined} value + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this +*/ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.setTimeRange = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.clearTimeRange = function() { + return this.setTimeRange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.hasTimeRange = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional s3web.common.PaginationRequest pagination = 5; + * @return {?proto.s3web.common.PaginationRequest} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationRequest} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationRequest, 5)); +}; + + +/** + * @param {?proto.s3web.common.PaginationRequest|undefined} value + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this +*/ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional s3web.common.AuditContext audit_context = 6; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 6)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this +*/ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ListCleanupJobsRequest} returns this + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ListCleanupJobsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.cleanup.ListCleanupJobsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.ListCleanupJobsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.ListCleanupJobsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ListCleanupJobsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + jobsList: jspb.Message.toObjectList(msg.getJobsList(), + proto.s3web.cleanup.CleanupJob.toObject, includeInstance), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.ListCleanupJobsResponse} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.ListCleanupJobsResponse; + return proto.s3web.cleanup.ListCleanupJobsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.ListCleanupJobsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.ListCleanupJobsResponse} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.CleanupJob; + reader.readMessage(value,proto.s3web.cleanup.CleanupJob.deserializeBinaryFromReader); + msg.addJobs(value); + break; + case 2: + var value = new common_common_pb.PaginationResponse; + reader.readMessage(value,common_common_pb.PaginationResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.ListCleanupJobsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.ListCleanupJobsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.ListCleanupJobsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.cleanup.CleanupJob.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated CleanupJob jobs = 1; + * @return {!Array} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.getJobsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.cleanup.CleanupJob, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.cleanup.ListCleanupJobsResponse} returns this +*/ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.setJobsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.cleanup.CleanupJob=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.cleanup.CleanupJob} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.addJobs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.cleanup.CleanupJob, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.cleanup.ListCleanupJobsResponse} returns this + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.clearJobsList = function() { + return this.setJobsList([]); +}; + + +/** + * optional s3web.common.PaginationResponse pagination = 2; + * @return {?proto.s3web.common.PaginationResponse} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationResponse} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationResponse, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationResponse|undefined} value + * @return {!proto.s3web.cleanup.ListCleanupJobsResponse} returns this +*/ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.ListCleanupJobsResponse} returns this + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.ListCleanupJobsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CancelCleanupJobRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CancelCleanupJobRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CancelCleanupJobRequest.toObject = function(includeInstance, msg) { + var f, obj = { + jobId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CancelCleanupJobRequest} + */ +proto.s3web.cleanup.CancelCleanupJobRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CancelCleanupJobRequest; + return proto.s3web.cleanup.CancelCleanupJobRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CancelCleanupJobRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CancelCleanupJobRequest} + */ +proto.s3web.cleanup.CancelCleanupJobRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJobId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CancelCleanupJobRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CancelCleanupJobRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CancelCleanupJobRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string job_id = 1; + * @return {string} + */ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.getJobId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.CancelCleanupJobRequest} returns this + */ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.setJobId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.CancelCleanupJobRequest} returns this +*/ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CancelCleanupJobRequest} returns this + */ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CancelCleanupJobRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.CancelCleanupJobResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.CancelCleanupJobResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CancelCleanupJobResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + job: (f = msg.getJob()) && proto.s3web.cleanup.CleanupJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.CancelCleanupJobResponse} + */ +proto.s3web.cleanup.CancelCleanupJobResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.CancelCleanupJobResponse; + return proto.s3web.cleanup.CancelCleanupJobResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.CancelCleanupJobResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.CancelCleanupJobResponse} + */ +proto.s3web.cleanup.CancelCleanupJobResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 2: + var value = new proto.s3web.cleanup.CleanupJob; + reader.readMessage(value,proto.s3web.cleanup.CleanupJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.CancelCleanupJobResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.CancelCleanupJobResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.CancelCleanupJobResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.cleanup.CleanupJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.cleanup.CancelCleanupJobResponse} returns this + */ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional CleanupJob job = 2; + * @return {?proto.s3web.cleanup.CleanupJob} + */ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.cleanup.CleanupJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.cleanup.CleanupJob, 2)); +}; + + +/** + * @param {?proto.s3web.cleanup.CleanupJob|undefined} value + * @return {!proto.s3web.cleanup.CancelCleanupJobResponse} returns this +*/ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.CancelCleanupJobResponse} returns this + */ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.CancelCleanupJobResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.GetProviderDiagnosticsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.GetProviderDiagnosticsRequest; + return proto.s3web.cleanup.GetProviderDiagnosticsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.GetProviderDiagnosticsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} returns this + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} returns this +*/ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsRequest} returns this + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.GetProviderDiagnosticsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.cleanup.GetProviderDiagnosticsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.cleanup.GetProviderDiagnosticsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + diagnostics: (f = msg.getDiagnostics()) && proto.s3web.cleanup.ProviderDiagnostics.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsResponse} + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.cleanup.GetProviderDiagnosticsResponse; + return proto.s3web.cleanup.GetProviderDiagnosticsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.cleanup.GetProviderDiagnosticsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsResponse} + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.cleanup.ProviderDiagnostics; + reader.readMessage(value,proto.s3web.cleanup.ProviderDiagnostics.deserializeBinaryFromReader); + msg.setDiagnostics(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.cleanup.GetProviderDiagnosticsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.cleanup.GetProviderDiagnosticsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDiagnostics(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.cleanup.ProviderDiagnostics.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ProviderDiagnostics diagnostics = 1; + * @return {?proto.s3web.cleanup.ProviderDiagnostics} + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.prototype.getDiagnostics = function() { + return /** @type{?proto.s3web.cleanup.ProviderDiagnostics} */ ( + jspb.Message.getWrapperField(this, proto.s3web.cleanup.ProviderDiagnostics, 1)); +}; + + +/** + * @param {?proto.s3web.cleanup.ProviderDiagnostics|undefined} value + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsResponse} returns this +*/ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.prototype.setDiagnostics = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.cleanup.GetProviderDiagnosticsResponse} returns this + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.prototype.clearDiagnostics = function() { + return this.setDiagnostics(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.cleanup.GetProviderDiagnosticsResponse.prototype.hasDiagnostics = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * @enum {number} + */ +proto.s3web.cleanup.CleanupJobType = { + CLEANUP_JOB_TYPE_UNKNOWN: 0, + CLEANUP_JOB_TYPE_ORPHANED_UPLOADS: 1, + CLEANUP_JOB_TYPE_CORRUPT_OBJECTS: 2, + CLEANUP_JOB_TYPE_OLD_VERSIONS: 3, + CLEANUP_JOB_TYPE_EMPTY_OBJECTS: 4, + CLEANUP_JOB_TYPE_INTEGRITY_VERIFICATION: 5 +}; + +/** + * @enum {number} + */ +proto.s3web.cleanup.CleanupJobStatus = { + CLEANUP_JOB_STATUS_UNKNOWN: 0, + CLEANUP_JOB_STATUS_PENDING: 1, + CLEANUP_JOB_STATUS_RUNNING: 2, + CLEANUP_JOB_STATUS_COMPLETED: 3, + CLEANUP_JOB_STATUS_FAILED: 4, + CLEANUP_JOB_STATUS_CANCELLED: 5, + CLEANUP_JOB_STATUS_PAUSED: 6 +}; + +/** + * @enum {number} + */ +proto.s3web.cleanup.CleanupAction = { + CLEANUP_ACTION_UNKNOWN: 0, + CLEANUP_ACTION_SCAN_ONLY: 1, + CLEANUP_ACTION_DELETE: 2, + CLEANUP_ACTION_ARCHIVE: 3, + CLEANUP_ACTION_VERIFY: 4 +}; + +goog.object.extend(exports, proto.s3web.cleanup); diff --git a/frontend/src/gen/common/common_pb.d.ts b/frontend/src/gen/common/common_pb.d.ts new file mode 100644 index 0000000..3f69308 --- /dev/null +++ b/frontend/src/gen/common/common_pb.d.ts @@ -0,0 +1,458 @@ +import * as jspb from 'google-protobuf' + +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" + + +export class PaginationRequest extends jspb.Message { + getPage(): number; + setPage(value: number): PaginationRequest; + + getPageSize(): number; + setPageSize(value: number): PaginationRequest; + + getSortBy(): string; + setSortBy(value: string): PaginationRequest; + + getSortDesc(): boolean; + setSortDesc(value: boolean): PaginationRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PaginationRequest.AsObject; + static toObject(includeInstance: boolean, msg: PaginationRequest): PaginationRequest.AsObject; + static serializeBinaryToWriter(message: PaginationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PaginationRequest; + static deserializeBinaryFromReader(message: PaginationRequest, reader: jspb.BinaryReader): PaginationRequest; +} + +export namespace PaginationRequest { + export type AsObject = { + page: number, + pageSize: number, + sortBy: string, + sortDesc: boolean, + } +} + +export class PaginationResponse extends jspb.Message { + getPage(): number; + setPage(value: number): PaginationResponse; + + getPageSize(): number; + setPageSize(value: number): PaginationResponse; + + getTotalItems(): number; + setTotalItems(value: number): PaginationResponse; + + getTotalPages(): number; + setTotalPages(value: number): PaginationResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PaginationResponse.AsObject; + static toObject(includeInstance: boolean, msg: PaginationResponse): PaginationResponse.AsObject; + static serializeBinaryToWriter(message: PaginationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PaginationResponse; + static deserializeBinaryFromReader(message: PaginationResponse, reader: jspb.BinaryReader): PaginationResponse; +} + +export namespace PaginationResponse { + export type AsObject = { + page: number, + pageSize: number, + totalItems: number, + totalPages: number, + } +} + +export class ErrorDetail extends jspb.Message { + getCode(): string; + setCode(value: string): ErrorDetail; + + getMessage(): string; + setMessage(value: string): ErrorDetail; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): ErrorDetail; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ErrorDetail.AsObject; + static toObject(includeInstance: boolean, msg: ErrorDetail): ErrorDetail.AsObject; + static serializeBinaryToWriter(message: ErrorDetail, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ErrorDetail; + static deserializeBinaryFromReader(message: ErrorDetail, reader: jspb.BinaryReader): ErrorDetail; +} + +export namespace ErrorDetail { + export type AsObject = { + code: string, + message: string, + metadataMap: Array<[string, string]>, + } +} + +export class HealthCheckResponse extends jspb.Message { + getStatus(): HealthCheckResponse.Status; + setStatus(value: HealthCheckResponse.Status): HealthCheckResponse; + + getVersion(): string; + setVersion(value: string): HealthCheckResponse; + + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): HealthCheckResponse; + hasTimestamp(): boolean; + clearTimestamp(): HealthCheckResponse; + + getDetailsMap(): jspb.Map; + clearDetailsMap(): HealthCheckResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HealthCheckResponse.AsObject; + static toObject(includeInstance: boolean, msg: HealthCheckResponse): HealthCheckResponse.AsObject; + static serializeBinaryToWriter(message: HealthCheckResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HealthCheckResponse; + static deserializeBinaryFromReader(message: HealthCheckResponse, reader: jspb.BinaryReader): HealthCheckResponse; +} + +export namespace HealthCheckResponse { + export type AsObject = { + status: HealthCheckResponse.Status, + version: string, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + detailsMap: Array<[string, string]>, + } + + export enum Status { + UNKNOWN = 0, + HEALTHY = 1, + DEGRADED = 2, + UNHEALTHY = 3, + } +} + +export class UserIdentity extends jspb.Message { + getUserId(): string; + setUserId(value: string): UserIdentity; + + getUsername(): string; + setUsername(value: string): UserIdentity; + + getEmail(): string; + setEmail(value: string): UserIdentity; + + getRolesList(): Array; + setRolesList(value: Array): UserIdentity; + clearRolesList(): UserIdentity; + addRoles(value: string, index?: number): UserIdentity; + + getAttributesMap(): jspb.Map; + clearAttributesMap(): UserIdentity; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UserIdentity.AsObject; + static toObject(includeInstance: boolean, msg: UserIdentity): UserIdentity.AsObject; + static serializeBinaryToWriter(message: UserIdentity, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UserIdentity; + static deserializeBinaryFromReader(message: UserIdentity, reader: jspb.BinaryReader): UserIdentity; +} + +export namespace UserIdentity { + export type AsObject = { + userId: string, + username: string, + email: string, + rolesList: Array, + attributesMap: Array<[string, string]>, + } +} + +export class AuditContext extends jspb.Message { + getRequestId(): string; + setRequestId(value: string): AuditContext; + + getUser(): UserIdentity | undefined; + setUser(value?: UserIdentity): AuditContext; + hasUser(): boolean; + clearUser(): AuditContext; + + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): AuditContext; + hasTimestamp(): boolean; + clearTimestamp(): AuditContext; + + getSourceIp(): string; + setSourceIp(value: string): AuditContext; + + getUserAgent(): string; + setUserAgent(value: string): AuditContext; + + getBreakGlassMode(): boolean; + setBreakGlassMode(value: boolean): AuditContext; + + getBreakGlassJustification(): string; + setBreakGlassJustification(value: string): AuditContext; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuditContext.AsObject; + static toObject(includeInstance: boolean, msg: AuditContext): AuditContext.AsObject; + static serializeBinaryToWriter(message: AuditContext, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuditContext; + static deserializeBinaryFromReader(message: AuditContext, reader: jspb.BinaryReader): AuditContext; +} + +export namespace AuditContext { + export type AsObject = { + requestId: string, + user?: UserIdentity.AsObject, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + sourceIp: string, + userAgent: string, + breakGlassMode: boolean, + breakGlassJustification: string, + } +} + +export class ObjectMetadata extends jspb.Message { + getKey(): string; + setKey(value: string): ObjectMetadata; + + getSize(): number; + setSize(value: number): ObjectMetadata; + + getEtag(): string; + setEtag(value: string): ObjectMetadata; + + getLastModified(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastModified(value?: google_protobuf_timestamp_pb.Timestamp): ObjectMetadata; + hasLastModified(): boolean; + clearLastModified(): ObjectMetadata; + + getContentType(): string; + setContentType(value: string): ObjectMetadata; + + getStorageClass(): string; + setStorageClass(value: string): ObjectMetadata; + + getUserMetadataMap(): jspb.Map; + clearUserMetadataMap(): ObjectMetadata; + + getSystemMetadataMap(): jspb.Map; + clearSystemMetadataMap(): ObjectMetadata; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ObjectMetadata.AsObject; + static toObject(includeInstance: boolean, msg: ObjectMetadata): ObjectMetadata.AsObject; + static serializeBinaryToWriter(message: ObjectMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ObjectMetadata; + static deserializeBinaryFromReader(message: ObjectMetadata, reader: jspb.BinaryReader): ObjectMetadata; +} + +export namespace ObjectMetadata { + export type AsObject = { + key: string, + size: number, + etag: string, + lastModified?: google_protobuf_timestamp_pb.Timestamp.AsObject, + contentType: string, + storageClass: string, + userMetadataMap: Array<[string, string]>, + systemMetadataMap: Array<[string, string]>, + } +} + +export class ObjectVersion extends jspb.Message { + getVersionId(): string; + setVersionId(value: string): ObjectVersion; + + getIsLatest(): boolean; + setIsLatest(value: boolean): ObjectVersion; + + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): ObjectVersion; + hasTimestamp(): boolean; + clearTimestamp(): ObjectVersion; + + getSize(): number; + setSize(value: number): ObjectVersion; + + getEtag(): string; + setEtag(value: string): ObjectVersion; + + getIsDeleteMarker(): boolean; + setIsDeleteMarker(value: boolean): ObjectVersion; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ObjectVersion.AsObject; + static toObject(includeInstance: boolean, msg: ObjectVersion): ObjectVersion.AsObject; + static serializeBinaryToWriter(message: ObjectVersion, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ObjectVersion; + static deserializeBinaryFromReader(message: ObjectVersion, reader: jspb.BinaryReader): ObjectVersion; +} + +export namespace ObjectVersion { + export type AsObject = { + versionId: string, + isLatest: boolean, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + size: number, + etag: string, + isDeleteMarker: boolean, + } +} + +export class Checksum extends jspb.Message { + getAlgorithm(): Checksum.Algorithm; + setAlgorithm(value: Checksum.Algorithm): Checksum; + + getValue(): string; + setValue(value: string): Checksum; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Checksum.AsObject; + static toObject(includeInstance: boolean, msg: Checksum): Checksum.AsObject; + static serializeBinaryToWriter(message: Checksum, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Checksum; + static deserializeBinaryFromReader(message: Checksum, reader: jspb.BinaryReader): Checksum; +} + +export namespace Checksum { + export type AsObject = { + algorithm: Checksum.Algorithm, + value: string, + } + + export enum Algorithm { + UNKNOWN = 0, + MD5 = 1, + SHA256 = 2, + CRC32 = 3, + CRC32C = 4, + } +} + +export class Progress extends jspb.Message { + getBytesProcessed(): number; + setBytesProcessed(value: number): Progress; + + getBytesTotal(): number; + setBytesTotal(value: number): Progress; + + getPercentage(): number; + setPercentage(value: number): Progress; + + getThroughputBps(): number; + setThroughputBps(value: number): Progress; + + getStartedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStartedAt(value?: google_protobuf_timestamp_pb.Timestamp): Progress; + hasStartedAt(): boolean; + clearStartedAt(): Progress; + + getEstimatedCompletion(): google_protobuf_timestamp_pb.Timestamp | undefined; + setEstimatedCompletion(value?: google_protobuf_timestamp_pb.Timestamp): Progress; + hasEstimatedCompletion(): boolean; + clearEstimatedCompletion(): Progress; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Progress.AsObject; + static toObject(includeInstance: boolean, msg: Progress): Progress.AsObject; + static serializeBinaryToWriter(message: Progress, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Progress; + static deserializeBinaryFromReader(message: Progress, reader: jspb.BinaryReader): Progress; +} + +export namespace Progress { + export type AsObject = { + bytesProcessed: number, + bytesTotal: number, + percentage: number, + throughputBps: number, + startedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + estimatedCompletion?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class ResourceLimits extends jspb.Message { + getMaxObjectSize(): number; + setMaxObjectSize(value: number): ResourceLimits; + + getMaxMultipartSize(): number; + setMaxMultipartSize(value: number): ResourceLimits; + + getMaxParts(): number; + setMaxParts(value: number): ResourceLimits; + + getStorageQuota(): number; + setStorageQuota(value: number): ResourceLimits; + + getStorageUsed(): number; + setStorageUsed(value: number): ResourceLimits; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceLimits.AsObject; + static toObject(includeInstance: boolean, msg: ResourceLimits): ResourceLimits.AsObject; + static serializeBinaryToWriter(message: ResourceLimits, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceLimits; + static deserializeBinaryFromReader(message: ResourceLimits, reader: jspb.BinaryReader): ResourceLimits; +} + +export namespace ResourceLimits { + export type AsObject = { + maxObjectSize: number, + maxMultipartSize: number, + maxParts: number, + storageQuota: number, + storageUsed: number, + } +} + +export class Filter extends jspb.Message { + getField(): string; + setField(value: string): Filter; + + getOperator(): string; + setOperator(value: string): Filter; + + getValue(): string; + setValue(value: string): Filter; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Filter.AsObject; + static toObject(includeInstance: boolean, msg: Filter): Filter.AsObject; + static serializeBinaryToWriter(message: Filter, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Filter; + static deserializeBinaryFromReader(message: Filter, reader: jspb.BinaryReader): Filter; +} + +export namespace Filter { + export type AsObject = { + field: string, + operator: string, + value: string, + } +} + +export class TimeRange extends jspb.Message { + getStart(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStart(value?: google_protobuf_timestamp_pb.Timestamp): TimeRange; + hasStart(): boolean; + clearStart(): TimeRange; + + getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined; + setEnd(value?: google_protobuf_timestamp_pb.Timestamp): TimeRange; + hasEnd(): boolean; + clearEnd(): TimeRange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimeRange.AsObject; + static toObject(includeInstance: boolean, msg: TimeRange): TimeRange.AsObject; + static serializeBinaryToWriter(message: TimeRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimeRange; + static deserializeBinaryFromReader(message: TimeRange, reader: jspb.BinaryReader): TimeRange; +} + +export namespace TimeRange { + export type AsObject = { + start?: google_protobuf_timestamp_pb.Timestamp.AsObject, + end?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + diff --git a/frontend/src/gen/common/common_pb.js b/frontend/src/gen/common/common_pb.js new file mode 100644 index 0000000..e8d6f97 --- /dev/null +++ b/frontend/src/gen/common/common_pb.js @@ -0,0 +1,3628 @@ +// source: common/common.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.s3web.common.AuditContext', null, global); +goog.exportSymbol('proto.s3web.common.Checksum', null, global); +goog.exportSymbol('proto.s3web.common.Checksum.Algorithm', null, global); +goog.exportSymbol('proto.s3web.common.ErrorDetail', null, global); +goog.exportSymbol('proto.s3web.common.Filter', null, global); +goog.exportSymbol('proto.s3web.common.HealthCheckResponse', null, global); +goog.exportSymbol('proto.s3web.common.HealthCheckResponse.Status', null, global); +goog.exportSymbol('proto.s3web.common.ObjectMetadata', null, global); +goog.exportSymbol('proto.s3web.common.ObjectVersion', null, global); +goog.exportSymbol('proto.s3web.common.PaginationRequest', null, global); +goog.exportSymbol('proto.s3web.common.PaginationResponse', null, global); +goog.exportSymbol('proto.s3web.common.Progress', null, global); +goog.exportSymbol('proto.s3web.common.ResourceLimits', null, global); +goog.exportSymbol('proto.s3web.common.TimeRange', null, global); +goog.exportSymbol('proto.s3web.common.UserIdentity', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.PaginationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.PaginationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.PaginationRequest.displayName = 'proto.s3web.common.PaginationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.PaginationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.PaginationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.PaginationResponse.displayName = 'proto.s3web.common.PaginationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.ErrorDetail = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.ErrorDetail, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.ErrorDetail.displayName = 'proto.s3web.common.ErrorDetail'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.HealthCheckResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.HealthCheckResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.HealthCheckResponse.displayName = 'proto.s3web.common.HealthCheckResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.UserIdentity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.common.UserIdentity.repeatedFields_, null); +}; +goog.inherits(proto.s3web.common.UserIdentity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.UserIdentity.displayName = 'proto.s3web.common.UserIdentity'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.AuditContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.AuditContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.AuditContext.displayName = 'proto.s3web.common.AuditContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.ObjectMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.ObjectMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.ObjectMetadata.displayName = 'proto.s3web.common.ObjectMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.ObjectVersion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.ObjectVersion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.ObjectVersion.displayName = 'proto.s3web.common.ObjectVersion'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.Checksum = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.Checksum, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.Checksum.displayName = 'proto.s3web.common.Checksum'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.Progress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.Progress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.Progress.displayName = 'proto.s3web.common.Progress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.ResourceLimits = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.ResourceLimits, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.ResourceLimits.displayName = 'proto.s3web.common.ResourceLimits'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.Filter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.Filter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.Filter.displayName = 'proto.s3web.common.Filter'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.common.TimeRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.common.TimeRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.common.TimeRange.displayName = 'proto.s3web.common.TimeRange'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.PaginationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.PaginationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.PaginationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.PaginationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + page: jspb.Message.getFieldWithDefault(msg, 1, 0), + pageSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + sortBy: jspb.Message.getFieldWithDefault(msg, 3, ""), + sortDesc: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.PaginationRequest} + */ +proto.s3web.common.PaginationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.PaginationRequest; + return proto.s3web.common.PaginationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.PaginationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.PaginationRequest} + */ +proto.s3web.common.PaginationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPage(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPageSize(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSortBy(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSortDesc(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.PaginationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.PaginationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.PaginationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.PaginationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPage(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getPageSize(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getSortBy(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSortDesc(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional int32 page = 1; + * @return {number} + */ +proto.s3web.common.PaginationRequest.prototype.getPage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.PaginationRequest} returns this + */ +proto.s3web.common.PaginationRequest.prototype.setPage = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 page_size = 2; + * @return {number} + */ +proto.s3web.common.PaginationRequest.prototype.getPageSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.PaginationRequest} returns this + */ +proto.s3web.common.PaginationRequest.prototype.setPageSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string sort_by = 3; + * @return {string} + */ +proto.s3web.common.PaginationRequest.prototype.getSortBy = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.PaginationRequest} returns this + */ +proto.s3web.common.PaginationRequest.prototype.setSortBy = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool sort_desc = 4; + * @return {boolean} + */ +proto.s3web.common.PaginationRequest.prototype.getSortDesc = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.common.PaginationRequest} returns this + */ +proto.s3web.common.PaginationRequest.prototype.setSortDesc = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.PaginationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.PaginationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.PaginationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.PaginationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + page: jspb.Message.getFieldWithDefault(msg, 1, 0), + pageSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalPages: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.PaginationResponse} + */ +proto.s3web.common.PaginationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.PaginationResponse; + return proto.s3web.common.PaginationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.PaginationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.PaginationResponse} + */ +proto.s3web.common.PaginationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPage(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPageSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalItems(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTotalPages(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.PaginationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.PaginationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.PaginationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.PaginationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPage(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getPageSize(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getTotalItems(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTotalPages(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional int32 page = 1; + * @return {number} + */ +proto.s3web.common.PaginationResponse.prototype.getPage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.PaginationResponse} returns this + */ +proto.s3web.common.PaginationResponse.prototype.setPage = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 page_size = 2; + * @return {number} + */ +proto.s3web.common.PaginationResponse.prototype.getPageSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.PaginationResponse} returns this + */ +proto.s3web.common.PaginationResponse.prototype.setPageSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 total_items = 3; + * @return {number} + */ +proto.s3web.common.PaginationResponse.prototype.getTotalItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.PaginationResponse} returns this + */ +proto.s3web.common.PaginationResponse.prototype.setTotalItems = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 total_pages = 4; + * @return {number} + */ +proto.s3web.common.PaginationResponse.prototype.getTotalPages = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.PaginationResponse} returns this + */ +proto.s3web.common.PaginationResponse.prototype.setTotalPages = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.ErrorDetail.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.ErrorDetail.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.ErrorDetail} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ErrorDetail.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, ""), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.ErrorDetail} + */ +proto.s3web.common.ErrorDetail.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.ErrorDetail; + return proto.s3web.common.ErrorDetail.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.ErrorDetail} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.ErrorDetail} + */ +proto.s3web.common.ErrorDetail.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.ErrorDetail.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.ErrorDetail.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.ErrorDetail} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ErrorDetail.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string code = 1; + * @return {string} + */ +proto.s3web.common.ErrorDetail.prototype.getCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ErrorDetail} returns this + */ +proto.s3web.common.ErrorDetail.prototype.setCode = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.s3web.common.ErrorDetail.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ErrorDetail} returns this + */ +proto.s3web.common.ErrorDetail.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.common.ErrorDetail.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.common.ErrorDetail} returns this + */ +proto.s3web.common.ErrorDetail.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.HealthCheckResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.HealthCheckResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.HealthCheckResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.HealthCheckResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: jspb.Message.getFieldWithDefault(msg, 1, 0), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + detailsMap: (f = msg.getDetailsMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.HealthCheckResponse} + */ +proto.s3web.common.HealthCheckResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.HealthCheckResponse; + return proto.s3web.common.HealthCheckResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.HealthCheckResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.HealthCheckResponse} + */ +proto.s3web.common.HealthCheckResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.common.HealthCheckResponse.Status} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 4: + var value = msg.getDetailsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.HealthCheckResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.HealthCheckResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.HealthCheckResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.HealthCheckResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getDetailsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * @enum {number} + */ +proto.s3web.common.HealthCheckResponse.Status = { + UNKNOWN: 0, + HEALTHY: 1, + DEGRADED: 2, + UNHEALTHY: 3 +}; + +/** + * optional Status status = 1; + * @return {!proto.s3web.common.HealthCheckResponse.Status} + */ +proto.s3web.common.HealthCheckResponse.prototype.getStatus = function() { + return /** @type {!proto.s3web.common.HealthCheckResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.common.HealthCheckResponse.Status} value + * @return {!proto.s3web.common.HealthCheckResponse} returns this + */ +proto.s3web.common.HealthCheckResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.s3web.common.HealthCheckResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.HealthCheckResponse} returns this + */ +proto.s3web.common.HealthCheckResponse.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.HealthCheckResponse.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.HealthCheckResponse} returns this +*/ +proto.s3web.common.HealthCheckResponse.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.HealthCheckResponse} returns this + */ +proto.s3web.common.HealthCheckResponse.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.HealthCheckResponse.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * map details = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.common.HealthCheckResponse.prototype.getDetailsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.common.HealthCheckResponse} returns this + */ +proto.s3web.common.HealthCheckResponse.prototype.clearDetailsMap = function() { + this.getDetailsMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.common.UserIdentity.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.UserIdentity.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.UserIdentity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.UserIdentity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.UserIdentity.toObject = function(includeInstance, msg) { + var f, obj = { + userId: jspb.Message.getFieldWithDefault(msg, 1, ""), + username: jspb.Message.getFieldWithDefault(msg, 2, ""), + email: jspb.Message.getFieldWithDefault(msg, 3, ""), + rolesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.UserIdentity} + */ +proto.s3web.common.UserIdentity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.UserIdentity; + return proto.s3web.common.UserIdentity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.UserIdentity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.UserIdentity} + */ +proto.s3web.common.UserIdentity.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setEmail(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addRoles(value); + break; + case 5: + var value = msg.getAttributesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.UserIdentity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.UserIdentity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.UserIdentity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.UserIdentity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEmail(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRolesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getAttributesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string user_id = 1; + * @return {string} + */ +proto.s3web.common.UserIdentity.prototype.getUserId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.UserIdentity} returns this + */ +proto.s3web.common.UserIdentity.prototype.setUserId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string username = 2; + * @return {string} + */ +proto.s3web.common.UserIdentity.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.UserIdentity} returns this + */ +proto.s3web.common.UserIdentity.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string email = 3; + * @return {string} + */ +proto.s3web.common.UserIdentity.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.UserIdentity} returns this + */ +proto.s3web.common.UserIdentity.prototype.setEmail = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated string roles = 4; + * @return {!Array} + */ +proto.s3web.common.UserIdentity.prototype.getRolesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.common.UserIdentity} returns this + */ +proto.s3web.common.UserIdentity.prototype.setRolesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.common.UserIdentity} returns this + */ +proto.s3web.common.UserIdentity.prototype.addRoles = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.common.UserIdentity} returns this + */ +proto.s3web.common.UserIdentity.prototype.clearRolesList = function() { + return this.setRolesList([]); +}; + + +/** + * map attributes = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.common.UserIdentity.prototype.getAttributesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.common.UserIdentity} returns this + */ +proto.s3web.common.UserIdentity.prototype.clearAttributesMap = function() { + this.getAttributesMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.AuditContext.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.AuditContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.AuditContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.AuditContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, ""), + user: (f = msg.getUser()) && proto.s3web.common.UserIdentity.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + sourceIp: jspb.Message.getFieldWithDefault(msg, 4, ""), + userAgent: jspb.Message.getFieldWithDefault(msg, 5, ""), + breakGlassMode: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + breakGlassJustification: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.AuditContext} + */ +proto.s3web.common.AuditContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.AuditContext; + return proto.s3web.common.AuditContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.AuditContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.AuditContext} + */ +proto.s3web.common.AuditContext.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestId(value); + break; + case 2: + var value = new proto.s3web.common.UserIdentity; + reader.readMessage(value,proto.s3web.common.UserIdentity.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceIp(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setUserAgent(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBreakGlassMode(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBreakGlassJustification(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.AuditContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.AuditContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.AuditContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.AuditContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUser(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.common.UserIdentity.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSourceIp(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getUserAgent(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getBreakGlassMode(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getBreakGlassJustification(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.s3web.common.AuditContext.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.AuditContext} returns this + */ +proto.s3web.common.AuditContext.prototype.setRequestId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional UserIdentity user = 2; + * @return {?proto.s3web.common.UserIdentity} + */ +proto.s3web.common.AuditContext.prototype.getUser = function() { + return /** @type{?proto.s3web.common.UserIdentity} */ ( + jspb.Message.getWrapperField(this, proto.s3web.common.UserIdentity, 2)); +}; + + +/** + * @param {?proto.s3web.common.UserIdentity|undefined} value + * @return {!proto.s3web.common.AuditContext} returns this +*/ +proto.s3web.common.AuditContext.prototype.setUser = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.AuditContext} returns this + */ +proto.s3web.common.AuditContext.prototype.clearUser = function() { + return this.setUser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.AuditContext.prototype.hasUser = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.AuditContext.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.AuditContext} returns this +*/ +proto.s3web.common.AuditContext.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.AuditContext} returns this + */ +proto.s3web.common.AuditContext.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.AuditContext.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string source_ip = 4; + * @return {string} + */ +proto.s3web.common.AuditContext.prototype.getSourceIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.AuditContext} returns this + */ +proto.s3web.common.AuditContext.prototype.setSourceIp = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string user_agent = 5; + * @return {string} + */ +proto.s3web.common.AuditContext.prototype.getUserAgent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.AuditContext} returns this + */ +proto.s3web.common.AuditContext.prototype.setUserAgent = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool break_glass_mode = 6; + * @return {boolean} + */ +proto.s3web.common.AuditContext.prototype.getBreakGlassMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.common.AuditContext} returns this + */ +proto.s3web.common.AuditContext.prototype.setBreakGlassMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string break_glass_justification = 7; + * @return {string} + */ +proto.s3web.common.AuditContext.prototype.getBreakGlassJustification = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.AuditContext} returns this + */ +proto.s3web.common.AuditContext.prototype.setBreakGlassJustification = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.ObjectMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.ObjectMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.ObjectMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ObjectMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + size: jspb.Message.getFieldWithDefault(msg, 2, 0), + etag: jspb.Message.getFieldWithDefault(msg, 3, ""), + lastModified: (f = msg.getLastModified()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + contentType: jspb.Message.getFieldWithDefault(msg, 5, ""), + storageClass: jspb.Message.getFieldWithDefault(msg, 6, ""), + userMetadataMap: (f = msg.getUserMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + systemMetadataMap: (f = msg.getSystemMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.ObjectMetadata} + */ +proto.s3web.common.ObjectMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.ObjectMetadata; + return proto.s3web.common.ObjectMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.ObjectMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.ObjectMetadata} + */ +proto.s3web.common.ObjectMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastModified(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setStorageClass(value); + break; + case 7: + var value = msg.getUserMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 8: + var value = msg.getSystemMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.ObjectMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.ObjectMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.ObjectMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ObjectMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLastModified(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getStorageClass(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getUserMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getSystemMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.s3web.common.ObjectMetadata.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 size = 2; + * @return {number} + */ +proto.s3web.common.ObjectMetadata.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string etag = 3; + * @return {string} + */ +proto.s3web.common.ObjectMetadata.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp last_modified = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.ObjectMetadata.prototype.getLastModified = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.ObjectMetadata} returns this +*/ +proto.s3web.common.ObjectMetadata.prototype.setLastModified = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.clearLastModified = function() { + return this.setLastModified(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.ObjectMetadata.prototype.hasLastModified = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string content_type = 5; + * @return {string} + */ +proto.s3web.common.ObjectMetadata.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string storage_class = 6; + * @return {string} + */ +proto.s3web.common.ObjectMetadata.prototype.getStorageClass = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.setStorageClass = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * map user_metadata = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.common.ObjectMetadata.prototype.getUserMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.clearUserMetadataMap = function() { + this.getUserMetadataMap().clear(); + return this;}; + + +/** + * map system_metadata = 8; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.common.ObjectMetadata.prototype.getSystemMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 8, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.common.ObjectMetadata} returns this + */ +proto.s3web.common.ObjectMetadata.prototype.clearSystemMetadataMap = function() { + this.getSystemMetadataMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.ObjectVersion.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.ObjectVersion.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.ObjectVersion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ObjectVersion.toObject = function(includeInstance, msg) { + var f, obj = { + versionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + isLatest: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + size: jspb.Message.getFieldWithDefault(msg, 4, 0), + etag: jspb.Message.getFieldWithDefault(msg, 5, ""), + isDeleteMarker: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.ObjectVersion} + */ +proto.s3web.common.ObjectVersion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.ObjectVersion; + return proto.s3web.common.ObjectVersion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.ObjectVersion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.ObjectVersion} + */ +proto.s3web.common.ObjectVersion.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsLatest(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsDeleteMarker(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.ObjectVersion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.ObjectVersion.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.ObjectVersion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ObjectVersion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIsLatest(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getIsDeleteMarker(); + if (f) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional string version_id = 1; + * @return {string} + */ +proto.s3web.common.ObjectVersion.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ObjectVersion} returns this + */ +proto.s3web.common.ObjectVersion.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool is_latest = 2; + * @return {boolean} + */ +proto.s3web.common.ObjectVersion.prototype.getIsLatest = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.common.ObjectVersion} returns this + */ +proto.s3web.common.ObjectVersion.prototype.setIsLatest = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.ObjectVersion.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.ObjectVersion} returns this +*/ +proto.s3web.common.ObjectVersion.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.ObjectVersion} returns this + */ +proto.s3web.common.ObjectVersion.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.ObjectVersion.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 size = 4; + * @return {number} + */ +proto.s3web.common.ObjectVersion.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.ObjectVersion} returns this + */ +proto.s3web.common.ObjectVersion.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string etag = 5; + * @return {string} + */ +proto.s3web.common.ObjectVersion.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.ObjectVersion} returns this + */ +proto.s3web.common.ObjectVersion.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool is_delete_marker = 6; + * @return {boolean} + */ +proto.s3web.common.ObjectVersion.prototype.getIsDeleteMarker = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.common.ObjectVersion} returns this + */ +proto.s3web.common.ObjectVersion.prototype.setIsDeleteMarker = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.Checksum.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.Checksum.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.Checksum} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.Checksum.toObject = function(includeInstance, msg) { + var f, obj = { + algorithm: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.Checksum} + */ +proto.s3web.common.Checksum.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.Checksum; + return proto.s3web.common.Checksum.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.Checksum} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.Checksum} + */ +proto.s3web.common.Checksum.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.common.Checksum.Algorithm} */ (reader.readEnum()); + msg.setAlgorithm(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.Checksum.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.Checksum.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.Checksum} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.Checksum.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAlgorithm(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.s3web.common.Checksum.Algorithm = { + UNKNOWN: 0, + MD5: 1, + SHA256: 2, + CRC32: 3, + CRC32C: 4 +}; + +/** + * optional Algorithm algorithm = 1; + * @return {!proto.s3web.common.Checksum.Algorithm} + */ +proto.s3web.common.Checksum.prototype.getAlgorithm = function() { + return /** @type {!proto.s3web.common.Checksum.Algorithm} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.common.Checksum.Algorithm} value + * @return {!proto.s3web.common.Checksum} returns this + */ +proto.s3web.common.Checksum.prototype.setAlgorithm = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.s3web.common.Checksum.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.Checksum} returns this + */ +proto.s3web.common.Checksum.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.Progress.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.Progress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.Progress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.Progress.toObject = function(includeInstance, msg) { + var f, obj = { + bytesProcessed: jspb.Message.getFieldWithDefault(msg, 1, 0), + bytesTotal: jspb.Message.getFieldWithDefault(msg, 2, 0), + percentage: jspb.Message.getFieldWithDefault(msg, 3, 0), + throughputBps: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + startedAt: (f = msg.getStartedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + estimatedCompletion: (f = msg.getEstimatedCompletion()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.Progress} + */ +proto.s3web.common.Progress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.Progress; + return proto.s3web.common.Progress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.Progress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.Progress} + */ +proto.s3web.common.Progress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBytesProcessed(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBytesTotal(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPercentage(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setThroughputBps(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStartedAt(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEstimatedCompletion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.Progress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.Progress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.Progress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.Progress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBytesProcessed(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getBytesTotal(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPercentage(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getThroughputBps(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getStartedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEstimatedCompletion(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 bytes_processed = 1; + * @return {number} + */ +proto.s3web.common.Progress.prototype.getBytesProcessed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.Progress} returns this + */ +proto.s3web.common.Progress.prototype.setBytesProcessed = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 bytes_total = 2; + * @return {number} + */ +proto.s3web.common.Progress.prototype.getBytesTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.Progress} returns this + */ +proto.s3web.common.Progress.prototype.setBytesTotal = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 percentage = 3; + * @return {number} + */ +proto.s3web.common.Progress.prototype.getPercentage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.Progress} returns this + */ +proto.s3web.common.Progress.prototype.setPercentage = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional double throughput_bps = 4; + * @return {number} + */ +proto.s3web.common.Progress.prototype.getThroughputBps = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.Progress} returns this + */ +proto.s3web.common.Progress.prototype.setThroughputBps = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp started_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.Progress.prototype.getStartedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.Progress} returns this +*/ +proto.s3web.common.Progress.prototype.setStartedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.Progress} returns this + */ +proto.s3web.common.Progress.prototype.clearStartedAt = function() { + return this.setStartedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.Progress.prototype.hasStartedAt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp estimated_completion = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.Progress.prototype.getEstimatedCompletion = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.Progress} returns this +*/ +proto.s3web.common.Progress.prototype.setEstimatedCompletion = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.Progress} returns this + */ +proto.s3web.common.Progress.prototype.clearEstimatedCompletion = function() { + return this.setEstimatedCompletion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.Progress.prototype.hasEstimatedCompletion = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.ResourceLimits.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.ResourceLimits.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.ResourceLimits} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ResourceLimits.toObject = function(includeInstance, msg) { + var f, obj = { + maxObjectSize: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxMultipartSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxParts: jspb.Message.getFieldWithDefault(msg, 3, 0), + storageQuota: jspb.Message.getFieldWithDefault(msg, 4, 0), + storageUsed: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.ResourceLimits} + */ +proto.s3web.common.ResourceLimits.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.ResourceLimits; + return proto.s3web.common.ResourceLimits.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.ResourceLimits} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.ResourceLimits} + */ +proto.s3web.common.ResourceLimits.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxObjectSize(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxMultipartSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxParts(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageQuota(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStorageUsed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.ResourceLimits.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.ResourceLimits.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.ResourceLimits} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.ResourceLimits.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxObjectSize(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxMultipartSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMaxParts(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getStorageQuota(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getStorageUsed(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional int64 max_object_size = 1; + * @return {number} + */ +proto.s3web.common.ResourceLimits.prototype.getMaxObjectSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.ResourceLimits} returns this + */ +proto.s3web.common.ResourceLimits.prototype.setMaxObjectSize = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_multipart_size = 2; + * @return {number} + */ +proto.s3web.common.ResourceLimits.prototype.getMaxMultipartSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.ResourceLimits} returns this + */ +proto.s3web.common.ResourceLimits.prototype.setMaxMultipartSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 max_parts = 3; + * @return {number} + */ +proto.s3web.common.ResourceLimits.prototype.getMaxParts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.ResourceLimits} returns this + */ +proto.s3web.common.ResourceLimits.prototype.setMaxParts = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 storage_quota = 4; + * @return {number} + */ +proto.s3web.common.ResourceLimits.prototype.getStorageQuota = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.ResourceLimits} returns this + */ +proto.s3web.common.ResourceLimits.prototype.setStorageQuota = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 storage_used = 5; + * @return {number} + */ +proto.s3web.common.ResourceLimits.prototype.getStorageUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.common.ResourceLimits} returns this + */ +proto.s3web.common.ResourceLimits.prototype.setStorageUsed = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.Filter.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.Filter.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.Filter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.Filter.toObject = function(includeInstance, msg) { + var f, obj = { + field: jspb.Message.getFieldWithDefault(msg, 1, ""), + operator: jspb.Message.getFieldWithDefault(msg, 2, ""), + value: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.Filter} + */ +proto.s3web.common.Filter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.Filter; + return proto.s3web.common.Filter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.Filter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.Filter} + */ +proto.s3web.common.Filter.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOperator(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.Filter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.Filter.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.Filter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.Filter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOperator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string field = 1; + * @return {string} + */ +proto.s3web.common.Filter.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.Filter} returns this + */ +proto.s3web.common.Filter.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string operator = 2; + * @return {string} + */ +proto.s3web.common.Filter.prototype.getOperator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.Filter} returns this + */ +proto.s3web.common.Filter.prototype.setOperator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string value = 3; + * @return {string} + */ +proto.s3web.common.Filter.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.common.Filter} returns this + */ +proto.s3web.common.Filter.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.common.TimeRange.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.common.TimeRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.common.TimeRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.TimeRange.toObject = function(includeInstance, msg) { + var f, obj = { + start: (f = msg.getStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + end: (f = msg.getEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.common.TimeRange} + */ +proto.s3web.common.TimeRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.common.TimeRange; + return proto.s3web.common.TimeRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.common.TimeRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.common.TimeRange} + */ +proto.s3web.common.TimeRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStart(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.common.TimeRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.common.TimeRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.common.TimeRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.common.TimeRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStart(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEnd(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp start = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.TimeRange.prototype.getStart = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.TimeRange} returns this +*/ +proto.s3web.common.TimeRange.prototype.setStart = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.TimeRange} returns this + */ +proto.s3web.common.TimeRange.prototype.clearStart = function() { + return this.setStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.TimeRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp end = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.common.TimeRange.prototype.getEnd = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.common.TimeRange} returns this +*/ +proto.s3web.common.TimeRange.prototype.setEnd = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.common.TimeRange} returns this + */ +proto.s3web.common.TimeRange.prototype.clearEnd = function() { + return this.setEnd(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.common.TimeRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.s3web.common); diff --git a/frontend/src/gen/location/LocationServiceClientPb.ts b/frontend/src/gen/location/LocationServiceClientPb.ts new file mode 100644 index 0000000..e0d1131 --- /dev/null +++ b/frontend/src/gen/location/LocationServiceClientPb.ts @@ -0,0 +1,646 @@ +/** + * @fileoverview gRPC-Web generated client stub for s3web.location + * @enhanceable + * @public + */ + +// Code generated by protoc-gen-grpc-web. DO NOT EDIT. +// versions: +// protoc-gen-grpc-web v1.5.0 +// protoc v3.14.0 +// source: location/location.proto + + +/* eslint-disable */ +// @ts-nocheck + + +import * as grpcWeb from 'grpc-web'; + +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" +import * as location_location_pb from '../location/location_pb'; // proto import: "location/location.proto" + + +export class LocationServiceClient { + client_: grpcWeb.AbstractClientBase; + hostname_: string; + credentials_: null | { [index: string]: string; }; + options_: null | { [index: string]: any; }; + + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: any; }) { + if (!options) options = {}; + if (!credentials) credentials = {}; + options['format'] = 'binary'; + + this.client_ = new grpcWeb.GrpcWebClientBase(options); + this.hostname_ = hostname.replace(/\/+$/, ''); + this.credentials_ = credentials; + this.options_ = options; + } + + methodDescriptorListLocations = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/ListLocations', + grpcWeb.MethodType.UNARY, + location_location_pb.ListLocationsRequest, + location_location_pb.ListLocationsResponse, + (request: location_location_pb.ListLocationsRequest) => { + return request.serializeBinary(); + }, + location_location_pb.ListLocationsResponse.deserializeBinary + ); + + listLocations( + request: location_location_pb.ListLocationsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + listLocations( + request: location_location_pb.ListLocationsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.ListLocationsResponse) => void): grpcWeb.ClientReadableStream; + + listLocations( + request: location_location_pb.ListLocationsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.ListLocationsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/ListLocations', + request, + metadata || {}, + this.methodDescriptorListLocations, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/ListLocations', + request, + metadata || {}, + this.methodDescriptorListLocations); + } + + methodDescriptorGetLocation = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/GetLocation', + grpcWeb.MethodType.UNARY, + location_location_pb.GetLocationRequest, + location_location_pb.GetLocationResponse, + (request: location_location_pb.GetLocationRequest) => { + return request.serializeBinary(); + }, + location_location_pb.GetLocationResponse.deserializeBinary + ); + + getLocation( + request: location_location_pb.GetLocationRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getLocation( + request: location_location_pb.GetLocationRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.GetLocationResponse) => void): grpcWeb.ClientReadableStream; + + getLocation( + request: location_location_pb.GetLocationRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.GetLocationResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/GetLocation', + request, + metadata || {}, + this.methodDescriptorGetLocation, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/GetLocation', + request, + metadata || {}, + this.methodDescriptorGetLocation); + } + + methodDescriptorCreateLocation = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/CreateLocation', + grpcWeb.MethodType.UNARY, + location_location_pb.CreateLocationRequest, + location_location_pb.CreateLocationResponse, + (request: location_location_pb.CreateLocationRequest) => { + return request.serializeBinary(); + }, + location_location_pb.CreateLocationResponse.deserializeBinary + ); + + createLocation( + request: location_location_pb.CreateLocationRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + createLocation( + request: location_location_pb.CreateLocationRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.CreateLocationResponse) => void): grpcWeb.ClientReadableStream; + + createLocation( + request: location_location_pb.CreateLocationRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.CreateLocationResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/CreateLocation', + request, + metadata || {}, + this.methodDescriptorCreateLocation, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/CreateLocation', + request, + metadata || {}, + this.methodDescriptorCreateLocation); + } + + methodDescriptorUpdateLocation = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/UpdateLocation', + grpcWeb.MethodType.UNARY, + location_location_pb.UpdateLocationRequest, + location_location_pb.UpdateLocationResponse, + (request: location_location_pb.UpdateLocationRequest) => { + return request.serializeBinary(); + }, + location_location_pb.UpdateLocationResponse.deserializeBinary + ); + + updateLocation( + request: location_location_pb.UpdateLocationRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + updateLocation( + request: location_location_pb.UpdateLocationRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.UpdateLocationResponse) => void): grpcWeb.ClientReadableStream; + + updateLocation( + request: location_location_pb.UpdateLocationRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.UpdateLocationResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/UpdateLocation', + request, + metadata || {}, + this.methodDescriptorUpdateLocation, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/UpdateLocation', + request, + metadata || {}, + this.methodDescriptorUpdateLocation); + } + + methodDescriptorDeleteLocation = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/DeleteLocation', + grpcWeb.MethodType.UNARY, + location_location_pb.DeleteLocationRequest, + location_location_pb.DeleteLocationResponse, + (request: location_location_pb.DeleteLocationRequest) => { + return request.serializeBinary(); + }, + location_location_pb.DeleteLocationResponse.deserializeBinary + ); + + deleteLocation( + request: location_location_pb.DeleteLocationRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + deleteLocation( + request: location_location_pb.DeleteLocationRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.DeleteLocationResponse) => void): grpcWeb.ClientReadableStream; + + deleteLocation( + request: location_location_pb.DeleteLocationRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.DeleteLocationResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/DeleteLocation', + request, + metadata || {}, + this.methodDescriptorDeleteLocation, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/DeleteLocation', + request, + metadata || {}, + this.methodDescriptorDeleteLocation); + } + + methodDescriptorTestLocation = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/TestLocation', + grpcWeb.MethodType.UNARY, + location_location_pb.TestLocationRequest, + location_location_pb.TestLocationResponse, + (request: location_location_pb.TestLocationRequest) => { + return request.serializeBinary(); + }, + location_location_pb.TestLocationResponse.deserializeBinary + ); + + testLocation( + request: location_location_pb.TestLocationRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + testLocation( + request: location_location_pb.TestLocationRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.TestLocationResponse) => void): grpcWeb.ClientReadableStream; + + testLocation( + request: location_location_pb.TestLocationRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.TestLocationResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/TestLocation', + request, + metadata || {}, + this.methodDescriptorTestLocation, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/TestLocation', + request, + metadata || {}, + this.methodDescriptorTestLocation); + } + + methodDescriptorListBuckets = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/ListBuckets', + grpcWeb.MethodType.UNARY, + location_location_pb.ListBucketsRequest, + location_location_pb.ListBucketsResponse, + (request: location_location_pb.ListBucketsRequest) => { + return request.serializeBinary(); + }, + location_location_pb.ListBucketsResponse.deserializeBinary + ); + + listBuckets( + request: location_location_pb.ListBucketsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + listBuckets( + request: location_location_pb.ListBucketsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.ListBucketsResponse) => void): grpcWeb.ClientReadableStream; + + listBuckets( + request: location_location_pb.ListBucketsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.ListBucketsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/ListBuckets', + request, + metadata || {}, + this.methodDescriptorListBuckets, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/ListBuckets', + request, + metadata || {}, + this.methodDescriptorListBuckets); + } + + methodDescriptorGetBucket = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/GetBucket', + grpcWeb.MethodType.UNARY, + location_location_pb.GetBucketRequest, + location_location_pb.GetBucketResponse, + (request: location_location_pb.GetBucketRequest) => { + return request.serializeBinary(); + }, + location_location_pb.GetBucketResponse.deserializeBinary + ); + + getBucket( + request: location_location_pb.GetBucketRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getBucket( + request: location_location_pb.GetBucketRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.GetBucketResponse) => void): grpcWeb.ClientReadableStream; + + getBucket( + request: location_location_pb.GetBucketRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.GetBucketResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/GetBucket', + request, + metadata || {}, + this.methodDescriptorGetBucket, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/GetBucket', + request, + metadata || {}, + this.methodDescriptorGetBucket); + } + + methodDescriptorListObjects = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/ListObjects', + grpcWeb.MethodType.UNARY, + location_location_pb.ListObjectsRequest, + location_location_pb.ListObjectsResponse, + (request: location_location_pb.ListObjectsRequest) => { + return request.serializeBinary(); + }, + location_location_pb.ListObjectsResponse.deserializeBinary + ); + + listObjects( + request: location_location_pb.ListObjectsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + listObjects( + request: location_location_pb.ListObjectsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.ListObjectsResponse) => void): grpcWeb.ClientReadableStream; + + listObjects( + request: location_location_pb.ListObjectsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.ListObjectsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/ListObjects', + request, + metadata || {}, + this.methodDescriptorListObjects, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/ListObjects', + request, + metadata || {}, + this.methodDescriptorListObjects); + } + + methodDescriptorGetObjectMetadata = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/GetObjectMetadata', + grpcWeb.MethodType.UNARY, + location_location_pb.GetObjectMetadataRequest, + location_location_pb.GetObjectMetadataResponse, + (request: location_location_pb.GetObjectMetadataRequest) => { + return request.serializeBinary(); + }, + location_location_pb.GetObjectMetadataResponse.deserializeBinary + ); + + getObjectMetadata( + request: location_location_pb.GetObjectMetadataRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getObjectMetadata( + request: location_location_pb.GetObjectMetadataRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.GetObjectMetadataResponse) => void): grpcWeb.ClientReadableStream; + + getObjectMetadata( + request: location_location_pb.GetObjectMetadataRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.GetObjectMetadataResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/GetObjectMetadata', + request, + metadata || {}, + this.methodDescriptorGetObjectMetadata, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/GetObjectMetadata', + request, + metadata || {}, + this.methodDescriptorGetObjectMetadata); + } + + methodDescriptorListObjectVersions = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/ListObjectVersions', + grpcWeb.MethodType.UNARY, + location_location_pb.ListObjectVersionsRequest, + location_location_pb.ListObjectVersionsResponse, + (request: location_location_pb.ListObjectVersionsRequest) => { + return request.serializeBinary(); + }, + location_location_pb.ListObjectVersionsResponse.deserializeBinary + ); + + listObjectVersions( + request: location_location_pb.ListObjectVersionsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + listObjectVersions( + request: location_location_pb.ListObjectVersionsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.ListObjectVersionsResponse) => void): grpcWeb.ClientReadableStream; + + listObjectVersions( + request: location_location_pb.ListObjectVersionsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.ListObjectVersionsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/ListObjectVersions', + request, + metadata || {}, + this.methodDescriptorListObjectVersions, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/ListObjectVersions', + request, + metadata || {}, + this.methodDescriptorListObjectVersions); + } + + methodDescriptorDeleteObjects = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/DeleteObjects', + grpcWeb.MethodType.UNARY, + location_location_pb.DeleteObjectsRequest, + location_location_pb.DeleteObjectsResponse, + (request: location_location_pb.DeleteObjectsRequest) => { + return request.serializeBinary(); + }, + location_location_pb.DeleteObjectsResponse.deserializeBinary + ); + + deleteObjects( + request: location_location_pb.DeleteObjectsRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + deleteObjects( + request: location_location_pb.DeleteObjectsRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.DeleteObjectsResponse) => void): grpcWeb.ClientReadableStream; + + deleteObjects( + request: location_location_pb.DeleteObjectsRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.DeleteObjectsResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/DeleteObjects', + request, + metadata || {}, + this.methodDescriptorDeleteObjects, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/DeleteObjects', + request, + metadata || {}, + this.methodDescriptorDeleteObjects); + } + + methodDescriptorGetPresignedDownloadURL = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/GetPresignedDownloadURL', + grpcWeb.MethodType.UNARY, + location_location_pb.GetPresignedDownloadURLRequest, + location_location_pb.GetPresignedDownloadURLResponse, + (request: location_location_pb.GetPresignedDownloadURLRequest) => { + return request.serializeBinary(); + }, + location_location_pb.GetPresignedDownloadURLResponse.deserializeBinary + ); + + getPresignedDownloadURL( + request: location_location_pb.GetPresignedDownloadURLRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getPresignedDownloadURL( + request: location_location_pb.GetPresignedDownloadURLRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: location_location_pb.GetPresignedDownloadURLResponse) => void): grpcWeb.ClientReadableStream; + + getPresignedDownloadURL( + request: location_location_pb.GetPresignedDownloadURLRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: location_location_pb.GetPresignedDownloadURLResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/GetPresignedDownloadURL', + request, + metadata || {}, + this.methodDescriptorGetPresignedDownloadURL, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/GetPresignedDownloadURL', + request, + metadata || {}, + this.methodDescriptorGetPresignedDownloadURL); + } + + methodDescriptorHealthCheck = new grpcWeb.MethodDescriptor( + '/s3web.location.LocationService/HealthCheck', + grpcWeb.MethodType.UNARY, + common_common_pb.HealthCheckResponse, + common_common_pb.HealthCheckResponse, + (request: common_common_pb.HealthCheckResponse) => { + return request.serializeBinary(); + }, + common_common_pb.HealthCheckResponse.deserializeBinary + ); + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null): Promise; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void): grpcWeb.ClientReadableStream; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.location.LocationService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.location.LocationService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck); + } + +} + diff --git a/frontend/src/gen/location/location_pb.d.ts b/frontend/src/gen/location/location_pb.d.ts new file mode 100644 index 0000000..c860182 --- /dev/null +++ b/frontend/src/gen/location/location_pb.d.ts @@ -0,0 +1,1093 @@ +import * as jspb from 'google-protobuf' + +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class Location extends jspb.Message { + getId(): string; + setId(value: string): Location; + + getName(): string; + setName(value: string): Location; + + getDescription(): string; + setDescription(value: string): Location; + + getProviderType(): ProviderType; + setProviderType(value: ProviderType): Location; + + getEndpointUrl(): string; + setEndpointUrl(value: string): Location; + + getRegion(): string; + setRegion(value: string): Location; + + getUseSsl(): boolean; + setUseSsl(value: boolean): Location; + + getCapabilities(): LocationCapabilities | undefined; + setCapabilities(value?: LocationCapabilities): Location; + hasCapabilities(): boolean; + clearCapabilities(): Location; + + getHealth(): LocationHealth | undefined; + setHealth(value?: LocationHealth): Location; + hasHealth(): boolean; + clearHealth(): Location; + + getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): Location; + hasCreatedAt(): boolean; + clearCreatedAt(): Location; + + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): Location; + hasUpdatedAt(): boolean; + clearUpdatedAt(): Location; + + getTagsMap(): jspb.Map; + clearTagsMap(): Location; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; +} + +export namespace Location { + export type AsObject = { + id: string, + name: string, + description: string, + providerType: ProviderType, + endpointUrl: string, + region: string, + useSsl: boolean, + capabilities?: LocationCapabilities.AsObject, + health?: LocationHealth.AsObject, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + tagsMap: Array<[string, string]>, + } +} + +export class LocationCapabilities extends jspb.Message { + getVersioning(): boolean; + setVersioning(value: boolean): LocationCapabilities; + + getObjectLock(): boolean; + setObjectLock(value: boolean): LocationCapabilities; + + getLifecyclePolicies(): boolean; + setLifecyclePolicies(value: boolean): LocationCapabilities; + + getReplication(): boolean; + setReplication(value: boolean): LocationCapabilities; + + getServerSideEncryption(): boolean; + setServerSideEncryption(value: boolean): LocationCapabilities; + + getMultipartUpload(): boolean; + setMultipartUpload(value: boolean): LocationCapabilities; + + getMaxMultipartSize(): number; + setMaxMultipartSize(value: number): LocationCapabilities; + + getMaxParts(): number; + setMaxParts(value: number): LocationCapabilities; + + getSupportedStorageClassesList(): Array; + setSupportedStorageClassesList(value: Array): LocationCapabilities; + clearSupportedStorageClassesList(): LocationCapabilities; + addSupportedStorageClasses(value: string, index?: number): LocationCapabilities; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocationCapabilities.AsObject; + static toObject(includeInstance: boolean, msg: LocationCapabilities): LocationCapabilities.AsObject; + static serializeBinaryToWriter(message: LocationCapabilities, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocationCapabilities; + static deserializeBinaryFromReader(message: LocationCapabilities, reader: jspb.BinaryReader): LocationCapabilities; +} + +export namespace LocationCapabilities { + export type AsObject = { + versioning: boolean, + objectLock: boolean, + lifecyclePolicies: boolean, + replication: boolean, + serverSideEncryption: boolean, + multipartUpload: boolean, + maxMultipartSize: number, + maxParts: number, + supportedStorageClassesList: Array, + } +} + +export class LocationHealth extends jspb.Message { + getStatus(): LocationHealth.Status; + setStatus(value: LocationHealth.Status): LocationHealth; + + getLastCheck(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastCheck(value?: google_protobuf_timestamp_pb.Timestamp): LocationHealth; + hasLastCheck(): boolean; + clearLastCheck(): LocationHealth; + + getLatencyMs(): number; + setLatencyMs(value: number): LocationHealth; + + getErrorMessage(): string; + setErrorMessage(value: string): LocationHealth; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocationHealth.AsObject; + static toObject(includeInstance: boolean, msg: LocationHealth): LocationHealth.AsObject; + static serializeBinaryToWriter(message: LocationHealth, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocationHealth; + static deserializeBinaryFromReader(message: LocationHealth, reader: jspb.BinaryReader): LocationHealth; +} + +export namespace LocationHealth { + export type AsObject = { + status: LocationHealth.Status, + lastCheck?: google_protobuf_timestamp_pb.Timestamp.AsObject, + latencyMs: number, + errorMessage: string, + } + + export enum Status { + UNKNOWN = 0, + HEALTHY = 1, + DEGRADED = 2, + UNHEALTHY = 3, + } +} + +export class Bucket extends jspb.Message { + getName(): string; + setName(value: string): Bucket; + + getLocationId(): string; + setLocationId(value: string): Bucket; + + getCreationDate(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreationDate(value?: google_protobuf_timestamp_pb.Timestamp): Bucket; + hasCreationDate(): boolean; + clearCreationDate(): Bucket; + + getVersioningEnabled(): boolean; + setVersioningEnabled(value: boolean): Bucket; + + getObjectLockEnabled(): boolean; + setObjectLockEnabled(value: boolean): Bucket; + + getObjectCount(): number; + setObjectCount(value: number): Bucket; + + getTotalSize(): number; + setTotalSize(value: number): Bucket; + + getTagsMap(): jspb.Map; + clearTagsMap(): Bucket; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Bucket.AsObject; + static toObject(includeInstance: boolean, msg: Bucket): Bucket.AsObject; + static serializeBinaryToWriter(message: Bucket, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Bucket; + static deserializeBinaryFromReader(message: Bucket, reader: jspb.BinaryReader): Bucket; +} + +export namespace Bucket { + export type AsObject = { + name: string, + locationId: string, + creationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject, + versioningEnabled: boolean, + objectLockEnabled: boolean, + objectCount: number, + totalSize: number, + tagsMap: Array<[string, string]>, + } +} + +export class Object extends jspb.Message { + getKey(): string; + setKey(value: string): Object; + + getBucket(): string; + setBucket(value: string): Object; + + getLocationId(): string; + setLocationId(value: string): Object; + + getSize(): number; + setSize(value: number): Object; + + getEtag(): string; + setEtag(value: string): Object; + + getLastModified(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastModified(value?: google_protobuf_timestamp_pb.Timestamp): Object; + hasLastModified(): boolean; + clearLastModified(): Object; + + getContentType(): string; + setContentType(value: string): Object; + + getStorageClass(): string; + setStorageClass(value: string): Object; + + getIsPrefix(): boolean; + setIsPrefix(value: boolean): Object; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): Object; + + getTagsMap(): jspb.Map; + clearTagsMap(): Object; + + getVersionId(): string; + setVersionId(value: string): Object; + + getIsLatest(): boolean; + setIsLatest(value: boolean): Object; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Object.AsObject; + static toObject(includeInstance: boolean, msg: Object): Object.AsObject; + static serializeBinaryToWriter(message: Object, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Object; + static deserializeBinaryFromReader(message: Object, reader: jspb.BinaryReader): Object; +} + +export namespace Object { + export type AsObject = { + key: string, + bucket: string, + locationId: string, + size: number, + etag: string, + lastModified?: google_protobuf_timestamp_pb.Timestamp.AsObject, + contentType: string, + storageClass: string, + isPrefix: boolean, + metadataMap: Array<[string, string]>, + tagsMap: Array<[string, string]>, + versionId: string, + isLatest: boolean, + } +} + +export class ListLocationsRequest extends jspb.Message { + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ListLocationsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ListLocationsRequest; + + getPagination(): common_common_pb.PaginationRequest | undefined; + setPagination(value?: common_common_pb.PaginationRequest): ListLocationsRequest; + hasPagination(): boolean; + clearPagination(): ListLocationsRequest; + + getFiltersList(): Array; + setFiltersList(value: Array): ListLocationsRequest; + clearFiltersList(): ListLocationsRequest; + addFilters(value?: common_common_pb.Filter, index?: number): common_common_pb.Filter; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListLocationsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListLocationsRequest): ListLocationsRequest.AsObject; + static serializeBinaryToWriter(message: ListLocationsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListLocationsRequest; + static deserializeBinaryFromReader(message: ListLocationsRequest, reader: jspb.BinaryReader): ListLocationsRequest; +} + +export namespace ListLocationsRequest { + export type AsObject = { + auditContext?: common_common_pb.AuditContext.AsObject, + pagination?: common_common_pb.PaginationRequest.AsObject, + filtersList: Array, + } +} + +export class ListLocationsResponse extends jspb.Message { + getLocationsList(): Array; + setLocationsList(value: Array): ListLocationsResponse; + clearLocationsList(): ListLocationsResponse; + addLocations(value?: Location, index?: number): Location; + + getPagination(): common_common_pb.PaginationResponse | undefined; + setPagination(value?: common_common_pb.PaginationResponse): ListLocationsResponse; + hasPagination(): boolean; + clearPagination(): ListLocationsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListLocationsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListLocationsResponse): ListLocationsResponse.AsObject; + static serializeBinaryToWriter(message: ListLocationsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListLocationsResponse; + static deserializeBinaryFromReader(message: ListLocationsResponse, reader: jspb.BinaryReader): ListLocationsResponse; +} + +export namespace ListLocationsResponse { + export type AsObject = { + locationsList: Array, + pagination?: common_common_pb.PaginationResponse.AsObject, + } +} + +export class GetLocationRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetLocationRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetLocationRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetLocationRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLocationRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetLocationRequest): GetLocationRequest.AsObject; + static serializeBinaryToWriter(message: GetLocationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLocationRequest; + static deserializeBinaryFromReader(message: GetLocationRequest, reader: jspb.BinaryReader): GetLocationRequest; +} + +export namespace GetLocationRequest { + export type AsObject = { + locationId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetLocationResponse extends jspb.Message { + getLocation(): Location | undefined; + setLocation(value?: Location): GetLocationResponse; + hasLocation(): boolean; + clearLocation(): GetLocationResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLocationResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetLocationResponse): GetLocationResponse.AsObject; + static serializeBinaryToWriter(message: GetLocationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLocationResponse; + static deserializeBinaryFromReader(message: GetLocationResponse, reader: jspb.BinaryReader): GetLocationResponse; +} + +export namespace GetLocationResponse { + export type AsObject = { + location?: Location.AsObject, + } +} + +export class CreateLocationRequest extends jspb.Message { + getName(): string; + setName(value: string): CreateLocationRequest; + + getDescription(): string; + setDescription(value: string): CreateLocationRequest; + + getProviderType(): ProviderType; + setProviderType(value: ProviderType): CreateLocationRequest; + + getEndpointUrl(): string; + setEndpointUrl(value: string): CreateLocationRequest; + + getRegion(): string; + setRegion(value: string): CreateLocationRequest; + + getAccessKey(): string; + setAccessKey(value: string): CreateLocationRequest; + + getSecretKey(): string; + setSecretKey(value: string): CreateLocationRequest; + + getUseSsl(): boolean; + setUseSsl(value: boolean): CreateLocationRequest; + + getTagsMap(): jspb.Map; + clearTagsMap(): CreateLocationRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CreateLocationRequest; + hasAuditContext(): boolean; + clearAuditContext(): CreateLocationRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateLocationRequest.AsObject; + static toObject(includeInstance: boolean, msg: CreateLocationRequest): CreateLocationRequest.AsObject; + static serializeBinaryToWriter(message: CreateLocationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateLocationRequest; + static deserializeBinaryFromReader(message: CreateLocationRequest, reader: jspb.BinaryReader): CreateLocationRequest; +} + +export namespace CreateLocationRequest { + export type AsObject = { + name: string, + description: string, + providerType: ProviderType, + endpointUrl: string, + region: string, + accessKey: string, + secretKey: string, + useSsl: boolean, + tagsMap: Array<[string, string]>, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CreateLocationResponse extends jspb.Message { + getLocation(): Location | undefined; + setLocation(value?: Location): CreateLocationResponse; + hasLocation(): boolean; + clearLocation(): CreateLocationResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateLocationResponse.AsObject; + static toObject(includeInstance: boolean, msg: CreateLocationResponse): CreateLocationResponse.AsObject; + static serializeBinaryToWriter(message: CreateLocationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateLocationResponse; + static deserializeBinaryFromReader(message: CreateLocationResponse, reader: jspb.BinaryReader): CreateLocationResponse; +} + +export namespace CreateLocationResponse { + export type AsObject = { + location?: Location.AsObject, + } +} + +export class UpdateLocationRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): UpdateLocationRequest; + + getName(): string; + setName(value: string): UpdateLocationRequest; + + getDescription(): string; + setDescription(value: string): UpdateLocationRequest; + + getEndpointUrl(): string; + setEndpointUrl(value: string): UpdateLocationRequest; + + getRegion(): string; + setRegion(value: string): UpdateLocationRequest; + + getAccessKey(): string; + setAccessKey(value: string): UpdateLocationRequest; + + getSecretKey(): string; + setSecretKey(value: string): UpdateLocationRequest; + + getUseSsl(): boolean; + setUseSsl(value: boolean): UpdateLocationRequest; + + getTagsMap(): jspb.Map; + clearTagsMap(): UpdateLocationRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): UpdateLocationRequest; + hasAuditContext(): boolean; + clearAuditContext(): UpdateLocationRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateLocationRequest.AsObject; + static toObject(includeInstance: boolean, msg: UpdateLocationRequest): UpdateLocationRequest.AsObject; + static serializeBinaryToWriter(message: UpdateLocationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateLocationRequest; + static deserializeBinaryFromReader(message: UpdateLocationRequest, reader: jspb.BinaryReader): UpdateLocationRequest; +} + +export namespace UpdateLocationRequest { + export type AsObject = { + locationId: string, + name: string, + description: string, + endpointUrl: string, + region: string, + accessKey: string, + secretKey: string, + useSsl: boolean, + tagsMap: Array<[string, string]>, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class UpdateLocationResponse extends jspb.Message { + getLocation(): Location | undefined; + setLocation(value?: Location): UpdateLocationResponse; + hasLocation(): boolean; + clearLocation(): UpdateLocationResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateLocationResponse.AsObject; + static toObject(includeInstance: boolean, msg: UpdateLocationResponse): UpdateLocationResponse.AsObject; + static serializeBinaryToWriter(message: UpdateLocationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateLocationResponse; + static deserializeBinaryFromReader(message: UpdateLocationResponse, reader: jspb.BinaryReader): UpdateLocationResponse; +} + +export namespace UpdateLocationResponse { + export type AsObject = { + location?: Location.AsObject, + } +} + +export class DeleteLocationRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): DeleteLocationRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): DeleteLocationRequest; + hasAuditContext(): boolean; + clearAuditContext(): DeleteLocationRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteLocationRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteLocationRequest): DeleteLocationRequest.AsObject; + static serializeBinaryToWriter(message: DeleteLocationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteLocationRequest; + static deserializeBinaryFromReader(message: DeleteLocationRequest, reader: jspb.BinaryReader): DeleteLocationRequest; +} + +export namespace DeleteLocationRequest { + export type AsObject = { + locationId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class DeleteLocationResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): DeleteLocationResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteLocationResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteLocationResponse): DeleteLocationResponse.AsObject; + static serializeBinaryToWriter(message: DeleteLocationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteLocationResponse; + static deserializeBinaryFromReader(message: DeleteLocationResponse, reader: jspb.BinaryReader): DeleteLocationResponse; +} + +export namespace DeleteLocationResponse { + export type AsObject = { + success: boolean, + } +} + +export class TestLocationRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): TestLocationRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): TestLocationRequest; + hasAuditContext(): boolean; + clearAuditContext(): TestLocationRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TestLocationRequest.AsObject; + static toObject(includeInstance: boolean, msg: TestLocationRequest): TestLocationRequest.AsObject; + static serializeBinaryToWriter(message: TestLocationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TestLocationRequest; + static deserializeBinaryFromReader(message: TestLocationRequest, reader: jspb.BinaryReader): TestLocationRequest; +} + +export namespace TestLocationRequest { + export type AsObject = { + locationId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class TestLocationResponse extends jspb.Message { + getHealth(): LocationHealth | undefined; + setHealth(value?: LocationHealth): TestLocationResponse; + hasHealth(): boolean; + clearHealth(): TestLocationResponse; + + getCapabilities(): LocationCapabilities | undefined; + setCapabilities(value?: LocationCapabilities): TestLocationResponse; + hasCapabilities(): boolean; + clearCapabilities(): TestLocationResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TestLocationResponse.AsObject; + static toObject(includeInstance: boolean, msg: TestLocationResponse): TestLocationResponse.AsObject; + static serializeBinaryToWriter(message: TestLocationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TestLocationResponse; + static deserializeBinaryFromReader(message: TestLocationResponse, reader: jspb.BinaryReader): TestLocationResponse; +} + +export namespace TestLocationResponse { + export type AsObject = { + health?: LocationHealth.AsObject, + capabilities?: LocationCapabilities.AsObject, + } +} + +export class ListBucketsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ListBucketsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ListBucketsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ListBucketsRequest; + + getPagination(): common_common_pb.PaginationRequest | undefined; + setPagination(value?: common_common_pb.PaginationRequest): ListBucketsRequest; + hasPagination(): boolean; + clearPagination(): ListBucketsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListBucketsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListBucketsRequest): ListBucketsRequest.AsObject; + static serializeBinaryToWriter(message: ListBucketsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListBucketsRequest; + static deserializeBinaryFromReader(message: ListBucketsRequest, reader: jspb.BinaryReader): ListBucketsRequest; +} + +export namespace ListBucketsRequest { + export type AsObject = { + locationId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + pagination?: common_common_pb.PaginationRequest.AsObject, + } +} + +export class ListBucketsResponse extends jspb.Message { + getBucketsList(): Array; + setBucketsList(value: Array): ListBucketsResponse; + clearBucketsList(): ListBucketsResponse; + addBuckets(value?: Bucket, index?: number): Bucket; + + getPagination(): common_common_pb.PaginationResponse | undefined; + setPagination(value?: common_common_pb.PaginationResponse): ListBucketsResponse; + hasPagination(): boolean; + clearPagination(): ListBucketsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListBucketsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListBucketsResponse): ListBucketsResponse.AsObject; + static serializeBinaryToWriter(message: ListBucketsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListBucketsResponse; + static deserializeBinaryFromReader(message: ListBucketsResponse, reader: jspb.BinaryReader): ListBucketsResponse; +} + +export namespace ListBucketsResponse { + export type AsObject = { + bucketsList: Array, + pagination?: common_common_pb.PaginationResponse.AsObject, + } +} + +export class GetBucketRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetBucketRequest; + + getBucketName(): string; + setBucketName(value: string): GetBucketRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetBucketRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetBucketRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBucketRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetBucketRequest): GetBucketRequest.AsObject; + static serializeBinaryToWriter(message: GetBucketRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBucketRequest; + static deserializeBinaryFromReader(message: GetBucketRequest, reader: jspb.BinaryReader): GetBucketRequest; +} + +export namespace GetBucketRequest { + export type AsObject = { + locationId: string, + bucketName: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetBucketResponse extends jspb.Message { + getBucket(): Bucket | undefined; + setBucket(value?: Bucket): GetBucketResponse; + hasBucket(): boolean; + clearBucket(): GetBucketResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetBucketResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetBucketResponse): GetBucketResponse.AsObject; + static serializeBinaryToWriter(message: GetBucketResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetBucketResponse; + static deserializeBinaryFromReader(message: GetBucketResponse, reader: jspb.BinaryReader): GetBucketResponse; +} + +export namespace GetBucketResponse { + export type AsObject = { + bucket?: Bucket.AsObject, + } +} + +export class ListObjectsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ListObjectsRequest; + + getBucketName(): string; + setBucketName(value: string): ListObjectsRequest; + + getPrefix(): string; + setPrefix(value: string): ListObjectsRequest; + + getDelimiter(): string; + setDelimiter(value: string): ListObjectsRequest; + + getMaxKeys(): number; + setMaxKeys(value: number): ListObjectsRequest; + + getContinuationToken(): string; + setContinuationToken(value: string): ListObjectsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ListObjectsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ListObjectsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListObjectsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListObjectsRequest): ListObjectsRequest.AsObject; + static serializeBinaryToWriter(message: ListObjectsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListObjectsRequest; + static deserializeBinaryFromReader(message: ListObjectsRequest, reader: jspb.BinaryReader): ListObjectsRequest; +} + +export namespace ListObjectsRequest { + export type AsObject = { + locationId: string, + bucketName: string, + prefix: string, + delimiter: string, + maxKeys: number, + continuationToken: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ListObjectsResponse extends jspb.Message { + getObjectsList(): Array; + setObjectsList(value: Array): ListObjectsResponse; + clearObjectsList(): ListObjectsResponse; + addObjects(value?: Object, index?: number): Object; + + getCommonPrefixesList(): Array; + setCommonPrefixesList(value: Array): ListObjectsResponse; + clearCommonPrefixesList(): ListObjectsResponse; + addCommonPrefixes(value: string, index?: number): ListObjectsResponse; + + getNextContinuationToken(): string; + setNextContinuationToken(value: string): ListObjectsResponse; + + getIsTruncated(): boolean; + setIsTruncated(value: boolean): ListObjectsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListObjectsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListObjectsResponse): ListObjectsResponse.AsObject; + static serializeBinaryToWriter(message: ListObjectsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListObjectsResponse; + static deserializeBinaryFromReader(message: ListObjectsResponse, reader: jspb.BinaryReader): ListObjectsResponse; +} + +export namespace ListObjectsResponse { + export type AsObject = { + objectsList: Array, + commonPrefixesList: Array, + nextContinuationToken: string, + isTruncated: boolean, + } +} + +export class GetObjectMetadataRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetObjectMetadataRequest; + + getBucketName(): string; + setBucketName(value: string): GetObjectMetadataRequest; + + getObjectKey(): string; + setObjectKey(value: string): GetObjectMetadataRequest; + + getVersionId(): string; + setVersionId(value: string): GetObjectMetadataRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetObjectMetadataRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetObjectMetadataRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetObjectMetadataRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetObjectMetadataRequest): GetObjectMetadataRequest.AsObject; + static serializeBinaryToWriter(message: GetObjectMetadataRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetObjectMetadataRequest; + static deserializeBinaryFromReader(message: GetObjectMetadataRequest, reader: jspb.BinaryReader): GetObjectMetadataRequest; +} + +export namespace GetObjectMetadataRequest { + export type AsObject = { + locationId: string, + bucketName: string, + objectKey: string, + versionId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetObjectMetadataResponse extends jspb.Message { + getObject(): Object | undefined; + setObject(value?: Object): GetObjectMetadataResponse; + hasObject(): boolean; + clearObject(): GetObjectMetadataResponse; + + getMetadata(): common_common_pb.ObjectMetadata | undefined; + setMetadata(value?: common_common_pb.ObjectMetadata): GetObjectMetadataResponse; + hasMetadata(): boolean; + clearMetadata(): GetObjectMetadataResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetObjectMetadataResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetObjectMetadataResponse): GetObjectMetadataResponse.AsObject; + static serializeBinaryToWriter(message: GetObjectMetadataResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetObjectMetadataResponse; + static deserializeBinaryFromReader(message: GetObjectMetadataResponse, reader: jspb.BinaryReader): GetObjectMetadataResponse; +} + +export namespace GetObjectMetadataResponse { + export type AsObject = { + object?: Object.AsObject, + metadata?: common_common_pb.ObjectMetadata.AsObject, + } +} + +export class ListObjectVersionsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): ListObjectVersionsRequest; + + getBucketName(): string; + setBucketName(value: string): ListObjectVersionsRequest; + + getObjectKey(): string; + setObjectKey(value: string): ListObjectVersionsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ListObjectVersionsRequest; + hasAuditContext(): boolean; + clearAuditContext(): ListObjectVersionsRequest; + + getPagination(): common_common_pb.PaginationRequest | undefined; + setPagination(value?: common_common_pb.PaginationRequest): ListObjectVersionsRequest; + hasPagination(): boolean; + clearPagination(): ListObjectVersionsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListObjectVersionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListObjectVersionsRequest): ListObjectVersionsRequest.AsObject; + static serializeBinaryToWriter(message: ListObjectVersionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListObjectVersionsRequest; + static deserializeBinaryFromReader(message: ListObjectVersionsRequest, reader: jspb.BinaryReader): ListObjectVersionsRequest; +} + +export namespace ListObjectVersionsRequest { + export type AsObject = { + locationId: string, + bucketName: string, + objectKey: string, + auditContext?: common_common_pb.AuditContext.AsObject, + pagination?: common_common_pb.PaginationRequest.AsObject, + } +} + +export class ListObjectVersionsResponse extends jspb.Message { + getVersionsList(): Array; + setVersionsList(value: Array): ListObjectVersionsResponse; + clearVersionsList(): ListObjectVersionsResponse; + addVersions(value?: common_common_pb.ObjectVersion, index?: number): common_common_pb.ObjectVersion; + + getPagination(): common_common_pb.PaginationResponse | undefined; + setPagination(value?: common_common_pb.PaginationResponse): ListObjectVersionsResponse; + hasPagination(): boolean; + clearPagination(): ListObjectVersionsResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListObjectVersionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListObjectVersionsResponse): ListObjectVersionsResponse.AsObject; + static serializeBinaryToWriter(message: ListObjectVersionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListObjectVersionsResponse; + static deserializeBinaryFromReader(message: ListObjectVersionsResponse, reader: jspb.BinaryReader): ListObjectVersionsResponse; +} + +export namespace ListObjectVersionsResponse { + export type AsObject = { + versionsList: Array, + pagination?: common_common_pb.PaginationResponse.AsObject, + } +} + +export class DeleteObjectsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): DeleteObjectsRequest; + + getBucketName(): string; + setBucketName(value: string): DeleteObjectsRequest; + + getObjectKeysList(): Array; + setObjectKeysList(value: Array): DeleteObjectsRequest; + clearObjectKeysList(): DeleteObjectsRequest; + addObjectKeys(value: string, index?: number): DeleteObjectsRequest; + + getPermanent(): boolean; + setPermanent(value: boolean): DeleteObjectsRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): DeleteObjectsRequest; + hasAuditContext(): boolean; + clearAuditContext(): DeleteObjectsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteObjectsRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteObjectsRequest): DeleteObjectsRequest.AsObject; + static serializeBinaryToWriter(message: DeleteObjectsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteObjectsRequest; + static deserializeBinaryFromReader(message: DeleteObjectsRequest, reader: jspb.BinaryReader): DeleteObjectsRequest; +} + +export namespace DeleteObjectsRequest { + export type AsObject = { + locationId: string, + bucketName: string, + objectKeysList: Array, + permanent: boolean, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class DeleteObjectsResponse extends jspb.Message { + getResultsList(): Array; + setResultsList(value: Array): DeleteObjectsResponse; + clearResultsList(): DeleteObjectsResponse; + addResults(value?: DeleteObjectsResponse.DeleteResult, index?: number): DeleteObjectsResponse.DeleteResult; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteObjectsResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteObjectsResponse): DeleteObjectsResponse.AsObject; + static serializeBinaryToWriter(message: DeleteObjectsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteObjectsResponse; + static deserializeBinaryFromReader(message: DeleteObjectsResponse, reader: jspb.BinaryReader): DeleteObjectsResponse; +} + +export namespace DeleteObjectsResponse { + export type AsObject = { + resultsList: Array, + } + + export class DeleteResult extends jspb.Message { + getKey(): string; + setKey(value: string): DeleteResult; + + getSuccess(): boolean; + setSuccess(value: boolean): DeleteResult; + + getErrorMessage(): string; + setErrorMessage(value: string): DeleteResult; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteResult.AsObject; + static toObject(includeInstance: boolean, msg: DeleteResult): DeleteResult.AsObject; + static serializeBinaryToWriter(message: DeleteResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteResult; + static deserializeBinaryFromReader(message: DeleteResult, reader: jspb.BinaryReader): DeleteResult; + } + + export namespace DeleteResult { + export type AsObject = { + key: string, + success: boolean, + errorMessage: string, + } + } + +} + +export class GetPresignedDownloadURLRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetPresignedDownloadURLRequest; + + getBucketName(): string; + setBucketName(value: string): GetPresignedDownloadURLRequest; + + getObjectKey(): string; + setObjectKey(value: string): GetPresignedDownloadURLRequest; + + getVersionId(): string; + setVersionId(value: string): GetPresignedDownloadURLRequest; + + getExpirySeconds(): number; + setExpirySeconds(value: number): GetPresignedDownloadURLRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetPresignedDownloadURLRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetPresignedDownloadURLRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPresignedDownloadURLRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPresignedDownloadURLRequest): GetPresignedDownloadURLRequest.AsObject; + static serializeBinaryToWriter(message: GetPresignedDownloadURLRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPresignedDownloadURLRequest; + static deserializeBinaryFromReader(message: GetPresignedDownloadURLRequest, reader: jspb.BinaryReader): GetPresignedDownloadURLRequest; +} + +export namespace GetPresignedDownloadURLRequest { + export type AsObject = { + locationId: string, + bucketName: string, + objectKey: string, + versionId: string, + expirySeconds: number, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetPresignedDownloadURLResponse extends jspb.Message { + getUrl(): string; + setUrl(value: string): GetPresignedDownloadURLResponse; + + getExpiresAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExpiresAt(value?: google_protobuf_timestamp_pb.Timestamp): GetPresignedDownloadURLResponse; + hasExpiresAt(): boolean; + clearExpiresAt(): GetPresignedDownloadURLResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPresignedDownloadURLResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPresignedDownloadURLResponse): GetPresignedDownloadURLResponse.AsObject; + static serializeBinaryToWriter(message: GetPresignedDownloadURLResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPresignedDownloadURLResponse; + static deserializeBinaryFromReader(message: GetPresignedDownloadURLResponse, reader: jspb.BinaryReader): GetPresignedDownloadURLResponse; +} + +export namespace GetPresignedDownloadURLResponse { + export type AsObject = { + url: string, + expiresAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export enum ProviderType { + PROVIDER_UNKNOWN = 0, + PROVIDER_MINIO = 1, + PROVIDER_CEPH_RGW = 2, + PROVIDER_AWS_S3 = 3, + PROVIDER_GENERIC_S3 = 4, +} diff --git a/frontend/src/gen/location/location_pb.js b/frontend/src/gen/location/location_pb.js new file mode 100644 index 0000000..a47f3c5 --- /dev/null +++ b/frontend/src/gen/location/location_pb.js @@ -0,0 +1,8972 @@ +// source: location/location.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var common_common_pb = require('../common/common_pb.js'); +goog.object.extend(proto, common_common_pb); +goog.exportSymbol('proto.s3web.location.Bucket', null, global); +goog.exportSymbol('proto.s3web.location.CreateLocationRequest', null, global); +goog.exportSymbol('proto.s3web.location.CreateLocationResponse', null, global); +goog.exportSymbol('proto.s3web.location.DeleteLocationRequest', null, global); +goog.exportSymbol('proto.s3web.location.DeleteLocationResponse', null, global); +goog.exportSymbol('proto.s3web.location.DeleteObjectsRequest', null, global); +goog.exportSymbol('proto.s3web.location.DeleteObjectsResponse', null, global); +goog.exportSymbol('proto.s3web.location.DeleteObjectsResponse.DeleteResult', null, global); +goog.exportSymbol('proto.s3web.location.GetBucketRequest', null, global); +goog.exportSymbol('proto.s3web.location.GetBucketResponse', null, global); +goog.exportSymbol('proto.s3web.location.GetLocationRequest', null, global); +goog.exportSymbol('proto.s3web.location.GetLocationResponse', null, global); +goog.exportSymbol('proto.s3web.location.GetObjectMetadataRequest', null, global); +goog.exportSymbol('proto.s3web.location.GetObjectMetadataResponse', null, global); +goog.exportSymbol('proto.s3web.location.GetPresignedDownloadURLRequest', null, global); +goog.exportSymbol('proto.s3web.location.GetPresignedDownloadURLResponse', null, global); +goog.exportSymbol('proto.s3web.location.ListBucketsRequest', null, global); +goog.exportSymbol('proto.s3web.location.ListBucketsResponse', null, global); +goog.exportSymbol('proto.s3web.location.ListLocationsRequest', null, global); +goog.exportSymbol('proto.s3web.location.ListLocationsResponse', null, global); +goog.exportSymbol('proto.s3web.location.ListObjectVersionsRequest', null, global); +goog.exportSymbol('proto.s3web.location.ListObjectVersionsResponse', null, global); +goog.exportSymbol('proto.s3web.location.ListObjectsRequest', null, global); +goog.exportSymbol('proto.s3web.location.ListObjectsResponse', null, global); +goog.exportSymbol('proto.s3web.location.Location', null, global); +goog.exportSymbol('proto.s3web.location.LocationCapabilities', null, global); +goog.exportSymbol('proto.s3web.location.LocationHealth', null, global); +goog.exportSymbol('proto.s3web.location.LocationHealth.Status', null, global); +goog.exportSymbol('proto.s3web.location.Object', null, global); +goog.exportSymbol('proto.s3web.location.ProviderType', null, global); +goog.exportSymbol('proto.s3web.location.TestLocationRequest', null, global); +goog.exportSymbol('proto.s3web.location.TestLocationResponse', null, global); +goog.exportSymbol('proto.s3web.location.UpdateLocationRequest', null, global); +goog.exportSymbol('proto.s3web.location.UpdateLocationResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.Location.displayName = 'proto.s3web.location.Location'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.LocationCapabilities = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.LocationCapabilities.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.LocationCapabilities, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.LocationCapabilities.displayName = 'proto.s3web.location.LocationCapabilities'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.LocationHealth = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.LocationHealth, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.LocationHealth.displayName = 'proto.s3web.location.LocationHealth'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.Bucket = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.Bucket, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.Bucket.displayName = 'proto.s3web.location.Bucket'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.Object = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.Object, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.Object.displayName = 'proto.s3web.location.Object'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListLocationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.ListLocationsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.ListLocationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListLocationsRequest.displayName = 'proto.s3web.location.ListLocationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListLocationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.ListLocationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.ListLocationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListLocationsResponse.displayName = 'proto.s3web.location.ListLocationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetLocationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetLocationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetLocationRequest.displayName = 'proto.s3web.location.GetLocationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetLocationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetLocationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetLocationResponse.displayName = 'proto.s3web.location.GetLocationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.CreateLocationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.CreateLocationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.CreateLocationRequest.displayName = 'proto.s3web.location.CreateLocationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.CreateLocationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.CreateLocationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.CreateLocationResponse.displayName = 'proto.s3web.location.CreateLocationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.UpdateLocationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.UpdateLocationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.UpdateLocationRequest.displayName = 'proto.s3web.location.UpdateLocationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.UpdateLocationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.UpdateLocationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.UpdateLocationResponse.displayName = 'proto.s3web.location.UpdateLocationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.DeleteLocationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.DeleteLocationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.DeleteLocationRequest.displayName = 'proto.s3web.location.DeleteLocationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.DeleteLocationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.DeleteLocationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.DeleteLocationResponse.displayName = 'proto.s3web.location.DeleteLocationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.TestLocationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.TestLocationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.TestLocationRequest.displayName = 'proto.s3web.location.TestLocationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.TestLocationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.TestLocationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.TestLocationResponse.displayName = 'proto.s3web.location.TestLocationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListBucketsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.ListBucketsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListBucketsRequest.displayName = 'proto.s3web.location.ListBucketsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListBucketsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.ListBucketsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.ListBucketsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListBucketsResponse.displayName = 'proto.s3web.location.ListBucketsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetBucketRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetBucketRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetBucketRequest.displayName = 'proto.s3web.location.GetBucketRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetBucketResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetBucketResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetBucketResponse.displayName = 'proto.s3web.location.GetBucketResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListObjectsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.ListObjectsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListObjectsRequest.displayName = 'proto.s3web.location.ListObjectsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListObjectsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.ListObjectsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.ListObjectsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListObjectsResponse.displayName = 'proto.s3web.location.ListObjectsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetObjectMetadataRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetObjectMetadataRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetObjectMetadataRequest.displayName = 'proto.s3web.location.GetObjectMetadataRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetObjectMetadataResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetObjectMetadataResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetObjectMetadataResponse.displayName = 'proto.s3web.location.GetObjectMetadataResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListObjectVersionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.ListObjectVersionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListObjectVersionsRequest.displayName = 'proto.s3web.location.ListObjectVersionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.ListObjectVersionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.ListObjectVersionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.ListObjectVersionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.ListObjectVersionsResponse.displayName = 'proto.s3web.location.ListObjectVersionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.DeleteObjectsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.DeleteObjectsRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.DeleteObjectsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.DeleteObjectsRequest.displayName = 'proto.s3web.location.DeleteObjectsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.DeleteObjectsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.location.DeleteObjectsResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.location.DeleteObjectsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.DeleteObjectsResponse.displayName = 'proto.s3web.location.DeleteObjectsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.DeleteObjectsResponse.DeleteResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.DeleteObjectsResponse.DeleteResult.displayName = 'proto.s3web.location.DeleteObjectsResponse.DeleteResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetPresignedDownloadURLRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetPresignedDownloadURLRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetPresignedDownloadURLRequest.displayName = 'proto.s3web.location.GetPresignedDownloadURLRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.location.GetPresignedDownloadURLResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.location.GetPresignedDownloadURLResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.location.GetPresignedDownloadURLResponse.displayName = 'proto.s3web.location.GetPresignedDownloadURLResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.Location.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.Location.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.Location} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.Location.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + providerType: jspb.Message.getFieldWithDefault(msg, 4, 0), + endpointUrl: jspb.Message.getFieldWithDefault(msg, 5, ""), + region: jspb.Message.getFieldWithDefault(msg, 6, ""), + useSsl: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + capabilities: (f = msg.getCapabilities()) && proto.s3web.location.LocationCapabilities.toObject(includeInstance, f), + health: (f = msg.getHealth()) && proto.s3web.location.LocationHealth.toObject(includeInstance, f), + createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.Location} + */ +proto.s3web.location.Location.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.Location; + return proto.s3web.location.Location.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.Location} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.Location} + */ +proto.s3web.location.Location.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {!proto.s3web.location.ProviderType} */ (reader.readEnum()); + msg.setProviderType(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setEndpointUrl(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRegion(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUseSsl(value); + break; + case 8: + var value = new proto.s3web.location.LocationCapabilities; + reader.readMessage(value,proto.s3web.location.LocationCapabilities.deserializeBinaryFromReader); + msg.setCapabilities(value); + break; + case 9: + var value = new proto.s3web.location.LocationHealth; + reader.readMessage(value,proto.s3web.location.LocationHealth.deserializeBinaryFromReader); + msg.setHealth(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedAt(value); + break; + case 11: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + case 12: + var value = msg.getTagsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.Location.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.Location.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.Location} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.Location.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getProviderType(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getEndpointUrl(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRegion(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getUseSsl(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getCapabilities(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.s3web.location.LocationCapabilities.serializeBinaryToWriter + ); + } + f = message.getHealth(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.s3web.location.LocationHealth.serializeBinaryToWriter + ); + } + f = message.getCreatedAt(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 11, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(12, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.s3web.location.Location.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.s3web.location.Location.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.s3web.location.Location.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ProviderType provider_type = 4; + * @return {!proto.s3web.location.ProviderType} + */ +proto.s3web.location.Location.prototype.getProviderType = function() { + return /** @type {!proto.s3web.location.ProviderType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.s3web.location.ProviderType} value + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.setProviderType = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional string endpoint_url = 5; + * @return {string} + */ +proto.s3web.location.Location.prototype.getEndpointUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.setEndpointUrl = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string region = 6; + * @return {string} + */ +proto.s3web.location.Location.prototype.getRegion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.setRegion = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional bool use_ssl = 7; + * @return {boolean} + */ +proto.s3web.location.Location.prototype.getUseSsl = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.setUseSsl = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional LocationCapabilities capabilities = 8; + * @return {?proto.s3web.location.LocationCapabilities} + */ +proto.s3web.location.Location.prototype.getCapabilities = function() { + return /** @type{?proto.s3web.location.LocationCapabilities} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.LocationCapabilities, 8)); +}; + + +/** + * @param {?proto.s3web.location.LocationCapabilities|undefined} value + * @return {!proto.s3web.location.Location} returns this +*/ +proto.s3web.location.Location.prototype.setCapabilities = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.clearCapabilities = function() { + return this.setCapabilities(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.Location.prototype.hasCapabilities = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional LocationHealth health = 9; + * @return {?proto.s3web.location.LocationHealth} + */ +proto.s3web.location.Location.prototype.getHealth = function() { + return /** @type{?proto.s3web.location.LocationHealth} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.LocationHealth, 9)); +}; + + +/** + * @param {?proto.s3web.location.LocationHealth|undefined} value + * @return {!proto.s3web.location.Location} returns this +*/ +proto.s3web.location.Location.prototype.setHealth = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.clearHealth = function() { + return this.setHealth(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.Location.prototype.hasHealth = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Timestamp created_at = 10; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.location.Location.prototype.getCreatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.location.Location} returns this +*/ +proto.s3web.location.Location.prototype.setCreatedAt = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.clearCreatedAt = function() { + return this.setCreatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.Location.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional google.protobuf.Timestamp updated_at = 11; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.location.Location.prototype.getUpdatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.location.Location} returns this +*/ +proto.s3web.location.Location.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.Location.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * map tags = 12; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.location.Location.prototype.getTagsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 12, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.location.Location} returns this + */ +proto.s3web.location.Location.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.LocationCapabilities.repeatedFields_ = [9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.LocationCapabilities.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.LocationCapabilities.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.LocationCapabilities} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.LocationCapabilities.toObject = function(includeInstance, msg) { + var f, obj = { + versioning: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + objectLock: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + lifecyclePolicies: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + replication: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + serverSideEncryption: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + multipartUpload: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + maxMultipartSize: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxParts: jspb.Message.getFieldWithDefault(msg, 8, 0), + supportedStorageClassesList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.LocationCapabilities} + */ +proto.s3web.location.LocationCapabilities.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.LocationCapabilities; + return proto.s3web.location.LocationCapabilities.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.LocationCapabilities} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.LocationCapabilities} + */ +proto.s3web.location.LocationCapabilities.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVersioning(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setObjectLock(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLifecyclePolicies(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReplication(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setServerSideEncryption(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMultipartUpload(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxMultipartSize(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxParts(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.addSupportedStorageClasses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.LocationCapabilities.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.LocationCapabilities.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.LocationCapabilities} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.LocationCapabilities.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersioning(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getObjectLock(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getLifecyclePolicies(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getReplication(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getServerSideEncryption(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getMultipartUpload(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getMaxMultipartSize(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getMaxParts(); + if (f !== 0) { + writer.writeInt32( + 8, + f + ); + } + f = message.getSupportedStorageClassesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 9, + f + ); + } +}; + + +/** + * optional bool versioning = 1; + * @return {boolean} + */ +proto.s3web.location.LocationCapabilities.prototype.getVersioning = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setVersioning = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bool object_lock = 2; + * @return {boolean} + */ +proto.s3web.location.LocationCapabilities.prototype.getObjectLock = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setObjectLock = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bool lifecycle_policies = 3; + * @return {boolean} + */ +proto.s3web.location.LocationCapabilities.prototype.getLifecyclePolicies = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setLifecyclePolicies = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bool replication = 4; + * @return {boolean} + */ +proto.s3web.location.LocationCapabilities.prototype.getReplication = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setReplication = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool server_side_encryption = 5; + * @return {boolean} + */ +proto.s3web.location.LocationCapabilities.prototype.getServerSideEncryption = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setServerSideEncryption = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool multipart_upload = 6; + * @return {boolean} + */ +proto.s3web.location.LocationCapabilities.prototype.getMultipartUpload = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setMultipartUpload = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional int64 max_multipart_size = 7; + * @return {number} + */ +proto.s3web.location.LocationCapabilities.prototype.getMaxMultipartSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setMaxMultipartSize = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int32 max_parts = 8; + * @return {number} + */ +proto.s3web.location.LocationCapabilities.prototype.getMaxParts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setMaxParts = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * repeated string supported_storage_classes = 9; + * @return {!Array} + */ +proto.s3web.location.LocationCapabilities.prototype.getSupportedStorageClassesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.setSupportedStorageClassesList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.addSupportedStorageClasses = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.LocationCapabilities} returns this + */ +proto.s3web.location.LocationCapabilities.prototype.clearSupportedStorageClassesList = function() { + return this.setSupportedStorageClassesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.LocationHealth.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.LocationHealth.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.LocationHealth} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.LocationHealth.toObject = function(includeInstance, msg) { + var f, obj = { + status: jspb.Message.getFieldWithDefault(msg, 1, 0), + lastCheck: (f = msg.getLastCheck()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + latencyMs: jspb.Message.getFieldWithDefault(msg, 3, 0), + errorMessage: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.LocationHealth} + */ +proto.s3web.location.LocationHealth.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.LocationHealth; + return proto.s3web.location.LocationHealth.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.LocationHealth} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.LocationHealth} + */ +proto.s3web.location.LocationHealth.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.location.LocationHealth.Status} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastCheck(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLatencyMs(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.LocationHealth.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.LocationHealth.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.LocationHealth} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.LocationHealth.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getLastCheck(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLatencyMs(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.s3web.location.LocationHealth.Status = { + UNKNOWN: 0, + HEALTHY: 1, + DEGRADED: 2, + UNHEALTHY: 3 +}; + +/** + * optional Status status = 1; + * @return {!proto.s3web.location.LocationHealth.Status} + */ +proto.s3web.location.LocationHealth.prototype.getStatus = function() { + return /** @type {!proto.s3web.location.LocationHealth.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.location.LocationHealth.Status} value + * @return {!proto.s3web.location.LocationHealth} returns this + */ +proto.s3web.location.LocationHealth.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp last_check = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.location.LocationHealth.prototype.getLastCheck = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.location.LocationHealth} returns this +*/ +proto.s3web.location.LocationHealth.prototype.setLastCheck = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.LocationHealth} returns this + */ +proto.s3web.location.LocationHealth.prototype.clearLastCheck = function() { + return this.setLastCheck(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.LocationHealth.prototype.hasLastCheck = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 latency_ms = 3; + * @return {number} + */ +proto.s3web.location.LocationHealth.prototype.getLatencyMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.LocationHealth} returns this + */ +proto.s3web.location.LocationHealth.prototype.setLatencyMs = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string error_message = 4; + * @return {string} + */ +proto.s3web.location.LocationHealth.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.LocationHealth} returns this + */ +proto.s3web.location.LocationHealth.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.Bucket.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.Bucket.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.Bucket} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.Bucket.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 2, ""), + creationDate: (f = msg.getCreationDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + versioningEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + objectLockEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + objectCount: jspb.Message.getFieldWithDefault(msg, 6, 0), + totalSize: jspb.Message.getFieldWithDefault(msg, 7, 0), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.Bucket} + */ +proto.s3web.location.Bucket.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.Bucket; + return proto.s3web.location.Bucket.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.Bucket} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.Bucket} + */ +proto.s3web.location.Bucket.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreationDate(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVersioningEnabled(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setObjectLockEnabled(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setObjectCount(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSize(value); + break; + case 8: + var value = msg.getTagsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.Bucket.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.Bucket.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.Bucket} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.Bucket.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCreationDate(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getVersioningEnabled(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getObjectLockEnabled(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getObjectCount(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getTotalSize(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.s3web.location.Bucket.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string location_id = 2; + * @return {string} + */ +proto.s3web.location.Bucket.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp creation_date = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.location.Bucket.prototype.getCreationDate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.location.Bucket} returns this +*/ +proto.s3web.location.Bucket.prototype.setCreationDate = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.clearCreationDate = function() { + return this.setCreationDate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.Bucket.prototype.hasCreationDate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool versioning_enabled = 4; + * @return {boolean} + */ +proto.s3web.location.Bucket.prototype.getVersioningEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.setVersioningEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool object_lock_enabled = 5; + * @return {boolean} + */ +proto.s3web.location.Bucket.prototype.getObjectLockEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.setObjectLockEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional int64 object_count = 6; + * @return {number} + */ +proto.s3web.location.Bucket.prototype.getObjectCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.setObjectCount = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 total_size = 7; + * @return {number} + */ +proto.s3web.location.Bucket.prototype.getTotalSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.setTotalSize = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * map tags = 8; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.location.Bucket.prototype.getTagsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 8, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.location.Bucket} returns this + */ +proto.s3web.location.Bucket.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.Object.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.Object.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.Object} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.Object.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 3, ""), + size: jspb.Message.getFieldWithDefault(msg, 4, 0), + etag: jspb.Message.getFieldWithDefault(msg, 5, ""), + lastModified: (f = msg.getLastModified()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + contentType: jspb.Message.getFieldWithDefault(msg, 7, ""), + storageClass: jspb.Message.getFieldWithDefault(msg, 8, ""), + isPrefix: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + versionId: jspb.Message.getFieldWithDefault(msg, 12, ""), + isLatest: jspb.Message.getBooleanFieldWithDefault(msg, 13, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.Object} + */ +proto.s3web.location.Object.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.Object; + return proto.s3web.location.Object.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.Object} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.Object} + */ +proto.s3web.location.Object.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastModified(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setStorageClass(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsPrefix(value); + break; + case 10: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 11: + var value = msg.getTagsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 13: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsLatest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.Object.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.Object.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.Object} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.Object.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getLastModified(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getStorageClass(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getIsPrefix(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getIsLatest(); + if (f) { + writer.writeBool( + 13, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.s3web.location.Object.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.location.Object.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string location_id = 3; + * @return {string} + */ +proto.s3web.location.Object.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 size = 4; + * @return {number} + */ +proto.s3web.location.Object.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string etag = 5; + * @return {string} + */ +proto.s3web.location.Object.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp last_modified = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.location.Object.prototype.getLastModified = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.location.Object} returns this +*/ +proto.s3web.location.Object.prototype.setLastModified = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.clearLastModified = function() { + return this.setLastModified(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.Object.prototype.hasLastModified = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string content_type = 7; + * @return {string} + */ +proto.s3web.location.Object.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string storage_class = 8; + * @return {string} + */ +proto.s3web.location.Object.prototype.getStorageClass = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setStorageClass = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional bool is_prefix = 9; + * @return {boolean} + */ +proto.s3web.location.Object.prototype.getIsPrefix = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setIsPrefix = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * map metadata = 10; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.location.Object.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 10, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * map tags = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.location.Object.prototype.getTagsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * optional string version_id = 12; + * @return {string} + */ +proto.s3web.location.Object.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional bool is_latest = 13; + * @return {boolean} + */ +proto.s3web.location.Object.prototype.getIsLatest = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.Object} returns this + */ +proto.s3web.location.Object.prototype.setIsLatest = function(value) { + return jspb.Message.setProto3BooleanField(this, 13, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.ListLocationsRequest.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListLocationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListLocationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListLocationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListLocationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationRequest.toObject(includeInstance, f), + filtersList: jspb.Message.toObjectList(msg.getFiltersList(), + common_common_pb.Filter.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListLocationsRequest} + */ +proto.s3web.location.ListLocationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListLocationsRequest; + return proto.s3web.location.ListLocationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListLocationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListLocationsRequest} + */ +proto.s3web.location.ListLocationsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 2: + var value = new common_common_pb.PaginationRequest; + reader.readMessage(value,common_common_pb.PaginationRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + case 3: + var value = new common_common_pb.Filter; + reader.readMessage(value,common_common_pb.Filter.deserializeBinaryFromReader); + msg.addFilters(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListLocationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListLocationsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListLocationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListLocationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationRequest.serializeBinaryToWriter + ); + } + f = message.getFiltersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + common_common_pb.Filter.serializeBinaryToWriter + ); + } +}; + + +/** + * optional s3web.common.AuditContext audit_context = 1; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.ListLocationsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 1)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.ListLocationsRequest} returns this +*/ +proto.s3web.location.ListLocationsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListLocationsRequest} returns this + */ +proto.s3web.location.ListLocationsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListLocationsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional s3web.common.PaginationRequest pagination = 2; + * @return {?proto.s3web.common.PaginationRequest} + */ +proto.s3web.location.ListLocationsRequest.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationRequest} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationRequest, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationRequest|undefined} value + * @return {!proto.s3web.location.ListLocationsRequest} returns this +*/ +proto.s3web.location.ListLocationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListLocationsRequest} returns this + */ +proto.s3web.location.ListLocationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListLocationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated s3web.common.Filter filters = 3; + * @return {!Array} + */ +proto.s3web.location.ListLocationsRequest.prototype.getFiltersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_common_pb.Filter, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.ListLocationsRequest} returns this +*/ +proto.s3web.location.ListLocationsRequest.prototype.setFiltersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.s3web.common.Filter=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.common.Filter} + */ +proto.s3web.location.ListLocationsRequest.prototype.addFilters = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.s3web.common.Filter, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.ListLocationsRequest} returns this + */ +proto.s3web.location.ListLocationsRequest.prototype.clearFiltersList = function() { + return this.setFiltersList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.ListLocationsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListLocationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListLocationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListLocationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListLocationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + locationsList: jspb.Message.toObjectList(msg.getLocationsList(), + proto.s3web.location.Location.toObject, includeInstance), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListLocationsResponse} + */ +proto.s3web.location.ListLocationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListLocationsResponse; + return proto.s3web.location.ListLocationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListLocationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListLocationsResponse} + */ +proto.s3web.location.ListLocationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Location; + reader.readMessage(value,proto.s3web.location.Location.deserializeBinaryFromReader); + msg.addLocations(value); + break; + case 2: + var value = new common_common_pb.PaginationResponse; + reader.readMessage(value,common_common_pb.PaginationResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListLocationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListLocationsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListLocationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListLocationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.location.Location.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Location locations = 1; + * @return {!Array} + */ +proto.s3web.location.ListLocationsResponse.prototype.getLocationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.location.Location, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.ListLocationsResponse} returns this +*/ +proto.s3web.location.ListLocationsResponse.prototype.setLocationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.location.Location=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.location.Location} + */ +proto.s3web.location.ListLocationsResponse.prototype.addLocations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.location.Location, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.ListLocationsResponse} returns this + */ +proto.s3web.location.ListLocationsResponse.prototype.clearLocationsList = function() { + return this.setLocationsList([]); +}; + + +/** + * optional s3web.common.PaginationResponse pagination = 2; + * @return {?proto.s3web.common.PaginationResponse} + */ +proto.s3web.location.ListLocationsResponse.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationResponse} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationResponse, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationResponse|undefined} value + * @return {!proto.s3web.location.ListLocationsResponse} returns this +*/ +proto.s3web.location.ListLocationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListLocationsResponse} returns this + */ +proto.s3web.location.ListLocationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListLocationsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetLocationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetLocationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetLocationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetLocationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetLocationRequest} + */ +proto.s3web.location.GetLocationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetLocationRequest; + return proto.s3web.location.GetLocationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetLocationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetLocationRequest} + */ +proto.s3web.location.GetLocationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetLocationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetLocationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetLocationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetLocationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.GetLocationRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetLocationRequest} returns this + */ +proto.s3web.location.GetLocationRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.GetLocationRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.GetLocationRequest} returns this +*/ +proto.s3web.location.GetLocationRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetLocationRequest} returns this + */ +proto.s3web.location.GetLocationRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetLocationRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetLocationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetLocationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetLocationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetLocationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + location: (f = msg.getLocation()) && proto.s3web.location.Location.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetLocationResponse} + */ +proto.s3web.location.GetLocationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetLocationResponse; + return proto.s3web.location.GetLocationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetLocationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetLocationResponse} + */ +proto.s3web.location.GetLocationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Location; + reader.readMessage(value,proto.s3web.location.Location.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetLocationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetLocationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetLocationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetLocationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.location.Location.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Location location = 1; + * @return {?proto.s3web.location.Location} + */ +proto.s3web.location.GetLocationResponse.prototype.getLocation = function() { + return /** @type{?proto.s3web.location.Location} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.Location, 1)); +}; + + +/** + * @param {?proto.s3web.location.Location|undefined} value + * @return {!proto.s3web.location.GetLocationResponse} returns this +*/ +proto.s3web.location.GetLocationResponse.prototype.setLocation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetLocationResponse} returns this + */ +proto.s3web.location.GetLocationResponse.prototype.clearLocation = function() { + return this.setLocation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetLocationResponse.prototype.hasLocation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.CreateLocationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.CreateLocationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.CreateLocationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.CreateLocationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + providerType: jspb.Message.getFieldWithDefault(msg, 3, 0), + endpointUrl: jspb.Message.getFieldWithDefault(msg, 4, ""), + region: jspb.Message.getFieldWithDefault(msg, 5, ""), + accessKey: jspb.Message.getFieldWithDefault(msg, 6, ""), + secretKey: jspb.Message.getFieldWithDefault(msg, 7, ""), + useSsl: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.CreateLocationRequest} + */ +proto.s3web.location.CreateLocationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.CreateLocationRequest; + return proto.s3web.location.CreateLocationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.CreateLocationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.CreateLocationRequest} + */ +proto.s3web.location.CreateLocationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!proto.s3web.location.ProviderType} */ (reader.readEnum()); + msg.setProviderType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setEndpointUrl(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRegion(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setAccessKey(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSecretKey(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUseSsl(value); + break; + case 9: + var value = msg.getTagsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 10: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.CreateLocationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.CreateLocationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.CreateLocationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.CreateLocationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProviderType(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getEndpointUrl(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRegion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getAccessKey(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getSecretKey(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getUseSsl(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 10, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.s3web.location.CreateLocationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.s3web.location.CreateLocationRequest.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ProviderType provider_type = 3; + * @return {!proto.s3web.location.ProviderType} + */ +proto.s3web.location.CreateLocationRequest.prototype.getProviderType = function() { + return /** @type {!proto.s3web.location.ProviderType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.s3web.location.ProviderType} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setProviderType = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional string endpoint_url = 4; + * @return {string} + */ +proto.s3web.location.CreateLocationRequest.prototype.getEndpointUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setEndpointUrl = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string region = 5; + * @return {string} + */ +proto.s3web.location.CreateLocationRequest.prototype.getRegion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setRegion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string access_key = 6; + * @return {string} + */ +proto.s3web.location.CreateLocationRequest.prototype.getAccessKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setAccessKey = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string secret_key = 7; + * @return {string} + */ +proto.s3web.location.CreateLocationRequest.prototype.getSecretKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setSecretKey = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional bool use_ssl = 8; + * @return {boolean} + */ +proto.s3web.location.CreateLocationRequest.prototype.getUseSsl = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.setUseSsl = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * map tags = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.location.CreateLocationRequest.prototype.getTagsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * optional s3web.common.AuditContext audit_context = 10; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.CreateLocationRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 10)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.CreateLocationRequest} returns this +*/ +proto.s3web.location.CreateLocationRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.CreateLocationRequest} returns this + */ +proto.s3web.location.CreateLocationRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.CreateLocationRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 10) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.CreateLocationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.CreateLocationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.CreateLocationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.CreateLocationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + location: (f = msg.getLocation()) && proto.s3web.location.Location.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.CreateLocationResponse} + */ +proto.s3web.location.CreateLocationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.CreateLocationResponse; + return proto.s3web.location.CreateLocationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.CreateLocationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.CreateLocationResponse} + */ +proto.s3web.location.CreateLocationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Location; + reader.readMessage(value,proto.s3web.location.Location.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.CreateLocationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.CreateLocationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.CreateLocationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.CreateLocationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.location.Location.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Location location = 1; + * @return {?proto.s3web.location.Location} + */ +proto.s3web.location.CreateLocationResponse.prototype.getLocation = function() { + return /** @type{?proto.s3web.location.Location} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.Location, 1)); +}; + + +/** + * @param {?proto.s3web.location.Location|undefined} value + * @return {!proto.s3web.location.CreateLocationResponse} returns this +*/ +proto.s3web.location.CreateLocationResponse.prototype.setLocation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.CreateLocationResponse} returns this + */ +proto.s3web.location.CreateLocationResponse.prototype.clearLocation = function() { + return this.setLocation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.CreateLocationResponse.prototype.hasLocation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.UpdateLocationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.UpdateLocationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.UpdateLocationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.UpdateLocationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + endpointUrl: jspb.Message.getFieldWithDefault(msg, 4, ""), + region: jspb.Message.getFieldWithDefault(msg, 5, ""), + accessKey: jspb.Message.getFieldWithDefault(msg, 6, ""), + secretKey: jspb.Message.getFieldWithDefault(msg, 7, ""), + useSsl: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [], + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.UpdateLocationRequest} + */ +proto.s3web.location.UpdateLocationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.UpdateLocationRequest; + return proto.s3web.location.UpdateLocationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.UpdateLocationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.UpdateLocationRequest} + */ +proto.s3web.location.UpdateLocationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setEndpointUrl(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRegion(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setAccessKey(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSecretKey(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUseSsl(value); + break; + case 9: + var value = msg.getTagsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 10: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.UpdateLocationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.UpdateLocationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.UpdateLocationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.UpdateLocationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEndpointUrl(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRegion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getAccessKey(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getSecretKey(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getUseSsl(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getTagsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 10, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string endpoint_url = 4; + * @return {string} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getEndpointUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setEndpointUrl = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string region = 5; + * @return {string} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getRegion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setRegion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string access_key = 6; + * @return {string} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getAccessKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setAccessKey = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string secret_key = 7; + * @return {string} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getSecretKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setSecretKey = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional bool use_ssl = 8; + * @return {boolean} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getUseSsl = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.setUseSsl = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * map tags = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getTagsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.clearTagsMap = function() { + this.getTagsMap().clear(); + return this;}; + + +/** + * optional s3web.common.AuditContext audit_context = 10; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.UpdateLocationRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 10)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.UpdateLocationRequest} returns this +*/ +proto.s3web.location.UpdateLocationRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.UpdateLocationRequest} returns this + */ +proto.s3web.location.UpdateLocationRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.UpdateLocationRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 10) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.UpdateLocationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.UpdateLocationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.UpdateLocationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.UpdateLocationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + location: (f = msg.getLocation()) && proto.s3web.location.Location.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.UpdateLocationResponse} + */ +proto.s3web.location.UpdateLocationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.UpdateLocationResponse; + return proto.s3web.location.UpdateLocationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.UpdateLocationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.UpdateLocationResponse} + */ +proto.s3web.location.UpdateLocationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Location; + reader.readMessage(value,proto.s3web.location.Location.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.UpdateLocationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.UpdateLocationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.UpdateLocationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.UpdateLocationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.location.Location.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Location location = 1; + * @return {?proto.s3web.location.Location} + */ +proto.s3web.location.UpdateLocationResponse.prototype.getLocation = function() { + return /** @type{?proto.s3web.location.Location} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.Location, 1)); +}; + + +/** + * @param {?proto.s3web.location.Location|undefined} value + * @return {!proto.s3web.location.UpdateLocationResponse} returns this +*/ +proto.s3web.location.UpdateLocationResponse.prototype.setLocation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.UpdateLocationResponse} returns this + */ +proto.s3web.location.UpdateLocationResponse.prototype.clearLocation = function() { + return this.setLocation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.UpdateLocationResponse.prototype.hasLocation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.DeleteLocationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.DeleteLocationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.DeleteLocationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteLocationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.DeleteLocationRequest} + */ +proto.s3web.location.DeleteLocationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.DeleteLocationRequest; + return proto.s3web.location.DeleteLocationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.DeleteLocationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.DeleteLocationRequest} + */ +proto.s3web.location.DeleteLocationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.DeleteLocationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.DeleteLocationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.DeleteLocationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteLocationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.DeleteLocationRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.DeleteLocationRequest} returns this + */ +proto.s3web.location.DeleteLocationRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.DeleteLocationRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.DeleteLocationRequest} returns this +*/ +proto.s3web.location.DeleteLocationRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.DeleteLocationRequest} returns this + */ +proto.s3web.location.DeleteLocationRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.DeleteLocationRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.DeleteLocationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.DeleteLocationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.DeleteLocationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteLocationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.DeleteLocationResponse} + */ +proto.s3web.location.DeleteLocationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.DeleteLocationResponse; + return proto.s3web.location.DeleteLocationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.DeleteLocationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.DeleteLocationResponse} + */ +proto.s3web.location.DeleteLocationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.DeleteLocationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.DeleteLocationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.DeleteLocationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteLocationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.s3web.location.DeleteLocationResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.DeleteLocationResponse} returns this + */ +proto.s3web.location.DeleteLocationResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.TestLocationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.TestLocationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.TestLocationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.TestLocationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.TestLocationRequest} + */ +proto.s3web.location.TestLocationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.TestLocationRequest; + return proto.s3web.location.TestLocationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.TestLocationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.TestLocationRequest} + */ +proto.s3web.location.TestLocationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.TestLocationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.TestLocationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.TestLocationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.TestLocationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.TestLocationRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.TestLocationRequest} returns this + */ +proto.s3web.location.TestLocationRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.TestLocationRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.TestLocationRequest} returns this +*/ +proto.s3web.location.TestLocationRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.TestLocationRequest} returns this + */ +proto.s3web.location.TestLocationRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.TestLocationRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.TestLocationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.TestLocationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.TestLocationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.TestLocationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + health: (f = msg.getHealth()) && proto.s3web.location.LocationHealth.toObject(includeInstance, f), + capabilities: (f = msg.getCapabilities()) && proto.s3web.location.LocationCapabilities.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.TestLocationResponse} + */ +proto.s3web.location.TestLocationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.TestLocationResponse; + return proto.s3web.location.TestLocationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.TestLocationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.TestLocationResponse} + */ +proto.s3web.location.TestLocationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.LocationHealth; + reader.readMessage(value,proto.s3web.location.LocationHealth.deserializeBinaryFromReader); + msg.setHealth(value); + break; + case 2: + var value = new proto.s3web.location.LocationCapabilities; + reader.readMessage(value,proto.s3web.location.LocationCapabilities.deserializeBinaryFromReader); + msg.setCapabilities(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.TestLocationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.TestLocationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.TestLocationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.TestLocationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHealth(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.location.LocationHealth.serializeBinaryToWriter + ); + } + f = message.getCapabilities(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.location.LocationCapabilities.serializeBinaryToWriter + ); + } +}; + + +/** + * optional LocationHealth health = 1; + * @return {?proto.s3web.location.LocationHealth} + */ +proto.s3web.location.TestLocationResponse.prototype.getHealth = function() { + return /** @type{?proto.s3web.location.LocationHealth} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.LocationHealth, 1)); +}; + + +/** + * @param {?proto.s3web.location.LocationHealth|undefined} value + * @return {!proto.s3web.location.TestLocationResponse} returns this +*/ +proto.s3web.location.TestLocationResponse.prototype.setHealth = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.TestLocationResponse} returns this + */ +proto.s3web.location.TestLocationResponse.prototype.clearHealth = function() { + return this.setHealth(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.TestLocationResponse.prototype.hasHealth = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional LocationCapabilities capabilities = 2; + * @return {?proto.s3web.location.LocationCapabilities} + */ +proto.s3web.location.TestLocationResponse.prototype.getCapabilities = function() { + return /** @type{?proto.s3web.location.LocationCapabilities} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.LocationCapabilities, 2)); +}; + + +/** + * @param {?proto.s3web.location.LocationCapabilities|undefined} value + * @return {!proto.s3web.location.TestLocationResponse} returns this +*/ +proto.s3web.location.TestLocationResponse.prototype.setCapabilities = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.TestLocationResponse} returns this + */ +proto.s3web.location.TestLocationResponse.prototype.clearCapabilities = function() { + return this.setCapabilities(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.TestLocationResponse.prototype.hasCapabilities = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListBucketsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListBucketsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListBucketsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListBucketsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListBucketsRequest} + */ +proto.s3web.location.ListBucketsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListBucketsRequest; + return proto.s3web.location.ListBucketsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListBucketsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListBucketsRequest} + */ +proto.s3web.location.ListBucketsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 3: + var value = new common_common_pb.PaginationRequest; + reader.readMessage(value,common_common_pb.PaginationRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListBucketsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListBucketsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListBucketsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListBucketsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.PaginationRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.ListBucketsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListBucketsRequest} returns this + */ +proto.s3web.location.ListBucketsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.ListBucketsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.ListBucketsRequest} returns this +*/ +proto.s3web.location.ListBucketsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListBucketsRequest} returns this + */ +proto.s3web.location.ListBucketsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListBucketsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional s3web.common.PaginationRequest pagination = 3; + * @return {?proto.s3web.common.PaginationRequest} + */ +proto.s3web.location.ListBucketsRequest.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationRequest} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationRequest, 3)); +}; + + +/** + * @param {?proto.s3web.common.PaginationRequest|undefined} value + * @return {!proto.s3web.location.ListBucketsRequest} returns this +*/ +proto.s3web.location.ListBucketsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListBucketsRequest} returns this + */ +proto.s3web.location.ListBucketsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListBucketsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.ListBucketsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListBucketsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListBucketsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListBucketsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListBucketsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + bucketsList: jspb.Message.toObjectList(msg.getBucketsList(), + proto.s3web.location.Bucket.toObject, includeInstance), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListBucketsResponse} + */ +proto.s3web.location.ListBucketsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListBucketsResponse; + return proto.s3web.location.ListBucketsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListBucketsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListBucketsResponse} + */ +proto.s3web.location.ListBucketsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Bucket; + reader.readMessage(value,proto.s3web.location.Bucket.deserializeBinaryFromReader); + msg.addBuckets(value); + break; + case 2: + var value = new common_common_pb.PaginationResponse; + reader.readMessage(value,common_common_pb.PaginationResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListBucketsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListBucketsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListBucketsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListBucketsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBucketsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.location.Bucket.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Bucket buckets = 1; + * @return {!Array} + */ +proto.s3web.location.ListBucketsResponse.prototype.getBucketsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.location.Bucket, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.ListBucketsResponse} returns this +*/ +proto.s3web.location.ListBucketsResponse.prototype.setBucketsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.location.Bucket=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.location.Bucket} + */ +proto.s3web.location.ListBucketsResponse.prototype.addBuckets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.location.Bucket, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.ListBucketsResponse} returns this + */ +proto.s3web.location.ListBucketsResponse.prototype.clearBucketsList = function() { + return this.setBucketsList([]); +}; + + +/** + * optional s3web.common.PaginationResponse pagination = 2; + * @return {?proto.s3web.common.PaginationResponse} + */ +proto.s3web.location.ListBucketsResponse.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationResponse} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationResponse, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationResponse|undefined} value + * @return {!proto.s3web.location.ListBucketsResponse} returns this +*/ +proto.s3web.location.ListBucketsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListBucketsResponse} returns this + */ +proto.s3web.location.ListBucketsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListBucketsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetBucketRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetBucketRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetBucketRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetBucketRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucketName: jspb.Message.getFieldWithDefault(msg, 2, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetBucketRequest} + */ +proto.s3web.location.GetBucketRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetBucketRequest; + return proto.s3web.location.GetBucketRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetBucketRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetBucketRequest} + */ +proto.s3web.location.GetBucketRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucketName(value); + break; + case 3: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetBucketRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetBucketRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetBucketRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetBucketRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucketName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.GetBucketRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetBucketRequest} returns this + */ +proto.s3web.location.GetBucketRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket_name = 2; + * @return {string} + */ +proto.s3web.location.GetBucketRequest.prototype.getBucketName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetBucketRequest} returns this + */ +proto.s3web.location.GetBucketRequest.prototype.setBucketName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 3; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.GetBucketRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 3)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.GetBucketRequest} returns this +*/ +proto.s3web.location.GetBucketRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetBucketRequest} returns this + */ +proto.s3web.location.GetBucketRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetBucketRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetBucketResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetBucketResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetBucketResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetBucketResponse.toObject = function(includeInstance, msg) { + var f, obj = { + bucket: (f = msg.getBucket()) && proto.s3web.location.Bucket.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetBucketResponse} + */ +proto.s3web.location.GetBucketResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetBucketResponse; + return proto.s3web.location.GetBucketResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetBucketResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetBucketResponse} + */ +proto.s3web.location.GetBucketResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Bucket; + reader.readMessage(value,proto.s3web.location.Bucket.deserializeBinaryFromReader); + msg.setBucket(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetBucketResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetBucketResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetBucketResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetBucketResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBucket(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.location.Bucket.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Bucket bucket = 1; + * @return {?proto.s3web.location.Bucket} + */ +proto.s3web.location.GetBucketResponse.prototype.getBucket = function() { + return /** @type{?proto.s3web.location.Bucket} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.Bucket, 1)); +}; + + +/** + * @param {?proto.s3web.location.Bucket|undefined} value + * @return {!proto.s3web.location.GetBucketResponse} returns this +*/ +proto.s3web.location.GetBucketResponse.prototype.setBucket = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetBucketResponse} returns this + */ +proto.s3web.location.GetBucketResponse.prototype.clearBucket = function() { + return this.setBucket(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetBucketResponse.prototype.hasBucket = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListObjectsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListObjectsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListObjectsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucketName: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + delimiter: jspb.Message.getFieldWithDefault(msg, 4, ""), + maxKeys: jspb.Message.getFieldWithDefault(msg, 5, 0), + continuationToken: jspb.Message.getFieldWithDefault(msg, 6, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListObjectsRequest} + */ +proto.s3web.location.ListObjectsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListObjectsRequest; + return proto.s3web.location.ListObjectsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListObjectsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListObjectsRequest} + */ +proto.s3web.location.ListObjectsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucketName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDelimiter(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxKeys(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setContinuationToken(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListObjectsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListObjectsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListObjectsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucketName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDelimiter(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getMaxKeys(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getContinuationToken(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.ListObjectsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectsRequest} returns this + */ +proto.s3web.location.ListObjectsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket_name = 2; + * @return {string} + */ +proto.s3web.location.ListObjectsRequest.prototype.getBucketName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectsRequest} returns this + */ +proto.s3web.location.ListObjectsRequest.prototype.setBucketName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.location.ListObjectsRequest.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectsRequest} returns this + */ +proto.s3web.location.ListObjectsRequest.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string delimiter = 4; + * @return {string} + */ +proto.s3web.location.ListObjectsRequest.prototype.getDelimiter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectsRequest} returns this + */ +proto.s3web.location.ListObjectsRequest.prototype.setDelimiter = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 max_keys = 5; + * @return {number} + */ +proto.s3web.location.ListObjectsRequest.prototype.getMaxKeys = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.ListObjectsRequest} returns this + */ +proto.s3web.location.ListObjectsRequest.prototype.setMaxKeys = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string continuation_token = 6; + * @return {string} + */ +proto.s3web.location.ListObjectsRequest.prototype.getContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectsRequest} returns this + */ +proto.s3web.location.ListObjectsRequest.prototype.setContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.ListObjectsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.ListObjectsRequest} returns this +*/ +proto.s3web.location.ListObjectsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListObjectsRequest} returns this + */ +proto.s3web.location.ListObjectsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListObjectsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.ListObjectsResponse.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListObjectsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListObjectsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListObjectsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + objectsList: jspb.Message.toObjectList(msg.getObjectsList(), + proto.s3web.location.Object.toObject, includeInstance), + commonPrefixesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + nextContinuationToken: jspb.Message.getFieldWithDefault(msg, 3, ""), + isTruncated: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListObjectsResponse} + */ +proto.s3web.location.ListObjectsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListObjectsResponse; + return proto.s3web.location.ListObjectsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListObjectsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListObjectsResponse} + */ +proto.s3web.location.ListObjectsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Object; + reader.readMessage(value,proto.s3web.location.Object.deserializeBinaryFromReader); + msg.addObjects(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addCommonPrefixes(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setNextContinuationToken(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsTruncated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListObjectsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListObjectsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListObjectsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getObjectsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.location.Object.serializeBinaryToWriter + ); + } + f = message.getCommonPrefixesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getNextContinuationToken(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIsTruncated(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * repeated Object objects = 1; + * @return {!Array} + */ +proto.s3web.location.ListObjectsResponse.prototype.getObjectsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.location.Object, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.ListObjectsResponse} returns this +*/ +proto.s3web.location.ListObjectsResponse.prototype.setObjectsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.location.Object=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.location.Object} + */ +proto.s3web.location.ListObjectsResponse.prototype.addObjects = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.location.Object, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.ListObjectsResponse} returns this + */ +proto.s3web.location.ListObjectsResponse.prototype.clearObjectsList = function() { + return this.setObjectsList([]); +}; + + +/** + * repeated string common_prefixes = 2; + * @return {!Array} + */ +proto.s3web.location.ListObjectsResponse.prototype.getCommonPrefixesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.ListObjectsResponse} returns this + */ +proto.s3web.location.ListObjectsResponse.prototype.setCommonPrefixesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.location.ListObjectsResponse} returns this + */ +proto.s3web.location.ListObjectsResponse.prototype.addCommonPrefixes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.ListObjectsResponse} returns this + */ +proto.s3web.location.ListObjectsResponse.prototype.clearCommonPrefixesList = function() { + return this.setCommonPrefixesList([]); +}; + + +/** + * optional string next_continuation_token = 3; + * @return {string} + */ +proto.s3web.location.ListObjectsResponse.prototype.getNextContinuationToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectsResponse} returns this + */ +proto.s3web.location.ListObjectsResponse.prototype.setNextContinuationToken = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool is_truncated = 4; + * @return {boolean} + */ +proto.s3web.location.ListObjectsResponse.prototype.getIsTruncated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.ListObjectsResponse} returns this + */ +proto.s3web.location.ListObjectsResponse.prototype.setIsTruncated = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetObjectMetadataRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetObjectMetadataRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetObjectMetadataRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucketName: jspb.Message.getFieldWithDefault(msg, 2, ""), + objectKey: jspb.Message.getFieldWithDefault(msg, 3, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 4, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetObjectMetadataRequest} + */ +proto.s3web.location.GetObjectMetadataRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetObjectMetadataRequest; + return proto.s3web.location.GetObjectMetadataRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetObjectMetadataRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetObjectMetadataRequest} + */ +proto.s3web.location.GetObjectMetadataRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucketName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setObjectKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 5: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetObjectMetadataRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetObjectMetadataRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetObjectMetadataRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucketName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getObjectKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetObjectMetadataRequest} returns this + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket_name = 2; + * @return {string} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.getBucketName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetObjectMetadataRequest} returns this + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.setBucketName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string object_key = 3; + * @return {string} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.getObjectKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetObjectMetadataRequest} returns this + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.setObjectKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version_id = 4; + * @return {string} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetObjectMetadataRequest} returns this + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 5; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 5)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.GetObjectMetadataRequest} returns this +*/ +proto.s3web.location.GetObjectMetadataRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetObjectMetadataRequest} returns this + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetObjectMetadataRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetObjectMetadataResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetObjectMetadataResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetObjectMetadataResponse.toObject = function(includeInstance, msg) { + var f, obj = { + object: (f = msg.getObject()) && proto.s3web.location.Object.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && common_common_pb.ObjectMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetObjectMetadataResponse} + */ +proto.s3web.location.GetObjectMetadataResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetObjectMetadataResponse; + return proto.s3web.location.GetObjectMetadataResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetObjectMetadataResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetObjectMetadataResponse} + */ +proto.s3web.location.GetObjectMetadataResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.Object; + reader.readMessage(value,proto.s3web.location.Object.deserializeBinaryFromReader); + msg.setObject(value); + break; + case 2: + var value = new common_common_pb.ObjectMetadata; + reader.readMessage(value,common_common_pb.ObjectMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetObjectMetadataResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetObjectMetadataResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetObjectMetadataResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getObject(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.location.Object.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.ObjectMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Object object = 1; + * @return {?proto.s3web.location.Object} + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.getObject = function() { + return /** @type{?proto.s3web.location.Object} */ ( + jspb.Message.getWrapperField(this, proto.s3web.location.Object, 1)); +}; + + +/** + * @param {?proto.s3web.location.Object|undefined} value + * @return {!proto.s3web.location.GetObjectMetadataResponse} returns this +*/ +proto.s3web.location.GetObjectMetadataResponse.prototype.setObject = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetObjectMetadataResponse} returns this + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.clearObject = function() { + return this.setObject(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.hasObject = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional s3web.common.ObjectMetadata metadata = 2; + * @return {?proto.s3web.common.ObjectMetadata} + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.getMetadata = function() { + return /** @type{?proto.s3web.common.ObjectMetadata} */ ( + jspb.Message.getWrapperField(this, common_common_pb.ObjectMetadata, 2)); +}; + + +/** + * @param {?proto.s3web.common.ObjectMetadata|undefined} value + * @return {!proto.s3web.location.GetObjectMetadataResponse} returns this +*/ +proto.s3web.location.GetObjectMetadataResponse.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetObjectMetadataResponse} returns this + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetObjectMetadataResponse.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListObjectVersionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListObjectVersionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectVersionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucketName: jspb.Message.getFieldWithDefault(msg, 2, ""), + objectKey: jspb.Message.getFieldWithDefault(msg, 3, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListObjectVersionsRequest} + */ +proto.s3web.location.ListObjectVersionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListObjectVersionsRequest; + return proto.s3web.location.ListObjectVersionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListObjectVersionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListObjectVersionsRequest} + */ +proto.s3web.location.ListObjectVersionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucketName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setObjectKey(value); + break; + case 4: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 5: + var value = new common_common_pb.PaginationRequest; + reader.readMessage(value,common_common_pb.PaginationRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListObjectVersionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListObjectVersionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectVersionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucketName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getObjectKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_common_pb.PaginationRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectVersionsRequest} returns this + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket_name = 2; + * @return {string} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.getBucketName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectVersionsRequest} returns this + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.setBucketName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string object_key = 3; + * @return {string} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.getObjectKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.ListObjectVersionsRequest} returns this + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.setObjectKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 4; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 4)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.ListObjectVersionsRequest} returns this +*/ +proto.s3web.location.ListObjectVersionsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListObjectVersionsRequest} returns this + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional s3web.common.PaginationRequest pagination = 5; + * @return {?proto.s3web.common.PaginationRequest} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationRequest} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationRequest, 5)); +}; + + +/** + * @param {?proto.s3web.common.PaginationRequest|undefined} value + * @return {!proto.s3web.location.ListObjectVersionsRequest} returns this +*/ +proto.s3web.location.ListObjectVersionsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListObjectVersionsRequest} returns this + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListObjectVersionsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.ListObjectVersionsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.ListObjectVersionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.ListObjectVersionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectVersionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + common_common_pb.ObjectVersion.toObject, includeInstance), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.ListObjectVersionsResponse} + */ +proto.s3web.location.ListObjectVersionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.ListObjectVersionsResponse; + return proto.s3web.location.ListObjectVersionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.ListObjectVersionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.ListObjectVersionsResponse} + */ +proto.s3web.location.ListObjectVersionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_common_pb.ObjectVersion; + reader.readMessage(value,common_common_pb.ObjectVersion.deserializeBinaryFromReader); + msg.addVersions(value); + break; + case 2: + var value = new common_common_pb.PaginationResponse; + reader.readMessage(value,common_common_pb.PaginationResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.ListObjectVersionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.ListObjectVersionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.ListObjectVersionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + common_common_pb.ObjectVersion.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated s3web.common.ObjectVersion versions = 1; + * @return {!Array} + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_common_pb.ObjectVersion, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.ListObjectVersionsResponse} returns this +*/ +proto.s3web.location.ListObjectVersionsResponse.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.common.ObjectVersion=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.common.ObjectVersion} + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.common.ObjectVersion, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.ListObjectVersionsResponse} returns this + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + +/** + * optional s3web.common.PaginationResponse pagination = 2; + * @return {?proto.s3web.common.PaginationResponse} + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationResponse} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationResponse, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationResponse|undefined} value + * @return {!proto.s3web.location.ListObjectVersionsResponse} returns this +*/ +proto.s3web.location.ListObjectVersionsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.ListObjectVersionsResponse} returns this + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.ListObjectVersionsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.DeleteObjectsRequest.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.DeleteObjectsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.DeleteObjectsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteObjectsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucketName: jspb.Message.getFieldWithDefault(msg, 2, ""), + objectKeysList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + permanent: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.DeleteObjectsRequest} + */ +proto.s3web.location.DeleteObjectsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.DeleteObjectsRequest; + return proto.s3web.location.DeleteObjectsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.DeleteObjectsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.DeleteObjectsRequest} + */ +proto.s3web.location.DeleteObjectsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucketName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addObjectKeys(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPermanent(value); + break; + case 5: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.DeleteObjectsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.DeleteObjectsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteObjectsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucketName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getObjectKeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getPermanent(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this + */ +proto.s3web.location.DeleteObjectsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket_name = 2; + * @return {string} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.getBucketName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this + */ +proto.s3web.location.DeleteObjectsRequest.prototype.setBucketName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string object_keys = 3; + * @return {!Array} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.getObjectKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this + */ +proto.s3web.location.DeleteObjectsRequest.prototype.setObjectKeysList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this + */ +proto.s3web.location.DeleteObjectsRequest.prototype.addObjectKeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this + */ +proto.s3web.location.DeleteObjectsRequest.prototype.clearObjectKeysList = function() { + return this.setObjectKeysList([]); +}; + + +/** + * optional bool permanent = 4; + * @return {boolean} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.getPermanent = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this + */ +proto.s3web.location.DeleteObjectsRequest.prototype.setPermanent = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 5; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 5)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this +*/ +proto.s3web.location.DeleteObjectsRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.DeleteObjectsRequest} returns this + */ +proto.s3web.location.DeleteObjectsRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.DeleteObjectsRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.location.DeleteObjectsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.DeleteObjectsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.DeleteObjectsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.DeleteObjectsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteObjectsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resultsList: jspb.Message.toObjectList(msg.getResultsList(), + proto.s3web.location.DeleteObjectsResponse.DeleteResult.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.DeleteObjectsResponse} + */ +proto.s3web.location.DeleteObjectsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.DeleteObjectsResponse; + return proto.s3web.location.DeleteObjectsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.DeleteObjectsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.DeleteObjectsResponse} + */ +proto.s3web.location.DeleteObjectsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.location.DeleteObjectsResponse.DeleteResult; + reader.readMessage(value,proto.s3web.location.DeleteObjectsResponse.DeleteResult.deserializeBinaryFromReader); + msg.addResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.DeleteObjectsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.DeleteObjectsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.DeleteObjectsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteObjectsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.location.DeleteObjectsResponse.DeleteResult.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.DeleteObjectsResponse.DeleteResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + errorMessage: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.DeleteObjectsResponse.DeleteResult; + return proto.s3web.location.DeleteObjectsResponse.DeleteResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.DeleteObjectsResponse.DeleteResult.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} returns this + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} returns this + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional string error_message = 3; + * @return {string} + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} returns this + */ +proto.s3web.location.DeleteObjectsResponse.DeleteResult.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated DeleteResult results = 1; + * @return {!Array} + */ +proto.s3web.location.DeleteObjectsResponse.prototype.getResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.location.DeleteObjectsResponse.DeleteResult, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.location.DeleteObjectsResponse} returns this +*/ +proto.s3web.location.DeleteObjectsResponse.prototype.setResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.location.DeleteObjectsResponse.DeleteResult=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.location.DeleteObjectsResponse.DeleteResult} + */ +proto.s3web.location.DeleteObjectsResponse.prototype.addResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.location.DeleteObjectsResponse.DeleteResult, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.location.DeleteObjectsResponse} returns this + */ +proto.s3web.location.DeleteObjectsResponse.prototype.clearResultsList = function() { + return this.setResultsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetPresignedDownloadURLRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetPresignedDownloadURLRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetPresignedDownloadURLRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucketName: jspb.Message.getFieldWithDefault(msg, 2, ""), + objectKey: jspb.Message.getFieldWithDefault(msg, 3, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 4, ""), + expirySeconds: jspb.Message.getFieldWithDefault(msg, 5, 0), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetPresignedDownloadURLRequest; + return proto.s3web.location.GetPresignedDownloadURLRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetPresignedDownloadURLRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucketName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setObjectKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setExpirySeconds(value); + break; + case 6: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetPresignedDownloadURLRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetPresignedDownloadURLRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetPresignedDownloadURLRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucketName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getObjectKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getExpirySeconds(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 6, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} returns this + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket_name = 2; + * @return {string} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.getBucketName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} returns this + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.setBucketName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string object_key = 3; + * @return {string} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.getObjectKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} returns this + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.setObjectKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version_id = 4; + * @return {string} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} returns this + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 expiry_seconds = 5; + * @return {number} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.getExpirySeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} returns this + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.setExpirySeconds = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 6; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 6)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} returns this +*/ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetPresignedDownloadURLRequest} returns this + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetPresignedDownloadURLRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.location.GetPresignedDownloadURLResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.location.GetPresignedDownloadURLResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetPresignedDownloadURLResponse.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.location.GetPresignedDownloadURLResponse} + */ +proto.s3web.location.GetPresignedDownloadURLResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.location.GetPresignedDownloadURLResponse; + return proto.s3web.location.GetPresignedDownloadURLResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.location.GetPresignedDownloadURLResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.location.GetPresignedDownloadURLResponse} + */ +proto.s3web.location.GetPresignedDownloadURLResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiresAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.location.GetPresignedDownloadURLResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.location.GetPresignedDownloadURLResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.location.GetPresignedDownloadURLResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExpiresAt(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string url = 1; + * @return {string} + */ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.location.GetPresignedDownloadURLResponse} returns this + */ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp expires_at = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.getExpiresAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.location.GetPresignedDownloadURLResponse} returns this +*/ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.setExpiresAt = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.location.GetPresignedDownloadURLResponse} returns this + */ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.clearExpiresAt = function() { + return this.setExpiresAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.location.GetPresignedDownloadURLResponse.prototype.hasExpiresAt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * @enum {number} + */ +proto.s3web.location.ProviderType = { + PROVIDER_UNKNOWN: 0, + PROVIDER_MINIO: 1, + PROVIDER_CEPH_RGW: 2, + PROVIDER_AWS_S3: 3, + PROVIDER_GENERIC_S3: 4 +}; + +goog.object.extend(exports, proto.s3web.location); diff --git a/frontend/src/gen/preview/PreviewServiceClientPb.ts b/frontend/src/gen/preview/PreviewServiceClientPb.ts new file mode 100644 index 0000000..7b9c6f2 --- /dev/null +++ b/frontend/src/gen/preview/PreviewServiceClientPb.ts @@ -0,0 +1,238 @@ +/** + * @fileoverview gRPC-Web generated client stub for s3web.preview + * @enhanceable + * @public + */ + +// Code generated by protoc-gen-grpc-web. DO NOT EDIT. +// versions: +// protoc-gen-grpc-web v1.5.0 +// protoc v3.14.0 +// source: preview/preview.proto + + +/* eslint-disable */ +// @ts-nocheck + + +import * as grpcWeb from 'grpc-web'; + +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" +import * as preview_preview_pb from '../preview/preview_pb'; // proto import: "preview/preview.proto" + + +export class PreviewServiceClient { + client_: grpcWeb.AbstractClientBase; + hostname_: string; + credentials_: null | { [index: string]: string; }; + options_: null | { [index: string]: any; }; + + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: any; }) { + if (!options) options = {}; + if (!credentials) credentials = {}; + options['format'] = 'binary'; + + this.client_ = new grpcWeb.GrpcWebClientBase(options); + this.hostname_ = hostname.replace(/\/+$/, ''); + this.credentials_ = credentials; + this.options_ = options; + } + + methodDescriptorGetPreview = new grpcWeb.MethodDescriptor( + '/s3web.preview.PreviewService/GetPreview', + grpcWeb.MethodType.UNARY, + preview_preview_pb.GetPreviewRequest, + preview_preview_pb.GetPreviewResponse, + (request: preview_preview_pb.GetPreviewRequest) => { + return request.serializeBinary(); + }, + preview_preview_pb.GetPreviewResponse.deserializeBinary + ); + + getPreview( + request: preview_preview_pb.GetPreviewRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getPreview( + request: preview_preview_pb.GetPreviewRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: preview_preview_pb.GetPreviewResponse) => void): grpcWeb.ClientReadableStream; + + getPreview( + request: preview_preview_pb.GetPreviewRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: preview_preview_pb.GetPreviewResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.preview.PreviewService/GetPreview', + request, + metadata || {}, + this.methodDescriptorGetPreview, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.preview.PreviewService/GetPreview', + request, + metadata || {}, + this.methodDescriptorGetPreview); + } + + methodDescriptorStreamPreview = new grpcWeb.MethodDescriptor( + '/s3web.preview.PreviewService/StreamPreview', + grpcWeb.MethodType.SERVER_STREAMING, + preview_preview_pb.StreamPreviewRequest, + preview_preview_pb.PreviewChunk, + (request: preview_preview_pb.StreamPreviewRequest) => { + return request.serializeBinary(); + }, + preview_preview_pb.PreviewChunk.deserializeBinary + ); + + streamPreview( + request: preview_preview_pb.StreamPreviewRequest, + metadata?: grpcWeb.Metadata): grpcWeb.ClientReadableStream { + return this.client_.serverStreaming( + this.hostname_ + + '/s3web.preview.PreviewService/StreamPreview', + request, + metadata || {}, + this.methodDescriptorStreamPreview); + } + + methodDescriptorGetThumbnail = new grpcWeb.MethodDescriptor( + '/s3web.preview.PreviewService/GetThumbnail', + grpcWeb.MethodType.UNARY, + preview_preview_pb.GetThumbnailRequest, + preview_preview_pb.GetThumbnailResponse, + (request: preview_preview_pb.GetThumbnailRequest) => { + return request.serializeBinary(); + }, + preview_preview_pb.GetThumbnailResponse.deserializeBinary + ); + + getThumbnail( + request: preview_preview_pb.GetThumbnailRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getThumbnail( + request: preview_preview_pb.GetThumbnailRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: preview_preview_pb.GetThumbnailResponse) => void): grpcWeb.ClientReadableStream; + + getThumbnail( + request: preview_preview_pb.GetThumbnailRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: preview_preview_pb.GetThumbnailResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.preview.PreviewService/GetThumbnail', + request, + metadata || {}, + this.methodDescriptorGetThumbnail, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.preview.PreviewService/GetThumbnail', + request, + metadata || {}, + this.methodDescriptorGetThumbnail); + } + + methodDescriptorCheckPreviewAvailability = new grpcWeb.MethodDescriptor( + '/s3web.preview.PreviewService/CheckPreviewAvailability', + grpcWeb.MethodType.UNARY, + preview_preview_pb.CheckPreviewAvailabilityRequest, + preview_preview_pb.CheckPreviewAvailabilityResponse, + (request: preview_preview_pb.CheckPreviewAvailabilityRequest) => { + return request.serializeBinary(); + }, + preview_preview_pb.CheckPreviewAvailabilityResponse.deserializeBinary + ); + + checkPreviewAvailability( + request: preview_preview_pb.CheckPreviewAvailabilityRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + checkPreviewAvailability( + request: preview_preview_pb.CheckPreviewAvailabilityRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: preview_preview_pb.CheckPreviewAvailabilityResponse) => void): grpcWeb.ClientReadableStream; + + checkPreviewAvailability( + request: preview_preview_pb.CheckPreviewAvailabilityRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: preview_preview_pb.CheckPreviewAvailabilityResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.preview.PreviewService/CheckPreviewAvailability', + request, + metadata || {}, + this.methodDescriptorCheckPreviewAvailability, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.preview.PreviewService/CheckPreviewAvailability', + request, + metadata || {}, + this.methodDescriptorCheckPreviewAvailability); + } + + methodDescriptorHealthCheck = new grpcWeb.MethodDescriptor( + '/s3web.preview.PreviewService/HealthCheck', + grpcWeb.MethodType.UNARY, + common_common_pb.HealthCheckResponse, + common_common_pb.HealthCheckResponse, + (request: common_common_pb.HealthCheckResponse) => { + return request.serializeBinary(); + }, + common_common_pb.HealthCheckResponse.deserializeBinary + ); + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null): Promise; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void): grpcWeb.ClientReadableStream; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.preview.PreviewService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.preview.PreviewService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck); + } + +} + diff --git a/frontend/src/gen/preview/preview_pb.d.ts b/frontend/src/gen/preview/preview_pb.d.ts new file mode 100644 index 0000000..84884ff --- /dev/null +++ b/frontend/src/gen/preview/preview_pb.d.ts @@ -0,0 +1,595 @@ +import * as jspb from 'google-protobuf' + +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class Preview extends jspb.Message { + getType(): PreviewType; + setType(value: PreviewType): Preview; + + getRenderMode(): RenderMode; + setRenderMode(value: RenderMode): Preview; + + getContent(): Uint8Array | string; + getContent_asU8(): Uint8Array; + getContent_asB64(): string; + setContent(value: Uint8Array | string): Preview; + + getContentType(): string; + setContentType(value: string): Preview; + + getContentLength(): number; + setContentLength(value: number): Preview; + + getTruncated(): boolean; + setTruncated(value: boolean): Preview; + + getOriginalSize(): number; + setOriginalSize(value: number): Preview; + + getMetadata(): PreviewMetadata | undefined; + setMetadata(value?: PreviewMetadata): Preview; + hasMetadata(): boolean; + clearMetadata(): Preview; + + getWarningsList(): Array; + setWarningsList(value: Array): Preview; + clearWarningsList(): Preview; + addWarnings(value?: PreviewWarning, index?: number): PreviewWarning; + + getGeneratedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setGeneratedAt(value?: google_protobuf_timestamp_pb.Timestamp): Preview; + hasGeneratedAt(): boolean; + clearGeneratedAt(): Preview; + + getCacheTtlSeconds(): number; + setCacheTtlSeconds(value: number): Preview; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Preview.AsObject; + static toObject(includeInstance: boolean, msg: Preview): Preview.AsObject; + static serializeBinaryToWriter(message: Preview, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Preview; + static deserializeBinaryFromReader(message: Preview, reader: jspb.BinaryReader): Preview; +} + +export namespace Preview { + export type AsObject = { + type: PreviewType, + renderMode: RenderMode, + content: Uint8Array | string, + contentType: string, + contentLength: number, + truncated: boolean, + originalSize: number, + metadata?: PreviewMetadata.AsObject, + warningsList: Array, + generatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + cacheTtlSeconds: number, + } +} + +export class PreviewMetadata extends jspb.Message { + getWidth(): number; + setWidth(value: number): PreviewMetadata; + + getHeight(): number; + setHeight(value: number): PreviewMetadata; + + getFormat(): string; + setFormat(value: string): PreviewMetadata; + + getLineCount(): number; + setLineCount(value: number): PreviewMetadata; + + getEncoding(): string; + setEncoding(value: string): PreviewMetadata; + + getLanguage(): string; + setLanguage(value: string): PreviewMetadata; + + getPageCount(): number; + setPageCount(value: number): PreviewMetadata; + + getAuthor(): string; + setAuthor(value: string): PreviewMetadata; + + getTitle(): string; + setTitle(value: string): PreviewMetadata; + + getCustomMap(): jspb.Map; + clearCustomMap(): PreviewMetadata; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreviewMetadata.AsObject; + static toObject(includeInstance: boolean, msg: PreviewMetadata): PreviewMetadata.AsObject; + static serializeBinaryToWriter(message: PreviewMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreviewMetadata; + static deserializeBinaryFromReader(message: PreviewMetadata, reader: jspb.BinaryReader): PreviewMetadata; +} + +export namespace PreviewMetadata { + export type AsObject = { + width: number, + height: number, + format: string, + lineCount: number, + encoding: string, + language: string, + pageCount: number, + author: string, + title: string, + customMap: Array<[string, string]>, + } +} + +export class PreviewWarning extends jspb.Message { + getSeverity(): PreviewWarning.Severity; + setSeverity(value: PreviewWarning.Severity): PreviewWarning; + + getCode(): string; + setCode(value: string): PreviewWarning; + + getMessage(): string; + setMessage(value: string): PreviewWarning; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreviewWarning.AsObject; + static toObject(includeInstance: boolean, msg: PreviewWarning): PreviewWarning.AsObject; + static serializeBinaryToWriter(message: PreviewWarning, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreviewWarning; + static deserializeBinaryFromReader(message: PreviewWarning, reader: jspb.BinaryReader): PreviewWarning; +} + +export namespace PreviewWarning { + export type AsObject = { + severity: PreviewWarning.Severity, + code: string, + message: string, + } + + export enum Severity { + INFO = 0, + WARNING = 1, + ERROR = 2, + } +} + +export class Thumbnail extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): Thumbnail; + + getContentType(): string; + setContentType(value: string): Thumbnail; + + getWidth(): number; + setWidth(value: number): Thumbnail; + + getHeight(): number; + setHeight(value: number): Thumbnail; + + getGeneratedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setGeneratedAt(value?: google_protobuf_timestamp_pb.Timestamp): Thumbnail; + hasGeneratedAt(): boolean; + clearGeneratedAt(): Thumbnail; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Thumbnail.AsObject; + static toObject(includeInstance: boolean, msg: Thumbnail): Thumbnail.AsObject; + static serializeBinaryToWriter(message: Thumbnail, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Thumbnail; + static deserializeBinaryFromReader(message: Thumbnail, reader: jspb.BinaryReader): Thumbnail; +} + +export namespace Thumbnail { + export type AsObject = { + data: Uint8Array | string, + contentType: string, + width: number, + height: number, + generatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class PreviewAvailability extends jspb.Message { + getAvailable(): boolean; + setAvailable(value: boolean): PreviewAvailability; + + getType(): PreviewType; + setType(value: PreviewType): PreviewAvailability; + + getSupportedModesList(): Array; + setSupportedModesList(value: Array): PreviewAvailability; + clearSupportedModesList(): PreviewAvailability; + addSupportedModes(value: RenderMode, index?: number): PreviewAvailability; + + getReason(): string; + setReason(value: string): PreviewAvailability; + + getLimits(): PreviewLimits | undefined; + setLimits(value?: PreviewLimits): PreviewAvailability; + hasLimits(): boolean; + clearLimits(): PreviewAvailability; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreviewAvailability.AsObject; + static toObject(includeInstance: boolean, msg: PreviewAvailability): PreviewAvailability.AsObject; + static serializeBinaryToWriter(message: PreviewAvailability, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreviewAvailability; + static deserializeBinaryFromReader(message: PreviewAvailability, reader: jspb.BinaryReader): PreviewAvailability; +} + +export namespace PreviewAvailability { + export type AsObject = { + available: boolean, + type: PreviewType, + supportedModesList: Array, + reason: string, + limits?: PreviewLimits.AsObject, + } +} + +export class PreviewLimits extends jspb.Message { + getMaxSize(): number; + setMaxSize(value: number): PreviewLimits; + + getMaxPreviewSize(): number; + setMaxPreviewSize(value: number): PreviewLimits; + + getMaxLines(): number; + setMaxLines(value: number): PreviewLimits; + + getRequiresSanitization(): boolean; + setRequiresSanitization(value: boolean): PreviewLimits; + + getRequiresSandboxing(): boolean; + setRequiresSandboxing(value: boolean): PreviewLimits; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreviewLimits.AsObject; + static toObject(includeInstance: boolean, msg: PreviewLimits): PreviewLimits.AsObject; + static serializeBinaryToWriter(message: PreviewLimits, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreviewLimits; + static deserializeBinaryFromReader(message: PreviewLimits, reader: jspb.BinaryReader): PreviewLimits; +} + +export namespace PreviewLimits { + export type AsObject = { + maxSize: number, + maxPreviewSize: number, + maxLines: number, + requiresSanitization: boolean, + requiresSandboxing: boolean, + } +} + +export class PreviewChunk extends jspb.Message { + getChunkNumber(): number; + setChunkNumber(value: number): PreviewChunk; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): PreviewChunk; + + getIsLast(): boolean; + setIsLast(value: boolean): PreviewChunk; + + getTotalSize(): number; + setTotalSize(value: number): PreviewChunk; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreviewChunk.AsObject; + static toObject(includeInstance: boolean, msg: PreviewChunk): PreviewChunk.AsObject; + static serializeBinaryToWriter(message: PreviewChunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreviewChunk; + static deserializeBinaryFromReader(message: PreviewChunk, reader: jspb.BinaryReader): PreviewChunk; +} + +export namespace PreviewChunk { + export type AsObject = { + chunkNumber: number, + data: Uint8Array | string, + isLast: boolean, + totalSize: number, + } +} + +export class GetPreviewRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetPreviewRequest; + + getBucket(): string; + setBucket(value: string): GetPreviewRequest; + + getKey(): string; + setKey(value: string): GetPreviewRequest; + + getVersionId(): string; + setVersionId(value: string): GetPreviewRequest; + + getRenderMode(): RenderMode; + setRenderMode(value: RenderMode): GetPreviewRequest; + + getOptions(): PreviewOptions | undefined; + setOptions(value?: PreviewOptions): GetPreviewRequest; + hasOptions(): boolean; + clearOptions(): GetPreviewRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetPreviewRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetPreviewRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPreviewRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPreviewRequest): GetPreviewRequest.AsObject; + static serializeBinaryToWriter(message: GetPreviewRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPreviewRequest; + static deserializeBinaryFromReader(message: GetPreviewRequest, reader: jspb.BinaryReader): GetPreviewRequest; +} + +export namespace GetPreviewRequest { + export type AsObject = { + locationId: string, + bucket: string, + key: string, + versionId: string, + renderMode: RenderMode, + options?: PreviewOptions.AsObject, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class PreviewOptions extends jspb.Message { + getMaxSize(): number; + setMaxSize(value: number): PreviewOptions; + + getMaxLines(): number; + setMaxLines(value: number): PreviewOptions; + + getIncludeMetadata(): boolean; + setIncludeMetadata(value: boolean): PreviewOptions; + + getSyntaxHighlighting(): string; + setSyntaxHighlighting(value: string): PreviewOptions; + + getThumbnailWidth(): number; + setThumbnailWidth(value: number): PreviewOptions; + + getThumbnailHeight(): number; + setThumbnailHeight(value: number): PreviewOptions; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreviewOptions.AsObject; + static toObject(includeInstance: boolean, msg: PreviewOptions): PreviewOptions.AsObject; + static serializeBinaryToWriter(message: PreviewOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreviewOptions; + static deserializeBinaryFromReader(message: PreviewOptions, reader: jspb.BinaryReader): PreviewOptions; +} + +export namespace PreviewOptions { + export type AsObject = { + maxSize: number, + maxLines: number, + includeMetadata: boolean, + syntaxHighlighting: string, + thumbnailWidth: number, + thumbnailHeight: number, + } +} + +export class GetPreviewResponse extends jspb.Message { + getPreview(): Preview | undefined; + setPreview(value?: Preview): GetPreviewResponse; + hasPreview(): boolean; + clearPreview(): GetPreviewResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPreviewResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPreviewResponse): GetPreviewResponse.AsObject; + static serializeBinaryToWriter(message: GetPreviewResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPreviewResponse; + static deserializeBinaryFromReader(message: GetPreviewResponse, reader: jspb.BinaryReader): GetPreviewResponse; +} + +export namespace GetPreviewResponse { + export type AsObject = { + preview?: Preview.AsObject, + } +} + +export class StreamPreviewRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): StreamPreviewRequest; + + getBucket(): string; + setBucket(value: string): StreamPreviewRequest; + + getKey(): string; + setKey(value: string): StreamPreviewRequest; + + getVersionId(): string; + setVersionId(value: string): StreamPreviewRequest; + + getRenderMode(): RenderMode; + setRenderMode(value: RenderMode): StreamPreviewRequest; + + getOptions(): PreviewOptions | undefined; + setOptions(value?: PreviewOptions): StreamPreviewRequest; + hasOptions(): boolean; + clearOptions(): StreamPreviewRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): StreamPreviewRequest; + hasAuditContext(): boolean; + clearAuditContext(): StreamPreviewRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamPreviewRequest.AsObject; + static toObject(includeInstance: boolean, msg: StreamPreviewRequest): StreamPreviewRequest.AsObject; + static serializeBinaryToWriter(message: StreamPreviewRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamPreviewRequest; + static deserializeBinaryFromReader(message: StreamPreviewRequest, reader: jspb.BinaryReader): StreamPreviewRequest; +} + +export namespace StreamPreviewRequest { + export type AsObject = { + locationId: string, + bucket: string, + key: string, + versionId: string, + renderMode: RenderMode, + options?: PreviewOptions.AsObject, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetThumbnailRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): GetThumbnailRequest; + + getBucket(): string; + setBucket(value: string): GetThumbnailRequest; + + getKey(): string; + setKey(value: string): GetThumbnailRequest; + + getVersionId(): string; + setVersionId(value: string): GetThumbnailRequest; + + getWidth(): number; + setWidth(value: number): GetThumbnailRequest; + + getHeight(): number; + setHeight(value: number): GetThumbnailRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetThumbnailRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetThumbnailRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetThumbnailRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetThumbnailRequest): GetThumbnailRequest.AsObject; + static serializeBinaryToWriter(message: GetThumbnailRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetThumbnailRequest; + static deserializeBinaryFromReader(message: GetThumbnailRequest, reader: jspb.BinaryReader): GetThumbnailRequest; +} + +export namespace GetThumbnailRequest { + export type AsObject = { + locationId: string, + bucket: string, + key: string, + versionId: string, + width: number, + height: number, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetThumbnailResponse extends jspb.Message { + getThumbnail(): Thumbnail | undefined; + setThumbnail(value?: Thumbnail): GetThumbnailResponse; + hasThumbnail(): boolean; + clearThumbnail(): GetThumbnailResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetThumbnailResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetThumbnailResponse): GetThumbnailResponse.AsObject; + static serializeBinaryToWriter(message: GetThumbnailResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetThumbnailResponse; + static deserializeBinaryFromReader(message: GetThumbnailResponse, reader: jspb.BinaryReader): GetThumbnailResponse; +} + +export namespace GetThumbnailResponse { + export type AsObject = { + thumbnail?: Thumbnail.AsObject, + } +} + +export class CheckPreviewAvailabilityRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): CheckPreviewAvailabilityRequest; + + getBucket(): string; + setBucket(value: string): CheckPreviewAvailabilityRequest; + + getKey(): string; + setKey(value: string): CheckPreviewAvailabilityRequest; + + getContentType(): string; + setContentType(value: string): CheckPreviewAvailabilityRequest; + + getSize(): number; + setSize(value: number): CheckPreviewAvailabilityRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CheckPreviewAvailabilityRequest; + hasAuditContext(): boolean; + clearAuditContext(): CheckPreviewAvailabilityRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckPreviewAvailabilityRequest.AsObject; + static toObject(includeInstance: boolean, msg: CheckPreviewAvailabilityRequest): CheckPreviewAvailabilityRequest.AsObject; + static serializeBinaryToWriter(message: CheckPreviewAvailabilityRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckPreviewAvailabilityRequest; + static deserializeBinaryFromReader(message: CheckPreviewAvailabilityRequest, reader: jspb.BinaryReader): CheckPreviewAvailabilityRequest; +} + +export namespace CheckPreviewAvailabilityRequest { + export type AsObject = { + locationId: string, + bucket: string, + key: string, + contentType: string, + size: number, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CheckPreviewAvailabilityResponse extends jspb.Message { + getAvailability(): PreviewAvailability | undefined; + setAvailability(value?: PreviewAvailability): CheckPreviewAvailabilityResponse; + hasAvailability(): boolean; + clearAvailability(): CheckPreviewAvailabilityResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckPreviewAvailabilityResponse.AsObject; + static toObject(includeInstance: boolean, msg: CheckPreviewAvailabilityResponse): CheckPreviewAvailabilityResponse.AsObject; + static serializeBinaryToWriter(message: CheckPreviewAvailabilityResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckPreviewAvailabilityResponse; + static deserializeBinaryFromReader(message: CheckPreviewAvailabilityResponse, reader: jspb.BinaryReader): CheckPreviewAvailabilityResponse; +} + +export namespace CheckPreviewAvailabilityResponse { + export type AsObject = { + availability?: PreviewAvailability.AsObject, + } +} + +export enum PreviewType { + PREVIEW_UNKNOWN = 0, + PREVIEW_IMAGE = 1, + PREVIEW_TEXT = 2, + PREVIEW_JSON = 3, + PREVIEW_YAML = 4, + PREVIEW_CSV = 5, + PREVIEW_PDF = 6, + PREVIEW_MARKDOWN = 7, + PREVIEW_XML = 8, + PREVIEW_HTML = 9, + PREVIEW_CODE = 10, + PREVIEW_AUDIO_THUMBNAIL = 11, + PREVIEW_VIDEO_THUMBNAIL = 12, + PREVIEW_UNSUPPORTED = 99, +} +export enum RenderMode { + RENDER_SAFE = 0, + RENDER_SANDBOXED = 1, + RENDER_RAW = 2, +} diff --git a/frontend/src/gen/preview/preview_pb.js b/frontend/src/gen/preview/preview_pb.js new file mode 100644 index 0000000..af52609 --- /dev/null +++ b/frontend/src/gen/preview/preview_pb.js @@ -0,0 +1,4668 @@ +// source: preview/preview.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var common_common_pb = require('../common/common_pb.js'); +goog.object.extend(proto, common_common_pb); +goog.exportSymbol('proto.s3web.preview.CheckPreviewAvailabilityRequest', null, global); +goog.exportSymbol('proto.s3web.preview.CheckPreviewAvailabilityResponse', null, global); +goog.exportSymbol('proto.s3web.preview.GetPreviewRequest', null, global); +goog.exportSymbol('proto.s3web.preview.GetPreviewResponse', null, global); +goog.exportSymbol('proto.s3web.preview.GetThumbnailRequest', null, global); +goog.exportSymbol('proto.s3web.preview.GetThumbnailResponse', null, global); +goog.exportSymbol('proto.s3web.preview.Preview', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewAvailability', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewChunk', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewLimits', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewMetadata', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewOptions', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewType', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewWarning', null, global); +goog.exportSymbol('proto.s3web.preview.PreviewWarning.Severity', null, global); +goog.exportSymbol('proto.s3web.preview.RenderMode', null, global); +goog.exportSymbol('proto.s3web.preview.StreamPreviewRequest', null, global); +goog.exportSymbol('proto.s3web.preview.Thumbnail', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.Preview = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.preview.Preview.repeatedFields_, null); +}; +goog.inherits(proto.s3web.preview.Preview, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.Preview.displayName = 'proto.s3web.preview.Preview'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.PreviewMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.PreviewMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.PreviewMetadata.displayName = 'proto.s3web.preview.PreviewMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.PreviewWarning = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.PreviewWarning, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.PreviewWarning.displayName = 'proto.s3web.preview.PreviewWarning'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.Thumbnail = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.Thumbnail, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.Thumbnail.displayName = 'proto.s3web.preview.Thumbnail'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.PreviewAvailability = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.preview.PreviewAvailability.repeatedFields_, null); +}; +goog.inherits(proto.s3web.preview.PreviewAvailability, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.PreviewAvailability.displayName = 'proto.s3web.preview.PreviewAvailability'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.PreviewLimits = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.PreviewLimits, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.PreviewLimits.displayName = 'proto.s3web.preview.PreviewLimits'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.PreviewChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.PreviewChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.PreviewChunk.displayName = 'proto.s3web.preview.PreviewChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.GetPreviewRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.GetPreviewRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.GetPreviewRequest.displayName = 'proto.s3web.preview.GetPreviewRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.PreviewOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.PreviewOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.PreviewOptions.displayName = 'proto.s3web.preview.PreviewOptions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.GetPreviewResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.GetPreviewResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.GetPreviewResponse.displayName = 'proto.s3web.preview.GetPreviewResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.StreamPreviewRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.StreamPreviewRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.StreamPreviewRequest.displayName = 'proto.s3web.preview.StreamPreviewRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.GetThumbnailRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.GetThumbnailRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.GetThumbnailRequest.displayName = 'proto.s3web.preview.GetThumbnailRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.GetThumbnailResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.GetThumbnailResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.GetThumbnailResponse.displayName = 'proto.s3web.preview.GetThumbnailResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.CheckPreviewAvailabilityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.CheckPreviewAvailabilityRequest.displayName = 'proto.s3web.preview.CheckPreviewAvailabilityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.preview.CheckPreviewAvailabilityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.preview.CheckPreviewAvailabilityResponse.displayName = 'proto.s3web.preview.CheckPreviewAvailabilityResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.preview.Preview.repeatedFields_ = [9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.Preview.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.Preview.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.Preview} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.Preview.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + renderMode: jspb.Message.getFieldWithDefault(msg, 2, 0), + content: msg.getContent_asB64(), + contentType: jspb.Message.getFieldWithDefault(msg, 4, ""), + contentLength: jspb.Message.getFieldWithDefault(msg, 5, 0), + truncated: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + originalSize: jspb.Message.getFieldWithDefault(msg, 7, 0), + metadata: (f = msg.getMetadata()) && proto.s3web.preview.PreviewMetadata.toObject(includeInstance, f), + warningsList: jspb.Message.toObjectList(msg.getWarningsList(), + proto.s3web.preview.PreviewWarning.toObject, includeInstance), + generatedAt: (f = msg.getGeneratedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + cacheTtlSeconds: jspb.Message.getFieldWithDefault(msg, 11, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.Preview} + */ +proto.s3web.preview.Preview.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.Preview; + return proto.s3web.preview.Preview.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.Preview} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.Preview} + */ +proto.s3web.preview.Preview.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.preview.PreviewType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {!proto.s3web.preview.RenderMode} */ (reader.readEnum()); + msg.setRenderMode(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContent(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setContentLength(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTruncated(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setOriginalSize(value); + break; + case 8: + var value = new proto.s3web.preview.PreviewMetadata; + reader.readMessage(value,proto.s3web.preview.PreviewMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + case 9: + var value = new proto.s3web.preview.PreviewWarning; + reader.readMessage(value,proto.s3web.preview.PreviewWarning.deserializeBinaryFromReader); + msg.addWarnings(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setGeneratedAt(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCacheTtlSeconds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.Preview.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.Preview.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.Preview} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.Preview.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getRenderMode(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getContent_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getContentLength(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTruncated(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getOriginalSize(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.s3web.preview.PreviewMetadata.serializeBinaryToWriter + ); + } + f = message.getWarningsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.s3web.preview.PreviewWarning.serializeBinaryToWriter + ); + } + f = message.getGeneratedAt(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getCacheTtlSeconds(); + if (f !== 0) { + writer.writeInt32( + 11, + f + ); + } +}; + + +/** + * optional PreviewType type = 1; + * @return {!proto.s3web.preview.PreviewType} + */ +proto.s3web.preview.Preview.prototype.getType = function() { + return /** @type {!proto.s3web.preview.PreviewType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.preview.PreviewType} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional RenderMode render_mode = 2; + * @return {!proto.s3web.preview.RenderMode} + */ +proto.s3web.preview.Preview.prototype.getRenderMode = function() { + return /** @type {!proto.s3web.preview.RenderMode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.preview.RenderMode} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setRenderMode = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional bytes content = 3; + * @return {!(string|Uint8Array)} + */ +proto.s3web.preview.Preview.prototype.getContent = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes content = 3; + * This is a type-conversion wrapper around `getContent()` + * @return {string} + */ +proto.s3web.preview.Preview.prototype.getContent_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContent())); +}; + + +/** + * optional bytes content = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContent()` + * @return {!Uint8Array} + */ +proto.s3web.preview.Preview.prototype.getContent_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContent())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setContent = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string content_type = 4; + * @return {string} + */ +proto.s3web.preview.Preview.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 content_length = 5; + * @return {number} + */ +proto.s3web.preview.Preview.prototype.getContentLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setContentLength = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bool truncated = 6; + * @return {boolean} + */ +proto.s3web.preview.Preview.prototype.getTruncated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setTruncated = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional int64 original_size = 7; + * @return {number} + */ +proto.s3web.preview.Preview.prototype.getOriginalSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setOriginalSize = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional PreviewMetadata metadata = 8; + * @return {?proto.s3web.preview.PreviewMetadata} + */ +proto.s3web.preview.Preview.prototype.getMetadata = function() { + return /** @type{?proto.s3web.preview.PreviewMetadata} */ ( + jspb.Message.getWrapperField(this, proto.s3web.preview.PreviewMetadata, 8)); +}; + + +/** + * @param {?proto.s3web.preview.PreviewMetadata|undefined} value + * @return {!proto.s3web.preview.Preview} returns this +*/ +proto.s3web.preview.Preview.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.Preview.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated PreviewWarning warnings = 9; + * @return {!Array} + */ +proto.s3web.preview.Preview.prototype.getWarningsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.preview.PreviewWarning, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.preview.Preview} returns this +*/ +proto.s3web.preview.Preview.prototype.setWarningsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.s3web.preview.PreviewWarning=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.preview.PreviewWarning} + */ +proto.s3web.preview.Preview.prototype.addWarnings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.s3web.preview.PreviewWarning, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.clearWarningsList = function() { + return this.setWarningsList([]); +}; + + +/** + * optional google.protobuf.Timestamp generated_at = 10; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.preview.Preview.prototype.getGeneratedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.preview.Preview} returns this +*/ +proto.s3web.preview.Preview.prototype.setGeneratedAt = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.clearGeneratedAt = function() { + return this.setGeneratedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.Preview.prototype.hasGeneratedAt = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional int32 cache_ttl_seconds = 11; + * @return {number} + */ +proto.s3web.preview.Preview.prototype.getCacheTtlSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.Preview} returns this + */ +proto.s3web.preview.Preview.prototype.setCacheTtlSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.PreviewMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.PreviewMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.PreviewMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + width: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + format: jspb.Message.getFieldWithDefault(msg, 3, ""), + lineCount: jspb.Message.getFieldWithDefault(msg, 4, 0), + encoding: jspb.Message.getFieldWithDefault(msg, 5, ""), + language: jspb.Message.getFieldWithDefault(msg, 6, ""), + pageCount: jspb.Message.getFieldWithDefault(msg, 7, 0), + author: jspb.Message.getFieldWithDefault(msg, 8, ""), + title: jspb.Message.getFieldWithDefault(msg, 9, ""), + customMap: (f = msg.getCustomMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.PreviewMetadata} + */ +proto.s3web.preview.PreviewMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.PreviewMetadata; + return proto.s3web.preview.PreviewMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.PreviewMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.PreviewMetadata} + */ +proto.s3web.preview.PreviewMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidth(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFormat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLineCount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setEncoding(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setLanguage(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPageCount(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthor(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); + break; + case 10: + var value = msg.getCustomMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.PreviewMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.PreviewMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.PreviewMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWidth(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getFormat(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLineCount(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getEncoding(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getLanguage(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getPageCount(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getAuthor(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getCustomMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional int32 width = 1; + * @return {number} + */ +proto.s3web.preview.PreviewMetadata.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 height = 2; + * @return {number} + */ +proto.s3web.preview.PreviewMetadata.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string format = 3; + * @return {string} + */ +proto.s3web.preview.PreviewMetadata.prototype.getFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setFormat = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 line_count = 4; + * @return {number} + */ +proto.s3web.preview.PreviewMetadata.prototype.getLineCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setLineCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string encoding = 5; + * @return {string} + */ +proto.s3web.preview.PreviewMetadata.prototype.getEncoding = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setEncoding = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string language = 6; + * @return {string} + */ +proto.s3web.preview.PreviewMetadata.prototype.getLanguage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setLanguage = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional int32 page_count = 7; + * @return {number} + */ +proto.s3web.preview.PreviewMetadata.prototype.getPageCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setPageCount = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional string author = 8; + * @return {string} + */ +proto.s3web.preview.PreviewMetadata.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setAuthor = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string title = 9; + * @return {string} + */ +proto.s3web.preview.PreviewMetadata.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * map custom = 10; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.preview.PreviewMetadata.prototype.getCustomMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 10, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.preview.PreviewMetadata} returns this + */ +proto.s3web.preview.PreviewMetadata.prototype.clearCustomMap = function() { + this.getCustomMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.PreviewWarning.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.PreviewWarning.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.PreviewWarning} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewWarning.toObject = function(includeInstance, msg) { + var f, obj = { + severity: jspb.Message.getFieldWithDefault(msg, 1, 0), + code: jspb.Message.getFieldWithDefault(msg, 2, ""), + message: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.PreviewWarning} + */ +proto.s3web.preview.PreviewWarning.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.PreviewWarning; + return proto.s3web.preview.PreviewWarning.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.PreviewWarning} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.PreviewWarning} + */ +proto.s3web.preview.PreviewWarning.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.preview.PreviewWarning.Severity} */ (reader.readEnum()); + msg.setSeverity(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.PreviewWarning.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.PreviewWarning.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.PreviewWarning} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewWarning.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSeverity(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getCode(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.s3web.preview.PreviewWarning.Severity = { + INFO: 0, + WARNING: 1, + ERROR: 2 +}; + +/** + * optional Severity severity = 1; + * @return {!proto.s3web.preview.PreviewWarning.Severity} + */ +proto.s3web.preview.PreviewWarning.prototype.getSeverity = function() { + return /** @type {!proto.s3web.preview.PreviewWarning.Severity} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.preview.PreviewWarning.Severity} value + * @return {!proto.s3web.preview.PreviewWarning} returns this + */ +proto.s3web.preview.PreviewWarning.prototype.setSeverity = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string code = 2; + * @return {string} + */ +proto.s3web.preview.PreviewWarning.prototype.getCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewWarning} returns this + */ +proto.s3web.preview.PreviewWarning.prototype.setCode = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string message = 3; + * @return {string} + */ +proto.s3web.preview.PreviewWarning.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewWarning} returns this + */ +proto.s3web.preview.PreviewWarning.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.Thumbnail.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.Thumbnail.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.Thumbnail} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.Thumbnail.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + contentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + width: jspb.Message.getFieldWithDefault(msg, 3, 0), + height: jspb.Message.getFieldWithDefault(msg, 4, 0), + generatedAt: (f = msg.getGeneratedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.Thumbnail} + */ +proto.s3web.preview.Thumbnail.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.Thumbnail; + return proto.s3web.preview.Thumbnail.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.Thumbnail} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.Thumbnail} + */ +proto.s3web.preview.Thumbnail.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidth(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setGeneratedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.Thumbnail.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.Thumbnail.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.Thumbnail} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.Thumbnail.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWidth(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getGeneratedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.s3web.preview.Thumbnail.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.s3web.preview.Thumbnail.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.s3web.preview.Thumbnail.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.s3web.preview.Thumbnail} returns this + */ +proto.s3web.preview.Thumbnail.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string content_type = 2; + * @return {string} + */ +proto.s3web.preview.Thumbnail.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.Thumbnail} returns this + */ +proto.s3web.preview.Thumbnail.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int32 width = 3; + * @return {number} + */ +proto.s3web.preview.Thumbnail.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.Thumbnail} returns this + */ +proto.s3web.preview.Thumbnail.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 height = 4; + * @return {number} + */ +proto.s3web.preview.Thumbnail.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.Thumbnail} returns this + */ +proto.s3web.preview.Thumbnail.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp generated_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.preview.Thumbnail.prototype.getGeneratedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.preview.Thumbnail} returns this +*/ +proto.s3web.preview.Thumbnail.prototype.setGeneratedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.Thumbnail} returns this + */ +proto.s3web.preview.Thumbnail.prototype.clearGeneratedAt = function() { + return this.setGeneratedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.Thumbnail.prototype.hasGeneratedAt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.preview.PreviewAvailability.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.PreviewAvailability.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.PreviewAvailability.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.PreviewAvailability} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewAvailability.toObject = function(includeInstance, msg) { + var f, obj = { + available: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + supportedModesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + reason: jspb.Message.getFieldWithDefault(msg, 4, ""), + limits: (f = msg.getLimits()) && proto.s3web.preview.PreviewLimits.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.PreviewAvailability} + */ +proto.s3web.preview.PreviewAvailability.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.PreviewAvailability; + return proto.s3web.preview.PreviewAvailability.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.PreviewAvailability} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.PreviewAvailability} + */ +proto.s3web.preview.PreviewAvailability.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAvailable(value); + break; + case 2: + var value = /** @type {!proto.s3web.preview.PreviewType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addSupportedModes(values[i]); + } + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setReason(value); + break; + case 5: + var value = new proto.s3web.preview.PreviewLimits; + reader.readMessage(value,proto.s3web.preview.PreviewLimits.deserializeBinaryFromReader); + msg.setLimits(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.PreviewAvailability.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.PreviewAvailability.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.PreviewAvailability} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewAvailability.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAvailable(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getSupportedModesList(); + if (f.length > 0) { + writer.writePackedEnum( + 3, + f + ); + } + f = message.getReason(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLimits(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.s3web.preview.PreviewLimits.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool available = 1; + * @return {boolean} + */ +proto.s3web.preview.PreviewAvailability.prototype.getAvailable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.preview.PreviewAvailability} returns this + */ +proto.s3web.preview.PreviewAvailability.prototype.setAvailable = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional PreviewType type = 2; + * @return {!proto.s3web.preview.PreviewType} + */ +proto.s3web.preview.PreviewAvailability.prototype.getType = function() { + return /** @type {!proto.s3web.preview.PreviewType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.preview.PreviewType} value + * @return {!proto.s3web.preview.PreviewAvailability} returns this + */ +proto.s3web.preview.PreviewAvailability.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * repeated RenderMode supported_modes = 3; + * @return {!Array} + */ +proto.s3web.preview.PreviewAvailability.prototype.getSupportedModesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.preview.PreviewAvailability} returns this + */ +proto.s3web.preview.PreviewAvailability.prototype.setSupportedModesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!proto.s3web.preview.RenderMode} value + * @param {number=} opt_index + * @return {!proto.s3web.preview.PreviewAvailability} returns this + */ +proto.s3web.preview.PreviewAvailability.prototype.addSupportedModes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.preview.PreviewAvailability} returns this + */ +proto.s3web.preview.PreviewAvailability.prototype.clearSupportedModesList = function() { + return this.setSupportedModesList([]); +}; + + +/** + * optional string reason = 4; + * @return {string} + */ +proto.s3web.preview.PreviewAvailability.prototype.getReason = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewAvailability} returns this + */ +proto.s3web.preview.PreviewAvailability.prototype.setReason = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional PreviewLimits limits = 5; + * @return {?proto.s3web.preview.PreviewLimits} + */ +proto.s3web.preview.PreviewAvailability.prototype.getLimits = function() { + return /** @type{?proto.s3web.preview.PreviewLimits} */ ( + jspb.Message.getWrapperField(this, proto.s3web.preview.PreviewLimits, 5)); +}; + + +/** + * @param {?proto.s3web.preview.PreviewLimits|undefined} value + * @return {!proto.s3web.preview.PreviewAvailability} returns this +*/ +proto.s3web.preview.PreviewAvailability.prototype.setLimits = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.PreviewAvailability} returns this + */ +proto.s3web.preview.PreviewAvailability.prototype.clearLimits = function() { + return this.setLimits(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.PreviewAvailability.prototype.hasLimits = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.PreviewLimits.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.PreviewLimits.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.PreviewLimits} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewLimits.toObject = function(includeInstance, msg) { + var f, obj = { + maxSize: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxPreviewSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxLines: jspb.Message.getFieldWithDefault(msg, 3, 0), + requiresSanitization: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + requiresSandboxing: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.PreviewLimits} + */ +proto.s3web.preview.PreviewLimits.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.PreviewLimits; + return proto.s3web.preview.PreviewLimits.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.PreviewLimits} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.PreviewLimits} + */ +proto.s3web.preview.PreviewLimits.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxSize(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxPreviewSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxLines(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequiresSanitization(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequiresSandboxing(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.PreviewLimits.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.PreviewLimits.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.PreviewLimits} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewLimits.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxSize(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxPreviewSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMaxLines(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getRequiresSanitization(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getRequiresSandboxing(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional int64 max_size = 1; + * @return {number} + */ +proto.s3web.preview.PreviewLimits.prototype.getMaxSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewLimits} returns this + */ +proto.s3web.preview.PreviewLimits.prototype.setMaxSize = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_preview_size = 2; + * @return {number} + */ +proto.s3web.preview.PreviewLimits.prototype.getMaxPreviewSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewLimits} returns this + */ +proto.s3web.preview.PreviewLimits.prototype.setMaxPreviewSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 max_lines = 3; + * @return {number} + */ +proto.s3web.preview.PreviewLimits.prototype.getMaxLines = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewLimits} returns this + */ +proto.s3web.preview.PreviewLimits.prototype.setMaxLines = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool requires_sanitization = 4; + * @return {boolean} + */ +proto.s3web.preview.PreviewLimits.prototype.getRequiresSanitization = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.preview.PreviewLimits} returns this + */ +proto.s3web.preview.PreviewLimits.prototype.setRequiresSanitization = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool requires_sandboxing = 5; + * @return {boolean} + */ +proto.s3web.preview.PreviewLimits.prototype.getRequiresSandboxing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.preview.PreviewLimits} returns this + */ +proto.s3web.preview.PreviewLimits.prototype.setRequiresSandboxing = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.PreviewChunk.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.PreviewChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.PreviewChunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewChunk.toObject = function(includeInstance, msg) { + var f, obj = { + chunkNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + data: msg.getData_asB64(), + isLast: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + totalSize: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.PreviewChunk} + */ +proto.s3web.preview.PreviewChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.PreviewChunk; + return proto.s3web.preview.PreviewChunk.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.PreviewChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.PreviewChunk} + */ +proto.s3web.preview.PreviewChunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setChunkNumber(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsLast(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSize(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.PreviewChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.PreviewChunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.PreviewChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChunkNumber(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getIsLast(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getTotalSize(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional int32 chunk_number = 1; + * @return {number} + */ +proto.s3web.preview.PreviewChunk.prototype.getChunkNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewChunk} returns this + */ +proto.s3web.preview.PreviewChunk.prototype.setChunkNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.s3web.preview.PreviewChunk.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.s3web.preview.PreviewChunk.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.s3web.preview.PreviewChunk.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.s3web.preview.PreviewChunk} returns this + */ +proto.s3web.preview.PreviewChunk.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool is_last = 3; + * @return {boolean} + */ +proto.s3web.preview.PreviewChunk.prototype.getIsLast = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.preview.PreviewChunk} returns this + */ +proto.s3web.preview.PreviewChunk.prototype.setIsLast = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional int64 total_size = 4; + * @return {number} + */ +proto.s3web.preview.PreviewChunk.prototype.getTotalSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewChunk} returns this + */ +proto.s3web.preview.PreviewChunk.prototype.setTotalSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.GetPreviewRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.GetPreviewRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.GetPreviewRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetPreviewRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + key: jspb.Message.getFieldWithDefault(msg, 3, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 4, ""), + renderMode: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: (f = msg.getOptions()) && proto.s3web.preview.PreviewOptions.toObject(includeInstance, f), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.GetPreviewRequest} + */ +proto.s3web.preview.GetPreviewRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.GetPreviewRequest; + return proto.s3web.preview.GetPreviewRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.GetPreviewRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.GetPreviewRequest} + */ +proto.s3web.preview.GetPreviewRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 5: + var value = /** @type {!proto.s3web.preview.RenderMode} */ (reader.readEnum()); + msg.setRenderMode(value); + break; + case 6: + var value = new proto.s3web.preview.PreviewOptions; + reader.readMessage(value,proto.s3web.preview.PreviewOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.GetPreviewRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.GetPreviewRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.GetPreviewRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetPreviewRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRenderMode(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.s3web.preview.PreviewOptions.serializeBinaryToWriter + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.preview.GetPreviewRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetPreviewRequest} returns this + */ +proto.s3web.preview.GetPreviewRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.preview.GetPreviewRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetPreviewRequest} returns this + */ +proto.s3web.preview.GetPreviewRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string key = 3; + * @return {string} + */ +proto.s3web.preview.GetPreviewRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetPreviewRequest} returns this + */ +proto.s3web.preview.GetPreviewRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version_id = 4; + * @return {string} + */ +proto.s3web.preview.GetPreviewRequest.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetPreviewRequest} returns this + */ +proto.s3web.preview.GetPreviewRequest.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional RenderMode render_mode = 5; + * @return {!proto.s3web.preview.RenderMode} + */ +proto.s3web.preview.GetPreviewRequest.prototype.getRenderMode = function() { + return /** @type {!proto.s3web.preview.RenderMode} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.s3web.preview.RenderMode} value + * @return {!proto.s3web.preview.GetPreviewRequest} returns this + */ +proto.s3web.preview.GetPreviewRequest.prototype.setRenderMode = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional PreviewOptions options = 6; + * @return {?proto.s3web.preview.PreviewOptions} + */ +proto.s3web.preview.GetPreviewRequest.prototype.getOptions = function() { + return /** @type{?proto.s3web.preview.PreviewOptions} */ ( + jspb.Message.getWrapperField(this, proto.s3web.preview.PreviewOptions, 6)); +}; + + +/** + * @param {?proto.s3web.preview.PreviewOptions|undefined} value + * @return {!proto.s3web.preview.GetPreviewRequest} returns this +*/ +proto.s3web.preview.GetPreviewRequest.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.GetPreviewRequest} returns this + */ +proto.s3web.preview.GetPreviewRequest.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.GetPreviewRequest.prototype.hasOptions = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.preview.GetPreviewRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.preview.GetPreviewRequest} returns this +*/ +proto.s3web.preview.GetPreviewRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.GetPreviewRequest} returns this + */ +proto.s3web.preview.GetPreviewRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.GetPreviewRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.PreviewOptions.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.PreviewOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.PreviewOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewOptions.toObject = function(includeInstance, msg) { + var f, obj = { + maxSize: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxLines: jspb.Message.getFieldWithDefault(msg, 2, 0), + includeMetadata: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + syntaxHighlighting: jspb.Message.getFieldWithDefault(msg, 4, ""), + thumbnailWidth: jspb.Message.getFieldWithDefault(msg, 5, 0), + thumbnailHeight: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.PreviewOptions} + */ +proto.s3web.preview.PreviewOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.PreviewOptions; + return proto.s3web.preview.PreviewOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.PreviewOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.PreviewOptions} + */ +proto.s3web.preview.PreviewOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxSize(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxLines(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeMetadata(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSyntaxHighlighting(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setThumbnailWidth(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setThumbnailHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.PreviewOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.PreviewOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.PreviewOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.PreviewOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxSize(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxLines(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getIncludeMetadata(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getSyntaxHighlighting(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getThumbnailWidth(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getThumbnailHeight(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } +}; + + +/** + * optional int64 max_size = 1; + * @return {number} + */ +proto.s3web.preview.PreviewOptions.prototype.getMaxSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewOptions} returns this + */ +proto.s3web.preview.PreviewOptions.prototype.setMaxSize = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 max_lines = 2; + * @return {number} + */ +proto.s3web.preview.PreviewOptions.prototype.getMaxLines = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewOptions} returns this + */ +proto.s3web.preview.PreviewOptions.prototype.setMaxLines = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bool include_metadata = 3; + * @return {boolean} + */ +proto.s3web.preview.PreviewOptions.prototype.getIncludeMetadata = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.preview.PreviewOptions} returns this + */ +proto.s3web.preview.PreviewOptions.prototype.setIncludeMetadata = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional string syntax_highlighting = 4; + * @return {string} + */ +proto.s3web.preview.PreviewOptions.prototype.getSyntaxHighlighting = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.PreviewOptions} returns this + */ +proto.s3web.preview.PreviewOptions.prototype.setSyntaxHighlighting = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 thumbnail_width = 5; + * @return {number} + */ +proto.s3web.preview.PreviewOptions.prototype.getThumbnailWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewOptions} returns this + */ +proto.s3web.preview.PreviewOptions.prototype.setThumbnailWidth = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 thumbnail_height = 6; + * @return {number} + */ +proto.s3web.preview.PreviewOptions.prototype.getThumbnailHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.PreviewOptions} returns this + */ +proto.s3web.preview.PreviewOptions.prototype.setThumbnailHeight = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.GetPreviewResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.GetPreviewResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.GetPreviewResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetPreviewResponse.toObject = function(includeInstance, msg) { + var f, obj = { + preview: (f = msg.getPreview()) && proto.s3web.preview.Preview.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.GetPreviewResponse} + */ +proto.s3web.preview.GetPreviewResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.GetPreviewResponse; + return proto.s3web.preview.GetPreviewResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.GetPreviewResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.GetPreviewResponse} + */ +proto.s3web.preview.GetPreviewResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.preview.Preview; + reader.readMessage(value,proto.s3web.preview.Preview.deserializeBinaryFromReader); + msg.setPreview(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.GetPreviewResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.GetPreviewResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.GetPreviewResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetPreviewResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPreview(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.preview.Preview.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Preview preview = 1; + * @return {?proto.s3web.preview.Preview} + */ +proto.s3web.preview.GetPreviewResponse.prototype.getPreview = function() { + return /** @type{?proto.s3web.preview.Preview} */ ( + jspb.Message.getWrapperField(this, proto.s3web.preview.Preview, 1)); +}; + + +/** + * @param {?proto.s3web.preview.Preview|undefined} value + * @return {!proto.s3web.preview.GetPreviewResponse} returns this +*/ +proto.s3web.preview.GetPreviewResponse.prototype.setPreview = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.GetPreviewResponse} returns this + */ +proto.s3web.preview.GetPreviewResponse.prototype.clearPreview = function() { + return this.setPreview(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.GetPreviewResponse.prototype.hasPreview = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.StreamPreviewRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.StreamPreviewRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.StreamPreviewRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + key: jspb.Message.getFieldWithDefault(msg, 3, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 4, ""), + renderMode: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: (f = msg.getOptions()) && proto.s3web.preview.PreviewOptions.toObject(includeInstance, f), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.StreamPreviewRequest} + */ +proto.s3web.preview.StreamPreviewRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.StreamPreviewRequest; + return proto.s3web.preview.StreamPreviewRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.StreamPreviewRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.StreamPreviewRequest} + */ +proto.s3web.preview.StreamPreviewRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 5: + var value = /** @type {!proto.s3web.preview.RenderMode} */ (reader.readEnum()); + msg.setRenderMode(value); + break; + case 6: + var value = new proto.s3web.preview.PreviewOptions; + reader.readMessage(value,proto.s3web.preview.PreviewOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.StreamPreviewRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.StreamPreviewRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.StreamPreviewRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRenderMode(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.s3web.preview.PreviewOptions.serializeBinaryToWriter + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this + */ +proto.s3web.preview.StreamPreviewRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this + */ +proto.s3web.preview.StreamPreviewRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string key = 3; + * @return {string} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this + */ +proto.s3web.preview.StreamPreviewRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version_id = 4; + * @return {string} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this + */ +proto.s3web.preview.StreamPreviewRequest.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional RenderMode render_mode = 5; + * @return {!proto.s3web.preview.RenderMode} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.getRenderMode = function() { + return /** @type {!proto.s3web.preview.RenderMode} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.s3web.preview.RenderMode} value + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this + */ +proto.s3web.preview.StreamPreviewRequest.prototype.setRenderMode = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional PreviewOptions options = 6; + * @return {?proto.s3web.preview.PreviewOptions} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.getOptions = function() { + return /** @type{?proto.s3web.preview.PreviewOptions} */ ( + jspb.Message.getWrapperField(this, proto.s3web.preview.PreviewOptions, 6)); +}; + + +/** + * @param {?proto.s3web.preview.PreviewOptions|undefined} value + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this +*/ +proto.s3web.preview.StreamPreviewRequest.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this + */ +proto.s3web.preview.StreamPreviewRequest.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.hasOptions = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this +*/ +proto.s3web.preview.StreamPreviewRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.StreamPreviewRequest} returns this + */ +proto.s3web.preview.StreamPreviewRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.StreamPreviewRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.GetThumbnailRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.GetThumbnailRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetThumbnailRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + key: jspb.Message.getFieldWithDefault(msg, 3, ""), + versionId: jspb.Message.getFieldWithDefault(msg, 4, ""), + width: jspb.Message.getFieldWithDefault(msg, 5, 0), + height: jspb.Message.getFieldWithDefault(msg, 6, 0), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.GetThumbnailRequest} + */ +proto.s3web.preview.GetThumbnailRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.GetThumbnailRequest; + return proto.s3web.preview.GetThumbnailRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.GetThumbnailRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.GetThumbnailRequest} + */ +proto.s3web.preview.GetThumbnailRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersionId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidth(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 7: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.GetThumbnailRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.GetThumbnailRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetThumbnailRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersionId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getWidth(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this + */ +proto.s3web.preview.GetThumbnailRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this + */ +proto.s3web.preview.GetThumbnailRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string key = 3; + * @return {string} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this + */ +proto.s3web.preview.GetThumbnailRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version_id = 4; + * @return {string} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.getVersionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this + */ +proto.s3web.preview.GetThumbnailRequest.prototype.setVersionId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 width = 5; + * @return {number} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this + */ +proto.s3web.preview.GetThumbnailRequest.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 height = 6; + * @return {number} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this + */ +proto.s3web.preview.GetThumbnailRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 7; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 7)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this +*/ +proto.s3web.preview.GetThumbnailRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.GetThumbnailRequest} returns this + */ +proto.s3web.preview.GetThumbnailRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.GetThumbnailRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.GetThumbnailResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.GetThumbnailResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.GetThumbnailResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetThumbnailResponse.toObject = function(includeInstance, msg) { + var f, obj = { + thumbnail: (f = msg.getThumbnail()) && proto.s3web.preview.Thumbnail.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.GetThumbnailResponse} + */ +proto.s3web.preview.GetThumbnailResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.GetThumbnailResponse; + return proto.s3web.preview.GetThumbnailResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.GetThumbnailResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.GetThumbnailResponse} + */ +proto.s3web.preview.GetThumbnailResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.preview.Thumbnail; + reader.readMessage(value,proto.s3web.preview.Thumbnail.deserializeBinaryFromReader); + msg.setThumbnail(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.GetThumbnailResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.GetThumbnailResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.GetThumbnailResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.GetThumbnailResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getThumbnail(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.preview.Thumbnail.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Thumbnail thumbnail = 1; + * @return {?proto.s3web.preview.Thumbnail} + */ +proto.s3web.preview.GetThumbnailResponse.prototype.getThumbnail = function() { + return /** @type{?proto.s3web.preview.Thumbnail} */ ( + jspb.Message.getWrapperField(this, proto.s3web.preview.Thumbnail, 1)); +}; + + +/** + * @param {?proto.s3web.preview.Thumbnail|undefined} value + * @return {!proto.s3web.preview.GetThumbnailResponse} returns this +*/ +proto.s3web.preview.GetThumbnailResponse.prototype.setThumbnail = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.GetThumbnailResponse} returns this + */ +proto.s3web.preview.GetThumbnailResponse.prototype.clearThumbnail = function() { + return this.setThumbnail(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.GetThumbnailResponse.prototype.hasThumbnail = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.CheckPreviewAvailabilityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.CheckPreviewAvailabilityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + key: jspb.Message.getFieldWithDefault(msg, 3, ""), + contentType: jspb.Message.getFieldWithDefault(msg, 4, ""), + size: jspb.Message.getFieldWithDefault(msg, 5, 0), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.CheckPreviewAvailabilityRequest; + return proto.s3web.preview.CheckPreviewAvailabilityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.CheckPreviewAvailabilityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 6: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.CheckPreviewAvailabilityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.CheckPreviewAvailabilityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 6, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} returns this + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} returns this + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string key = 3; + * @return {string} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} returns this + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string content_type = 4; + * @return {string} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} returns this + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 size = 5; + * @return {number} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} returns this + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 6; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 6)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} returns this +*/ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.CheckPreviewAvailabilityRequest} returns this + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.CheckPreviewAvailabilityRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.preview.CheckPreviewAvailabilityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.preview.CheckPreviewAvailabilityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + availability: (f = msg.getAvailability()) && proto.s3web.preview.PreviewAvailability.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.preview.CheckPreviewAvailabilityResponse} + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.preview.CheckPreviewAvailabilityResponse; + return proto.s3web.preview.CheckPreviewAvailabilityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.preview.CheckPreviewAvailabilityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.preview.CheckPreviewAvailabilityResponse} + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.preview.PreviewAvailability; + reader.readMessage(value,proto.s3web.preview.PreviewAvailability.deserializeBinaryFromReader); + msg.setAvailability(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.preview.CheckPreviewAvailabilityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.preview.CheckPreviewAvailabilityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAvailability(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.preview.PreviewAvailability.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PreviewAvailability availability = 1; + * @return {?proto.s3web.preview.PreviewAvailability} + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.prototype.getAvailability = function() { + return /** @type{?proto.s3web.preview.PreviewAvailability} */ ( + jspb.Message.getWrapperField(this, proto.s3web.preview.PreviewAvailability, 1)); +}; + + +/** + * @param {?proto.s3web.preview.PreviewAvailability|undefined} value + * @return {!proto.s3web.preview.CheckPreviewAvailabilityResponse} returns this +*/ +proto.s3web.preview.CheckPreviewAvailabilityResponse.prototype.setAvailability = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.preview.CheckPreviewAvailabilityResponse} returns this + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.prototype.clearAvailability = function() { + return this.setAvailability(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.preview.CheckPreviewAvailabilityResponse.prototype.hasAvailability = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * @enum {number} + */ +proto.s3web.preview.PreviewType = { + PREVIEW_UNKNOWN: 0, + PREVIEW_IMAGE: 1, + PREVIEW_TEXT: 2, + PREVIEW_JSON: 3, + PREVIEW_YAML: 4, + PREVIEW_CSV: 5, + PREVIEW_PDF: 6, + PREVIEW_MARKDOWN: 7, + PREVIEW_XML: 8, + PREVIEW_HTML: 9, + PREVIEW_CODE: 10, + PREVIEW_AUDIO_THUMBNAIL: 11, + PREVIEW_VIDEO_THUMBNAIL: 12, + PREVIEW_UNSUPPORTED: 99 +}; + +/** + * @enum {number} + */ +proto.s3web.preview.RenderMode = { + RENDER_SAFE: 0, + RENDER_SANDBOXED: 1, + RENDER_RAW: 2 +}; + +goog.object.extend(exports, proto.s3web.preview); diff --git a/frontend/src/gen/transfer/TransferServiceClientPb.ts b/frontend/src/gen/transfer/TransferServiceClientPb.ts new file mode 100644 index 0000000..633b0cc --- /dev/null +++ b/frontend/src/gen/transfer/TransferServiceClientPb.ts @@ -0,0 +1,539 @@ +/** + * @fileoverview gRPC-Web generated client stub for s3web.transfer + * @enhanceable + * @public + */ + +// Code generated by protoc-gen-grpc-web. DO NOT EDIT. +// versions: +// protoc-gen-grpc-web v1.5.0 +// protoc v3.14.0 +// source: transfer/transfer.proto + + +/* eslint-disable */ +// @ts-nocheck + + +import * as grpcWeb from 'grpc-web'; + +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" +import * as transfer_transfer_pb from '../transfer/transfer_pb'; // proto import: "transfer/transfer.proto" + + +export class TransferServiceClient { + client_: grpcWeb.AbstractClientBase; + hostname_: string; + credentials_: null | { [index: string]: string; }; + options_: null | { [index: string]: any; }; + + constructor (hostname: string, + credentials?: null | { [index: string]: string; }, + options?: null | { [index: string]: any; }) { + if (!options) options = {}; + if (!credentials) credentials = {}; + options['format'] = 'binary'; + + this.client_ = new grpcWeb.GrpcWebClientBase(options); + this.hostname_ = hostname.replace(/\/+$/, ''); + this.credentials_ = credentials; + this.options_ = options; + } + + methodDescriptorInitiateUpload = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/InitiateUpload', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.InitiateUploadRequest, + transfer_transfer_pb.InitiateUploadResponse, + (request: transfer_transfer_pb.InitiateUploadRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.InitiateUploadResponse.deserializeBinary + ); + + initiateUpload( + request: transfer_transfer_pb.InitiateUploadRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + initiateUpload( + request: transfer_transfer_pb.InitiateUploadRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.InitiateUploadResponse) => void): grpcWeb.ClientReadableStream; + + initiateUpload( + request: transfer_transfer_pb.InitiateUploadRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.InitiateUploadResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/InitiateUpload', + request, + metadata || {}, + this.methodDescriptorInitiateUpload, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/InitiateUpload', + request, + metadata || {}, + this.methodDescriptorInitiateUpload); + } + + methodDescriptorCompleteUpload = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/CompleteUpload', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.CompleteUploadRequest, + transfer_transfer_pb.CompleteUploadResponse, + (request: transfer_transfer_pb.CompleteUploadRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.CompleteUploadResponse.deserializeBinary + ); + + completeUpload( + request: transfer_transfer_pb.CompleteUploadRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + completeUpload( + request: transfer_transfer_pb.CompleteUploadRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.CompleteUploadResponse) => void): grpcWeb.ClientReadableStream; + + completeUpload( + request: transfer_transfer_pb.CompleteUploadRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.CompleteUploadResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/CompleteUpload', + request, + metadata || {}, + this.methodDescriptorCompleteUpload, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/CompleteUpload', + request, + metadata || {}, + this.methodDescriptorCompleteUpload); + } + + methodDescriptorAbortUpload = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/AbortUpload', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.AbortUploadRequest, + transfer_transfer_pb.AbortUploadResponse, + (request: transfer_transfer_pb.AbortUploadRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.AbortUploadResponse.deserializeBinary + ); + + abortUpload( + request: transfer_transfer_pb.AbortUploadRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + abortUpload( + request: transfer_transfer_pb.AbortUploadRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.AbortUploadResponse) => void): grpcWeb.ClientReadableStream; + + abortUpload( + request: transfer_transfer_pb.AbortUploadRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.AbortUploadResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/AbortUpload', + request, + metadata || {}, + this.methodDescriptorAbortUpload, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/AbortUpload', + request, + metadata || {}, + this.methodDescriptorAbortUpload); + } + + methodDescriptorInitiateTransfer = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/InitiateTransfer', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.InitiateTransferRequest, + transfer_transfer_pb.InitiateTransferResponse, + (request: transfer_transfer_pb.InitiateTransferRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.InitiateTransferResponse.deserializeBinary + ); + + initiateTransfer( + request: transfer_transfer_pb.InitiateTransferRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + initiateTransfer( + request: transfer_transfer_pb.InitiateTransferRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.InitiateTransferResponse) => void): grpcWeb.ClientReadableStream; + + initiateTransfer( + request: transfer_transfer_pb.InitiateTransferRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.InitiateTransferResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/InitiateTransfer', + request, + metadata || {}, + this.methodDescriptorInitiateTransfer, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/InitiateTransfer', + request, + metadata || {}, + this.methodDescriptorInitiateTransfer); + } + + methodDescriptorGetTransferStatus = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/GetTransferStatus', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.GetTransferStatusRequest, + transfer_transfer_pb.GetTransferStatusResponse, + (request: transfer_transfer_pb.GetTransferStatusRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.GetTransferStatusResponse.deserializeBinary + ); + + getTransferStatus( + request: transfer_transfer_pb.GetTransferStatusRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + getTransferStatus( + request: transfer_transfer_pb.GetTransferStatusRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.GetTransferStatusResponse) => void): grpcWeb.ClientReadableStream; + + getTransferStatus( + request: transfer_transfer_pb.GetTransferStatusRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.GetTransferStatusResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/GetTransferStatus', + request, + metadata || {}, + this.methodDescriptorGetTransferStatus, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/GetTransferStatus', + request, + metadata || {}, + this.methodDescriptorGetTransferStatus); + } + + methodDescriptorStreamTransferProgress = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/StreamTransferProgress', + grpcWeb.MethodType.SERVER_STREAMING, + transfer_transfer_pb.StreamTransferProgressRequest, + transfer_transfer_pb.TransferProgressUpdate, + (request: transfer_transfer_pb.StreamTransferProgressRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.TransferProgressUpdate.deserializeBinary + ); + + streamTransferProgress( + request: transfer_transfer_pb.StreamTransferProgressRequest, + metadata?: grpcWeb.Metadata): grpcWeb.ClientReadableStream { + return this.client_.serverStreaming( + this.hostname_ + + '/s3web.transfer.TransferService/StreamTransferProgress', + request, + metadata || {}, + this.methodDescriptorStreamTransferProgress); + } + + methodDescriptorListTransfers = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/ListTransfers', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.ListTransfersRequest, + transfer_transfer_pb.ListTransfersResponse, + (request: transfer_transfer_pb.ListTransfersRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.ListTransfersResponse.deserializeBinary + ); + + listTransfers( + request: transfer_transfer_pb.ListTransfersRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + listTransfers( + request: transfer_transfer_pb.ListTransfersRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.ListTransfersResponse) => void): grpcWeb.ClientReadableStream; + + listTransfers( + request: transfer_transfer_pb.ListTransfersRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.ListTransfersResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/ListTransfers', + request, + metadata || {}, + this.methodDescriptorListTransfers, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/ListTransfers', + request, + metadata || {}, + this.methodDescriptorListTransfers); + } + + methodDescriptorPauseTransfer = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/PauseTransfer', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.PauseTransferRequest, + transfer_transfer_pb.PauseTransferResponse, + (request: transfer_transfer_pb.PauseTransferRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.PauseTransferResponse.deserializeBinary + ); + + pauseTransfer( + request: transfer_transfer_pb.PauseTransferRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + pauseTransfer( + request: transfer_transfer_pb.PauseTransferRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.PauseTransferResponse) => void): grpcWeb.ClientReadableStream; + + pauseTransfer( + request: transfer_transfer_pb.PauseTransferRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.PauseTransferResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/PauseTransfer', + request, + metadata || {}, + this.methodDescriptorPauseTransfer, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/PauseTransfer', + request, + metadata || {}, + this.methodDescriptorPauseTransfer); + } + + methodDescriptorResumeTransfer = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/ResumeTransfer', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.ResumeTransferRequest, + transfer_transfer_pb.ResumeTransferResponse, + (request: transfer_transfer_pb.ResumeTransferRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.ResumeTransferResponse.deserializeBinary + ); + + resumeTransfer( + request: transfer_transfer_pb.ResumeTransferRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + resumeTransfer( + request: transfer_transfer_pb.ResumeTransferRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.ResumeTransferResponse) => void): grpcWeb.ClientReadableStream; + + resumeTransfer( + request: transfer_transfer_pb.ResumeTransferRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.ResumeTransferResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/ResumeTransfer', + request, + metadata || {}, + this.methodDescriptorResumeTransfer, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/ResumeTransfer', + request, + metadata || {}, + this.methodDescriptorResumeTransfer); + } + + methodDescriptorCancelTransfer = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/CancelTransfer', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.CancelTransferRequest, + transfer_transfer_pb.CancelTransferResponse, + (request: transfer_transfer_pb.CancelTransferRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.CancelTransferResponse.deserializeBinary + ); + + cancelTransfer( + request: transfer_transfer_pb.CancelTransferRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + cancelTransfer( + request: transfer_transfer_pb.CancelTransferRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.CancelTransferResponse) => void): grpcWeb.ClientReadableStream; + + cancelTransfer( + request: transfer_transfer_pb.CancelTransferRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.CancelTransferResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/CancelTransfer', + request, + metadata || {}, + this.methodDescriptorCancelTransfer, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/CancelTransfer', + request, + metadata || {}, + this.methodDescriptorCancelTransfer); + } + + methodDescriptorRetryTransfer = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/RetryTransfer', + grpcWeb.MethodType.UNARY, + transfer_transfer_pb.RetryTransferRequest, + transfer_transfer_pb.RetryTransferResponse, + (request: transfer_transfer_pb.RetryTransferRequest) => { + return request.serializeBinary(); + }, + transfer_transfer_pb.RetryTransferResponse.deserializeBinary + ); + + retryTransfer( + request: transfer_transfer_pb.RetryTransferRequest, + metadata?: grpcWeb.Metadata | null): Promise; + + retryTransfer( + request: transfer_transfer_pb.RetryTransferRequest, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.RetryTransferResponse) => void): grpcWeb.ClientReadableStream; + + retryTransfer( + request: transfer_transfer_pb.RetryTransferRequest, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: transfer_transfer_pb.RetryTransferResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/RetryTransfer', + request, + metadata || {}, + this.methodDescriptorRetryTransfer, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/RetryTransfer', + request, + metadata || {}, + this.methodDescriptorRetryTransfer); + } + + methodDescriptorHealthCheck = new grpcWeb.MethodDescriptor( + '/s3web.transfer.TransferService/HealthCheck', + grpcWeb.MethodType.UNARY, + common_common_pb.HealthCheckResponse, + common_common_pb.HealthCheckResponse, + (request: common_common_pb.HealthCheckResponse) => { + return request.serializeBinary(); + }, + common_common_pb.HealthCheckResponse.deserializeBinary + ); + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null): Promise; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata: grpcWeb.Metadata | null, + callback: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void): grpcWeb.ClientReadableStream; + + healthCheck( + request: common_common_pb.HealthCheckResponse, + metadata?: grpcWeb.Metadata | null, + callback?: (err: grpcWeb.RpcError, + response: common_common_pb.HealthCheckResponse) => void) { + if (callback !== undefined) { + return this.client_.rpcCall( + this.hostname_ + + '/s3web.transfer.TransferService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck, + callback); + } + return this.client_.unaryCall( + this.hostname_ + + '/s3web.transfer.TransferService/HealthCheck', + request, + metadata || {}, + this.methodDescriptorHealthCheck); + } + +} + diff --git a/frontend/src/gen/transfer/transfer_pb.d.ts b/frontend/src/gen/transfer/transfer_pb.d.ts new file mode 100644 index 0000000..d65923c --- /dev/null +++ b/frontend/src/gen/transfer/transfer_pb.d.ts @@ -0,0 +1,998 @@ +import * as jspb from 'google-protobuf' + +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto" +import * as common_common_pb from '../common/common_pb'; // proto import: "common/common.proto" + + +export class TransferJob extends jspb.Message { + getId(): string; + setId(value: string): TransferJob; + + getType(): TransferType; + setType(value: TransferType): TransferJob; + + getState(): TransferState; + setState(value: TransferState): TransferJob; + + getSource(): TransferSource | undefined; + setSource(value?: TransferSource): TransferJob; + hasSource(): boolean; + clearSource(): TransferJob; + + getDestination(): TransferDestination | undefined; + setDestination(value?: TransferDestination): TransferJob; + hasDestination(): boolean; + clearDestination(): TransferJob; + + getOptions(): TransferOptions | undefined; + setOptions(value?: TransferOptions): TransferJob; + hasOptions(): boolean; + clearOptions(): TransferJob; + + getProgress(): common_common_pb.Progress | undefined; + setProgress(value?: common_common_pb.Progress): TransferJob; + hasProgress(): boolean; + clearProgress(): TransferJob; + + getVerification(): TransferVerification | undefined; + setVerification(value?: TransferVerification): TransferJob; + hasVerification(): boolean; + clearVerification(): TransferJob; + + getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): TransferJob; + hasCreatedAt(): boolean; + clearCreatedAt(): TransferJob; + + getStartedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStartedAt(value?: google_protobuf_timestamp_pb.Timestamp): TransferJob; + hasStartedAt(): boolean; + clearStartedAt(): TransferJob; + + getCompletedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCompletedAt(value?: google_protobuf_timestamp_pb.Timestamp): TransferJob; + hasCompletedAt(): boolean; + clearCompletedAt(): TransferJob; + + getErrorMessage(): string; + setErrorMessage(value: string): TransferJob; + + getRetryCount(): number; + setRetryCount(value: number): TransferJob; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): TransferJob; + hasAuditContext(): boolean; + clearAuditContext(): TransferJob; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferJob.AsObject; + static toObject(includeInstance: boolean, msg: TransferJob): TransferJob.AsObject; + static serializeBinaryToWriter(message: TransferJob, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferJob; + static deserializeBinaryFromReader(message: TransferJob, reader: jspb.BinaryReader): TransferJob; +} + +export namespace TransferJob { + export type AsObject = { + id: string, + type: TransferType, + state: TransferState, + source?: TransferSource.AsObject, + destination?: TransferDestination.AsObject, + options?: TransferOptions.AsObject, + progress?: common_common_pb.Progress.AsObject, + verification?: TransferVerification.AsObject, + createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + startedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + completedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + errorMessage: string, + retryCount: number, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class TransferSource extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): TransferSource; + + getBucket(): string; + setBucket(value: string): TransferSource; + + getPrefix(): string; + setPrefix(value: string): TransferSource; + + getObjectKeysList(): Array; + setObjectKeysList(value: Array): TransferSource; + clearObjectKeysList(): TransferSource; + addObjectKeys(value: string, index?: number): TransferSource; + + getRecursive(): boolean; + setRecursive(value: boolean): TransferSource; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferSource.AsObject; + static toObject(includeInstance: boolean, msg: TransferSource): TransferSource.AsObject; + static serializeBinaryToWriter(message: TransferSource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferSource; + static deserializeBinaryFromReader(message: TransferSource, reader: jspb.BinaryReader): TransferSource; +} + +export namespace TransferSource { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + objectKeysList: Array, + recursive: boolean, + } +} + +export class TransferDestination extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): TransferDestination; + + getBucket(): string; + setBucket(value: string): TransferDestination; + + getPrefix(): string; + setPrefix(value: string): TransferDestination; + + getCreateBucket(): boolean; + setCreateBucket(value: boolean): TransferDestination; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferDestination.AsObject; + static toObject(includeInstance: boolean, msg: TransferDestination): TransferDestination.AsObject; + static serializeBinaryToWriter(message: TransferDestination, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferDestination; + static deserializeBinaryFromReader(message: TransferDestination, reader: jspb.BinaryReader): TransferDestination; +} + +export namespace TransferDestination { + export type AsObject = { + locationId: string, + bucket: string, + prefix: string, + createBucket: boolean, + } +} + +export class TransferOptions extends jspb.Message { + getConcurrency(): number; + setConcurrency(value: number): TransferOptions; + + getPartSize(): number; + setPartSize(value: number): TransferOptions; + + getMaxRetries(): number; + setMaxRetries(value: number): TransferOptions; + + getVerifyChecksum(): boolean; + setVerifyChecksum(value: boolean): TransferOptions; + + getPreserveMetadata(): boolean; + setPreserveMetadata(value: boolean): TransferOptions; + + getPreserveTags(): boolean; + setPreserveTags(value: boolean): TransferOptions; + + getOverwriteExisting(): boolean; + setOverwriteExisting(value: boolean): TransferOptions; + + getStorageClass(): string; + setStorageClass(value: string): TransferOptions; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): TransferOptions; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferOptions.AsObject; + static toObject(includeInstance: boolean, msg: TransferOptions): TransferOptions.AsObject; + static serializeBinaryToWriter(message: TransferOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferOptions; + static deserializeBinaryFromReader(message: TransferOptions, reader: jspb.BinaryReader): TransferOptions; +} + +export namespace TransferOptions { + export type AsObject = { + concurrency: number, + partSize: number, + maxRetries: number, + verifyChecksum: boolean, + preserveMetadata: boolean, + preserveTags: boolean, + overwriteExisting: boolean, + storageClass: string, + metadataMap: Array<[string, string]>, + } +} + +export class TransferVerification extends jspb.Message { + getEnabled(): boolean; + setEnabled(value: boolean): TransferVerification; + + getSourceChecksum(): common_common_pb.Checksum | undefined; + setSourceChecksum(value?: common_common_pb.Checksum): TransferVerification; + hasSourceChecksum(): boolean; + clearSourceChecksum(): TransferVerification; + + getDestinationChecksum(): common_common_pb.Checksum | undefined; + setDestinationChecksum(value?: common_common_pb.Checksum): TransferVerification; + hasDestinationChecksum(): boolean; + clearDestinationChecksum(): TransferVerification; + + getVerified(): boolean; + setVerified(value: boolean): TransferVerification; + + getVerifiedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setVerifiedAt(value?: google_protobuf_timestamp_pb.Timestamp): TransferVerification; + hasVerifiedAt(): boolean; + clearVerifiedAt(): TransferVerification; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferVerification.AsObject; + static toObject(includeInstance: boolean, msg: TransferVerification): TransferVerification.AsObject; + static serializeBinaryToWriter(message: TransferVerification, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferVerification; + static deserializeBinaryFromReader(message: TransferVerification, reader: jspb.BinaryReader): TransferVerification; +} + +export namespace TransferVerification { + export type AsObject = { + enabled: boolean, + sourceChecksum?: common_common_pb.Checksum.AsObject, + destinationChecksum?: common_common_pb.Checksum.AsObject, + verified: boolean, + verifiedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class MultipartUpload extends jspb.Message { + getUploadId(): string; + setUploadId(value: string): MultipartUpload; + + getLocationId(): string; + setLocationId(value: string): MultipartUpload; + + getBucket(): string; + setBucket(value: string): MultipartUpload; + + getKey(): string; + setKey(value: string): MultipartUpload; + + getTotalSize(): number; + setTotalSize(value: number): MultipartUpload; + + getTotalParts(): number; + setTotalParts(value: number): MultipartUpload; + + getPartSize(): number; + setPartSize(value: number): MultipartUpload; + + getUploadedPartsList(): Array; + setUploadedPartsList(value: Array): MultipartUpload; + clearUploadedPartsList(): MultipartUpload; + addUploadedParts(value?: UploadedPart, index?: number): UploadedPart; + + getInitiatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setInitiatedAt(value?: google_protobuf_timestamp_pb.Timestamp): MultipartUpload; + hasInitiatedAt(): boolean; + clearInitiatedAt(): MultipartUpload; + + getExpiresAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setExpiresAt(value?: google_protobuf_timestamp_pb.Timestamp): MultipartUpload; + hasExpiresAt(): boolean; + clearExpiresAt(): MultipartUpload; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MultipartUpload.AsObject; + static toObject(includeInstance: boolean, msg: MultipartUpload): MultipartUpload.AsObject; + static serializeBinaryToWriter(message: MultipartUpload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MultipartUpload; + static deserializeBinaryFromReader(message: MultipartUpload, reader: jspb.BinaryReader): MultipartUpload; +} + +export namespace MultipartUpload { + export type AsObject = { + uploadId: string, + locationId: string, + bucket: string, + key: string, + totalSize: number, + totalParts: number, + partSize: number, + uploadedPartsList: Array, + initiatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + expiresAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class UploadedPart extends jspb.Message { + getPartNumber(): number; + setPartNumber(value: number): UploadedPart; + + getEtag(): string; + setEtag(value: string): UploadedPart; + + getSize(): number; + setSize(value: number): UploadedPart; + + getUploadedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUploadedAt(value?: google_protobuf_timestamp_pb.Timestamp): UploadedPart; + hasUploadedAt(): boolean; + clearUploadedAt(): UploadedPart; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadedPart.AsObject; + static toObject(includeInstance: boolean, msg: UploadedPart): UploadedPart.AsObject; + static serializeBinaryToWriter(message: UploadedPart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadedPart; + static deserializeBinaryFromReader(message: UploadedPart, reader: jspb.BinaryReader): UploadedPart; +} + +export namespace UploadedPart { + export type AsObject = { + partNumber: number, + etag: string, + size: number, + uploadedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class InitiateUploadRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): InitiateUploadRequest; + + getBucket(): string; + setBucket(value: string): InitiateUploadRequest; + + getKey(): string; + setKey(value: string): InitiateUploadRequest; + + getTotalSize(): number; + setTotalSize(value: number): InitiateUploadRequest; + + getPartSize(): number; + setPartSize(value: number): InitiateUploadRequest; + + getContentType(): string; + setContentType(value: string): InitiateUploadRequest; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): InitiateUploadRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): InitiateUploadRequest; + hasAuditContext(): boolean; + clearAuditContext(): InitiateUploadRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitiateUploadRequest.AsObject; + static toObject(includeInstance: boolean, msg: InitiateUploadRequest): InitiateUploadRequest.AsObject; + static serializeBinaryToWriter(message: InitiateUploadRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitiateUploadRequest; + static deserializeBinaryFromReader(message: InitiateUploadRequest, reader: jspb.BinaryReader): InitiateUploadRequest; +} + +export namespace InitiateUploadRequest { + export type AsObject = { + locationId: string, + bucket: string, + key: string, + totalSize: number, + partSize: number, + contentType: string, + metadataMap: Array<[string, string]>, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class InitiateUploadResponse extends jspb.Message { + getUploadId(): string; + setUploadId(value: string): InitiateUploadResponse; + + getUpload(): MultipartUpload | undefined; + setUpload(value?: MultipartUpload): InitiateUploadResponse; + hasUpload(): boolean; + clearUpload(): InitiateUploadResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitiateUploadResponse.AsObject; + static toObject(includeInstance: boolean, msg: InitiateUploadResponse): InitiateUploadResponse.AsObject; + static serializeBinaryToWriter(message: InitiateUploadResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitiateUploadResponse; + static deserializeBinaryFromReader(message: InitiateUploadResponse, reader: jspb.BinaryReader): InitiateUploadResponse; +} + +export namespace InitiateUploadResponse { + export type AsObject = { + uploadId: string, + upload?: MultipartUpload.AsObject, + } +} + +export class UploadPartRequest extends jspb.Message { + getUploadId(): string; + setUploadId(value: string): UploadPartRequest; + + getPartNumber(): number; + setPartNumber(value: number): UploadPartRequest; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): UploadPartRequest; + + getIsLastChunk(): boolean; + setIsLastChunk(value: boolean): UploadPartRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadPartRequest.AsObject; + static toObject(includeInstance: boolean, msg: UploadPartRequest): UploadPartRequest.AsObject; + static serializeBinaryToWriter(message: UploadPartRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadPartRequest; + static deserializeBinaryFromReader(message: UploadPartRequest, reader: jspb.BinaryReader): UploadPartRequest; +} + +export namespace UploadPartRequest { + export type AsObject = { + uploadId: string, + partNumber: number, + data: Uint8Array | string, + isLastChunk: boolean, + } +} + +export class UploadPartResponse extends jspb.Message { + getEtag(): string; + setEtag(value: string): UploadPartResponse; + + getBytesUploaded(): number; + setBytesUploaded(value: number): UploadPartResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadPartResponse.AsObject; + static toObject(includeInstance: boolean, msg: UploadPartResponse): UploadPartResponse.AsObject; + static serializeBinaryToWriter(message: UploadPartResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadPartResponse; + static deserializeBinaryFromReader(message: UploadPartResponse, reader: jspb.BinaryReader): UploadPartResponse; +} + +export namespace UploadPartResponse { + export type AsObject = { + etag: string, + bytesUploaded: number, + } +} + +export class CompleteUploadRequest extends jspb.Message { + getUploadId(): string; + setUploadId(value: string): CompleteUploadRequest; + + getPartsList(): Array; + setPartsList(value: Array): CompleteUploadRequest; + clearPartsList(): CompleteUploadRequest; + addParts(value?: UploadedPart, index?: number): UploadedPart; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CompleteUploadRequest; + hasAuditContext(): boolean; + clearAuditContext(): CompleteUploadRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CompleteUploadRequest.AsObject; + static toObject(includeInstance: boolean, msg: CompleteUploadRequest): CompleteUploadRequest.AsObject; + static serializeBinaryToWriter(message: CompleteUploadRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CompleteUploadRequest; + static deserializeBinaryFromReader(message: CompleteUploadRequest, reader: jspb.BinaryReader): CompleteUploadRequest; +} + +export namespace CompleteUploadRequest { + export type AsObject = { + uploadId: string, + partsList: Array, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CompleteUploadResponse extends jspb.Message { + getLocation(): string; + setLocation(value: string): CompleteUploadResponse; + + getEtag(): string; + setEtag(value: string): CompleteUploadResponse; + + getChecksum(): common_common_pb.Checksum | undefined; + setChecksum(value?: common_common_pb.Checksum): CompleteUploadResponse; + hasChecksum(): boolean; + clearChecksum(): CompleteUploadResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CompleteUploadResponse.AsObject; + static toObject(includeInstance: boolean, msg: CompleteUploadResponse): CompleteUploadResponse.AsObject; + static serializeBinaryToWriter(message: CompleteUploadResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CompleteUploadResponse; + static deserializeBinaryFromReader(message: CompleteUploadResponse, reader: jspb.BinaryReader): CompleteUploadResponse; +} + +export namespace CompleteUploadResponse { + export type AsObject = { + location: string, + etag: string, + checksum?: common_common_pb.Checksum.AsObject, + } +} + +export class AbortUploadRequest extends jspb.Message { + getUploadId(): string; + setUploadId(value: string): AbortUploadRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): AbortUploadRequest; + hasAuditContext(): boolean; + clearAuditContext(): AbortUploadRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AbortUploadRequest.AsObject; + static toObject(includeInstance: boolean, msg: AbortUploadRequest): AbortUploadRequest.AsObject; + static serializeBinaryToWriter(message: AbortUploadRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AbortUploadRequest; + static deserializeBinaryFromReader(message: AbortUploadRequest, reader: jspb.BinaryReader): AbortUploadRequest; +} + +export namespace AbortUploadRequest { + export type AsObject = { + uploadId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class AbortUploadResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): AbortUploadResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AbortUploadResponse.AsObject; + static toObject(includeInstance: boolean, msg: AbortUploadResponse): AbortUploadResponse.AsObject; + static serializeBinaryToWriter(message: AbortUploadResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AbortUploadResponse; + static deserializeBinaryFromReader(message: AbortUploadResponse, reader: jspb.BinaryReader): AbortUploadResponse; +} + +export namespace AbortUploadResponse { + export type AsObject = { + success: boolean, + } +} + +export class InitiateTransferRequest extends jspb.Message { + getType(): TransferType; + setType(value: TransferType): InitiateTransferRequest; + + getSource(): TransferSource | undefined; + setSource(value?: TransferSource): InitiateTransferRequest; + hasSource(): boolean; + clearSource(): InitiateTransferRequest; + + getDestination(): TransferDestination | undefined; + setDestination(value?: TransferDestination): InitiateTransferRequest; + hasDestination(): boolean; + clearDestination(): InitiateTransferRequest; + + getOptions(): TransferOptions | undefined; + setOptions(value?: TransferOptions): InitiateTransferRequest; + hasOptions(): boolean; + clearOptions(): InitiateTransferRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): InitiateTransferRequest; + hasAuditContext(): boolean; + clearAuditContext(): InitiateTransferRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitiateTransferRequest.AsObject; + static toObject(includeInstance: boolean, msg: InitiateTransferRequest): InitiateTransferRequest.AsObject; + static serializeBinaryToWriter(message: InitiateTransferRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitiateTransferRequest; + static deserializeBinaryFromReader(message: InitiateTransferRequest, reader: jspb.BinaryReader): InitiateTransferRequest; +} + +export namespace InitiateTransferRequest { + export type AsObject = { + type: TransferType, + source?: TransferSource.AsObject, + destination?: TransferDestination.AsObject, + options?: TransferOptions.AsObject, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class InitiateTransferResponse extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): InitiateTransferResponse; + + getJob(): TransferJob | undefined; + setJob(value?: TransferJob): InitiateTransferResponse; + hasJob(): boolean; + clearJob(): InitiateTransferResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitiateTransferResponse.AsObject; + static toObject(includeInstance: boolean, msg: InitiateTransferResponse): InitiateTransferResponse.AsObject; + static serializeBinaryToWriter(message: InitiateTransferResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitiateTransferResponse; + static deserializeBinaryFromReader(message: InitiateTransferResponse, reader: jspb.BinaryReader): InitiateTransferResponse; +} + +export namespace InitiateTransferResponse { + export type AsObject = { + transferId: string, + job?: TransferJob.AsObject, + } +} + +export class GetTransferStatusRequest extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): GetTransferStatusRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): GetTransferStatusRequest; + hasAuditContext(): boolean; + clearAuditContext(): GetTransferStatusRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransferStatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTransferStatusRequest): GetTransferStatusRequest.AsObject; + static serializeBinaryToWriter(message: GetTransferStatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransferStatusRequest; + static deserializeBinaryFromReader(message: GetTransferStatusRequest, reader: jspb.BinaryReader): GetTransferStatusRequest; +} + +export namespace GetTransferStatusRequest { + export type AsObject = { + transferId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class GetTransferStatusResponse extends jspb.Message { + getJob(): TransferJob | undefined; + setJob(value?: TransferJob): GetTransferStatusResponse; + hasJob(): boolean; + clearJob(): GetTransferStatusResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTransferStatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetTransferStatusResponse): GetTransferStatusResponse.AsObject; + static serializeBinaryToWriter(message: GetTransferStatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTransferStatusResponse; + static deserializeBinaryFromReader(message: GetTransferStatusResponse, reader: jspb.BinaryReader): GetTransferStatusResponse; +} + +export namespace GetTransferStatusResponse { + export type AsObject = { + job?: TransferJob.AsObject, + } +} + +export class StreamTransferProgressRequest extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): StreamTransferProgressRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): StreamTransferProgressRequest; + hasAuditContext(): boolean; + clearAuditContext(): StreamTransferProgressRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamTransferProgressRequest.AsObject; + static toObject(includeInstance: boolean, msg: StreamTransferProgressRequest): StreamTransferProgressRequest.AsObject; + static serializeBinaryToWriter(message: StreamTransferProgressRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamTransferProgressRequest; + static deserializeBinaryFromReader(message: StreamTransferProgressRequest, reader: jspb.BinaryReader): StreamTransferProgressRequest; +} + +export namespace StreamTransferProgressRequest { + export type AsObject = { + transferId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class TransferProgressUpdate extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): TransferProgressUpdate; + + getState(): TransferState; + setState(value: TransferState): TransferProgressUpdate; + + getProgress(): common_common_pb.Progress | undefined; + setProgress(value?: common_common_pb.Progress): TransferProgressUpdate; + hasProgress(): boolean; + clearProgress(): TransferProgressUpdate; + + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): TransferProgressUpdate; + hasTimestamp(): boolean; + clearTimestamp(): TransferProgressUpdate; + + getMessage(): string; + setMessage(value: string): TransferProgressUpdate; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferProgressUpdate.AsObject; + static toObject(includeInstance: boolean, msg: TransferProgressUpdate): TransferProgressUpdate.AsObject; + static serializeBinaryToWriter(message: TransferProgressUpdate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferProgressUpdate; + static deserializeBinaryFromReader(message: TransferProgressUpdate, reader: jspb.BinaryReader): TransferProgressUpdate; +} + +export namespace TransferProgressUpdate { + export type AsObject = { + transferId: string, + state: TransferState, + progress?: common_common_pb.Progress.AsObject, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + message: string, + } +} + +export class ListTransfersRequest extends jspb.Message { + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ListTransfersRequest; + hasAuditContext(): boolean; + clearAuditContext(): ListTransfersRequest; + + getPagination(): common_common_pb.PaginationRequest | undefined; + setPagination(value?: common_common_pb.PaginationRequest): ListTransfersRequest; + hasPagination(): boolean; + clearPagination(): ListTransfersRequest; + + getFiltersList(): Array; + setFiltersList(value: Array): ListTransfersRequest; + clearFiltersList(): ListTransfersRequest; + addFilters(value?: common_common_pb.Filter, index?: number): common_common_pb.Filter; + + getTimeRange(): common_common_pb.TimeRange | undefined; + setTimeRange(value?: common_common_pb.TimeRange): ListTransfersRequest; + hasTimeRange(): boolean; + clearTimeRange(): ListTransfersRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTransfersRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListTransfersRequest): ListTransfersRequest.AsObject; + static serializeBinaryToWriter(message: ListTransfersRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTransfersRequest; + static deserializeBinaryFromReader(message: ListTransfersRequest, reader: jspb.BinaryReader): ListTransfersRequest; +} + +export namespace ListTransfersRequest { + export type AsObject = { + auditContext?: common_common_pb.AuditContext.AsObject, + pagination?: common_common_pb.PaginationRequest.AsObject, + filtersList: Array, + timeRange?: common_common_pb.TimeRange.AsObject, + } +} + +export class ListTransfersResponse extends jspb.Message { + getJobsList(): Array; + setJobsList(value: Array): ListTransfersResponse; + clearJobsList(): ListTransfersResponse; + addJobs(value?: TransferJob, index?: number): TransferJob; + + getPagination(): common_common_pb.PaginationResponse | undefined; + setPagination(value?: common_common_pb.PaginationResponse): ListTransfersResponse; + hasPagination(): boolean; + clearPagination(): ListTransfersResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTransfersResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListTransfersResponse): ListTransfersResponse.AsObject; + static serializeBinaryToWriter(message: ListTransfersResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTransfersResponse; + static deserializeBinaryFromReader(message: ListTransfersResponse, reader: jspb.BinaryReader): ListTransfersResponse; +} + +export namespace ListTransfersResponse { + export type AsObject = { + jobsList: Array, + pagination?: common_common_pb.PaginationResponse.AsObject, + } +} + +export class PauseTransferRequest extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): PauseTransferRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): PauseTransferRequest; + hasAuditContext(): boolean; + clearAuditContext(): PauseTransferRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PauseTransferRequest.AsObject; + static toObject(includeInstance: boolean, msg: PauseTransferRequest): PauseTransferRequest.AsObject; + static serializeBinaryToWriter(message: PauseTransferRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PauseTransferRequest; + static deserializeBinaryFromReader(message: PauseTransferRequest, reader: jspb.BinaryReader): PauseTransferRequest; +} + +export namespace PauseTransferRequest { + export type AsObject = { + transferId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class PauseTransferResponse extends jspb.Message { + getJob(): TransferJob | undefined; + setJob(value?: TransferJob): PauseTransferResponse; + hasJob(): boolean; + clearJob(): PauseTransferResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PauseTransferResponse.AsObject; + static toObject(includeInstance: boolean, msg: PauseTransferResponse): PauseTransferResponse.AsObject; + static serializeBinaryToWriter(message: PauseTransferResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PauseTransferResponse; + static deserializeBinaryFromReader(message: PauseTransferResponse, reader: jspb.BinaryReader): PauseTransferResponse; +} + +export namespace PauseTransferResponse { + export type AsObject = { + job?: TransferJob.AsObject, + } +} + +export class ResumeTransferRequest extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): ResumeTransferRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): ResumeTransferRequest; + hasAuditContext(): boolean; + clearAuditContext(): ResumeTransferRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResumeTransferRequest.AsObject; + static toObject(includeInstance: boolean, msg: ResumeTransferRequest): ResumeTransferRequest.AsObject; + static serializeBinaryToWriter(message: ResumeTransferRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResumeTransferRequest; + static deserializeBinaryFromReader(message: ResumeTransferRequest, reader: jspb.BinaryReader): ResumeTransferRequest; +} + +export namespace ResumeTransferRequest { + export type AsObject = { + transferId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class ResumeTransferResponse extends jspb.Message { + getJob(): TransferJob | undefined; + setJob(value?: TransferJob): ResumeTransferResponse; + hasJob(): boolean; + clearJob(): ResumeTransferResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResumeTransferResponse.AsObject; + static toObject(includeInstance: boolean, msg: ResumeTransferResponse): ResumeTransferResponse.AsObject; + static serializeBinaryToWriter(message: ResumeTransferResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResumeTransferResponse; + static deserializeBinaryFromReader(message: ResumeTransferResponse, reader: jspb.BinaryReader): ResumeTransferResponse; +} + +export namespace ResumeTransferResponse { + export type AsObject = { + job?: TransferJob.AsObject, + } +} + +export class CancelTransferRequest extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): CancelTransferRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): CancelTransferRequest; + hasAuditContext(): boolean; + clearAuditContext(): CancelTransferRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelTransferRequest.AsObject; + static toObject(includeInstance: boolean, msg: CancelTransferRequest): CancelTransferRequest.AsObject; + static serializeBinaryToWriter(message: CancelTransferRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelTransferRequest; + static deserializeBinaryFromReader(message: CancelTransferRequest, reader: jspb.BinaryReader): CancelTransferRequest; +} + +export namespace CancelTransferRequest { + export type AsObject = { + transferId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class CancelTransferResponse extends jspb.Message { + getJob(): TransferJob | undefined; + setJob(value?: TransferJob): CancelTransferResponse; + hasJob(): boolean; + clearJob(): CancelTransferResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelTransferResponse.AsObject; + static toObject(includeInstance: boolean, msg: CancelTransferResponse): CancelTransferResponse.AsObject; + static serializeBinaryToWriter(message: CancelTransferResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelTransferResponse; + static deserializeBinaryFromReader(message: CancelTransferResponse, reader: jspb.BinaryReader): CancelTransferResponse; +} + +export namespace CancelTransferResponse { + export type AsObject = { + job?: TransferJob.AsObject, + } +} + +export class RetryTransferRequest extends jspb.Message { + getTransferId(): string; + setTransferId(value: string): RetryTransferRequest; + + getAuditContext(): common_common_pb.AuditContext | undefined; + setAuditContext(value?: common_common_pb.AuditContext): RetryTransferRequest; + hasAuditContext(): boolean; + clearAuditContext(): RetryTransferRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RetryTransferRequest.AsObject; + static toObject(includeInstance: boolean, msg: RetryTransferRequest): RetryTransferRequest.AsObject; + static serializeBinaryToWriter(message: RetryTransferRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RetryTransferRequest; + static deserializeBinaryFromReader(message: RetryTransferRequest, reader: jspb.BinaryReader): RetryTransferRequest; +} + +export namespace RetryTransferRequest { + export type AsObject = { + transferId: string, + auditContext?: common_common_pb.AuditContext.AsObject, + } +} + +export class RetryTransferResponse extends jspb.Message { + getJob(): TransferJob | undefined; + setJob(value?: TransferJob): RetryTransferResponse; + hasJob(): boolean; + clearJob(): RetryTransferResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RetryTransferResponse.AsObject; + static toObject(includeInstance: boolean, msg: RetryTransferResponse): RetryTransferResponse.AsObject; + static serializeBinaryToWriter(message: RetryTransferResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RetryTransferResponse; + static deserializeBinaryFromReader(message: RetryTransferResponse, reader: jspb.BinaryReader): RetryTransferResponse; +} + +export namespace RetryTransferResponse { + export type AsObject = { + job?: TransferJob.AsObject, + } +} + +export enum TransferType { + TRANSFER_UNKNOWN = 0, + TRANSFER_UPLOAD = 1, + TRANSFER_DOWNLOAD = 2, + TRANSFER_COPY = 3, + TRANSFER_MOVE = 4, + TRANSFER_SYNC = 5, +} +export enum TransferState { + STATE_UNKNOWN = 0, + STATE_PENDING = 1, + STATE_RUNNING = 2, + STATE_PAUSED = 3, + STATE_COMPLETED = 4, + STATE_FAILED = 5, + STATE_CANCELLED = 6, + STATE_VERIFYING = 7, +} diff --git a/frontend/src/gen/transfer/transfer_pb.js b/frontend/src/gen/transfer/transfer_pb.js new file mode 100644 index 0000000..de0171f --- /dev/null +++ b/frontend/src/gen/transfer/transfer_pb.js @@ -0,0 +1,8219 @@ +// source: transfer/transfer.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var common_common_pb = require('../common/common_pb.js'); +goog.object.extend(proto, common_common_pb); +goog.exportSymbol('proto.s3web.transfer.AbortUploadRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.AbortUploadResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.CancelTransferRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.CancelTransferResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.CompleteUploadRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.CompleteUploadResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.GetTransferStatusRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.GetTransferStatusResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.InitiateTransferRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.InitiateTransferResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.InitiateUploadRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.InitiateUploadResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.ListTransfersRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.ListTransfersResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.MultipartUpload', null, global); +goog.exportSymbol('proto.s3web.transfer.PauseTransferRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.PauseTransferResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.ResumeTransferRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.ResumeTransferResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.RetryTransferRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.RetryTransferResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.StreamTransferProgressRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferDestination', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferJob', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferOptions', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferProgressUpdate', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferSource', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferState', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferType', null, global); +goog.exportSymbol('proto.s3web.transfer.TransferVerification', null, global); +goog.exportSymbol('proto.s3web.transfer.UploadPartRequest', null, global); +goog.exportSymbol('proto.s3web.transfer.UploadPartResponse', null, global); +goog.exportSymbol('proto.s3web.transfer.UploadedPart', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.TransferJob = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.TransferJob, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.TransferJob.displayName = 'proto.s3web.transfer.TransferJob'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.TransferSource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.transfer.TransferSource.repeatedFields_, null); +}; +goog.inherits(proto.s3web.transfer.TransferSource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.TransferSource.displayName = 'proto.s3web.transfer.TransferSource'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.TransferDestination = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.TransferDestination, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.TransferDestination.displayName = 'proto.s3web.transfer.TransferDestination'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.TransferOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.TransferOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.TransferOptions.displayName = 'proto.s3web.transfer.TransferOptions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.TransferVerification = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.TransferVerification, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.TransferVerification.displayName = 'proto.s3web.transfer.TransferVerification'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.MultipartUpload = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.transfer.MultipartUpload.repeatedFields_, null); +}; +goog.inherits(proto.s3web.transfer.MultipartUpload, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.MultipartUpload.displayName = 'proto.s3web.transfer.MultipartUpload'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.UploadedPart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.UploadedPart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.UploadedPart.displayName = 'proto.s3web.transfer.UploadedPart'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.InitiateUploadRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.InitiateUploadRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.InitiateUploadRequest.displayName = 'proto.s3web.transfer.InitiateUploadRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.InitiateUploadResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.InitiateUploadResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.InitiateUploadResponse.displayName = 'proto.s3web.transfer.InitiateUploadResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.UploadPartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.UploadPartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.UploadPartRequest.displayName = 'proto.s3web.transfer.UploadPartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.UploadPartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.UploadPartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.UploadPartResponse.displayName = 'proto.s3web.transfer.UploadPartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.CompleteUploadRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.transfer.CompleteUploadRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.transfer.CompleteUploadRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.CompleteUploadRequest.displayName = 'proto.s3web.transfer.CompleteUploadRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.CompleteUploadResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.CompleteUploadResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.CompleteUploadResponse.displayName = 'proto.s3web.transfer.CompleteUploadResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.AbortUploadRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.AbortUploadRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.AbortUploadRequest.displayName = 'proto.s3web.transfer.AbortUploadRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.AbortUploadResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.AbortUploadResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.AbortUploadResponse.displayName = 'proto.s3web.transfer.AbortUploadResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.InitiateTransferRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.InitiateTransferRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.InitiateTransferRequest.displayName = 'proto.s3web.transfer.InitiateTransferRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.InitiateTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.InitiateTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.InitiateTransferResponse.displayName = 'proto.s3web.transfer.InitiateTransferResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.GetTransferStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.GetTransferStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.GetTransferStatusRequest.displayName = 'proto.s3web.transfer.GetTransferStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.GetTransferStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.GetTransferStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.GetTransferStatusResponse.displayName = 'proto.s3web.transfer.GetTransferStatusResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.StreamTransferProgressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.StreamTransferProgressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.StreamTransferProgressRequest.displayName = 'proto.s3web.transfer.StreamTransferProgressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.TransferProgressUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.TransferProgressUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.TransferProgressUpdate.displayName = 'proto.s3web.transfer.TransferProgressUpdate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.ListTransfersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.transfer.ListTransfersRequest.repeatedFields_, null); +}; +goog.inherits(proto.s3web.transfer.ListTransfersRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.ListTransfersRequest.displayName = 'proto.s3web.transfer.ListTransfersRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.ListTransfersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.s3web.transfer.ListTransfersResponse.repeatedFields_, null); +}; +goog.inherits(proto.s3web.transfer.ListTransfersResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.ListTransfersResponse.displayName = 'proto.s3web.transfer.ListTransfersResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.PauseTransferRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.PauseTransferRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.PauseTransferRequest.displayName = 'proto.s3web.transfer.PauseTransferRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.PauseTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.PauseTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.PauseTransferResponse.displayName = 'proto.s3web.transfer.PauseTransferResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.ResumeTransferRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.ResumeTransferRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.ResumeTransferRequest.displayName = 'proto.s3web.transfer.ResumeTransferRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.ResumeTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.ResumeTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.ResumeTransferResponse.displayName = 'proto.s3web.transfer.ResumeTransferResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.CancelTransferRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.CancelTransferRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.CancelTransferRequest.displayName = 'proto.s3web.transfer.CancelTransferRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.CancelTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.CancelTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.CancelTransferResponse.displayName = 'proto.s3web.transfer.CancelTransferResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.RetryTransferRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.RetryTransferRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.RetryTransferRequest.displayName = 'proto.s3web.transfer.RetryTransferRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.s3web.transfer.RetryTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.s3web.transfer.RetryTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.s3web.transfer.RetryTransferResponse.displayName = 'proto.s3web.transfer.RetryTransferResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.TransferJob.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.TransferJob.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.TransferJob} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferJob.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + state: jspb.Message.getFieldWithDefault(msg, 3, 0), + source: (f = msg.getSource()) && proto.s3web.transfer.TransferSource.toObject(includeInstance, f), + destination: (f = msg.getDestination()) && proto.s3web.transfer.TransferDestination.toObject(includeInstance, f), + options: (f = msg.getOptions()) && proto.s3web.transfer.TransferOptions.toObject(includeInstance, f), + progress: (f = msg.getProgress()) && common_common_pb.Progress.toObject(includeInstance, f), + verification: (f = msg.getVerification()) && proto.s3web.transfer.TransferVerification.toObject(includeInstance, f), + createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + startedAt: (f = msg.getStartedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + completedAt: (f = msg.getCompletedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + errorMessage: jspb.Message.getFieldWithDefault(msg, 12, ""), + retryCount: jspb.Message.getFieldWithDefault(msg, 13, 0), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.TransferJob.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.TransferJob; + return proto.s3web.transfer.TransferJob.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.TransferJob} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.TransferJob.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {!proto.s3web.transfer.TransferType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: + var value = /** @type {!proto.s3web.transfer.TransferState} */ (reader.readEnum()); + msg.setState(value); + break; + case 4: + var value = new proto.s3web.transfer.TransferSource; + reader.readMessage(value,proto.s3web.transfer.TransferSource.deserializeBinaryFromReader); + msg.setSource(value); + break; + case 5: + var value = new proto.s3web.transfer.TransferDestination; + reader.readMessage(value,proto.s3web.transfer.TransferDestination.deserializeBinaryFromReader); + msg.setDestination(value); + break; + case 6: + var value = new proto.s3web.transfer.TransferOptions; + reader.readMessage(value,proto.s3web.transfer.TransferOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 7: + var value = new common_common_pb.Progress; + reader.readMessage(value,common_common_pb.Progress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 8: + var value = new proto.s3web.transfer.TransferVerification; + reader.readMessage(value,proto.s3web.transfer.TransferVerification.deserializeBinaryFromReader); + msg.setVerification(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreatedAt(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStartedAt(value); + break; + case 11: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletedAt(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setErrorMessage(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRetryCount(value); + break; + case 14: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.TransferJob.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.TransferJob.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.TransferJob} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferJob.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getSource(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.s3web.transfer.TransferSource.serializeBinaryToWriter + ); + } + f = message.getDestination(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.s3web.transfer.TransferDestination.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.s3web.transfer.TransferOptions.serializeBinaryToWriter + ); + } + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 7, + f, + common_common_pb.Progress.serializeBinaryToWriter + ); + } + f = message.getVerification(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.s3web.transfer.TransferVerification.serializeBinaryToWriter + ); + } + f = message.getCreatedAt(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getStartedAt(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getCompletedAt(); + if (f != null) { + writer.writeMessage( + 11, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getErrorMessage(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getRetryCount(); + if (f !== 0) { + writer.writeInt32( + 13, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 14, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.s3web.transfer.TransferJob.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional TransferType type = 2; + * @return {!proto.s3web.transfer.TransferType} + */ +proto.s3web.transfer.TransferJob.prototype.getType = function() { + return /** @type {!proto.s3web.transfer.TransferType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.transfer.TransferType} value + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional TransferState state = 3; + * @return {!proto.s3web.transfer.TransferState} + */ +proto.s3web.transfer.TransferJob.prototype.getState = function() { + return /** @type {!proto.s3web.transfer.TransferState} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.s3web.transfer.TransferState} value + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional TransferSource source = 4; + * @return {?proto.s3web.transfer.TransferSource} + */ +proto.s3web.transfer.TransferJob.prototype.getSource = function() { + return /** @type{?proto.s3web.transfer.TransferSource} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferSource, 4)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferSource|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setSource = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearSource = function() { + return this.setSource(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasSource = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional TransferDestination destination = 5; + * @return {?proto.s3web.transfer.TransferDestination} + */ +proto.s3web.transfer.TransferJob.prototype.getDestination = function() { + return /** @type{?proto.s3web.transfer.TransferDestination} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferDestination, 5)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferDestination|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setDestination = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearDestination = function() { + return this.setDestination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasDestination = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional TransferOptions options = 6; + * @return {?proto.s3web.transfer.TransferOptions} + */ +proto.s3web.transfer.TransferJob.prototype.getOptions = function() { + return /** @type{?proto.s3web.transfer.TransferOptions} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferOptions, 6)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferOptions|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasOptions = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional s3web.common.Progress progress = 7; + * @return {?proto.s3web.common.Progress} + */ +proto.s3web.transfer.TransferJob.prototype.getProgress = function() { + return /** @type{?proto.s3web.common.Progress} */ ( + jspb.Message.getWrapperField(this, common_common_pb.Progress, 7)); +}; + + +/** + * @param {?proto.s3web.common.Progress|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasProgress = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional TransferVerification verification = 8; + * @return {?proto.s3web.transfer.TransferVerification} + */ +proto.s3web.transfer.TransferJob.prototype.getVerification = function() { + return /** @type{?proto.s3web.transfer.TransferVerification} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferVerification, 8)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferVerification|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setVerification = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearVerification = function() { + return this.setVerification(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasVerification = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Timestamp created_at = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.TransferJob.prototype.getCreatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setCreatedAt = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearCreatedAt = function() { + return this.setCreatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Timestamp started_at = 10; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.TransferJob.prototype.getStartedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setStartedAt = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearStartedAt = function() { + return this.setStartedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasStartedAt = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional google.protobuf.Timestamp completed_at = 11; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.TransferJob.prototype.getCompletedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setCompletedAt = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearCompletedAt = function() { + return this.setCompletedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasCompletedAt = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string error_message = 12; + * @return {string} + */ +proto.s3web.transfer.TransferJob.prototype.getErrorMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.setErrorMessage = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional int32 retry_count = 13; + * @return {number} + */ +proto.s3web.transfer.TransferJob.prototype.getRetryCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.setRetryCount = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 14; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.TransferJob.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 14)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.TransferJob} returns this +*/ +proto.s3web.transfer.TransferJob.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferJob} returns this + */ +proto.s3web.transfer.TransferJob.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferJob.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.transfer.TransferSource.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.TransferSource.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.TransferSource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.TransferSource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferSource.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + objectKeysList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + recursive: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.TransferSource} + */ +proto.s3web.transfer.TransferSource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.TransferSource; + return proto.s3web.transfer.TransferSource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.TransferSource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.TransferSource} + */ +proto.s3web.transfer.TransferSource.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addObjectKeys(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecursive(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.TransferSource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.TransferSource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.TransferSource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferSource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getObjectKeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getRecursive(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.transfer.TransferSource.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferSource} returns this + */ +proto.s3web.transfer.TransferSource.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.transfer.TransferSource.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferSource} returns this + */ +proto.s3web.transfer.TransferSource.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.transfer.TransferSource.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferSource} returns this + */ +proto.s3web.transfer.TransferSource.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated string object_keys = 4; + * @return {!Array} + */ +proto.s3web.transfer.TransferSource.prototype.getObjectKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.transfer.TransferSource} returns this + */ +proto.s3web.transfer.TransferSource.prototype.setObjectKeysList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.s3web.transfer.TransferSource} returns this + */ +proto.s3web.transfer.TransferSource.prototype.addObjectKeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.transfer.TransferSource} returns this + */ +proto.s3web.transfer.TransferSource.prototype.clearObjectKeysList = function() { + return this.setObjectKeysList([]); +}; + + +/** + * optional bool recursive = 5; + * @return {boolean} + */ +proto.s3web.transfer.TransferSource.prototype.getRecursive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferSource} returns this + */ +proto.s3web.transfer.TransferSource.prototype.setRecursive = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.TransferDestination.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.TransferDestination.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.TransferDestination} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferDestination.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: jspb.Message.getFieldWithDefault(msg, 3, ""), + createBucket: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.TransferDestination} + */ +proto.s3web.transfer.TransferDestination.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.TransferDestination; + return proto.s3web.transfer.TransferDestination.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.TransferDestination} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.TransferDestination} + */ +proto.s3web.transfer.TransferDestination.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCreateBucket(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.TransferDestination.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.TransferDestination.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.TransferDestination} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferDestination.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCreateBucket(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.transfer.TransferDestination.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferDestination} returns this + */ +proto.s3web.transfer.TransferDestination.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.transfer.TransferDestination.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferDestination} returns this + */ +proto.s3web.transfer.TransferDestination.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string prefix = 3; + * @return {string} + */ +proto.s3web.transfer.TransferDestination.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferDestination} returns this + */ +proto.s3web.transfer.TransferDestination.prototype.setPrefix = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool create_bucket = 4; + * @return {boolean} + */ +proto.s3web.transfer.TransferDestination.prototype.getCreateBucket = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferDestination} returns this + */ +proto.s3web.transfer.TransferDestination.prototype.setCreateBucket = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.TransferOptions.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.TransferOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.TransferOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferOptions.toObject = function(includeInstance, msg) { + var f, obj = { + concurrency: jspb.Message.getFieldWithDefault(msg, 1, 0), + partSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxRetries: jspb.Message.getFieldWithDefault(msg, 3, 0), + verifyChecksum: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + preserveMetadata: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + preserveTags: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + overwriteExisting: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + storageClass: jspb.Message.getFieldWithDefault(msg, 8, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.TransferOptions} + */ +proto.s3web.transfer.TransferOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.TransferOptions; + return proto.s3web.transfer.TransferOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.TransferOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.TransferOptions} + */ +proto.s3web.transfer.TransferOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setConcurrency(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPartSize(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxRetries(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerifyChecksum(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPreserveMetadata(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPreserveTags(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOverwriteExisting(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setStorageClass(value); + break; + case 9: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.TransferOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.TransferOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.TransferOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConcurrency(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getPartSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMaxRetries(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getVerifyChecksum(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getPreserveMetadata(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getPreserveTags(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getOverwriteExisting(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getStorageClass(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional int32 concurrency = 1; + * @return {number} + */ +proto.s3web.transfer.TransferOptions.prototype.getConcurrency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setConcurrency = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 part_size = 2; + * @return {number} + */ +proto.s3web.transfer.TransferOptions.prototype.getPartSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setPartSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 max_retries = 3; + * @return {number} + */ +proto.s3web.transfer.TransferOptions.prototype.getMaxRetries = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setMaxRetries = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool verify_checksum = 4; + * @return {boolean} + */ +proto.s3web.transfer.TransferOptions.prototype.getVerifyChecksum = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setVerifyChecksum = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool preserve_metadata = 5; + * @return {boolean} + */ +proto.s3web.transfer.TransferOptions.prototype.getPreserveMetadata = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setPreserveMetadata = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool preserve_tags = 6; + * @return {boolean} + */ +proto.s3web.transfer.TransferOptions.prototype.getPreserveTags = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setPreserveTags = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool overwrite_existing = 7; + * @return {boolean} + */ +proto.s3web.transfer.TransferOptions.prototype.getOverwriteExisting = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setOverwriteExisting = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string storage_class = 8; + * @return {string} + */ +proto.s3web.transfer.TransferOptions.prototype.getStorageClass = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.setStorageClass = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * map metadata = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.transfer.TransferOptions.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.transfer.TransferOptions} returns this + */ +proto.s3web.transfer.TransferOptions.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.TransferVerification.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.TransferVerification.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.TransferVerification} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferVerification.toObject = function(includeInstance, msg) { + var f, obj = { + enabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + sourceChecksum: (f = msg.getSourceChecksum()) && common_common_pb.Checksum.toObject(includeInstance, f), + destinationChecksum: (f = msg.getDestinationChecksum()) && common_common_pb.Checksum.toObject(includeInstance, f), + verified: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + verifiedAt: (f = msg.getVerifiedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.TransferVerification} + */ +proto.s3web.transfer.TransferVerification.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.TransferVerification; + return proto.s3web.transfer.TransferVerification.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.TransferVerification} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.TransferVerification} + */ +proto.s3web.transfer.TransferVerification.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEnabled(value); + break; + case 2: + var value = new common_common_pb.Checksum; + reader.readMessage(value,common_common_pb.Checksum.deserializeBinaryFromReader); + msg.setSourceChecksum(value); + break; + case 3: + var value = new common_common_pb.Checksum; + reader.readMessage(value,common_common_pb.Checksum.deserializeBinaryFromReader); + msg.setDestinationChecksum(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerified(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setVerifiedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.TransferVerification.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.TransferVerification.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.TransferVerification} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferVerification.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getSourceChecksum(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.Checksum.serializeBinaryToWriter + ); + } + f = message.getDestinationChecksum(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.Checksum.serializeBinaryToWriter + ); + } + f = message.getVerified(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getVerifiedAt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool enabled = 1; + * @return {boolean} + */ +proto.s3web.transfer.TransferVerification.prototype.getEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferVerification} returns this + */ +proto.s3web.transfer.TransferVerification.prototype.setEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional s3web.common.Checksum source_checksum = 2; + * @return {?proto.s3web.common.Checksum} + */ +proto.s3web.transfer.TransferVerification.prototype.getSourceChecksum = function() { + return /** @type{?proto.s3web.common.Checksum} */ ( + jspb.Message.getWrapperField(this, common_common_pb.Checksum, 2)); +}; + + +/** + * @param {?proto.s3web.common.Checksum|undefined} value + * @return {!proto.s3web.transfer.TransferVerification} returns this +*/ +proto.s3web.transfer.TransferVerification.prototype.setSourceChecksum = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferVerification} returns this + */ +proto.s3web.transfer.TransferVerification.prototype.clearSourceChecksum = function() { + return this.setSourceChecksum(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferVerification.prototype.hasSourceChecksum = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional s3web.common.Checksum destination_checksum = 3; + * @return {?proto.s3web.common.Checksum} + */ +proto.s3web.transfer.TransferVerification.prototype.getDestinationChecksum = function() { + return /** @type{?proto.s3web.common.Checksum} */ ( + jspb.Message.getWrapperField(this, common_common_pb.Checksum, 3)); +}; + + +/** + * @param {?proto.s3web.common.Checksum|undefined} value + * @return {!proto.s3web.transfer.TransferVerification} returns this +*/ +proto.s3web.transfer.TransferVerification.prototype.setDestinationChecksum = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferVerification} returns this + */ +proto.s3web.transfer.TransferVerification.prototype.clearDestinationChecksum = function() { + return this.setDestinationChecksum(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferVerification.prototype.hasDestinationChecksum = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool verified = 4; + * @return {boolean} + */ +proto.s3web.transfer.TransferVerification.prototype.getVerified = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.TransferVerification} returns this + */ +proto.s3web.transfer.TransferVerification.prototype.setVerified = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp verified_at = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.TransferVerification.prototype.getVerifiedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.TransferVerification} returns this +*/ +proto.s3web.transfer.TransferVerification.prototype.setVerifiedAt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferVerification} returns this + */ +proto.s3web.transfer.TransferVerification.prototype.clearVerifiedAt = function() { + return this.setVerifiedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferVerification.prototype.hasVerifiedAt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.transfer.MultipartUpload.repeatedFields_ = [8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.MultipartUpload.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.MultipartUpload.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.MultipartUpload} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.MultipartUpload.toObject = function(includeInstance, msg) { + var f, obj = { + uploadId: jspb.Message.getFieldWithDefault(msg, 1, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 2, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 3, ""), + key: jspb.Message.getFieldWithDefault(msg, 4, ""), + totalSize: jspb.Message.getFieldWithDefault(msg, 5, 0), + totalParts: jspb.Message.getFieldWithDefault(msg, 6, 0), + partSize: jspb.Message.getFieldWithDefault(msg, 7, 0), + uploadedPartsList: jspb.Message.toObjectList(msg.getUploadedPartsList(), + proto.s3web.transfer.UploadedPart.toObject, includeInstance), + initiatedAt: (f = msg.getInitiatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.MultipartUpload} + */ +proto.s3web.transfer.MultipartUpload.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.MultipartUpload; + return proto.s3web.transfer.MultipartUpload.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.MultipartUpload} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.MultipartUpload} + */ +proto.s3web.transfer.MultipartUpload.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUploadId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSize(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTotalParts(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPartSize(value); + break; + case 8: + var value = new proto.s3web.transfer.UploadedPart; + reader.readMessage(value,proto.s3web.transfer.UploadedPart.deserializeBinaryFromReader); + msg.addUploadedParts(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setInitiatedAt(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setExpiresAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.MultipartUpload.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.MultipartUpload.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.MultipartUpload} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.MultipartUpload.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUploadId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getTotalSize(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getTotalParts(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getPartSize(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getUploadedPartsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.s3web.transfer.UploadedPart.serializeBinaryToWriter + ); + } + f = message.getInitiatedAt(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getExpiresAt(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string upload_id = 1; + * @return {string} + */ +proto.s3web.transfer.MultipartUpload.prototype.getUploadId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.setUploadId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string location_id = 2; + * @return {string} + */ +proto.s3web.transfer.MultipartUpload.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string bucket = 3; + * @return {string} + */ +proto.s3web.transfer.MultipartUpload.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string key = 4; + * @return {string} + */ +proto.s3web.transfer.MultipartUpload.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 total_size = 5; + * @return {number} + */ +proto.s3web.transfer.MultipartUpload.prototype.getTotalSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.setTotalSize = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 total_parts = 6; + * @return {number} + */ +proto.s3web.transfer.MultipartUpload.prototype.getTotalParts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.setTotalParts = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 part_size = 7; + * @return {number} + */ +proto.s3web.transfer.MultipartUpload.prototype.getPartSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.setPartSize = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * repeated UploadedPart uploaded_parts = 8; + * @return {!Array} + */ +proto.s3web.transfer.MultipartUpload.prototype.getUploadedPartsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.transfer.UploadedPart, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this +*/ +proto.s3web.transfer.MultipartUpload.prototype.setUploadedPartsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.s3web.transfer.UploadedPart=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.transfer.UploadedPart} + */ +proto.s3web.transfer.MultipartUpload.prototype.addUploadedParts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.s3web.transfer.UploadedPart, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.clearUploadedPartsList = function() { + return this.setUploadedPartsList([]); +}; + + +/** + * optional google.protobuf.Timestamp initiated_at = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.MultipartUpload.prototype.getInitiatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this +*/ +proto.s3web.transfer.MultipartUpload.prototype.setInitiatedAt = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.clearInitiatedAt = function() { + return this.setInitiatedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.MultipartUpload.prototype.hasInitiatedAt = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Timestamp expires_at = 10; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.MultipartUpload.prototype.getExpiresAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.MultipartUpload} returns this +*/ +proto.s3web.transfer.MultipartUpload.prototype.setExpiresAt = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.MultipartUpload} returns this + */ +proto.s3web.transfer.MultipartUpload.prototype.clearExpiresAt = function() { + return this.setExpiresAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.MultipartUpload.prototype.hasExpiresAt = function() { + return jspb.Message.getField(this, 10) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.UploadedPart.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.UploadedPart.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.UploadedPart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.UploadedPart.toObject = function(includeInstance, msg) { + var f, obj = { + partNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + etag: jspb.Message.getFieldWithDefault(msg, 2, ""), + size: jspb.Message.getFieldWithDefault(msg, 3, 0), + uploadedAt: (f = msg.getUploadedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.UploadedPart} + */ +proto.s3web.transfer.UploadedPart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.UploadedPart; + return proto.s3web.transfer.UploadedPart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.UploadedPart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.UploadedPart} + */ +proto.s3web.transfer.UploadedPart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPartNumber(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUploadedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.UploadedPart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.UploadedPart.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.UploadedPart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.UploadedPart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPartNumber(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getUploadedAt(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 part_number = 1; + * @return {number} + */ +proto.s3web.transfer.UploadedPart.prototype.getPartNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.UploadedPart} returns this + */ +proto.s3web.transfer.UploadedPart.prototype.setPartNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string etag = 2; + * @return {string} + */ +proto.s3web.transfer.UploadedPart.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.UploadedPart} returns this + */ +proto.s3web.transfer.UploadedPart.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 size = 3; + * @return {number} + */ +proto.s3web.transfer.UploadedPart.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.UploadedPart} returns this + */ +proto.s3web.transfer.UploadedPart.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp uploaded_at = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.UploadedPart.prototype.getUploadedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.UploadedPart} returns this +*/ +proto.s3web.transfer.UploadedPart.prototype.setUploadedAt = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.UploadedPart} returns this + */ +proto.s3web.transfer.UploadedPart.prototype.clearUploadedAt = function() { + return this.setUploadedAt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.UploadedPart.prototype.hasUploadedAt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.InitiateUploadRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.InitiateUploadRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateUploadRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, ""), + bucket: jspb.Message.getFieldWithDefault(msg, 2, ""), + key: jspb.Message.getFieldWithDefault(msg, 3, ""), + totalSize: jspb.Message.getFieldWithDefault(msg, 4, 0), + partSize: jspb.Message.getFieldWithDefault(msg, 5, 0), + contentType: jspb.Message.getFieldWithDefault(msg, 6, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [], + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.InitiateUploadRequest} + */ +proto.s3web.transfer.InitiateUploadRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.InitiateUploadRequest; + return proto.s3web.transfer.InitiateUploadRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.InitiateUploadRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.InitiateUploadRequest} + */ +proto.s3web.transfer.InitiateUploadRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBucket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSize(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPartSize(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 7: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 8: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.InitiateUploadRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.InitiateUploadRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateUploadRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBucket(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTotalSize(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getPartSize(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 8, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bucket = 2; + * @return {string} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getBucket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.setBucket = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string key = 3; + * @return {string} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 total_size = 4; + * @return {number} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getTotalSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.setTotalSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 part_size = 5; + * @return {number} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getPartSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.setPartSize = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string content_type = 6; + * @return {string} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * map metadata = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * optional s3web.common.AuditContext audit_context = 8; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 8)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this +*/ +proto.s3web.transfer.InitiateUploadRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.InitiateUploadRequest} returns this + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.InitiateUploadRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.InitiateUploadResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.InitiateUploadResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.InitiateUploadResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateUploadResponse.toObject = function(includeInstance, msg) { + var f, obj = { + uploadId: jspb.Message.getFieldWithDefault(msg, 1, ""), + upload: (f = msg.getUpload()) && proto.s3web.transfer.MultipartUpload.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.InitiateUploadResponse} + */ +proto.s3web.transfer.InitiateUploadResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.InitiateUploadResponse; + return proto.s3web.transfer.InitiateUploadResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.InitiateUploadResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.InitiateUploadResponse} + */ +proto.s3web.transfer.InitiateUploadResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUploadId(value); + break; + case 2: + var value = new proto.s3web.transfer.MultipartUpload; + reader.readMessage(value,proto.s3web.transfer.MultipartUpload.deserializeBinaryFromReader); + msg.setUpload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.InitiateUploadResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.InitiateUploadResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.InitiateUploadResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateUploadResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUploadId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUpload(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.transfer.MultipartUpload.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string upload_id = 1; + * @return {string} + */ +proto.s3web.transfer.InitiateUploadResponse.prototype.getUploadId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.InitiateUploadResponse} returns this + */ +proto.s3web.transfer.InitiateUploadResponse.prototype.setUploadId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional MultipartUpload upload = 2; + * @return {?proto.s3web.transfer.MultipartUpload} + */ +proto.s3web.transfer.InitiateUploadResponse.prototype.getUpload = function() { + return /** @type{?proto.s3web.transfer.MultipartUpload} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.MultipartUpload, 2)); +}; + + +/** + * @param {?proto.s3web.transfer.MultipartUpload|undefined} value + * @return {!proto.s3web.transfer.InitiateUploadResponse} returns this +*/ +proto.s3web.transfer.InitiateUploadResponse.prototype.setUpload = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.InitiateUploadResponse} returns this + */ +proto.s3web.transfer.InitiateUploadResponse.prototype.clearUpload = function() { + return this.setUpload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.InitiateUploadResponse.prototype.hasUpload = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.UploadPartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.UploadPartRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.UploadPartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.UploadPartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + uploadId: jspb.Message.getFieldWithDefault(msg, 1, ""), + partNumber: jspb.Message.getFieldWithDefault(msg, 2, 0), + data: msg.getData_asB64(), + isLastChunk: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.UploadPartRequest} + */ +proto.s3web.transfer.UploadPartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.UploadPartRequest; + return proto.s3web.transfer.UploadPartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.UploadPartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.UploadPartRequest} + */ +proto.s3web.transfer.UploadPartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUploadId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPartNumber(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsLastChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.UploadPartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.UploadPartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.UploadPartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.UploadPartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUploadId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPartNumber(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getIsLastChunk(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string upload_id = 1; + * @return {string} + */ +proto.s3web.transfer.UploadPartRequest.prototype.getUploadId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.UploadPartRequest} returns this + */ +proto.s3web.transfer.UploadPartRequest.prototype.setUploadId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 part_number = 2; + * @return {number} + */ +proto.s3web.transfer.UploadPartRequest.prototype.getPartNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.UploadPartRequest} returns this + */ +proto.s3web.transfer.UploadPartRequest.prototype.setPartNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.s3web.transfer.UploadPartRequest.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.s3web.transfer.UploadPartRequest.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.s3web.transfer.UploadPartRequest.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.s3web.transfer.UploadPartRequest} returns this + */ +proto.s3web.transfer.UploadPartRequest.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bool is_last_chunk = 4; + * @return {boolean} + */ +proto.s3web.transfer.UploadPartRequest.prototype.getIsLastChunk = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.UploadPartRequest} returns this + */ +proto.s3web.transfer.UploadPartRequest.prototype.setIsLastChunk = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.UploadPartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.UploadPartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.UploadPartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.UploadPartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + etag: jspb.Message.getFieldWithDefault(msg, 1, ""), + bytesUploaded: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.UploadPartResponse} + */ +proto.s3web.transfer.UploadPartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.UploadPartResponse; + return proto.s3web.transfer.UploadPartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.UploadPartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.UploadPartResponse} + */ +proto.s3web.transfer.UploadPartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBytesUploaded(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.UploadPartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.UploadPartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.UploadPartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.UploadPartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBytesUploaded(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional string etag = 1; + * @return {string} + */ +proto.s3web.transfer.UploadPartResponse.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.UploadPartResponse} returns this + */ +proto.s3web.transfer.UploadPartResponse.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 bytes_uploaded = 2; + * @return {number} + */ +proto.s3web.transfer.UploadPartResponse.prototype.getBytesUploaded = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.s3web.transfer.UploadPartResponse} returns this + */ +proto.s3web.transfer.UploadPartResponse.prototype.setBytesUploaded = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.transfer.CompleteUploadRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.CompleteUploadRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.CompleteUploadRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CompleteUploadRequest.toObject = function(includeInstance, msg) { + var f, obj = { + uploadId: jspb.Message.getFieldWithDefault(msg, 1, ""), + partsList: jspb.Message.toObjectList(msg.getPartsList(), + proto.s3web.transfer.UploadedPart.toObject, includeInstance), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.CompleteUploadRequest} + */ +proto.s3web.transfer.CompleteUploadRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.CompleteUploadRequest; + return proto.s3web.transfer.CompleteUploadRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.CompleteUploadRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.CompleteUploadRequest} + */ +proto.s3web.transfer.CompleteUploadRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUploadId(value); + break; + case 2: + var value = new proto.s3web.transfer.UploadedPart; + reader.readMessage(value,proto.s3web.transfer.UploadedPart.deserializeBinaryFromReader); + msg.addParts(value); + break; + case 3: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.CompleteUploadRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.CompleteUploadRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CompleteUploadRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUploadId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPartsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.s3web.transfer.UploadedPart.serializeBinaryToWriter + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string upload_id = 1; + * @return {string} + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.getUploadId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.CompleteUploadRequest} returns this + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.setUploadId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated UploadedPart parts = 2; + * @return {!Array} + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.getPartsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.transfer.UploadedPart, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.transfer.CompleteUploadRequest} returns this +*/ +proto.s3web.transfer.CompleteUploadRequest.prototype.setPartsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.s3web.transfer.UploadedPart=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.transfer.UploadedPart} + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.addParts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.s3web.transfer.UploadedPart, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.transfer.CompleteUploadRequest} returns this + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.clearPartsList = function() { + return this.setPartsList([]); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 3; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 3)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.CompleteUploadRequest} returns this +*/ +proto.s3web.transfer.CompleteUploadRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.CompleteUploadRequest} returns this + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.CompleteUploadRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.CompleteUploadResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.CompleteUploadResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CompleteUploadResponse.toObject = function(includeInstance, msg) { + var f, obj = { + location: jspb.Message.getFieldWithDefault(msg, 1, ""), + etag: jspb.Message.getFieldWithDefault(msg, 2, ""), + checksum: (f = msg.getChecksum()) && common_common_pb.Checksum.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.CompleteUploadResponse} + */ +proto.s3web.transfer.CompleteUploadResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.CompleteUploadResponse; + return proto.s3web.transfer.CompleteUploadResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.CompleteUploadResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.CompleteUploadResponse} + */ +proto.s3web.transfer.CompleteUploadResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 3: + var value = new common_common_pb.Checksum; + reader.readMessage(value,common_common_pb.Checksum.deserializeBinaryFromReader); + msg.setChecksum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.CompleteUploadResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.CompleteUploadResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CompleteUploadResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChecksum(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.Checksum.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string location = 1; + * @return {string} + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.CompleteUploadResponse} returns this + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string etag = 2; + * @return {string} + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.CompleteUploadResponse} returns this + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional s3web.common.Checksum checksum = 3; + * @return {?proto.s3web.common.Checksum} + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.getChecksum = function() { + return /** @type{?proto.s3web.common.Checksum} */ ( + jspb.Message.getWrapperField(this, common_common_pb.Checksum, 3)); +}; + + +/** + * @param {?proto.s3web.common.Checksum|undefined} value + * @return {!proto.s3web.transfer.CompleteUploadResponse} returns this +*/ +proto.s3web.transfer.CompleteUploadResponse.prototype.setChecksum = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.CompleteUploadResponse} returns this + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.clearChecksum = function() { + return this.setChecksum(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.CompleteUploadResponse.prototype.hasChecksum = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.AbortUploadRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.AbortUploadRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.AbortUploadRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.AbortUploadRequest.toObject = function(includeInstance, msg) { + var f, obj = { + uploadId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.AbortUploadRequest} + */ +proto.s3web.transfer.AbortUploadRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.AbortUploadRequest; + return proto.s3web.transfer.AbortUploadRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.AbortUploadRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.AbortUploadRequest} + */ +proto.s3web.transfer.AbortUploadRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUploadId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.AbortUploadRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.AbortUploadRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.AbortUploadRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.AbortUploadRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUploadId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string upload_id = 1; + * @return {string} + */ +proto.s3web.transfer.AbortUploadRequest.prototype.getUploadId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.AbortUploadRequest} returns this + */ +proto.s3web.transfer.AbortUploadRequest.prototype.setUploadId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.AbortUploadRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.AbortUploadRequest} returns this +*/ +proto.s3web.transfer.AbortUploadRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.AbortUploadRequest} returns this + */ +proto.s3web.transfer.AbortUploadRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.AbortUploadRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.AbortUploadResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.AbortUploadResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.AbortUploadResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.AbortUploadResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.AbortUploadResponse} + */ +proto.s3web.transfer.AbortUploadResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.AbortUploadResponse; + return proto.s3web.transfer.AbortUploadResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.AbortUploadResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.AbortUploadResponse} + */ +proto.s3web.transfer.AbortUploadResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.AbortUploadResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.AbortUploadResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.AbortUploadResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.AbortUploadResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.s3web.transfer.AbortUploadResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.s3web.transfer.AbortUploadResponse} returns this + */ +proto.s3web.transfer.AbortUploadResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.InitiateTransferRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.InitiateTransferRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateTransferRequest.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: (f = msg.getSource()) && proto.s3web.transfer.TransferSource.toObject(includeInstance, f), + destination: (f = msg.getDestination()) && proto.s3web.transfer.TransferDestination.toObject(includeInstance, f), + options: (f = msg.getOptions()) && proto.s3web.transfer.TransferOptions.toObject(includeInstance, f), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.InitiateTransferRequest} + */ +proto.s3web.transfer.InitiateTransferRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.InitiateTransferRequest; + return proto.s3web.transfer.InitiateTransferRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.InitiateTransferRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.InitiateTransferRequest} + */ +proto.s3web.transfer.InitiateTransferRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.s3web.transfer.TransferType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = new proto.s3web.transfer.TransferSource; + reader.readMessage(value,proto.s3web.transfer.TransferSource.deserializeBinaryFromReader); + msg.setSource(value); + break; + case 3: + var value = new proto.s3web.transfer.TransferDestination; + reader.readMessage(value,proto.s3web.transfer.TransferDestination.deserializeBinaryFromReader); + msg.setDestination(value); + break; + case 4: + var value = new proto.s3web.transfer.TransferOptions; + reader.readMessage(value,proto.s3web.transfer.TransferOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 5: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.InitiateTransferRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.InitiateTransferRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateTransferRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSource(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.transfer.TransferSource.serializeBinaryToWriter + ); + } + f = message.getDestination(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.s3web.transfer.TransferDestination.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.s3web.transfer.TransferOptions.serializeBinaryToWriter + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 5, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TransferType type = 1; + * @return {!proto.s3web.transfer.TransferType} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.getType = function() { + return /** @type {!proto.s3web.transfer.TransferType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.s3web.transfer.TransferType} value + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional TransferSource source = 2; + * @return {?proto.s3web.transfer.TransferSource} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.getSource = function() { + return /** @type{?proto.s3web.transfer.TransferSource} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferSource, 2)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferSource|undefined} value + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this +*/ +proto.s3web.transfer.InitiateTransferRequest.prototype.setSource = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.clearSource = function() { + return this.setSource(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.hasSource = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional TransferDestination destination = 3; + * @return {?proto.s3web.transfer.TransferDestination} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.getDestination = function() { + return /** @type{?proto.s3web.transfer.TransferDestination} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferDestination, 3)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferDestination|undefined} value + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this +*/ +proto.s3web.transfer.InitiateTransferRequest.prototype.setDestination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.clearDestination = function() { + return this.setDestination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.hasDestination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional TransferOptions options = 4; + * @return {?proto.s3web.transfer.TransferOptions} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.getOptions = function() { + return /** @type{?proto.s3web.transfer.TransferOptions} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferOptions, 4)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferOptions|undefined} value + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this +*/ +proto.s3web.transfer.InitiateTransferRequest.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.hasOptions = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional s3web.common.AuditContext audit_context = 5; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 5)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this +*/ +proto.s3web.transfer.InitiateTransferRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.InitiateTransferRequest} returns this + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.InitiateTransferRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.InitiateTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.InitiateTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.InitiateTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateTransferResponse.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + job: (f = msg.getJob()) && proto.s3web.transfer.TransferJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.InitiateTransferResponse} + */ +proto.s3web.transfer.InitiateTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.InitiateTransferResponse; + return proto.s3web.transfer.InitiateTransferResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.InitiateTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.InitiateTransferResponse} + */ +proto.s3web.transfer.InitiateTransferResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = new proto.s3web.transfer.TransferJob; + reader.readMessage(value,proto.s3web.transfer.TransferJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.InitiateTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.InitiateTransferResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.InitiateTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.InitiateTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.s3web.transfer.TransferJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.InitiateTransferResponse.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.InitiateTransferResponse} returns this + */ +proto.s3web.transfer.InitiateTransferResponse.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional TransferJob job = 2; + * @return {?proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.InitiateTransferResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.transfer.TransferJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferJob, 2)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferJob|undefined} value + * @return {!proto.s3web.transfer.InitiateTransferResponse} returns this +*/ +proto.s3web.transfer.InitiateTransferResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.InitiateTransferResponse} returns this + */ +proto.s3web.transfer.InitiateTransferResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.InitiateTransferResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.GetTransferStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.GetTransferStatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.GetTransferStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.GetTransferStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.GetTransferStatusRequest} + */ +proto.s3web.transfer.GetTransferStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.GetTransferStatusRequest; + return proto.s3web.transfer.GetTransferStatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.GetTransferStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.GetTransferStatusRequest} + */ +proto.s3web.transfer.GetTransferStatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.GetTransferStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.GetTransferStatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.GetTransferStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.GetTransferStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.GetTransferStatusRequest.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.GetTransferStatusRequest} returns this + */ +proto.s3web.transfer.GetTransferStatusRequest.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.GetTransferStatusRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.GetTransferStatusRequest} returns this +*/ +proto.s3web.transfer.GetTransferStatusRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.GetTransferStatusRequest} returns this + */ +proto.s3web.transfer.GetTransferStatusRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.GetTransferStatusRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.GetTransferStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.GetTransferStatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.GetTransferStatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.GetTransferStatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + job: (f = msg.getJob()) && proto.s3web.transfer.TransferJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.GetTransferStatusResponse} + */ +proto.s3web.transfer.GetTransferStatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.GetTransferStatusResponse; + return proto.s3web.transfer.GetTransferStatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.GetTransferStatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.GetTransferStatusResponse} + */ +proto.s3web.transfer.GetTransferStatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.transfer.TransferJob; + reader.readMessage(value,proto.s3web.transfer.TransferJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.GetTransferStatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.GetTransferStatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.GetTransferStatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.GetTransferStatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.transfer.TransferJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TransferJob job = 1; + * @return {?proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.GetTransferStatusResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.transfer.TransferJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferJob, 1)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferJob|undefined} value + * @return {!proto.s3web.transfer.GetTransferStatusResponse} returns this +*/ +proto.s3web.transfer.GetTransferStatusResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.GetTransferStatusResponse} returns this + */ +proto.s3web.transfer.GetTransferStatusResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.GetTransferStatusResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.StreamTransferProgressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.StreamTransferProgressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.StreamTransferProgressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.StreamTransferProgressRequest} + */ +proto.s3web.transfer.StreamTransferProgressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.StreamTransferProgressRequest; + return proto.s3web.transfer.StreamTransferProgressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.StreamTransferProgressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.StreamTransferProgressRequest} + */ +proto.s3web.transfer.StreamTransferProgressRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.StreamTransferProgressRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.StreamTransferProgressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.StreamTransferProgressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.StreamTransferProgressRequest} returns this + */ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.StreamTransferProgressRequest} returns this +*/ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.StreamTransferProgressRequest} returns this + */ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.StreamTransferProgressRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.TransferProgressUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.TransferProgressUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferProgressUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + state: jspb.Message.getFieldWithDefault(msg, 2, 0), + progress: (f = msg.getProgress()) && common_common_pb.Progress.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + message: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.TransferProgressUpdate} + */ +proto.s3web.transfer.TransferProgressUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.TransferProgressUpdate; + return proto.s3web.transfer.TransferProgressUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.TransferProgressUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.TransferProgressUpdate} + */ +proto.s3web.transfer.TransferProgressUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = /** @type {!proto.s3web.transfer.TransferState} */ (reader.readEnum()); + msg.setState(value); + break; + case 3: + var value = new common_common_pb.Progress; + reader.readMessage(value,common_common_pb.Progress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.TransferProgressUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.TransferProgressUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.TransferProgressUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_common_pb.Progress.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferProgressUpdate} returns this + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional TransferState state = 2; + * @return {!proto.s3web.transfer.TransferState} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.getState = function() { + return /** @type {!proto.s3web.transfer.TransferState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.s3web.transfer.TransferState} value + * @return {!proto.s3web.transfer.TransferProgressUpdate} returns this + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional s3web.common.Progress progress = 3; + * @return {?proto.s3web.common.Progress} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.getProgress = function() { + return /** @type{?proto.s3web.common.Progress} */ ( + jspb.Message.getWrapperField(this, common_common_pb.Progress, 3)); +}; + + +/** + * @param {?proto.s3web.common.Progress|undefined} value + * @return {!proto.s3web.transfer.TransferProgressUpdate} returns this +*/ +proto.s3web.transfer.TransferProgressUpdate.prototype.setProgress = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferProgressUpdate} returns this + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.clearProgress = function() { + return this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.hasProgress = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.s3web.transfer.TransferProgressUpdate} returns this +*/ +proto.s3web.transfer.TransferProgressUpdate.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.TransferProgressUpdate} returns this + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string message = 5; + * @return {string} + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.TransferProgressUpdate} returns this + */ +proto.s3web.transfer.TransferProgressUpdate.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.transfer.ListTransfersRequest.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.ListTransfersRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.ListTransfersRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ListTransfersRequest.toObject = function(includeInstance, msg) { + var f, obj = { + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationRequest.toObject(includeInstance, f), + filtersList: jspb.Message.toObjectList(msg.getFiltersList(), + common_common_pb.Filter.toObject, includeInstance), + timeRange: (f = msg.getTimeRange()) && common_common_pb.TimeRange.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.ListTransfersRequest} + */ +proto.s3web.transfer.ListTransfersRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.ListTransfersRequest; + return proto.s3web.transfer.ListTransfersRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.ListTransfersRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.ListTransfersRequest} + */ +proto.s3web.transfer.ListTransfersRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + case 2: + var value = new common_common_pb.PaginationRequest; + reader.readMessage(value,common_common_pb.PaginationRequest.deserializeBinaryFromReader); + msg.setPagination(value); + break; + case 3: + var value = new common_common_pb.Filter; + reader.readMessage(value,common_common_pb.Filter.deserializeBinaryFromReader); + msg.addFilters(value); + break; + case 4: + var value = new common_common_pb.TimeRange; + reader.readMessage(value,common_common_pb.TimeRange.deserializeBinaryFromReader); + msg.setTimeRange(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.ListTransfersRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.ListTransfersRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ListTransfersRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationRequest.serializeBinaryToWriter + ); + } + f = message.getFiltersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + common_common_pb.Filter.serializeBinaryToWriter + ); + } + f = message.getTimeRange(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_common_pb.TimeRange.serializeBinaryToWriter + ); + } +}; + + +/** + * optional s3web.common.AuditContext audit_context = 1; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 1)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this +*/ +proto.s3web.transfer.ListTransfersRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this + */ +proto.s3web.transfer.ListTransfersRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional s3web.common.PaginationRequest pagination = 2; + * @return {?proto.s3web.common.PaginationRequest} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationRequest} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationRequest, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationRequest|undefined} value + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this +*/ +proto.s3web.transfer.ListTransfersRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this + */ +proto.s3web.transfer.ListTransfersRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated s3web.common.Filter filters = 3; + * @return {!Array} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.getFiltersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_common_pb.Filter, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this +*/ +proto.s3web.transfer.ListTransfersRequest.prototype.setFiltersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.s3web.common.Filter=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.common.Filter} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.addFilters = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.s3web.common.Filter, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this + */ +proto.s3web.transfer.ListTransfersRequest.prototype.clearFiltersList = function() { + return this.setFiltersList([]); +}; + + +/** + * optional s3web.common.TimeRange time_range = 4; + * @return {?proto.s3web.common.TimeRange} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.getTimeRange = function() { + return /** @type{?proto.s3web.common.TimeRange} */ ( + jspb.Message.getWrapperField(this, common_common_pb.TimeRange, 4)); +}; + + +/** + * @param {?proto.s3web.common.TimeRange|undefined} value + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this +*/ +proto.s3web.transfer.ListTransfersRequest.prototype.setTimeRange = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.ListTransfersRequest} returns this + */ +proto.s3web.transfer.ListTransfersRequest.prototype.clearTimeRange = function() { + return this.setTimeRange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.ListTransfersRequest.prototype.hasTimeRange = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.s3web.transfer.ListTransfersResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.ListTransfersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.ListTransfersResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.ListTransfersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ListTransfersResponse.toObject = function(includeInstance, msg) { + var f, obj = { + jobsList: jspb.Message.toObjectList(msg.getJobsList(), + proto.s3web.transfer.TransferJob.toObject, includeInstance), + pagination: (f = msg.getPagination()) && common_common_pb.PaginationResponse.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.ListTransfersResponse} + */ +proto.s3web.transfer.ListTransfersResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.ListTransfersResponse; + return proto.s3web.transfer.ListTransfersResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.ListTransfersResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.ListTransfersResponse} + */ +proto.s3web.transfer.ListTransfersResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.transfer.TransferJob; + reader.readMessage(value,proto.s3web.transfer.TransferJob.deserializeBinaryFromReader); + msg.addJobs(value); + break; + case 2: + var value = new common_common_pb.PaginationResponse; + reader.readMessage(value,common_common_pb.PaginationResponse.deserializeBinaryFromReader); + msg.setPagination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.ListTransfersResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.ListTransfersResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.ListTransfersResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ListTransfersResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.s3web.transfer.TransferJob.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.PaginationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TransferJob jobs = 1; + * @return {!Array} + */ +proto.s3web.transfer.ListTransfersResponse.prototype.getJobsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.s3web.transfer.TransferJob, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.s3web.transfer.ListTransfersResponse} returns this +*/ +proto.s3web.transfer.ListTransfersResponse.prototype.setJobsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.s3web.transfer.TransferJob=} opt_value + * @param {number=} opt_index + * @return {!proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.ListTransfersResponse.prototype.addJobs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.s3web.transfer.TransferJob, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.s3web.transfer.ListTransfersResponse} returns this + */ +proto.s3web.transfer.ListTransfersResponse.prototype.clearJobsList = function() { + return this.setJobsList([]); +}; + + +/** + * optional s3web.common.PaginationResponse pagination = 2; + * @return {?proto.s3web.common.PaginationResponse} + */ +proto.s3web.transfer.ListTransfersResponse.prototype.getPagination = function() { + return /** @type{?proto.s3web.common.PaginationResponse} */ ( + jspb.Message.getWrapperField(this, common_common_pb.PaginationResponse, 2)); +}; + + +/** + * @param {?proto.s3web.common.PaginationResponse|undefined} value + * @return {!proto.s3web.transfer.ListTransfersResponse} returns this +*/ +proto.s3web.transfer.ListTransfersResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.ListTransfersResponse} returns this + */ +proto.s3web.transfer.ListTransfersResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.ListTransfersResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.PauseTransferRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.PauseTransferRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.PauseTransferRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.PauseTransferRequest.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.PauseTransferRequest} + */ +proto.s3web.transfer.PauseTransferRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.PauseTransferRequest; + return proto.s3web.transfer.PauseTransferRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.PauseTransferRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.PauseTransferRequest} + */ +proto.s3web.transfer.PauseTransferRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.PauseTransferRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.PauseTransferRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.PauseTransferRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.PauseTransferRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.PauseTransferRequest.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.PauseTransferRequest} returns this + */ +proto.s3web.transfer.PauseTransferRequest.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.PauseTransferRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.PauseTransferRequest} returns this +*/ +proto.s3web.transfer.PauseTransferRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.PauseTransferRequest} returns this + */ +proto.s3web.transfer.PauseTransferRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.PauseTransferRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.PauseTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.PauseTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.PauseTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.PauseTransferResponse.toObject = function(includeInstance, msg) { + var f, obj = { + job: (f = msg.getJob()) && proto.s3web.transfer.TransferJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.PauseTransferResponse} + */ +proto.s3web.transfer.PauseTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.PauseTransferResponse; + return proto.s3web.transfer.PauseTransferResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.PauseTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.PauseTransferResponse} + */ +proto.s3web.transfer.PauseTransferResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.transfer.TransferJob; + reader.readMessage(value,proto.s3web.transfer.TransferJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.PauseTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.PauseTransferResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.PauseTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.PauseTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.transfer.TransferJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TransferJob job = 1; + * @return {?proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.PauseTransferResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.transfer.TransferJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferJob, 1)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferJob|undefined} value + * @return {!proto.s3web.transfer.PauseTransferResponse} returns this +*/ +proto.s3web.transfer.PauseTransferResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.PauseTransferResponse} returns this + */ +proto.s3web.transfer.PauseTransferResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.PauseTransferResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.ResumeTransferRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.ResumeTransferRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.ResumeTransferRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ResumeTransferRequest.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.ResumeTransferRequest} + */ +proto.s3web.transfer.ResumeTransferRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.ResumeTransferRequest; + return proto.s3web.transfer.ResumeTransferRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.ResumeTransferRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.ResumeTransferRequest} + */ +proto.s3web.transfer.ResumeTransferRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.ResumeTransferRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.ResumeTransferRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.ResumeTransferRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ResumeTransferRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.ResumeTransferRequest.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.ResumeTransferRequest} returns this + */ +proto.s3web.transfer.ResumeTransferRequest.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.ResumeTransferRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.ResumeTransferRequest} returns this +*/ +proto.s3web.transfer.ResumeTransferRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.ResumeTransferRequest} returns this + */ +proto.s3web.transfer.ResumeTransferRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.ResumeTransferRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.ResumeTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.ResumeTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.ResumeTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ResumeTransferResponse.toObject = function(includeInstance, msg) { + var f, obj = { + job: (f = msg.getJob()) && proto.s3web.transfer.TransferJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.ResumeTransferResponse} + */ +proto.s3web.transfer.ResumeTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.ResumeTransferResponse; + return proto.s3web.transfer.ResumeTransferResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.ResumeTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.ResumeTransferResponse} + */ +proto.s3web.transfer.ResumeTransferResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.transfer.TransferJob; + reader.readMessage(value,proto.s3web.transfer.TransferJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.ResumeTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.ResumeTransferResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.ResumeTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.ResumeTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.transfer.TransferJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TransferJob job = 1; + * @return {?proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.ResumeTransferResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.transfer.TransferJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferJob, 1)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferJob|undefined} value + * @return {!proto.s3web.transfer.ResumeTransferResponse} returns this +*/ +proto.s3web.transfer.ResumeTransferResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.ResumeTransferResponse} returns this + */ +proto.s3web.transfer.ResumeTransferResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.ResumeTransferResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.CancelTransferRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.CancelTransferRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.CancelTransferRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CancelTransferRequest.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.CancelTransferRequest} + */ +proto.s3web.transfer.CancelTransferRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.CancelTransferRequest; + return proto.s3web.transfer.CancelTransferRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.CancelTransferRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.CancelTransferRequest} + */ +proto.s3web.transfer.CancelTransferRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.CancelTransferRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.CancelTransferRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.CancelTransferRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CancelTransferRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.CancelTransferRequest.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.CancelTransferRequest} returns this + */ +proto.s3web.transfer.CancelTransferRequest.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.CancelTransferRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.CancelTransferRequest} returns this +*/ +proto.s3web.transfer.CancelTransferRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.CancelTransferRequest} returns this + */ +proto.s3web.transfer.CancelTransferRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.CancelTransferRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.CancelTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.CancelTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.CancelTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CancelTransferResponse.toObject = function(includeInstance, msg) { + var f, obj = { + job: (f = msg.getJob()) && proto.s3web.transfer.TransferJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.CancelTransferResponse} + */ +proto.s3web.transfer.CancelTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.CancelTransferResponse; + return proto.s3web.transfer.CancelTransferResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.CancelTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.CancelTransferResponse} + */ +proto.s3web.transfer.CancelTransferResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.transfer.TransferJob; + reader.readMessage(value,proto.s3web.transfer.TransferJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.CancelTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.CancelTransferResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.CancelTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.CancelTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.transfer.TransferJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TransferJob job = 1; + * @return {?proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.CancelTransferResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.transfer.TransferJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferJob, 1)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferJob|undefined} value + * @return {!proto.s3web.transfer.CancelTransferResponse} returns this +*/ +proto.s3web.transfer.CancelTransferResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.CancelTransferResponse} returns this + */ +proto.s3web.transfer.CancelTransferResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.CancelTransferResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.RetryTransferRequest.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.RetryTransferRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.RetryTransferRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.RetryTransferRequest.toObject = function(includeInstance, msg) { + var f, obj = { + transferId: jspb.Message.getFieldWithDefault(msg, 1, ""), + auditContext: (f = msg.getAuditContext()) && common_common_pb.AuditContext.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.RetryTransferRequest} + */ +proto.s3web.transfer.RetryTransferRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.RetryTransferRequest; + return proto.s3web.transfer.RetryTransferRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.RetryTransferRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.RetryTransferRequest} + */ +proto.s3web.transfer.RetryTransferRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransferId(value); + break; + case 2: + var value = new common_common_pb.AuditContext; + reader.readMessage(value,common_common_pb.AuditContext.deserializeBinaryFromReader); + msg.setAuditContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.RetryTransferRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.RetryTransferRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.RetryTransferRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.RetryTransferRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransferId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAuditContext(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_common_pb.AuditContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string transfer_id = 1; + * @return {string} + */ +proto.s3web.transfer.RetryTransferRequest.prototype.getTransferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.s3web.transfer.RetryTransferRequest} returns this + */ +proto.s3web.transfer.RetryTransferRequest.prototype.setTransferId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional s3web.common.AuditContext audit_context = 2; + * @return {?proto.s3web.common.AuditContext} + */ +proto.s3web.transfer.RetryTransferRequest.prototype.getAuditContext = function() { + return /** @type{?proto.s3web.common.AuditContext} */ ( + jspb.Message.getWrapperField(this, common_common_pb.AuditContext, 2)); +}; + + +/** + * @param {?proto.s3web.common.AuditContext|undefined} value + * @return {!proto.s3web.transfer.RetryTransferRequest} returns this +*/ +proto.s3web.transfer.RetryTransferRequest.prototype.setAuditContext = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.RetryTransferRequest} returns this + */ +proto.s3web.transfer.RetryTransferRequest.prototype.clearAuditContext = function() { + return this.setAuditContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.RetryTransferRequest.prototype.hasAuditContext = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.s3web.transfer.RetryTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.s3web.transfer.RetryTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.s3web.transfer.RetryTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.RetryTransferResponse.toObject = function(includeInstance, msg) { + var f, obj = { + job: (f = msg.getJob()) && proto.s3web.transfer.TransferJob.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.s3web.transfer.RetryTransferResponse} + */ +proto.s3web.transfer.RetryTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.s3web.transfer.RetryTransferResponse; + return proto.s3web.transfer.RetryTransferResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.s3web.transfer.RetryTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.s3web.transfer.RetryTransferResponse} + */ +proto.s3web.transfer.RetryTransferResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.s3web.transfer.TransferJob; + reader.readMessage(value,proto.s3web.transfer.TransferJob.deserializeBinaryFromReader); + msg.setJob(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.s3web.transfer.RetryTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.s3web.transfer.RetryTransferResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.s3web.transfer.RetryTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.s3web.transfer.RetryTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJob(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.s3web.transfer.TransferJob.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TransferJob job = 1; + * @return {?proto.s3web.transfer.TransferJob} + */ +proto.s3web.transfer.RetryTransferResponse.prototype.getJob = function() { + return /** @type{?proto.s3web.transfer.TransferJob} */ ( + jspb.Message.getWrapperField(this, proto.s3web.transfer.TransferJob, 1)); +}; + + +/** + * @param {?proto.s3web.transfer.TransferJob|undefined} value + * @return {!proto.s3web.transfer.RetryTransferResponse} returns this +*/ +proto.s3web.transfer.RetryTransferResponse.prototype.setJob = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.s3web.transfer.RetryTransferResponse} returns this + */ +proto.s3web.transfer.RetryTransferResponse.prototype.clearJob = function() { + return this.setJob(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.s3web.transfer.RetryTransferResponse.prototype.hasJob = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * @enum {number} + */ +proto.s3web.transfer.TransferType = { + TRANSFER_UNKNOWN: 0, + TRANSFER_UPLOAD: 1, + TRANSFER_DOWNLOAD: 2, + TRANSFER_COPY: 3, + TRANSFER_MOVE: 4, + TRANSFER_SYNC: 5 +}; + +/** + * @enum {number} + */ +proto.s3web.transfer.TransferState = { + STATE_UNKNOWN: 0, + STATE_PENDING: 1, + STATE_RUNNING: 2, + STATE_PAUSED: 3, + STATE_COMPLETED: 4, + STATE_FAILED: 5, + STATE_CANCELLED: 6, + STATE_VERIFYING: 7 +}; + +goog.object.extend(exports, proto.s3web.transfer); diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index a7baa9f..c907e1a 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -1,9 +1,579 @@ -// API client for communicating with the gRPC backend -// In production, this would use grpc-web, but for simplicity we'll use REST endpoints +// API client for communicating with the backend +// Uses REST + MSW in mock mode, gRPC-web in production. -const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8080/api'; +import * as grpcWeb from 'grpc-web'; +import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; -class ApiClient { +import type { + AuditLog, + BreakGlassSession, + Bucket, + CleanupJob, + CleanupJobStatistics, + CorruptObject, + EmptyObject, + Location, + ObjectMetadata, + ObjectVersion, + OrphanedUpload, + ProviderDiagnostics, + S3Object, + StorageAnalytics, + Transfer, + User, +} from '../types'; + +import { AuthServiceClient } from '../gen/auth/AuthServiceClientPb'; +import { + AuthenticateRequest, + BreakGlassSession as PbBreakGlassSession, + EnterBreakGlassRequest, + ExitBreakGlassRequest, + GetCurrentUserRequest, + LogoutRequest, + PasswordCredentials, + Role, + User as PbUser, +} from '../gen/auth/auth_pb'; + +import { AuditServiceClient } from '../gen/audit/AuditServiceClientPb'; +import { + ExportFormat, + ExportLogsRequest, + QueryLogsRequest, +} from '../gen/audit/audit_pb'; + +import { CleanupServiceClient } from '../gen/cleanup/CleanupServiceClientPb'; +import { + CancelCleanupJobRequest, + CleanupJob as PbCleanupJob, + CleanupJobStatus, + CleanupJobType, + CleanupOldVersionsRequest, + CleanupOrphanedUploadsRequest, + GetCleanupJobStatusRequest, + GetProviderDiagnosticsRequest, + GetStorageAnalyticsRequest, + ListCleanupJobsRequest, + ScanCorruptObjectsRequest, + ScanEmptyObjectsRequest, + ScanOrphanedUploadsRequest, + ScanOrphanedVersionsRequest, + VerifyObjectIntegrityRequest, +} from '../gen/cleanup/cleanup_pb'; + +import { LocationServiceClient } from '../gen/location/LocationServiceClientPb'; +import { + CreateLocationRequest, + DeleteObjectsRequest, + DeleteLocationRequest, + GetBucketRequest, + GetLocationRequest, + GetObjectMetadataRequest, + GetPresignedDownloadURLRequest, + ListBucketsRequest, + ListLocationsRequest, + ListObjectsRequest, + Location as PbLocation, + LocationHealth, + ProviderType, + TestLocationRequest, + UpdateLocationRequest, +} from '../gen/location/location_pb'; + +import { PreviewServiceClient } from '../gen/preview/PreviewServiceClientPb'; +import { + GetPreviewRequest, + PreviewType, + RenderMode, +} from '../gen/preview/preview_pb'; + +import { TransferServiceClient } from '../gen/transfer/TransferServiceClientPb'; +import { + CancelTransferRequest, + GetTransferStatusRequest, + InitiateTransferRequest, + ListTransfersRequest, + PauseTransferRequest, + ResumeTransferRequest, + TransferJob as PbTransferJob, + TransferSource, + TransferDestination, + TransferState, + TransferType, +} from '../gen/transfer/transfer_pb'; + +import { + AuditContext, + Filter, + TimeRange, + UserIdentity, +} from '../gen/common/common_pb'; + +const REST_API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8080/api'; +const GRPC_WEB_BASE_URL = import.meta.env.VITE_GRPC_WEB_URL || 'http://localhost:8081'; +const USE_MOCK_API = import.meta.env.VITE_USE_MOCK_API === 'true'; + +const textDecoder = new TextDecoder('utf-8'); +const mapStringMap = (map?: { forEach: (cb: (value: T, key: string) => void) => void }): Record => { + const result: Record = {}; + if (!map) return result; + map.forEach((value, key) => { + result[key] = value; + }); + return result; +}; + +const toNumber = (value: unknown): number => { + if (typeof value === 'number') return value; + if (typeof value === 'string') return Number(value); + return 0; +}; + +const toIsoString = (timestamp?: { getSeconds(): number; getNanos(): number }): string => { + if (!timestamp) return ''; + const millis = timestamp.getSeconds() * 1000 + Math.floor(timestamp.getNanos() / 1e6); + return new Date(millis).toISOString(); +}; + +const toTimestamp = (value?: string): Timestamp | undefined => { + if (!value) return undefined; + const date = new Date(value); + if (Number.isNaN(date.getTime())) return undefined; + const ts = new Timestamp(); + ts.setSeconds(Math.floor(date.getTime() / 1000)); + ts.setNanos((date.getTime() % 1000) * 1e6); + return ts; +}; + +const roleToUiRole = (roles: Role[]): User['role'] => { + if (!roles || roles.length === 0) return 'viewer'; + if (roles.includes(Role.ROLE_SYSTEM_ADMIN)) return 'system-admin'; + if (roles.includes(Role.ROLE_TENANT_ADMIN)) return 'tenant-admin'; + if (roles.includes(Role.ROLE_EDITOR)) return 'editor'; + return 'viewer'; +}; + +const mapBreakGlassSession = (session?: PbBreakGlassSession | null): BreakGlassSession | undefined => { + if (!session) return undefined; + return { + sessionId: session.getSessionId(), + active: session.getIsActive(), + justification: session.getJustification(), + expiresAt: toIsoString(session.getExpiresAt()), + startedAt: toIsoString(session.getStartedAt()), + }; +}; + +const mapUser = (user?: PbUser | null, session?: PbBreakGlassSession | null): User => { + if (!user) { + return { + id: '', + username: '', + email: '', + role: 'viewer', + locations: [], + }; + } + + const accessList = user.getLocationAccessList(); + const locations = accessList.map((access) => access.getLocationId()); + + return { + id: user.getId(), + username: user.getUsername(), + email: user.getEmail(), + role: roleToUiRole(user.getRolesList()), + locations, + breakGlassMode: mapBreakGlassSession(session), + }; +}; + +const mapLocationStatus = (health?: LocationHealth | null): Location['status'] => { + if (!health) return 'inactive'; + switch (health.getStatus()) { + case LocationHealth.Status.HEALTHY: + return 'active'; + case LocationHealth.Status.DEGRADED: + return 'active'; + case LocationHealth.Status.UNHEALTHY: + return 'error'; + default: + return 'inactive'; + } +}; + +const mapProviderType = (providerType: ProviderType): Location['provider'] => { + switch (providerType) { + case ProviderType.PROVIDER_MINIO: + return 'minio'; + case ProviderType.PROVIDER_CEPH_RGW: + return 'ceph-rgw'; + case ProviderType.PROVIDER_AWS_S3: + return 'aws-s3'; + case ProviderType.PROVIDER_GENERIC_S3: + return 'generic-s3'; + default: + return 'generic-s3'; + } +}; + +const mapLocation = (location?: PbLocation | null): Location => { + if (!location) { + return { + id: '', + name: '', + provider: 'generic-s3', + endpointUrl: '', + status: 'inactive', + createdAt: '', + updatedAt: '', + }; + } + + const health = location.getHealth(); + const capabilities = location.getCapabilities(); + + return { + id: location.getId(), + name: location.getName(), + description: location.getDescription(), + provider: mapProviderType(location.getProviderType()), + endpointUrl: location.getEndpointUrl(), + region: location.getRegion(), + status: mapLocationStatus(health), + healthStatus: health + ? { + healthy: health.getStatus() === LocationHealth.Status.HEALTHY, + lastCheck: toIsoString(health.getLastCheck()), + message: health.getErrorMessage(), + latencyMs: health.getLatencyMs(), + } + : undefined, + capabilities: capabilities + ? { + versioning: capabilities.getVersioning(), + objectLock: capabilities.getObjectLock(), + lifecyclePolicies: capabilities.getLifecyclePolicies(), + replication: capabilities.getReplication(), + serverSideEncryption: capabilities.getServerSideEncryption(), + multipartUpload: capabilities.getMultipartUpload(), + maxMultipartSize: capabilities.getMaxMultipartSize(), + maxParts: capabilities.getMaxParts(), + supportedStorageClasses: capabilities.getSupportedStorageClassesList(), + } + : undefined, + createdAt: toIsoString(location.getCreatedAt()), + updatedAt: toIsoString(location.getUpdatedAt()), + }; +}; + +const mapTransferStatus = (state: TransferState): Transfer['status'] => { + switch (state) { + case TransferState.STATE_PENDING: + return 'pending'; + case TransferState.STATE_RUNNING: + case TransferState.STATE_VERIFYING: + return 'in_progress'; + case TransferState.STATE_COMPLETED: + return 'completed'; + case TransferState.STATE_CANCELLED: + return 'cancelled'; + case TransferState.STATE_FAILED: + return 'failed'; + case TransferState.STATE_PAUSED: + return 'pending'; + default: + return 'pending'; + } +}; + +const mapTransferType = (type: TransferType): Transfer['operation'] => { + switch (type) { + case TransferType.TRANSFER_MOVE: + return 'move'; + case TransferType.TRANSFER_SYNC: + return 'sync'; + case TransferType.TRANSFER_COPY: + default: + return 'copy'; + } +}; + +const mapTransferJob = (job?: PbTransferJob | null): Transfer => { + if (!job) { + return { + id: '', + sourceLocationId: '', + sourceBucket: '', + sourceKey: '', + destLocationId: '', + destBucket: '', + destKey: '', + operation: 'copy', + status: 'pending', + progress: 0, + totalBytes: 0, + transferredBytes: 0, + createdAt: '', + }; + } + + const source = job.getSource(); + const dest = job.getDestination(); + const progress = job.getProgress(); + + const bytesProcessed = progress?.getBytesProcessed() ?? 0; + const bytesTotal = progress?.getBytesTotal() ?? 0; + const percentage = progress?.getPercentage() ?? 0; + + let estimatedTimeRemaining: number | undefined; + if (progress?.getEstimatedCompletion()) { + const etaMs = progress.getEstimatedCompletion().getSeconds() * 1000; + estimatedTimeRemaining = Math.max(0, Math.round((etaMs - Date.now()) / 1000)); + } + + return { + id: job.getId(), + sourceLocationId: source?.getLocationId() || '', + sourceBucket: source?.getBucket() || '', + sourceKey: source?.getObjectKeysList()[0] || source?.getPrefix() || '', + destLocationId: dest?.getLocationId() || '', + destBucket: dest?.getBucket() || '', + destKey: dest?.getPrefix() || '', + operation: mapTransferType(job.getType()), + status: mapTransferStatus(job.getState()), + progress: percentage, + totalBytes: bytesTotal, + transferredBytes: bytesProcessed, + throughputBps: progress?.getThroughputBps() || undefined, + estimatedTimeRemaining, + errorMessage: job.getErrorMessage(), + createdAt: toIsoString(job.getCreatedAt()), + startedAt: toIsoString(job.getStartedAt()), + completedAt: toIsoString(job.getCompletedAt()), + }; +}; + +const mapCleanupJobType = (jobType: CleanupJobType): CleanupJob['jobType'] => { + switch (jobType) { + case CleanupJobType.CLEANUP_JOB_TYPE_CORRUPT_OBJECTS: + return 'corrupt_objects'; + case CleanupJobType.CLEANUP_JOB_TYPE_OLD_VERSIONS: + return 'old_versions'; + case CleanupJobType.CLEANUP_JOB_TYPE_EMPTY_OBJECTS: + return 'empty_objects'; + case CleanupJobType.CLEANUP_JOB_TYPE_ORPHANED_UPLOADS: + default: + return 'orphaned_uploads'; + } +}; + +const mapCleanupStatus = (status: CleanupJobStatus): CleanupJob['status'] => { + switch (status) { + case CleanupJobStatus.CLEANUP_JOB_STATUS_RUNNING: + return 'running'; + case CleanupJobStatus.CLEANUP_JOB_STATUS_COMPLETED: + return 'completed'; + case CleanupJobStatus.CLEANUP_JOB_STATUS_FAILED: + return 'failed'; + case CleanupJobStatus.CLEANUP_JOB_STATUS_CANCELLED: + return 'cancelled'; + case CleanupJobStatus.CLEANUP_JOB_STATUS_PENDING: + default: + return 'pending'; + } +}; + +const mapCleanupStatistics = (job?: PbCleanupJob | null): CleanupJobStatistics | undefined => { + if (!job || !job.getStats()) return undefined; + const stats = job.getStats(); + const startedAt = job.getStartedAt(); + const completedAt = job.getCompletedAt(); + let durationMs = 0; + if (startedAt && completedAt) { + const startMs = startedAt.getSeconds() * 1000; + const endMs = completedAt.getSeconds() * 1000; + durationMs = Math.max(0, endMs - startMs); + } + + return { + itemsScanned: stats.getItemsScanned(), + itemsProcessed: stats.getItemsCleaned(), + itemsFailed: stats.getItemsFailed(), + bytesProcessed: stats.getBytesScanned(), + bytesFreed: stats.getBytesFreed(), + durationMs, + }; +}; + +const mapCleanupJob = (job?: PbCleanupJob | null): CleanupJob => { + if (!job) { + return { + id: '', + locationId: '', + jobType: 'orphaned_uploads', + status: 'pending', + dryRun: false, + breakGlass: false, + createdAt: '', + }; + } + + const auditContext = job.getAuditContext(); + + return { + id: job.getJobId(), + locationId: job.getLocationId(), + jobType: mapCleanupJobType(job.getType()), + status: mapCleanupStatus(job.getStatus()), + bucket: job.getBucket() || undefined, + prefix: job.getPrefix() || undefined, + dryRun: job.getAction() === 1, + breakGlass: auditContext?.getBreakGlassMode() || false, + createdAt: toIsoString(job.getCreatedAt()), + startedAt: toIsoString(job.getStartedAt()) || undefined, + completedAt: toIsoString(job.getCompletedAt()) || undefined, + statistics: mapCleanupStatistics(job), + errorMessage: job.getErrorMessage(), + }; +}; + +const mapAuditLog = (event: any): AuditLog => ({ + id: event.getId(), + timestamp: toIsoString(event.getTimestamp()), + userId: event.getUserId(), + username: event.getUsername(), + action: event.getAction(), + resource: event.getResourceType(), + resourceId: event.getResourceId() || undefined, + locationId: event.getMetadataMap?.().get('location_id') || undefined, + breakGlass: event.getBreakGlassMode(), + justification: event.getBreakGlassJustification() || undefined, + ipAddress: event.getSourceIp() || undefined, + userAgent: event.getUserAgent() || undefined, + success: event.getResult() === 1, + errorMessage: event.getErrorMessage() || undefined, +}); + +const mapOrphanedUpload = (upload: any): OrphanedUpload => ({ + uploadId: upload.getUploadId(), + bucket: upload.getBucket(), + key: upload.getKey(), + initiated: toIsoString(upload.getInitiated()), + estimatedSizeBytes: upload.getEstimatedSizeBytes(), + partCount: upload.getPartCount(), + storageClass: upload.getStorageClass(), + ageDays: upload.getAgeDays(), +}); + +const mapCorruptObject = (obj: any): CorruptObject => ({ + bucket: obj.getBucket(), + key: obj.getKey(), + versionId: obj.getVersionId(), + size: obj.getSize(), + lastModified: toIsoString(obj.getLastModified()), + corruptionType: obj.getCorruptionType(), + errorMessage: obj.getErrorMessage(), + isRecoverable: obj.getIsRecoverable(), +}); + +const mapObjectVersion = (obj: any): ObjectVersion => ({ + bucket: obj.getBucket(), + key: obj.getKey(), + versionId: obj.getVersionId(), + size: obj.getSize(), + lastModified: toIsoString(obj.getLastModified()), + isLatest: obj.getIsLatest(), + isDeleteMarker: obj.getIsDeleteMarker(), + ageDays: obj.getAgeDays(), +}); + +const mapEmptyObject = (obj: any): EmptyObject => ({ + bucket: obj.getBucket(), + key: obj.getKey(), + versionId: obj.getVersionId(), + lastModified: toIsoString(obj.getLastModified()), + ageDays: obj.getAgeDays(), +}); + +const mapStorageAnalytics = (analytics: any): StorageAnalytics => { + if (!analytics) { + return { + locationId: '', + totalObjects: 0, + totalSize: 0, + bucketStats: [], + objectAging: { + lessThan30Days: 0, + days30To90: 0, + days90To180: 0, + days180To365: 0, + moreThan365Days: 0, + }, + largestObjects: [], + }; + } + + const ageDistribution = mapStringMap(analytics.getAgeDistributionMap?.()); + + return { + locationId: analytics.getLocationId(), + totalObjects: analytics.getTotalObjects(), + totalSize: analytics.getTotalSizeBytes(), + bucketStats: [], + objectAging: { + lessThan30Days: toNumber(ageDistribution.lt30), + days30To90: toNumber(ageDistribution['30-90']), + days90To180: toNumber(ageDistribution['90-180']), + days180To365: toNumber(ageDistribution['180-365']), + moreThan365Days: toNumber(ageDistribution.gt365), + }, + largestObjects: [], + }; +}; + +const mapProviderDiagnostics = (diagnostics: any, locationId = ''): ProviderDiagnostics => { + if (!diagnostics) { + return { + locationId, + providerType: '', + healthy: false, + capabilities: [], + recommendations: [], + warnings: [], + }; + } + + const capabilities = mapStringMap(diagnostics.getCapabilitiesMap?.()); + + return { + locationId, + providerType: diagnostics.getProviderType(), + healthy: diagnostics.getWarningsList().length === 0, + capabilities: Object.entries(capabilities).map(([key, value]) => `${key}:${value}`), + recommendations: diagnostics.getRecommendationsList(), + warnings: diagnostics.getWarningsList(), + }; +}; + +const mapObjectMetadata = (object: any, metadata: any): ObjectMetadata => { + const userMetadata = mapStringMap(metadata?.getUserMetadataMap?.()); + + return { + key: object?.getKey() || metadata?.getKey() || '', + size: object?.getSize() || metadata?.getSize() || 0, + etag: object?.getEtag() || metadata?.getEtag() || '', + lastModified: toIsoString(object?.getLastModified?.() || metadata?.getLastModified?.()), + contentType: object?.getContentType() || metadata?.getContentType() || undefined, + storageClass: object?.getStorageClass() || metadata?.getStorageClass() || undefined, + metadata: Object.keys(userMetadata).length ? userMetadata : undefined, + versionId: object?.getVersionId() || undefined, + isLatest: object?.getIsLatest?.() || undefined, + }; +}; + +class RestApiClient { private baseUrl: string; private token: string | null = null; @@ -21,10 +591,11 @@ class ApiClient { } } - private async request( - endpoint: string, - options: RequestInit = {} - ): Promise { + setCurrentUser(_user: User | null) { + // No-op for REST mock mode. + } + + private async request(endpoint: string, options: RequestInit = {}): Promise { const headers: Record = { 'Content-Type': 'application/json', ...(options.headers as Record), @@ -386,14 +957,837 @@ class ApiClient { } } -// Create a structured API client with nested methods -const apiClient = new ApiClient(API_BASE_URL); +class GrpcApiClient { + private baseUrl: string; + private token: string | null = null; + private currentUser: User | null = null; + + private authClient: AuthServiceClient; + private auditClient: AuditServiceClient; + private cleanupClient: CleanupServiceClient; + private locationClient: LocationServiceClient; + private previewClient: PreviewServiceClient; + private transferClient: TransferServiceClient; + + constructor(baseUrl: string) { + this.baseUrl = baseUrl; + this.token = localStorage.getItem('auth_token'); + + this.authClient = new AuthServiceClient(baseUrl); + this.auditClient = new AuditServiceClient(baseUrl); + this.cleanupClient = new CleanupServiceClient(baseUrl); + this.locationClient = new LocationServiceClient(baseUrl); + this.previewClient = new PreviewServiceClient(baseUrl); + this.transferClient = new TransferServiceClient(baseUrl); + } + + setToken(token: string | null) { + this.token = token; + if (token) { + localStorage.setItem('auth_token', token); + } else { + localStorage.removeItem('auth_token'); + } + } + + setCurrentUser(user: User | null) { + this.currentUser = user; + } + + private buildMetadata(): grpcWeb.Metadata { + const metadata: grpcWeb.Metadata = {}; + if (this.token) { + metadata['authorization'] = `Bearer ${this.token}`; + } + return metadata; + } + + private buildAuditContext(breakGlass?: boolean, justification?: string): AuditContext | undefined { + if (!this.currentUser) { + return undefined; + } + + const identity = new UserIdentity(); + identity.setUserId(this.currentUser.id); + identity.setUsername(this.currentUser.username); + identity.setEmail(this.currentUser.email || ''); + identity.setRolesList([this.currentUser.role]); + + const ctx = new AuditContext(); + ctx.setUser(identity); + ctx.setBreakGlassMode(Boolean(breakGlass)); + if (justification) { + ctx.setBreakGlassJustification(justification); + } + return ctx; + } + + private async unary(call: Promise): Promise { + try { + return await call; + } catch (err) { + if (err && typeof err === 'object' && 'message' in err) { + throw new Error(String((err as grpcWeb.RpcError).message)); + } + throw err; + } + } + + // Auth endpoints + async login(username: string, password: string) { + const creds = new PasswordCredentials(); + creds.setUsername(username); + creds.setPassword(password); + + const req = new AuthenticateRequest(); + req.setPassword(creds); + + const resp = await this.unary( + this.authClient.authenticate(req, this.buildMetadata()) + ); + + const token = resp.getToken()?.getAccessToken() || ''; + const user = mapUser(resp.getUser(), undefined); + + return { token, user }; + } + + async logout() { + const req = new LogoutRequest(); + req.setToken(this.token || ''); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.authClient.logout(req, this.buildMetadata())); + } + + async getCurrentUser() { + const req = new GetCurrentUserRequest(); + req.setToken(this.token || ''); + + const resp = await this.unary( + this.authClient.getCurrentUser(req, this.buildMetadata()) + ); + + return mapUser(resp.getUser(), resp.getBreakGlassSession()); + } + + async enterBreakGlass(justification: string, durationMinutes: number) { + if (!this.currentUser) { + throw new Error('User context required for break-glass'); + } + + const req = new EnterBreakGlassRequest(); + req.setJustification(justification); + req.setDurationSeconds(durationMinutes * 60); + req.setAuditContext(this.buildAuditContext(true, justification)); + + await this.unary(this.authClient.enterBreakGlass(req, this.buildMetadata())); + } + + async exitBreakGlass() { + if (!this.currentUser?.breakGlassMode?.sessionId) { + throw new Error('Break-glass session not available'); + } + + const req = new ExitBreakGlassRequest(); + req.setSessionId(this.currentUser.breakGlassMode.sessionId); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.authClient.exitBreakGlass(req, this.buildMetadata())); + } + + // Location endpoints + async listLocations() { + const req = new ListLocationsRequest(); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.listLocations(req, this.buildMetadata()) + ); + + return resp.getLocationsList().map(mapLocation); + } + + async getLocation(id: string) { + const req = new GetLocationRequest(); + req.setLocationId(id); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.getLocation(req, this.buildMetadata()) + ); + + return mapLocation(resp.getLocation()); + } + + async createLocation(data: any) { + const req = new CreateLocationRequest(); + req.setName(data.name || ''); + req.setDescription(data.description || ''); + req.setProviderType( + ProviderType[`PROVIDER_${String(data.provider || 'GENERIC_S3').toUpperCase().replace('-', '_')}` as keyof typeof ProviderType] || + ProviderType.PROVIDER_GENERIC_S3 + ); + req.setEndpointUrl(data.endpointUrl || ''); + req.setRegion(data.region || ''); + req.setAccessKey(data.accessKey || ''); + req.setSecretKey(data.secretKey || ''); + req.setUseSsl(Boolean(data.useSsl)); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.createLocation(req, this.buildMetadata()) + ); + + return mapLocation(resp.getLocation()); + } + + async updateLocation(id: string, data: any) { + const req = new UpdateLocationRequest(); + req.setLocationId(id); + if (data.name) req.setName(data.name); + if (data.description) req.setDescription(data.description); + if (data.endpointUrl) req.setEndpointUrl(data.endpointUrl); + if (data.region) req.setRegion(data.region); + if (data.accessKey) req.setAccessKey(data.accessKey); + if (data.secretKey) req.setSecretKey(data.secretKey); + if (data.useSsl !== undefined) req.setUseSsl(Boolean(data.useSsl)); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.updateLocation(req, this.buildMetadata()) + ); + + return mapLocation(resp.getLocation()); + } + + async deleteLocation(id: string) { + const req = new DeleteLocationRequest(); + req.setLocationId(id); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.locationClient.deleteLocation(req, this.buildMetadata())); + } + + async testLocationConnection(id: string) { + const req = new TestLocationRequest(); + req.setLocationId(id); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.testLocation(req, this.buildMetadata()) + ); + + return { + health: resp.getHealth(), + capabilities: resp.getCapabilities(), + }; + } + + // Bucket endpoints + async listBuckets(locationId: string): Promise { + const req = new ListBucketsRequest(); + req.setLocationId(locationId); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.listBuckets(req, this.buildMetadata()) + ); + + return resp.getBucketsList().map((bucket) => ({ + name: bucket.getName(), + locationId: bucket.getLocationId(), + creationDate: toIsoString(bucket.getCreationDate()), + versioningEnabled: bucket.getVersioningEnabled(), + objectLockEnabled: bucket.getObjectLockEnabled(), + tags: Object.keys(mapStringMap(bucket.getTagsMap?.())).length + ? mapStringMap(bucket.getTagsMap?.()) + : undefined, + })); + } + + async getBucket(locationId: string, bucketName: string): Promise { + const req = new GetBucketRequest(); + req.setLocationId(locationId); + req.setBucketName(bucketName); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.getBucket(req, this.buildMetadata()) + ); + + const bucket = resp.getBucket(); + return { + name: bucket?.getName() || '', + locationId: bucket?.getLocationId() || locationId, + creationDate: toIsoString(bucket?.getCreationDate?.()), + versioningEnabled: bucket?.getVersioningEnabled?.(), + objectLockEnabled: bucket?.getObjectLockEnabled?.(), + tags: Object.keys(mapStringMap(bucket?.getTagsMap?.())).length + ? mapStringMap(bucket?.getTagsMap?.()) + : undefined, + }; + } + + async createBucket(_locationId: string, _bucketName: string) { + throw new Error('CreateBucket not implemented in gRPC API'); + } + + async deleteBucket(_locationId: string, _bucketName: string) { + throw new Error('DeleteBucket not implemented in gRPC API'); + } + + // Object endpoints + async listObjects(locationId: string, bucket: string, prefix?: string) { + const req = new ListObjectsRequest(); + req.setLocationId(locationId); + req.setBucketName(bucket); + req.setPrefix(prefix || ''); + req.setDelimiter('/'); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.listObjects(req, this.buildMetadata()) + ); + + const objects: S3Object[] = resp.getObjectsList().map((obj) => ({ + key: obj.getKey(), + bucket: obj.getBucket(), + locationId: obj.getLocationId(), + size: obj.getSize(), + etag: obj.getEtag(), + lastModified: toIsoString(obj.getLastModified()), + contentType: obj.getContentType() || undefined, + storageClass: obj.getStorageClass() || undefined, + metadata: Object.keys(mapStringMap(obj.getMetadataMap?.())).length + ? mapStringMap(obj.getMetadataMap?.()) + : undefined, + tags: Object.keys(mapStringMap(obj.getTagsMap?.())).length + ? mapStringMap(obj.getTagsMap?.()) + : undefined, + versionId: obj.getVersionId() || undefined, + isLatest: obj.getIsLatest(), + })); + + return { + objects, + prefixes: resp.getCommonPrefixesList(), + }; + } + + async getObjectMetadata(locationId: string, bucket: string, key: string) { + const req = new GetObjectMetadataRequest(); + req.setLocationId(locationId); + req.setBucketName(bucket); + req.setObjectKey(key); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.getObjectMetadata(req, this.buildMetadata()) + ); + + return mapObjectMetadata(resp.getObject(), resp.getMetadata()); + } + + async deleteObject(locationId: string, bucket: string, key: string) { + const req = new DeleteObjectsRequest(); + req.setLocationId(locationId); + req.setBucketName(bucket); + req.setObjectKeysList([key]); + req.setPermanent(true); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.locationClient.deleteObjects(req, this.buildMetadata())); + } + + async deleteObjects(locationId: string, bucket: string, keys: string[]) { + const req = new DeleteObjectsRequest(); + req.setLocationId(locationId); + req.setBucketName(bucket); + req.setObjectKeysList(keys); + req.setPermanent(true); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.locationClient.deleteObjects(req, this.buildMetadata())); + } + + async getDownloadUrl(locationId: string, bucket: string, key: string) { + const req = new GetPresignedDownloadURLRequest(); + req.setLocationId(locationId); + req.setBucketName(bucket); + req.setObjectKey(key); + req.setExpirySeconds(900); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.locationClient.getPresignedDownloadURL(req, this.buildMetadata()) + ); + + return { url: resp.getUrl() }; + } + + async getPreview(locationId: string, bucket: string, key: string) { + const req = new GetPreviewRequest(); + req.setLocationId(locationId); + req.setBucket(bucket); + req.setKey(key); + req.setRenderMode(RenderMode.RENDER_SAFE); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.previewClient.getPreview(req, this.buildMetadata()) + ); + + const preview = resp.getPreview(); + if (!preview) { + return { content: '' }; + } + + const contentType = preview.getContentType() || 'application/octet-stream'; + const bytes = preview.getContent_asU8(); + + if ( + preview.getType() === PreviewType.PREVIEW_IMAGE || + preview.getType() === PreviewType.PREVIEW_PDF + ) { + const blob = new Blob([bytes], { type: contentType }); + return { url: URL.createObjectURL(blob) }; + } + + if ( + preview.getType() === PreviewType.PREVIEW_TEXT || + preview.getType() === PreviewType.PREVIEW_JSON || + preview.getType() === PreviewType.PREVIEW_YAML || + preview.getType() === PreviewType.PREVIEW_CSV || + preview.getType() === PreviewType.PREVIEW_MARKDOWN || + preview.getType() === PreviewType.PREVIEW_CODE + ) { + return { content: textDecoder.decode(bytes) }; + } + + return { content: textDecoder.decode(bytes) }; + } + + // Transfer endpoints + async createTransfer(data: { + sourceLocationId: string; + sourceBucket: string; + sourceKey: string; + destLocationId: string; + destBucket: string; + destKey: string; + operation: 'copy' | 'move'; + }) { + const req = new InitiateTransferRequest(); + req.setType( + data.operation === 'move' + ? TransferType.TRANSFER_MOVE + : TransferType.TRANSFER_COPY + ); + + const source = new TransferSource(); + source.setLocationId(data.sourceLocationId); + source.setBucket(data.sourceBucket); + source.setObjectKeysList([data.sourceKey]); + + const destination = new TransferDestination(); + destination.setLocationId(data.destLocationId); + destination.setBucket(data.destBucket); + destination.setPrefix(data.destKey); + + req.setSource(source); + req.setDestination(destination); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.transferClient.initiateTransfer(req, this.buildMetadata()) + ); + + return mapTransferJob(resp.getJob()); + } + + async listTransfers(status?: string) { + const req = new ListTransfersRequest(); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.transferClient.listTransfers(req, this.buildMetadata()) + ); + + const transfers = resp.getJobsList().map(mapTransferJob); + if (!status) { + return transfers; + } + + return transfers.filter((transfer) => transfer.status === status); + } + + async getTransfer(id: string) { + const req = new GetTransferStatusRequest(); + req.setTransferId(id); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.transferClient.getTransferStatus(req, this.buildMetadata()) + ); + + return mapTransferJob(resp.getJob()); + } + + async cancelTransfer(id: string) { + const req = new CancelTransferRequest(); + req.setTransferId(id); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.transferClient.cancelTransfer(req, this.buildMetadata())); + } + + async pauseTransfer(id: string) { + const req = new PauseTransferRequest(); + req.setTransferId(id); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.transferClient.pauseTransfer(req, this.buildMetadata())); + } + + async resumeTransfer(id: string) { + const req = new ResumeTransferRequest(); + req.setTransferId(id); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.transferClient.resumeTransfer(req, this.buildMetadata())); + } + + // Audit endpoints + async listAuditLogs(filters?: { + userId?: string; + action?: string; + startDate?: string; + endDate?: string; + breakGlass?: boolean; + }) { + const req = new QueryLogsRequest(); + req.setAuditContext(this.buildAuditContext()); + + if (filters?.userId) { + req.setUserIdsList([filters.userId]); + } + + if (filters?.action) { + const actionFilter = new Filter(); + actionFilter.setField('action'); + actionFilter.setOperator('eq'); + actionFilter.setValue(filters.action); + req.addFilters(actionFilter); + } + + if (filters?.breakGlass === true) { + req.setBreakGlassOnly(true); + } else if (filters?.breakGlass === false) { + const breakGlassFilter = new Filter(); + breakGlassFilter.setField('break_glass_mode'); + breakGlassFilter.setOperator('eq'); + breakGlassFilter.setValue('false'); + req.addFilters(breakGlassFilter); + } + + const start = toTimestamp(filters?.startDate); + const end = toTimestamp(filters?.endDate); + if (start || end) { + const range = new TimeRange(); + if (start) range.setStart(start); + if (end) range.setEnd(end); + req.setTimeRange(range); + } + + const resp = await this.unary( + this.auditClient.queryLogs(req, this.buildMetadata()) + ); + + return resp.getEventsList().map(mapAuditLog); + } + + async exportAuditLogs(format: 'csv' | 'json') { + const req = new ExportLogsRequest(); + req.setAuditContext(this.buildAuditContext()); + req.setFormat(format === 'csv' ? ExportFormat.FORMAT_CSV : ExportFormat.FORMAT_JSON); + + const resp = await this.unary( + this.auditClient.exportLogs(req, this.buildMetadata()) + ); + + const bytes = resp.getData_asU8(); + const contentType = resp.getContentType() || (format === 'csv' ? 'text/csv' : 'application/json'); + return new Blob([bytes], { type: contentType }); + } + + // Cleanup endpoints + async scanOrphanedUploads(data: { + locationId: string; + bucket?: string; + prefix?: string; + minAgeDays?: number; + maxResults?: number; + }) { + if (!data.bucket) { + throw new Error('Bucket is required for orphaned upload scan'); + } + + const req = new ScanOrphanedUploadsRequest(); + req.setLocationId(data.locationId); + req.setBucket(data.bucket); + req.setPrefix(data.prefix || ''); + if (data.minAgeDays) req.setMinAgeDays(data.minAgeDays); + if (data.maxResults) req.setMaxResults(data.maxResults); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.scanOrphanedUploads(req, this.buildMetadata()) + ); + + return { + uploads: resp.getUploadsList().map(mapOrphanedUpload), + nextContinuationToken: resp.getNextContinuationToken(), + totalCount: resp.getTotalCount(), + totalSizeBytes: resp.getTotalSizeBytes(), + }; + } + + async scanCorruptObjects(data: { + locationId: string; + bucket?: string; + prefix?: string; + verifyChecksums?: boolean; + }) { + if (!data.bucket) { + throw new Error('Bucket is required for corrupt object scan'); + } + + const req = new ScanCorruptObjectsRequest(); + req.setLocationId(data.locationId); + req.setBucket(data.bucket); + req.setPrefix(data.prefix || ''); + req.setVerifyChecksums(Boolean(data.verifyChecksums)); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.scanCorruptObjects(req, this.buildMetadata()) + ); + + return { + objects: resp.getObjectsList().map(mapCorruptObject), + nextContinuationToken: resp.getNextContinuationToken(), + totalCount: resp.getTotalCount(), + }; + } + + async scanOrphanedVersions(data: { + locationId: string; + bucket?: string; + prefix?: string; + keepVersions?: number; + }) { + if (!data.bucket) { + throw new Error('Bucket is required for orphaned version scan'); + } + + const req = new ScanOrphanedVersionsRequest(); + req.setLocationId(data.locationId); + req.setBucket(data.bucket); + req.setPrefix(data.prefix || ''); + if (data.keepVersions) req.setMaxVersionsPerObject(data.keepVersions); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.scanOrphanedVersions(req, this.buildMetadata()) + ); + + return { + versions: resp.getVersionsList().map(mapObjectVersion), + nextContinuationToken: resp.getNextContinuationToken(), + totalCount: resp.getTotalCount(), + totalSizeBytes: resp.getTotalSizeBytes(), + }; + } + + async scanEmptyObjects(data: { + locationId: string; + bucket?: string; + prefix?: string; + }) { + if (!data.bucket) { + throw new Error('Bucket is required for empty object scan'); + } + + const req = new ScanEmptyObjectsRequest(); + req.setLocationId(data.locationId); + req.setBucket(data.bucket); + req.setPrefix(data.prefix || ''); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.scanEmptyObjects(req, this.buildMetadata()) + ); + + return { + objects: resp.getObjectsList().map(mapEmptyObject), + nextContinuationToken: resp.getNextContinuationToken(), + totalCount: resp.getTotalCount(), + }; + } + + async cleanupOrphanedUploads(data: { + locationId: string; + bucket?: string; + prefix?: string; + minAgeDays?: number; + dryRun?: boolean; + breakGlass?: boolean; + }) { + if (!data.bucket) { + throw new Error('Bucket is required for orphaned upload cleanup'); + } + + const req = new CleanupOrphanedUploadsRequest(); + req.setLocationId(data.locationId); + req.setBucket(data.bucket); + req.setPrefix(data.prefix || ''); + if (data.minAgeDays) req.setMinAgeDays(data.minAgeDays); + req.setDryRun(Boolean(data.dryRun)); + req.setAuditContext(this.buildAuditContext(data.breakGlass)); + + const resp = await this.unary( + this.cleanupClient.cleanupOrphanedUploads(req, this.buildMetadata()) + ); + + return mapCleanupJob(resp.getJob()); + } + + async cleanupOldVersions(data: { + locationId: string; + bucket?: string; + prefix?: string; + keepVersions?: number; + dryRun?: boolean; + breakGlass?: boolean; + }) { + if (!data.bucket) { + throw new Error('Bucket is required for old version cleanup'); + } + + const req = new CleanupOldVersionsRequest(); + req.setLocationId(data.locationId); + req.setBucket(data.bucket); + req.setPrefix(data.prefix || ''); + if (data.keepVersions) req.setKeepVersions(data.keepVersions); + req.setDryRun(Boolean(data.dryRun)); + req.setAuditContext(this.buildAuditContext(data.breakGlass)); + + const resp = await this.unary( + this.cleanupClient.cleanupOldVersions(req, this.buildMetadata()) + ); + + return mapCleanupJob(resp.getJob()); + } + + async verifyObjectIntegrity(data: { + locationId: string; + bucket: string; + key: string; + versionId?: string; + }) { + const req = new VerifyObjectIntegrityRequest(); + req.setLocationId(data.locationId); + req.setBucket(data.bucket); + req.setKey(data.key); + if (data.versionId) req.setVersionId(data.versionId); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.verifyObjectIntegrity(req, this.buildMetadata()) + ); + + return { + isValid: resp.getIsValid(), + checksumAlgorithm: resp.getChecksumAlgorithm(), + expectedChecksum: resp.getExpectedChecksum(), + actualChecksum: resp.getActualChecksum(), + errorMessage: resp.getErrorMessage(), + }; + } + + async getStorageAnalytics(locationId: string, bucket?: string) { + const req = new GetStorageAnalyticsRequest(); + req.setLocationId(locationId); + if (bucket) req.setBucket(bucket); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.getStorageAnalytics(req, this.buildMetadata()) + ); + + return mapStorageAnalytics(resp.getAnalytics()); + } + + async getProviderDiagnostics(locationId: string) { + const req = new GetProviderDiagnosticsRequest(); + req.setLocationId(locationId); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.getProviderDiagnostics(req, this.buildMetadata()) + ); + + return mapProviderDiagnostics(resp.getDiagnostics(), locationId); + } + + async getCleanupJobStatus(jobId: string) { + const req = new GetCleanupJobStatusRequest(); + req.setJobId(jobId); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.getCleanupJobStatus(req, this.buildMetadata()) + ); + + return mapCleanupJob(resp.getJob()); + } + + async listCleanupJobs(filters?: { + locationId?: string; + status?: string; + jobType?: string; + }) { + const req = new ListCleanupJobsRequest(); + if (filters?.locationId) req.setLocationId(filters.locationId); + if (filters?.status) req.setStatus(filters.status as any); + if (filters?.jobType) req.setJobType(filters.jobType as any); + req.setAuditContext(this.buildAuditContext()); + + const resp = await this.unary( + this.cleanupClient.listCleanupJobs(req, this.buildMetadata()) + ); + + return resp.getJobsList().map(mapCleanupJob); + } + + async cancelCleanupJob(jobId: string) { + const req = new CancelCleanupJobRequest(); + req.setJobId(jobId); + req.setAuditContext(this.buildAuditContext()); + + await this.unary(this.cleanupClient.cancelCleanupJob(req, this.buildMetadata())); + } +} + +const apiClient = USE_MOCK_API + ? new RestApiClient(REST_API_BASE_URL) + : new GrpcApiClient(GRPC_WEB_BASE_URL); export const api = { - // Direct methods setToken: (token: string | null) => apiClient.setToken(token), - - // Auth methods + setCurrentUser: (user: User | null) => apiClient.setCurrentUser(user), + auth: { login: (username: string, password: string) => apiClient.login(username, password), logout: () => apiClient.logout(), @@ -402,8 +1796,7 @@ export const api = { apiClient.enterBreakGlass(justification, durationMinutes), exitBreakGlass: () => apiClient.exitBreakGlass(), }, - - // Location methods + locations: { list: () => apiClient.listLocations(), get: (id: string) => apiClient.getLocation(id), @@ -412,32 +1805,29 @@ export const api = { delete: (id: string) => apiClient.deleteLocation(id), testConnection: (id: string) => apiClient.testLocationConnection(id), }, - - // Bucket methods + buckets: { list: (locationId: string) => apiClient.listBuckets(locationId), get: (locationId: string, bucketName: string) => apiClient.getBucket(locationId, bucketName), create: (locationId: string, bucketName: string) => apiClient.createBucket(locationId, bucketName), delete: (locationId: string, bucketName: string) => apiClient.deleteBucket(locationId, bucketName), }, - - // Object methods + objects: { - list: (locationId: string, bucket: string, prefix?: string, continuationToken?: string) => - apiClient.listObjects(locationId, bucket, prefix, continuationToken), + list: (locationId: string, bucket: string, prefix?: string) => + apiClient.listObjects(locationId, bucket, prefix), getMetadata: (locationId: string, bucket: string, key: string) => apiClient.getObjectMetadata(locationId, bucket, key), delete: (locationId: string, bucket: string, key: string) => apiClient.deleteObject(locationId, bucket, key), - deleteBatch: (locationId: string, bucket: string, keys: string[]) => + deleteMultiple: (locationId: string, bucket: string, keys: string[]) => apiClient.deleteObjects(locationId, bucket, keys), getDownloadUrl: (locationId: string, bucket: string, key: string) => apiClient.getDownloadUrl(locationId, bucket, key), getPreview: (locationId: string, bucket: string, key: string) => apiClient.getPreview(locationId, bucket, key), }, - - // Transfer methods + transfers: { create: (data: { sourceLocationId: string; @@ -454,8 +1844,7 @@ export const api = { pause: (id: string) => apiClient.pauseTransfer(id), resume: (id: string) => apiClient.resumeTransfer(id), }, - - // Audit methods + audit: { listLogs: (filters?: { userId?: string; @@ -464,11 +1853,9 @@ export const api = { endDate?: string; breakGlass?: boolean; }) => apiClient.listAuditLogs(filters), - exportLogs: (format: 'csv' | 'json', filters?: any) => - apiClient.exportAuditLogs(format, filters), + exportLogs: (format: 'csv' | 'json') => apiClient.exportAuditLogs(format), }, - // Cleanup methods cleanup: { scanOrphanedUploads: (data: { locationId: string; @@ -510,16 +1897,14 @@ export const api = { dryRun?: boolean; breakGlass?: boolean; }) => apiClient.cleanupOldVersions(data), - verifyIntegrity: (data: { + verifyObjectIntegrity: (data: { locationId: string; bucket: string; key: string; versionId?: string; }) => apiClient.verifyObjectIntegrity(data), - getAnalytics: (locationId: string, bucket?: string) => - apiClient.getStorageAnalytics(locationId, bucket), - getDiagnostics: (locationId: string) => - apiClient.getProviderDiagnostics(locationId), + getAnalytics: (locationId: string, bucket?: string) => apiClient.getStorageAnalytics(locationId, bucket), + getDiagnostics: (locationId: string) => apiClient.getProviderDiagnostics(locationId), getJobStatus: (jobId: string) => apiClient.getCleanupJobStatus(jobId), listJobs: (filters?: { locationId?: string; diff --git a/frontend/src/store/authStore.test.ts b/frontend/src/store/authStore.test.ts index 23f704e..493caaf 100644 --- a/frontend/src/store/authStore.test.ts +++ b/frontend/src/store/authStore.test.ts @@ -14,6 +14,7 @@ vi.mock('../lib/api', () => ({ exitBreakGlass: vi.fn(), }, setToken: vi.fn(), + setCurrentUser: vi.fn(), }, })); diff --git a/frontend/src/store/authStore.ts b/frontend/src/store/authStore.ts index e95f5ff..44d5d05 100644 --- a/frontend/src/store/authStore.ts +++ b/frontend/src/store/authStore.ts @@ -28,6 +28,7 @@ export const useAuthStore = create((set) => ({ set({ isLoading: true, error: null }); const response = await api.auth.login(username, password); api.setToken(response.token); + api.setCurrentUser(response.user); set({ user: response.user, isAuthenticated: true, isLoading: false }); } catch (error) { set({ @@ -45,6 +46,7 @@ export const useAuthStore = create((set) => ({ console.error('Logout error:', error); } finally { api.setToken(null); + api.setCurrentUser(null); set({ user: null, isAuthenticated: false }); } }, @@ -53,9 +55,11 @@ export const useAuthStore = create((set) => ({ try { set({ isLoading: true }); const user = await api.auth.getCurrentUser(); + api.setCurrentUser(user); set({ user, isAuthenticated: true, isLoading: false }); } catch { api.setToken(null); + api.setCurrentUser(null); set({ user: null, isAuthenticated: false, isLoading: false }); } }, @@ -67,6 +71,7 @@ export const useAuthStore = create((set) => ({ // Refresh user to get updated break-glass session const user = await api.auth.getCurrentUser(); + api.setCurrentUser(user); set({ user, isLoading: false }); } catch (error) { set({ @@ -84,6 +89,7 @@ export const useAuthStore = create((set) => ({ // Refresh user to clear break-glass session const user = await api.auth.getCurrentUser(); + api.setCurrentUser(user); set({ user, isLoading: false }); } catch (error) { set({ diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 7c6ba35..2e9c626 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -106,6 +106,7 @@ export interface User { } export interface BreakGlassSession { + sessionId?: string; active: boolean; justification: string; expiresAt: string; diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 3ae78fe..1ff5137 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,4 +6,12 @@ export default defineConfig({ plugins: [react({ jsxRuntime: 'automatic', })], + optimizeDeps: { + include: ['grpc-web', 'google-protobuf'], + }, + build: { + commonjsOptions: { + include: [/gen/, /node_modules/], + }, + }, }) diff --git a/scripts/generate-grpc-web.sh b/scripts/generate-grpc-web.sh new file mode 100755 index 0000000..b154a38 --- /dev/null +++ b/scripts/generate-grpc-web.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +set -euo pipefail + +# Script to generate grpc-web client code for the frontend. + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' + +PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +PROTO_DIR="${PROJECT_ROOT}/api/proto" +OUT_DIR="${PROJECT_ROOT}/frontend/src/gen" +TOOLS_DIR="${PROJECT_ROOT}/scripts/.tools" + +PROTOC_GEN_GRPC_WEB_VERSION="1.5.0" + +mkdir -p "${OUT_DIR}" "${TOOLS_DIR}" + +if ! command -v protoc >/dev/null 2>&1; then + echo -e "${RED}Error: protoc is not installed${NC}" + exit 1 +fi + +if ! command -v protoc-gen-grpc-web >/dev/null 2>&1; then + echo -e "${YELLOW}Installing protoc-gen-grpc-web...${NC}" + os="$(uname -s | tr '[:upper:]' '[:lower:]')" + arch="$(uname -m)" + case "${arch}" in + x86_64|amd64) + arch="x86_64" + ;; + arm64|aarch64) + arch="aarch64" + ;; + *) + echo -e "${RED}Unsupported architecture: ${arch}${NC}" + exit 1 + ;; + esac + + binary="protoc-gen-grpc-web-${PROTOC_GEN_GRPC_WEB_VERSION}-${os}-${arch}" + url="https://github.com/grpc/grpc-web/releases/download/${PROTOC_GEN_GRPC_WEB_VERSION}/${binary}" + + curl -fsSL "${url}" -o "${TOOLS_DIR}/protoc-gen-grpc-web" + chmod +x "${TOOLS_DIR}/protoc-gen-grpc-web" + export PATH="${TOOLS_DIR}:${PATH}" +fi + +echo -e "${GREEN}Generating grpc-web stubs...${NC}" + +proto_files=$(find "${PROTO_DIR}" -type f -name '*.proto' ! -path "${PROTO_DIR}/reporting/*") + +protoc \ + --proto_path="${PROTO_DIR}" \ + --js_out=import_style=commonjs,binary:"${OUT_DIR}" \ + --grpc-web_out=import_style=typescript,mode=grpcweb:"${OUT_DIR}" \ + ${proto_files} + +echo -e "${GREEN}✓ grpc-web code generation complete${NC}" From bf9f3f04c027e7119efeba729eb1415c98e71871 Mon Sep 17 00:00:00 2001 From: kd Date: Tue, 27 Jan 2026 11:34:22 -0800 Subject: [PATCH 3/7] feat(deploy): add frontend, worker, and envoy manifests --- deployments/base/envoy-config.yaml | 81 ++++++++++++++++ deployments/base/envoy-deployment.yaml | 92 +++++++++++++++++++ deployments/base/envoy-service.yaml | 21 +++++ deployments/base/frontend-deployment.yaml | 80 ++++++++++++++++ deployments/base/frontend-service.yaml | 21 +++++ deployments/base/kustomization.yaml | 12 +++ deployments/base/serviceaccount.yaml | 33 +++++++ deployments/base/worker-deployment.yaml | 92 +++++++++++++++++++ .../containerfiles/Containerfile.frontend | 34 +++++++ .../containerfiles/Containerfile.migrate | 39 ++++++++ .../containerfiles/Containerfile.server | 83 +++++++++++++++++ .../containerfiles/Containerfile.worker | 38 ++++++++ deployments/overlays/dev/kustomization.yaml | 6 ++ deployments/overlays/prod/env-overrides.yaml | 15 +++ deployments/overlays/prod/ingress.yaml | 41 +++++++++ deployments/overlays/prod/kustomization.yaml | 37 +++++++- .../overlays/staging/kustomization.yaml | 6 ++ frontend/nginx.conf | 16 ++++ 18 files changed, 746 insertions(+), 1 deletion(-) create mode 100644 deployments/base/envoy-config.yaml create mode 100644 deployments/base/envoy-deployment.yaml create mode 100644 deployments/base/envoy-service.yaml create mode 100644 deployments/base/frontend-deployment.yaml create mode 100644 deployments/base/frontend-service.yaml create mode 100644 deployments/base/worker-deployment.yaml create mode 100644 deployments/containerfiles/Containerfile.frontend create mode 100644 deployments/containerfiles/Containerfile.migrate create mode 100644 deployments/containerfiles/Containerfile.server create mode 100644 deployments/containerfiles/Containerfile.worker create mode 100644 deployments/overlays/prod/env-overrides.yaml create mode 100644 deployments/overlays/prod/ingress.yaml create mode 100644 frontend/nginx.conf diff --git a/deployments/base/envoy-config.yaml b/deployments/base/envoy-config.yaml new file mode 100644 index 0000000..edf16c2 --- /dev/null +++ b/deployments/base/envoy-config.yaml @@ -0,0 +1,81 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: s3-web-envoy-config + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: envoy + app.kubernetes.io/version: "0.1.0" +data: + envoy.yaml: | + static_resources: + listeners: + - name: listener_grpc_web + address: + socket_address: + address: 0.0.0.0 + port_value: 8081 + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + stat_prefix: ingress_http + codec_type: AUTO + route_config: + name: grpc_web_route + virtual_hosts: + - name: grpc_web + domains: ["*"] + cors: + allow_origin_string_match: + - exact: "https://s3.k8ika0s.com" + - exact: "http://localhost:5173" + allow_methods: "GET,POST,PUT,DELETE,OPTIONS" + allow_headers: "authorization,content-type,x-grpc-web,grpc-timeout,grpc-status,grpc-message,keep-alive,user-agent,cache-control,content-transfer-encoding" + expose_headers: "grpc-status,grpc-message" + max_age: "86400" + routes: + - match: + prefix: "/" + route: + cluster: s3-web-grpc + timeout: 0s + max_stream_duration: + grpc_timeout_header_max: 0s + http_filters: + - name: envoy.filters.http.grpc_web + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb + - name: envoy.filters.http.cors + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + + clusters: + - name: s3-web-grpc + connect_timeout: 1s + type: STRICT_DNS + lb_policy: ROUND_ROBIN + http2_protocol_options: {} + load_assignment: + cluster_name: s3-web-grpc + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: s3-web-server + port_value: 9090 + + admin: + access_log_path: /tmp/admin_access.log + address: + socket_address: + address: 0.0.0.0 + port_value: 9901 + +# Made with Bob diff --git a/deployments/base/envoy-deployment.yaml b/deployments/base/envoy-deployment.yaml new file mode 100644 index 0000000..947f4ce --- /dev/null +++ b/deployments/base/envoy-deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: s3-web-envoy + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: envoy + app.kubernetes.io/version: "0.1.0" +spec: + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: envoy + template: + metadata: + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: envoy + app.kubernetes.io/version: "0.1.0" + spec: + serviceAccountName: s3-web-envoy + securityContext: + runAsNonRoot: true + runAsUser: 101 + runAsGroup: 101 + fsGroup: 101 + seccompProfile: + type: RuntimeDefault + containers: + - name: envoy + image: envoyproxy/envoy:v1.29.2 + args: + - "-c" + - "/etc/envoy/envoy.yaml" + - "--service-cluster" + - "s3-web-envoy" + ports: + - name: grpc-web + containerPort: 8081 + protocol: TCP + - name: admin + containerPort: 9901 + protocol: TCP + readinessProbe: + httpGet: + path: /ready + port: admin + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 3 + livenessProbe: + httpGet: + path: /ready + port: admin + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + capabilities: + drop: + - ALL + volumeMounts: + - name: config + mountPath: /etc/envoy + readOnly: true + - name: tmp + mountPath: /tmp + volumes: + - name: config + configMap: + name: s3-web-envoy-config + items: + - key: envoy.yaml + path: envoy.yaml + - name: tmp + emptyDir: {} + +# Made with Bob diff --git a/deployments/base/envoy-service.yaml b/deployments/base/envoy-service.yaml new file mode 100644 index 0000000..aea644f --- /dev/null +++ b/deployments/base/envoy-service.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: s3-web-envoy + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: envoy + app.kubernetes.io/version: "0.1.0" +spec: + type: ClusterIP + ports: + - name: grpc-web + port: 8081 + targetPort: grpc-web + protocol: TCP + selector: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: envoy + +# Made with Bob diff --git a/deployments/base/frontend-deployment.yaml b/deployments/base/frontend-deployment.yaml new file mode 100644 index 0000000..9f4bebf --- /dev/null +++ b/deployments/base/frontend-deployment.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: s3-web-frontend + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: frontend + app.kubernetes.io/version: "0.1.0" +spec: + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: frontend + template: + metadata: + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: frontend + app.kubernetes.io/version: "0.1.0" + spec: + serviceAccountName: s3-web-frontend + securityContext: + runAsNonRoot: true + runAsUser: 101 + runAsGroup: 101 + fsGroup: 101 + seccompProfile: + type: RuntimeDefault + containers: + - name: frontend + image: s3-web-frontend:latest + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 8080 + protocol: TCP + readinessProbe: + httpGet: + path: /healthz + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 3 + livenessProbe: + httpGet: + path: /healthz + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 300m + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + capabilities: + drop: + - ALL + volumeMounts: + - name: tmp + mountPath: /tmp + - name: cache + mountPath: /var/cache/nginx + volumes: + - name: tmp + emptyDir: {} + - name: cache + emptyDir: {} + +# Made with Bob diff --git a/deployments/base/frontend-service.yaml b/deployments/base/frontend-service.yaml new file mode 100644 index 0000000..51d1398 --- /dev/null +++ b/deployments/base/frontend-service.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: s3-web-frontend + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: frontend + app.kubernetes.io/version: "0.1.0" +spec: + type: ClusterIP + ports: + - name: http + port: 80 + targetPort: http + protocol: TCP + selector: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: frontend + +# Made with Bob diff --git a/deployments/base/kustomization.yaml b/deployments/base/kustomization.yaml index 412c37a..d2ccac3 100644 --- a/deployments/base/kustomization.yaml +++ b/deployments/base/kustomization.yaml @@ -14,11 +14,23 @@ resources: - secret.yaml - deployment.yaml - service.yaml +- worker-deployment.yaml +- frontend-deployment.yaml +- frontend-service.yaml +- envoy-config.yaml +- envoy-deployment.yaml +- envoy-service.yaml images: - name: s3-web newName: s3-web newTag: latest +- name: s3-web-frontend + newName: s3-web-frontend + newTag: latest +- name: s3-web-worker + newName: s3-web-worker + newTag: latest configMapGenerator: - name: s3-web-config diff --git a/deployments/base/serviceaccount.yaml b/deployments/base/serviceaccount.yaml index c63928d..976309a 100644 --- a/deployments/base/serviceaccount.yaml +++ b/deployments/base/serviceaccount.yaml @@ -9,6 +9,39 @@ metadata: app.kubernetes.io/version: "0.1.0" automountServiceAccountToken: true --- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: s3-web-worker + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: worker + app.kubernetes.io/version: "0.1.0" +automountServiceAccountToken: false +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: s3-web-frontend + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: frontend + app.kubernetes.io/version: "0.1.0" +automountServiceAccountToken: false +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: s3-web-envoy + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: envoy + app.kubernetes.io/version: "0.1.0" +automountServiceAccountToken: false +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/deployments/base/worker-deployment.yaml b/deployments/base/worker-deployment.yaml new file mode 100644 index 0000000..66da751 --- /dev/null +++ b/deployments/base/worker-deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: s3-web-worker + namespace: s3-web + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: worker + app.kubernetes.io/version: "0.1.0" +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: worker + template: + metadata: + labels: + app.kubernetes.io/name: s3-web + app.kubernetes.io/component: worker + app.kubernetes.io/version: "0.1.0" + spec: + serviceAccountName: s3-web-worker + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + seccompProfile: + type: RuntimeDefault + containers: + - name: worker + image: s3-web-worker:latest + imagePullPolicy: IfNotPresent + env: + - name: ENVIRONMENT + value: "production" + - name: LOG_LEVEL + value: "info" + - name: LOG_FORMAT + value: "json" + - name: DB_HOST + valueFrom: + secretKeyRef: + name: s3-web-db + key: host + - name: DB_PORT + valueFrom: + secretKeyRef: + name: s3-web-db + key: port + - name: DB_NAME + valueFrom: + secretKeyRef: + name: s3-web-db + key: database + - name: DB_USER + valueFrom: + secretKeyRef: + name: s3-web-db + key: username + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: s3-web-db + key: password + - name: DB_SSLMODE + value: "require" + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + capabilities: + drop: + - ALL + volumeMounts: + - name: tmp + mountPath: /tmp + volumes: + - name: tmp + emptyDir: {} + +# Made with Bob diff --git a/deployments/containerfiles/Containerfile.frontend b/deployments/containerfiles/Containerfile.frontend new file mode 100644 index 0000000..76799a6 --- /dev/null +++ b/deployments/containerfiles/Containerfile.frontend @@ -0,0 +1,34 @@ +# Multi-stage build for s3-web frontend + +FROM docker.io/library/node:20-alpine AS builder + +WORKDIR /app + +COPY frontend/package.json frontend/package-lock.json ./ +RUN npm ci + +COPY frontend/index.html ./index.html +COPY frontend/vite.config.ts ./vite.config.ts +COPY frontend/tsconfig.json ./tsconfig.json +COPY frontend/tsconfig.app.json ./tsconfig.app.json +COPY frontend/tsconfig.node.json ./tsconfig.node.json +COPY frontend/postcss.config.js ./postcss.config.js +COPY frontend/tailwind.config.js ./tailwind.config.js +COPY frontend/src ./src +COPY frontend/public ./public + +ARG VITE_GRPC_WEB_URL=http://localhost:8081 +ARG VITE_API_URL=http://localhost:8080/api/v1 +ARG VITE_USE_MOCK_API=false +ENV VITE_GRPC_WEB_URL=${VITE_GRPC_WEB_URL} +ENV VITE_API_URL=${VITE_API_URL} +ENV VITE_USE_MOCK_API=${VITE_USE_MOCK_API} + +RUN npm run build + +FROM docker.io/nginxinc/nginx-unprivileged:1.25-alpine + +COPY --from=builder /app/dist /usr/share/nginx/html +COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 8080 diff --git a/deployments/containerfiles/Containerfile.migrate b/deployments/containerfiles/Containerfile.migrate new file mode 100644 index 0000000..0b3b871 --- /dev/null +++ b/deployments/containerfiles/Containerfile.migrate @@ -0,0 +1,39 @@ +# Multi-stage build for s3-web migrate tool + +FROM docker.io/library/golang:1.21-alpine AS builder + +RUN apk add --no-cache \ + git \ + make \ + protobuf \ + protobuf-dev + +WORKDIR /build + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \ + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + +RUN make proto + +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ + -o /build/bin/s3-web-migrate \ + ./backend/cmd/migrate/main.go + +FROM docker.io/library/alpine:3.19 + +RUN addgroup -g 1000 s3web && \ + adduser -D -u 1000 -G s3web s3web + +WORKDIR /app + +COPY --from=builder /build/bin/s3-web-migrate /app/s3-web-migrate +COPY --from=builder /build/migrations /app/migrations + +USER s3web + +ENTRYPOINT ["/app/s3-web-migrate"] diff --git a/deployments/containerfiles/Containerfile.server b/deployments/containerfiles/Containerfile.server new file mode 100644 index 0000000..30789a2 --- /dev/null +++ b/deployments/containerfiles/Containerfile.server @@ -0,0 +1,83 @@ +# Multi-stage build for s3-web backend server +# Using Podman-compatible Containerfile syntax + +# Stage 1: Build stage +FROM docker.io/library/golang:1.21-alpine AS builder + +# Install build dependencies +RUN apk add --no-cache \ + git \ + make \ + protobuf \ + protobuf-dev + +# Set working directory +WORKDIR /build + +# Copy go mod files +COPY go.mod go.sum ./ + +# Download dependencies +RUN go mod download + +# Copy source code +COPY . . + +# Install protoc plugins +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \ + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + +# Generate protobuf code +RUN make proto + +# Build the application +ARG VERSION=dev +ARG BUILD_TIME +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ + -ldflags="-w -s -X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME}" \ + -o /build/bin/s3-web-server \ + ./backend/cmd/server/main.go + +# Stage 2: Runtime stage +FROM docker.io/library/alpine:3.19 + +# Install runtime dependencies +RUN apk add --no-cache \ + ca-certificates \ + tzdata + +# Create non-root user +RUN addgroup -g 1000 s3web && \ + adduser -D -u 1000 -G s3web s3web + +# Set working directory +WORKDIR /app + +# Copy binary from builder +COPY --from=builder /build/bin/s3-web-server /app/s3-web-server + +# Copy migrations +COPY --from=builder /build/migrations /app/migrations + +# Change ownership +RUN chown -R s3web:s3web /app + +# Switch to non-root user +USER s3web + +# Expose ports +EXPOSE 9090 + +# Health check +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD ["/app/s3-web-server", "health"] || exit 1 + +# Set entrypoint +ENTRYPOINT ["/app/s3-web-server"] + +# Labels +LABEL org.opencontainers.image.title="s3-web" \ + org.opencontainers.image.description="Multi-tenant S3 file management system" \ + org.opencontainers.image.vendor="s3-web" \ + org.opencontainers.image.licenses="Proprietary" \ + org.opencontainers.image.source="https://github.com/k8ika0s/s3-web" \ No newline at end of file diff --git a/deployments/containerfiles/Containerfile.worker b/deployments/containerfiles/Containerfile.worker new file mode 100644 index 0000000..4089272 --- /dev/null +++ b/deployments/containerfiles/Containerfile.worker @@ -0,0 +1,38 @@ +# Multi-stage build for s3-web worker + +FROM docker.io/library/golang:1.21-alpine AS builder + +RUN apk add --no-cache \ + git \ + make \ + protobuf \ + protobuf-dev + +WORKDIR /build + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \ + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + +RUN make proto + +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \ + -o /build/bin/s3-web-worker \ + ./backend/cmd/worker/main.go + +FROM docker.io/library/alpine:3.19 + +RUN addgroup -g 1000 s3web && \ + adduser -D -u 1000 -G s3web s3web + +WORKDIR /app + +COPY --from=builder /build/bin/s3-web-worker /app/s3-web-worker + +USER s3web + +ENTRYPOINT ["/app/s3-web-worker"] diff --git a/deployments/overlays/dev/kustomization.yaml b/deployments/overlays/dev/kustomization.yaml index 9449aa2..4f13e20 100644 --- a/deployments/overlays/dev/kustomization.yaml +++ b/deployments/overlays/dev/kustomization.yaml @@ -21,6 +21,12 @@ images: - name: s3-web newName: s3-web newTag: dev +- name: s3-web-frontend + newName: s3-web-frontend + newTag: dev +- name: s3-web-worker + newName: s3-web-worker + newTag: dev configMapGenerator: - name: s3-web-config diff --git a/deployments/overlays/prod/env-overrides.yaml b/deployments/overlays/prod/env-overrides.yaml new file mode 100644 index 0000000..edd4cdb --- /dev/null +++ b/deployments/overlays/prod/env-overrides.yaml @@ -0,0 +1,15 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: s3-web-server +spec: + template: + spec: + containers: + - name: server + env: + - name: NATS_URL + value: "nats://nats.nats.svc:4222" + - name: TEMPORAL_HOST_PORT + value: "temporal-frontend.temporal.svc:7233" + diff --git a/deployments/overlays/prod/ingress.yaml b/deployments/overlays/prod/ingress.yaml new file mode 100644 index 0000000..1bd963b --- /dev/null +++ b/deployments/overlays/prod/ingress.yaml @@ -0,0 +1,41 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: s3-web + namespace: s3-web + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "0" + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" + cert-manager.io/cluster-issuer: letsencrypt-prod-route53 +spec: + ingressClassName: nginx-private + tls: + - hosts: + - s3.k8ika0s.com + - grpc.s3.k8ika0s.com + secretName: s3-web-tls + rules: + - host: s3.k8ika0s.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: s3-web-frontend + port: + number: 80 + - host: grpc.s3.k8ika0s.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: s3-web-envoy + port: + number: 8081 + +# Made with Bob diff --git a/deployments/overlays/prod/kustomization.yaml b/deployments/overlays/prod/kustomization.yaml index 4788f82..7357303 100644 --- a/deployments/overlays/prod/kustomization.yaml +++ b/deployments/overlays/prod/kustomization.yaml @@ -19,7 +19,13 @@ replicas: images: - name: s3-web - newName: s3-web + newName: registry.k8ika0s.com/s3-web/s3-web + newTag: v0.1.0 +- name: s3-web-frontend + newName: registry.k8ika0s.com/s3-web/s3-web-frontend + newTag: v0.1.0 +- name: s3-web-worker + newName: registry.k8ika0s.com/s3-web/s3-web-worker newTag: v0.1.0 configMapGenerator: @@ -62,9 +68,38 @@ patches: value: name: GOMAXPROCS value: "4" +- target: + kind: Deployment + name: s3-web-server + patch: |- + - op: add + path: /spec/template/spec/imagePullSecrets + value: + - name: harbor-registry +- target: + kind: Deployment + name: s3-web-worker + patch: |- + - op: add + path: /spec/template/spec/imagePullSecrets + value: + - name: harbor-registry +- target: + kind: Deployment + name: s3-web-frontend + patch: |- + - op: add + path: /spec/template/spec/imagePullSecrets + value: + - name: harbor-registry +- path: env-overrides.yaml + target: + kind: Deployment + name: s3-web-server resources: - hpa.yaml - pdb.yaml +- ingress.yaml # Made with Bob diff --git a/deployments/overlays/staging/kustomization.yaml b/deployments/overlays/staging/kustomization.yaml index 88ba409..1023bb9 100644 --- a/deployments/overlays/staging/kustomization.yaml +++ b/deployments/overlays/staging/kustomization.yaml @@ -21,6 +21,12 @@ images: - name: s3-web newName: s3-web newTag: staging +- name: s3-web-frontend + newName: s3-web-frontend + newTag: staging +- name: s3-web-worker + newName: s3-web-worker + newTag: staging configMapGenerator: - name: s3-web-config diff --git a/frontend/nginx.conf b/frontend/nginx.conf new file mode 100644 index 0000000..6102c7e --- /dev/null +++ b/frontend/nginx.conf @@ -0,0 +1,16 @@ +server { + listen 8080; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + location = /healthz { + add_header Content-Type text/plain; + return 200 "ok"; + } + + location / { + try_files $uri /index.html; + } +} From 7efba947d70ff5a7f2711e4d0647284399c59c21 Mon Sep 17 00:00:00 2001 From: kd Date: Tue, 27 Jan 2026 11:34:31 -0800 Subject: [PATCH 4/7] docs: consolidate maintenance notes and prune summaries --- CI_FIXES_SUMMARY.md | 233 ---------- CI_REMEDIATION_SUMMARY.md | 203 --------- CLEANUP_FEATURE_COMPLETE.md | 715 ------------------------------ CLEANUP_PLAN.md | 97 ---- CLEANUP_SUMMARY.md | 248 ----------- COMPILATION_FIXES.md | 142 ------ GIT_WORKFLOW_SETUP.md | 286 ------------ LICENSE_UPDATE.md | 136 ------ LINT_FIX_LESSONS.md | 229 ---------- MIGRATION_FIX_SUMMARY.md | 260 ----------- PROJECT_OVERVIEW.md | 239 ---------- README.md | 6 +- STORAGE_CLEANUP_IMPLEMENTATION.md | 373 ---------------- docs/BUILT_WITH_BOB.md | 4 +- docs/MAINTENANCE_NOTES.md | 26 ++ docs/README.md | 3 +- 16 files changed, 33 insertions(+), 3167 deletions(-) delete mode 100644 CI_FIXES_SUMMARY.md delete mode 100644 CI_REMEDIATION_SUMMARY.md delete mode 100644 CLEANUP_FEATURE_COMPLETE.md delete mode 100644 CLEANUP_PLAN.md delete mode 100644 CLEANUP_SUMMARY.md delete mode 100644 COMPILATION_FIXES.md delete mode 100644 GIT_WORKFLOW_SETUP.md delete mode 100644 LICENSE_UPDATE.md delete mode 100644 LINT_FIX_LESSONS.md delete mode 100644 MIGRATION_FIX_SUMMARY.md delete mode 100644 PROJECT_OVERVIEW.md delete mode 100644 STORAGE_CLEANUP_IMPLEMENTATION.md create mode 100644 docs/MAINTENANCE_NOTES.md diff --git a/CI_FIXES_SUMMARY.md b/CI_FIXES_SUMMARY.md deleted file mode 100644 index 32e7218..0000000 --- a/CI_FIXES_SUMMARY.md +++ /dev/null @@ -1,233 +0,0 @@ -# CI Fixes and Caching Implementation Summary - -## Overview -This document summarizes all changes made to fix CI failures and implement comprehensive caching for the s3-web project. - -## Changes Made - -### 1. CI Workflow Enhancements (.github/workflows/ci.yml) - -#### Caching Strategy -Implemented multi-level caching across all Go-based jobs: - -**Backend Lint Job:** -- Added Go module caching via `setup-go` action -- Added golangci-lint cache (~/.cache/golangci-lint) -- Added Go build cache (~/.cache/go-build) -- Cache key: `${{ runner.os }}-golangci-lint-${{ hashFiles('backend/go.sum') }}` - -**Backend Test Job:** -- Added Go module caching via `setup-go` action -- Added combined Go modules and build cache -- Cache key: `${{ runner.os }}-go-test-${{ hashFiles('backend/go.sum') }}` - -**Backend Build Job:** -- Added Go module caching via `setup-go` action -- Added Go build cache -- Cache key: `${{ runner.os }}-go-build-${{ hashFiles('backend/go.sum') }}` - -**Integration Test Job:** -- Added Go module caching via `setup-go` action -- Added Go modules and build cache -- Cache key: `${{ runner.os }}-go-integration-${{ hashFiles('backend/go.sum') }}` - -#### Expected Performance Improvements -- **golangci-lint**: 30-50% faster (caches linter analysis results) -- **Go builds**: 40-60% faster (caches compiled packages) -- **Go tests**: 20-40% faster (caches test binaries) -- **Overall CI time**: 30-40% reduction expected - -### 2. Backend Lint Error Fixes - -#### Error Categories Fixed - -**A. Unchecked Error Returns (errcheck) - 40+ violations** - -1. **Logger Sync Calls** - - Files: `backend/cmd/worker/main.go`, `backend/cmd/migrate/main.go` - - Fix: Changed `defer logger.Sync()` to `defer func() { _ = logger.Sync() }()` - - Rationale: Logger sync errors during shutdown are non-critical - -2. **fmt.Scanln Call** - - File: `backend/cmd/migrate/main.go` - - Fix: Changed `fmt.Scanln(&confirm)` to `_, _ = fmt.Scanln(&confirm)` - - Rationale: User input errors are handled by subsequent validation - -3. **NATS Message Operations** - - Files: `backend/pkg/events/replay.go`, test files - - Fix: Added `_ =` prefix for Ack/Nak calls in cleanup code - - Fix: Changed `defer sub.Unsubscribe()` to `defer func() { _ = sub.Unsubscribe() }()` - - Rationale: Cleanup operations during shutdown/error paths - -4. **Cache Operations in Tests** - - Files: `backend/pkg/cache/*_test.go` - - Fix: Kept `err =` for operations checked with `require.NoError()` - - Fix: Added `_ =` only for cleanup operations - - Rationale: Test assertions need error checking, cleanup doesn't - -5. **Circuit Breaker Test Calls** - - Files: `backend/pkg/resilience/*_test.go` - - Fix: Kept `err :=` for operations checked with assertions - - Rationale: Tests verify circuit breaker behavior - -6. **Publisher Test Calls** - - Files: `backend/pkg/events/*_test.go` - - Fix: Kept `err =` for operations checked with `require.NoError()` - - Rationale: Tests verify event publishing works correctly - -**B. Unused Code (unused) - 2 violations** -- Removed `mockRedisClient` type and `newMockRedisClient` function -- File: `backend/pkg/cache/redis_test.go` -- Rationale: Test helpers that were never actually used - -**C. Static Analysis (staticcheck SA1029) - 3 violations** -- Created proper context key types -- New file: `backend/pkg/middleware/context_keys.go` -- Updated test files to use typed context keys instead of raw strings -- Rationale: Prevents context key collisions - -**D. Ineffectual Assignments (ineffassign) - 2 violations** -- Added clarifying comments for `argCount` variables -- Files: `backend/internal/transfer/repository.go`, `backend/internal/audit/repository.go` -- Rationale: Variables are used in loops, false positive from linter - -### 3. Scripts Created - -**scripts/fix_all_lint_errors.sh** (95 lines) -- Initial automated fix script -- Fixed most lint errors but created syntax errors - -**scripts/fix_lint_errors_properly.sh** (37 lines) -- Corrected syntax errors from first script -- Properly distinguished between test assertions and cleanup code - -**scripts/fix_lint_errors.sh** (62 lines) -- Original attempt (superseded by above scripts) - -### 4. New Files Created - -1. **backend/pkg/middleware/context_keys.go** (16 lines) - - Defines typed context keys to avoid collisions - - Exports `requestIDKey` and `userIDKey` constants - -2. **CI_FIXES_SUMMARY.md** (this file) - - Comprehensive documentation of all changes - -## Commits in This PR - -### Commit 1: Initial Git Workflow Setup -- Added `.github/CODEOWNERS` -- Updated `AGENTS.md` with Git workflow documentation -- Created `GIT_WORKFLOW_SETUP.md` -- Added AGPL-3.0 license files - -### Commit 2: CI Failure Fixes -- Fixed database migration ordering -- Added golangci-lint timeout -- Fixed frontend TypeScript error - -### Commit 3: Lint Errors and Caching -- Fixed all 58 golangci-lint violations -- Implemented comprehensive CI caching -- Created fix scripts - -### Commit 4: Syntax Error Corrections -- Fixed double assignment syntax errors -- Restored proper error handling in tests - -## Testing Strategy - -### Local Testing -- Scripts tested locally to verify syntax -- Manual verification of key files - -### CI Testing -- All changes validated through GitHub Actions CI -- Multiple iterations to catch and fix issues -- Caching effectiveness will be measured in subsequent runs - -## Known Remaining Issues - -The following CI failures are pre-existing from the main branch and not caused by these changes: - -1. **Frontend Tests** - Pre-existing test failures -2. **Frontend Build** - Pre-existing TypeScript issues -3. **Integration Tests** - Pre-existing integration test failures -4. **Security Scan** - Pre-existing security findings - -These should be addressed in separate PRs to maintain focused, reviewable changes. - -## Performance Metrics - -### Before Caching -- Backend Lint: ~2 minutes -- Backend Tests: ~3-4 minutes -- Backend Build: ~1-2 minutes -- Integration Tests: ~4-5 minutes -- **Total**: ~10-13 minutes - -### Expected After Caching (First Run) -- Backend Lint: ~2 minutes (cache miss) -- Backend Tests: ~3-4 minutes (cache miss) -- Backend Build: ~1-2 minutes (cache miss) -- Integration Tests: ~4-5 minutes (cache miss) -- **Total**: ~10-13 minutes - -### Expected After Caching (Subsequent Runs) -- Backend Lint: ~1-1.5 minutes (30-50% faster) -- Backend Tests: ~2-2.5 minutes (30-40% faster) -- Backend Build: ~30-60 seconds (40-60% faster) -- Integration Tests: ~2.5-3.5 minutes (30-40% faster) -- **Total**: ~6.5-8.5 minutes (35-40% faster) - -## Lessons Learned - -1. **Automated Fixes Need Careful Testing** - - Initial sed script created syntax errors - - Need to distinguish between different error handling patterns - - Test assertions vs cleanup code require different approaches - -2. **Context Keys Should Be Typed** - - Using raw strings as context keys can cause collisions - - Custom types provide compile-time safety - -3. **Caching Strategy Matters** - - Separate cache keys per job type improves hit rates - - Including both modules and build cache maximizes benefit - - Fallback restore-keys provide partial cache hits - -4. **Incremental Fixes Are Better** - - Multiple small commits easier to review and debug - - Each commit addresses specific issue category - - Easier to revert if needed - -## Next Steps - -1. **Monitor CI Performance** - - Track actual cache hit rates - - Measure real performance improvements - - Adjust cache strategy if needed - -2. **Address Remaining Failures** - - Frontend test failures (separate PR) - - Frontend build issues (separate PR) - - Integration test failures (separate PR) - - Security scan findings (separate PR) - -3. **Documentation Updates** - - Update CONTRIBUTING.md with caching info - - Add performance benchmarks to docs - - Document lint fix patterns for future reference - -## Related Documentation - -- [AGENTS.md](AGENTS.md) - Git workflow and branch protection rules -- [GIT_WORKFLOW_SETUP.md](GIT_WORKFLOW_SETUP.md) - Detailed setup documentation -- [LICENSE_UPDATE.md](LICENSE_UPDATE.md) - AGPL-3.0 license change documentation -- [.github/workflows/ci.yml](.github/workflows/ci.yml) - CI configuration - ---- - -**Last Updated**: 2026-01-18 -**Author**: IBM Bob -**PR**: #1 \ No newline at end of file diff --git a/CI_REMEDIATION_SUMMARY.md b/CI_REMEDIATION_SUMMARY.md deleted file mode 100644 index 0bde226..0000000 --- a/CI_REMEDIATION_SUMMARY.md +++ /dev/null @@ -1,203 +0,0 @@ -# CI Remediation Summary - -## Overview - -This document summarizes the CI remediation work performed on PR #1 (chore/add-agpl-license-and-git-workflow) and documents remaining issues that should be addressed in follow-up PRs. - -## Work Completed - -### 1. License Migration (Commit 1) -- ✅ Downloaded and added AGPL-3.0 LICENSE file -- ✅ Created NOTICE file with copyright and third-party notices -- ✅ Updated README.md, CONTRIBUTING.md, CHANGELOG.md with license information -- ✅ Created comprehensive LICENSE_UPDATE.md documentation - -### 2. Git Workflow Setup (Commit 1) -- ✅ Created `.github/CODEOWNERS` defining @k8ika0s as code owner -- ✅ Configured main branch protection via GitHub API - - Required pull requests - - Required code owner approval - - Stale review dismissal - - Conversation resolution required - - No force pushes or deletions -- ✅ Updated AGENTS.md with comprehensive Git workflow documentation -- ✅ Created GIT_WORKFLOW_SETUP.md with complete setup guide - -### 3. CI Enhancements (Commits 2-3) -- ✅ Fixed database migration ordering (renamed 000006 to 002) -- ✅ Added golangci-lint timeout (5m) -- ✅ Fixed frontend TypeScript error in useResponsive hook -- ✅ Implemented comprehensive CI caching for all Go jobs - - Go modules cache - - Go build cache - - golangci-lint cache - - Expected 30-40% performance improvement - -### 4. Backend Lint Fixes (Commits 4-10) -- ✅ Fixed 58 initial errcheck violations (automated sed scripts) -- ✅ Fixed compilation errors from sed script issues (manual fixes) -- ✅ Fixed additional errcheck violations revealed after compilation fixes -- ⚠️ **PARTIAL SUCCESS**: Some lint errors remain (see below) - -## Commits Summary - -1. `e0c8f5f` - Initial license and Git workflow setup -2. `f8c0d0a` - Database migration fix and CI caching -3. `0c5e2f8` - Frontend TypeScript fix -4. `8e4c7d3` - Initial automated errcheck fixes (created cascading issues) -5. `c5a9e6f` - Fixed syntax errors from commit 4 -6. `64bdd4c` - Fixed remaining compilation errors -7. `7b6794e` - Attempted final backend lint fix (incomplete) -8. `5d59566` - Manual fix for compilation errors (successful) -9. `2fe1730` - Fixed revealed errcheck violations (partial) -10. Current state - -## Remaining CI Issues - -### Backend Lint (14 violations) - -**Status**: ❌ FAILING - -**Errcheck Violations** (8): -1. `logger.Sync` not checked (1 occurrence) -2. `json.Encoder.Encode` not checked (3 occurrences) -3. `subscriber.Subscribe` not checked (2 occurrences) -4. `tx.Rollback` not checked (2 occurrences - NEW) - -**Gosimple Violations** (1): -- S1039: Unnecessary use of fmt.Sprintf - -**Ineffassign Violations** (5): -- Ineffectual assignment to `argCount` (2 occurrences) -- Ineffectual assignment to `err` (3 occurrences) - -### Backend Tests -**Status**: ❌ FAILING -- Migration failures -- Test failures -- **Action**: Separate PR needed - -### Frontend Lint -**Status**: ❌ FAILING -- React Hook dependency warnings -- Fast refresh warnings -- **Action**: Separate PR needed - -### Frontend Tests -**Status**: ❌ FAILING -- Test failures -- **Action**: Separate PR needed - -### Frontend Build -**Status**: ❌ FAILING -- Build errors -- Deprecated actions/upload-artifact@v3 -- **Action**: Separate PR needed - -### Integration Tests -**Status**: ❌ FAILING -- Container initialization failures -- **Action**: Separate PR needed - -### Security Scan -**Status**: ❌ FAILING -- CodeQL v2 deprecation -- Resource access issues -- **Action**: Separate PR needed - -## Lessons Learned - -### 1. Automated Sed Scripts Are Dangerous -**Problem**: Used sed scripts to fix 58 errcheck violations, which created: -- Double assignments (`err = _ = func()`) -- Invalid goroutine syntax -- Missed many lines needing fixes -- Created new errors while fixing old ones - -**Root Cause**: Sed cannot understand: -- Variable scope (when err is already declared) -- Context (test assertion vs cleanup vs unused) -- Go syntax rules (goroutine closures, variable shadowing) - -**Lesson**: Manual fixes are faster and safer for semantic changes. Sed scripts only work for purely syntactic changes. - -### 2. Incremental Testing Is Critical -**Problem**: Made multiple changes in one commit, making it hard to identify which change caused which issue. - -**Lesson**: Test after each logical change, commit incrementally. - -### 3. Lint Errors Cascade -**Problem**: Fixing compilation errors revealed new lint errors that were previously hidden. - -**Lesson**: Expect multiple iterations when fixing lint issues. The linter may not show all errors until previous ones are fixed. - -### 4. Context Matters More Than Pattern Matching -**Problem**: Same pattern (`err = func()`) requires different fixes depending on context: -- First use: `err := func()` -- Reuse: `err = func()` -- Unused: `_ = func()` -- Goroutine: Different scoping rules - -**Lesson**: Understand the context before applying fixes. - -## Recommendations - -### Immediate Actions - -1. **Document Remaining Issues**: Create GitHub issues for each failing CI job -2. **Prioritize Fixes**: Address in order of impact: - - Backend Lint (blocks PR merge) - - Backend Tests (critical functionality) - - Frontend issues (user-facing) - - Security/Integration (infrastructure) - -3. **Separate PRs**: Create individual PRs for each category of fixes: - - PR #2: Backend lint fixes (14 violations) - - PR #3: Backend test fixes - - PR #4: Frontend lint fixes - - PR #5: Frontend test/build fixes - - PR #6: Integration test fixes - - PR #7: Security scan fixes - -### Long-term Improvements - -1. **Pre-commit Hooks**: Add golangci-lint and prettier to pre-commit hooks -2. **Local CI**: Provide `make lint` and `make test` commands that match CI exactly -3. **Lint Configuration**: Create `.golangci.yml` to configure linters appropriately -4. **Documentation**: Update CONTRIBUTING.md with lint fix guidelines -5. **CI Optimization**: Continue improving caching and parallelization - -## Current PR Status - -**PR #1**: `chore/add-agpl-license-and-git-workflow` -- **Primary Goal**: ✅ License migration and Git workflow setup (COMPLETE) -- **Secondary Goal**: ⚠️ CI fixes (PARTIAL - 10 commits, significant progress) -- **Recommendation**: - - Merge PR #1 with current state (license/workflow complete) - - Address remaining CI issues in follow-up PRs - - OR continue fixing Backend Lint in this PR (14 violations remaining) - -## Time Investment - -- **Total Commits**: 10 -- **Total Time**: ~3 hours -- **Automated Fixes**: 7 iterations (commits 4-7, scripts) -- **Manual Fixes**: 3 commits (8-10) -- **Remaining Work**: Estimated 1-2 hours for Backend Lint - -## Conclusion - -Significant progress has been made on CI remediation: -- ✅ License migration complete -- ✅ Git workflow complete -- ✅ CI caching implemented -- ✅ Major compilation errors fixed -- ⚠️ 14 lint violations remain - -The automated sed script approach proved ineffective and time-consuming. Manual fixes were more reliable but slower. Going forward, a combination of proper linter configuration and targeted manual fixes is recommended. - ---- - -**Document Version**: 1.0 -**Last Updated**: 2026-01-18 -**Author**: IBM Bob \ No newline at end of file diff --git a/CLEANUP_FEATURE_COMPLETE.md b/CLEANUP_FEATURE_COMPLETE.md deleted file mode 100644 index f9fb5b4..0000000 --- a/CLEANUP_FEATURE_COMPLETE.md +++ /dev/null @@ -1,715 +0,0 @@ -# Storage Cleanup Feature - Complete Implementation - -## Executive Summary - -Successfully implemented a production-grade, multi-tenant storage cleanup and maintenance system for the s3-web project. The feature provides administrators with powerful tools to discover and clean up orphaned data, partial uploads, corrupt objects, and storage issues across multiple S3-compatible providers (MinIO, Ceph RGW, AWS S3, and generic S3). - -**Total Implementation**: 6 commits, ~7,013 lines of production code -**Branch**: `feature/storage-cleanup-tooling` -**Status**: Ready for testing and integration - ---- - -## Architecture Overview - -### System Components - -``` -┌─────────────────────────────────────────────────────────────┐ -│ gRPC API Layer │ -│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ -│ │ Authorization│ │ Rate Limiting│ │ Audit Logging│ │ -│ │ Middleware │ │ Middleware │ │ Middleware │ │ -│ └──────────────┘ └──────────────┘ └──────────────┘ │ -│ ↓ │ -│ ┌──────────────────────────────────────────────────────┐ │ -│ │ gRPC Handler (Proto Conversion) │ │ -│ └──────────────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────────────┘ - ↓ -┌─────────────────────────────────────────────────────────────┐ -│ Service Layer │ -│ ┌──────────────────────────────────────────────────────┐ │ -│ │ Business Logic & Orchestration │ │ -│ │ - Request validation │ │ -│ │ - Provider selection │ │ -│ │ - Job creation │ │ -│ │ - Workflow initiation │ │ -│ └──────────────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────────────┘ - ↓ -┌─────────────────────────────────────────────────────────────┐ -│ Temporal Workflows │ -│ ┌──────────────────────┐ ┌──────────────────────┐ │ -│ │ Orphaned Uploads │ │ Old Versions │ │ -│ │ Cleanup Workflow │ │ Cleanup Workflow │ │ -│ └──────────────────────┘ └──────────────────────┘ │ -│ ↓ │ -│ ┌──────────────────────────────────────────────────────┐ │ -│ │ Temporal Activities │ │ -│ │ - Scan operations │ │ -│ │ - Cleanup operations │ │ -│ │ - Verification operations │ │ -│ │ - Audit logging │ │ -│ │ - Stats updates │ │ -│ └──────────────────────────────────────────────────────┘ │ -└─────────────────────────────────────────────────────────────┘ - ↓ -┌─────────────────────────────────────────────────────────────┐ -│ Provider Abstraction Layer │ -│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ -│ │ MinIO │ │ Ceph RGW │ │ AWS S3 │ │ Generic │ │ -│ │ Provider │ │ Provider │ │ Provider │ │ Provider │ │ -│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ -└─────────────────────────────────────────────────────────────┘ - ↓ -┌─────────────────────────────────────────────────────────────┐ -│ Persistence Layer │ -│ ┌──────────────────────┐ ┌──────────────────────┐ │ -│ │ PostgreSQL │ │ Audit Service │ │ -│ │ - Jobs │ │ - Event logging │ │ -│ │ - Statistics │ │ - Break-glass │ │ -│ └──────────────────────┘ └──────────────────────┘ │ -└─────────────────────────────────────────────────────────────┘ -``` - ---- - -## Implementation Details - -### 1. API Layer (363 lines) - -**File**: [`api/proto/cleanup/cleanup.proto`](api/proto/cleanup/cleanup.proto:1) - -**gRPC Service Definition**: -- 13 RPC methods covering all cleanup operations -- Comprehensive request/response types -- Enums for job types, statuses, and actions -- Integration with common types (pagination, audit context, time ranges) - -**Key RPCs**: -- `ScanOrphanedUploads`: Discover incomplete multipart uploads -- `CleanupOrphanedUploads`: Remove orphaned uploads with dry-run support -- `ScanCorruptObjects`: Find objects with integrity issues -- `VerifyObjectIntegrity`: Checksum verification -- `ScanOrphanedVersions`: Find old object versions -- `CleanupOldVersions`: Remove old versions with keep-versions policy -- `GetStorageAnalytics`: Storage usage statistics -- `GetProviderDiagnostics`: Provider-specific diagnostics -- Job management: Status, list, cancel operations - -### 2. Provider Adapters (1,703 lines) - -**Files**: -- [`backend/pkg/s3provider/cleanup_adapter.go`](backend/pkg/s3provider/cleanup_adapter.go:1) (186 lines) - Interface -- [`backend/pkg/s3provider/cleanup_minio.go`](backend/pkg/s3provider/cleanup_minio.go:1) (565 lines) - MinIO -- [`backend/pkg/s3provider/cleanup_ceph.go`](backend/pkg/s3provider/cleanup_ceph.go:1) (523 lines) - Ceph RGW -- [`backend/pkg/s3provider/cleanup_generic.go`](backend/pkg/s3provider/cleanup_generic.go:1) (429 lines) - Generic S3 - -**CleanupAdapter Interface**: -```go -type CleanupAdapter interface { - GetProviderType() ProviderType - ListOrphanedMultipartUploads(ctx, req) (*ListOrphanedUploadsResponse, error) - AbortMultipartUploads(ctx, req) (*AbortMultipartUploadsResponse, error) - GetStorageUsageStats(ctx, req) (*StorageUsageStats, error) - VerifyObjectIntegrity(ctx, req) (*VerifyIntegrityResponse, error) - GetProviderDiagnostics(ctx) (*ProviderDiagnostics, error) -} -``` - -**Provider-Specific Optimizations**: -- **MinIO**: Batch operations, parallel processing, detailed part analysis -- **Ceph RGW**: RADOS pool awareness, off-peak scheduling, bucket indexing -- **Generic S3**: Standard S3 API, works with any compatible provider - -### 3. Data Layer (476 lines) - -**Repository** - [`backend/internal/cleanup/repository.go`](backend/internal/cleanup/repository.go:1) (407 lines): -```go -type Repository interface { - CreateJob(ctx, job) error - GetJob(ctx, jobID) (*CleanupJob, error) - UpdateJob(ctx, job) error - ListJobs(ctx, filters) ([]*CleanupJob, int64, error) - GetJobStats(ctx, jobID) (*CleanupJobStats, error) - UpdateJobStats(ctx, jobID, stats) error -} -``` - -**Database Migrations** (69 lines): -- [`migrations/000009_create_cleanup_tables.up.sql`](migrations/000009_create_cleanup_tables.up.sql:1) (62 lines) -- [`migrations/000009_create_cleanup_tables.down.sql`](migrations/000009_create_cleanup_tables.down.sql:1) (7 lines) - -**Schema**: -- `cleanup_jobs`: Job metadata with foreign key to locations -- `cleanup_job_stats`: Detailed statistics (items scanned/cleaned/failed, bytes freed) -- Proper indexes for query performance -- Auto-updating timestamp triggers - -### 4. Service Layer (754 lines) - -**File**: [`backend/internal/cleanup/service.go`](backend/internal/cleanup/service.go:1) - -**Service Interface**: -```go -type Service interface { - // Scan operations - ScanOrphanedUploads(ctx, req) (*ScanOrphanedUploadsResponse, error) - ScanCorruptObjects(ctx, req) (*ScanCorruptObjectsResponse, error) - ScanOrphanedVersions(ctx, req) (*ScanOrphanedVersionsResponse, error) - ScanEmptyObjects(ctx, req) (*ScanEmptyObjectsResponse, error) - - // Cleanup operations - CleanupOrphanedUploads(ctx, req) (*CleanupOrphanedUploadsResponse, error) - CleanupOldVersions(ctx, req) (*CleanupOldVersionsResponse, error) - - // Verification - VerifyObjectIntegrity(ctx, req) (*VerifyObjectIntegrityResponse, error) - - // Analytics - GetStorageAnalytics(ctx, req) (*GetStorageAnalyticsResponse, error) - GetProviderDiagnostics(ctx, req) (*GetProviderDiagnosticsResponse, error) - - // Job management - GetCleanupJobStatus(ctx, req) (*GetCleanupJobStatusResponse, error) - ListCleanupJobs(ctx, req) (*ListCleanupJobsResponse, error) - CancelCleanupJob(ctx, req) (*CancelCleanupJobResponse, error) -} -``` - -**Key Features**: -- Provider-agnostic through CleanupAdapter interface -- Job creation and tracking -- Temporal workflow integration points (TODO markers) -- Credential decryption placeholder -- Comprehensive error handling - -### 5. gRPC Handler Layer (748 lines) - -**File**: [`backend/internal/cleanup/grpc_handler.go`](backend/internal/cleanup/grpc_handler.go:1) - -**Responsibilities**: -- Protobuf to internal type conversion -- Request validation using `grpcutil` -- User ID extraction from audit context -- Error wrapping with gRPC status codes -- Pagination handling -- Health check endpoint - -**Type Conversions**: -- Enum mappings (job types, statuses, actions) -- Timestamp handling (protobuf ↔ time.Time) -- Optional field handling (pointers) -- Pagination request/response conversion - -### 6. Temporal Workflows (619 lines) - -**File**: [`backend/internal/cleanup/workflows.go`](backend/internal/cleanup/workflows.go:1) - -**Workflows**: - -1. **CleanupOrphanedUploadsWorkflow**: - - Batch processing with continuation tokens - - Progress tracking (every 100 items) - - Dry-run mode support - - Audit event recording (start/completion) - - Error handling and retry logic - - Final statistics update - -2. **CleanupOldVersionsWorkflow**: - - Similar structure to orphaned uploads - - Keep-versions policy enforcement - - Version-specific cleanup logic - -**Workflow Features**: -- 5-minute activity timeouts -- Exponential backoff retry (3 attempts) -- Context-aware cancellation -- Break-glass mode tracking -- Comprehensive logging - -### 7. Temporal Activities (367 lines) - -**File**: [`backend/internal/cleanup/activities.go`](backend/internal/cleanup/activities.go:1) - -**Activities**: -- `UpdateJobStatus`: Job lifecycle management -- `ScanOrphanedUploads`: Scan operations via cleanup adapter -- `AbortMultipartUpload`: Individual upload abortion -- `ScanOldVersions`: Version scanning (stub for future) -- `DeleteObjectVersion`: Version deletion (stub for future) -- `VerifyObjectChecksum`: Integrity verification -- `RecordAuditEvent`: Audit logging integration -- `UpdateJobStats`: Real-time statistics - -**Key Features**: -- Provider abstraction through CleanupAdapter -- Credential handling (decryption placeholder) -- Error handling with graceful degradation -- Integration with location and audit services - -### 8. Authorization & Audit Middleware (289 lines) - -**File**: [`backend/internal/cleanup/middleware.go`](backend/internal/cleanup/middleware.go:1) - -**Middleware Stack**: - -1. **AuthorizationMiddleware**: - - RBAC enforcement via auth service - - User authentication from gRPC metadata - - Method-to-action permission mapping - - Break-glass mode validation: - * Justification requirement (min 10 chars) - * System-level permission check - * Time-bound session validation - - Health check bypass - -2. **RateLimitMiddleware** (placeholder): - - Rate limiting infrastructure - - Ready for implementation - -3. **AuditMiddleware**: - - Operation logging - - Duration tracking - - User identification - - Success/failure recording - -**Permission Actions**: -- `read`: Scan and analytics operations -- `verify`: Integrity verification -- `cleanup`: Destructive operations -- `cancel`: Job cancellation - -### 9. Documentation (1,386 lines) - -**Files**: -- [`docs/STORAGE_CLEANUP.md`](docs/STORAGE_CLEANUP.md:1) (476 lines) - User guide -- [`STORAGE_CLEANUP_IMPLEMENTATION.md`](STORAGE_CLEANUP_IMPLEMENTATION.md:1) (434 lines) - Implementation details -- [`CLEANUP_FEATURE_COMPLETE.md`](CLEANUP_FEATURE_COMPLETE.md:1) (this file) - Complete summary - -**Documentation Coverage**: -- Architecture overview -- Security model (RBAC, break-glass, audit) -- Provider-specific implementations -- Operation guides with gRPC examples -- Best practices and troubleshooting -- API reference -- Future enhancements - ---- - -## Security Model - -### Authentication & Authorization - -1. **User Authentication**: - - User ID extracted from gRPC metadata - - Token validation via auth service - - Session management - -2. **RBAC Enforcement**: - - Permission checks for all operations - - Resource-based access control - - Action-based permissions (read, verify, cleanup, cancel) - -3. **Break-Glass Mode**: - - Required for cross-tenant destructive operations - - Justification mandatory (min 10 characters) - - System-level permission required - - Time-bound sessions - - Immutable audit trail - -### Audit Logging - -1. **Comprehensive Logging**: - - All operations logged via audit service - - User identity tracking - - Timestamp and duration - - Success/failure status - - Break-glass mode flagging - -2. **Audit Events**: - - Job start/completion - - Individual cleanup actions - - Permission checks - - Break-glass activations - -### Data Protection - -1. **Credential Security**: - - Encrypted storage in database - - Decryption only in activities - - Never exposed to browser - - Placeholder for crypto.Encryptor integration - -2. **Input Validation**: - - Required field checks - - Type validation - - Range validation - - Sanitization - ---- - -## Operational Features - -### Job Management - -1. **Job Lifecycle**: - ``` - PENDING → RUNNING → COMPLETED - ↘ FAILED - ↘ CANCELLED - ↘ PAUSED - ``` - -2. **Job Tracking**: - - Real-time status updates - - Progress tracking (items scanned/cleaned/failed) - - Bytes freed calculation - - Error message capture - - Duration tracking - -3. **Job Operations**: - - Create and start jobs - - Query job status - - List jobs with filters - - Cancel running jobs - - View job statistics - -### Dry-Run Mode - -1. **Safe Preview**: - - Scan without deletion - - Report what would be deleted - - Size estimation - - No actual changes - -2. **Use Cases**: - - Testing cleanup policies - - Estimating storage savings - - Validating filters - - Training and demonstration - -### Provider Diagnostics - -1. **Capability Detection**: - - Versioning support - - Object lock support - - Multipart limits - - SSE support - -2. **Health Monitoring**: - - Connection status - - Latency measurement - - Error detection - - Performance metrics - -3. **Recommendations**: - - Provider-specific best practices - - Performance optimization tips - - Configuration suggestions - - Warning messages - ---- - -## Performance Considerations - -### Batch Processing - -1. **Continuation Tokens**: - - Paginated scanning - - Resumable operations - - Memory efficiency - -2. **Concurrency**: - - Parallel processing where safe - - Configurable batch sizes - - Rate limiting support - -### Retry Logic - -1. **Temporal Retry Policy**: - - Initial interval: 1 second - - Backoff coefficient: 2.0 - - Maximum interval: 1 minute - - Maximum attempts: 3 - -2. **Activity Timeouts**: - - Start-to-close: 5 minutes - - Heartbeat support - - Progress reporting - -### Database Optimization - -1. **Indexes**: - - Job ID (primary key) - - Location ID + Status (composite) - - Created timestamp - - User ID - -2. **Statistics Tracking**: - - Separate stats table - - Periodic updates (every 100 items) - - Atomic operations - ---- - -## Integration Points - -### Required Services - -1. **Location Service**: - - Provider configuration - - Credential management - - Health status - -2. **Auth Service**: - - User authentication - - Permission checks - - Break-glass validation - -3. **Audit Service**: - - Event logging - - Break-glass tracking - - Compliance reporting - -4. **Temporal**: - - Workflow execution - - Activity orchestration - - Retry handling - -### Database Schema - -1. **Tables**: - - `cleanup_jobs`: Job metadata - - `cleanup_job_stats`: Statistics - - Foreign key to `locations` table - -2. **Triggers**: - - Auto-update timestamps - - Statistics aggregation - ---- - -## Testing Strategy - -### Unit Tests (TODO) - -1. **Service Layer**: - - Business logic validation - - Error handling - - Edge cases - -2. **Repository Layer**: - - Database operations - - Query correctness - - Transaction handling - -3. **Provider Adapters**: - - API interactions - - Error handling - - Provider-specific logic - -### Integration Tests (TODO) - -1. **With Test Containers**: - - PostgreSQL for database - - MinIO for S3 operations - - NATS for events - - Temporal for workflows - -2. **End-to-End Scenarios**: - - Complete cleanup workflows - - Job lifecycle - - Error recovery - - Audit trail verification - -### gRPC Tests (TODO) - -1. **Handler Tests**: - - Request validation - - Type conversion - - Error responses - -2. **Middleware Tests**: - - Authorization checks - - Break-glass validation - - Audit logging - ---- - -## Deployment Considerations - -### Environment Variables - -```bash -# Database -DB_HOST=localhost -DB_PORT=5432 -DB_NAME=s3web -DB_USER=s3web -DB_PASSWORD= - -# Temporal -TEMPORAL_HOST=localhost:7233 -TEMPORAL_NAMESPACE=s3web - -# Service -GRPC_PORT=50051 -LOG_LEVEL=info -``` - -### Kubernetes Resources - -1. **Deployment**: - - Cleanup service pods - - Temporal worker pods - - Resource limits/requests - -2. **Services**: - - gRPC service - - Health check endpoints - -3. **ConfigMaps**: - - Service configuration - - Provider settings - -4. **Secrets**: - - Database credentials - - Encryption keys - -### Monitoring - -1. **Metrics**: - - Job success/failure rates - - Cleanup throughput - - Storage freed - - Operation latency - -2. **Alerts**: - - Job failures - - High error rates - - Long-running jobs - - Break-glass usage - -3. **Dashboards**: - - Job status overview - - Storage analytics - - Provider health - - Audit activity - ---- - -## Future Enhancements - -### Planned Features - -1. **Advanced Scheduling**: - - Cron-based cleanup jobs - - Recurring scans - - Off-peak execution - -2. **Lifecycle Policies**: - - Automatic cleanup rules - - Age-based deletion - - Storage class transitions - -3. **Reporting**: - - Storage savings reports - - Cleanup history - - Trend analysis - - Cost optimization - -4. **UI Components**: - - React admin interface - - Job monitoring dashboard - - Interactive cleanup wizard - - Real-time progress tracking - -5. **Additional Providers**: - - Google Cloud Storage - - Azure Blob Storage - - Wasabi - - Backblaze B2 - -### Optimization Opportunities - -1. **Performance**: - - Parallel scanning - - Bulk operations - - Caching strategies - -2. **Scalability**: - - Horizontal scaling - - Load balancing - - Queue-based processing - -3. **Observability**: - - Distributed tracing - - Detailed metrics - - Log aggregation - ---- - -## Commit History - -1. **Commit 1** (`aa5a3c2` → `a384ef6`): Protobuf definitions, provider adapters, documentation -2. **Commit 2** (`a384ef6` → `8868f7b`): Repository, migrations, service layer -3. **Commit 3** (`8868f7b` → `4a97cbc`): gRPC handler layer -4. **Commit 4** (`4a97cbc` → `5fcfaa6`): Temporal workflows and activities -5. **Commit 5** (`5fcfaa6` → current): Authorization and audit middleware -6. **Commit 6** (pending): Final summary and integration guide - ---- - -## Summary Statistics - -| Component | Files | Lines | Status | -|-----------|-------|-------|--------| -| Protobuf API | 1 | 363 | ✅ Complete | -| Provider Adapters | 4 | 1,703 | ✅ Complete | -| Repository | 1 | 407 | ✅ Complete | -| Migrations | 2 | 69 | ✅ Complete | -| Service Layer | 1 | 754 | ✅ Complete | -| gRPC Handler | 1 | 748 | ✅ Complete | -| Workflows | 1 | 619 | ✅ Complete | -| Activities | 1 | 367 | ✅ Complete | -| Middleware | 1 | 289 | ✅ Complete | -| Documentation | 3 | 1,386 | ✅ Complete | -| **Total** | **16** | **6,705** | **✅ Complete** | - -**Additional**: -- Tests: 0 lines (TODO) -- Server Integration: Pending -- Frontend: Future work - ---- - -## Conclusion - -The storage cleanup feature is **production-ready** with comprehensive: -- ✅ API definitions and contracts -- ✅ Multi-provider support with optimizations -- ✅ Reliable long-running operations via Temporal -- ✅ Security through RBAC and break-glass mode -- ✅ Audit logging for compliance -- ✅ Database persistence and job tracking -- ✅ Comprehensive documentation - -**Remaining Work**: -- ⏳ Unit and integration tests (~1,700 lines estimated) -- ⏳ Server integration (register service in main.go) -- ⏳ Frontend components (future) - -**Ready For**: -- Code review -- Testing -- Integration with main server -- Deployment to development environment - ---- - -**Implementation Date**: January 2026 -**Branch**: `feature/storage-cleanup-tooling` -**Status**: ✅ Core Implementation Complete \ No newline at end of file diff --git a/CLEANUP_PLAN.md b/CLEANUP_PLAN.md deleted file mode 100644 index 1ae1d20..0000000 --- a/CLEANUP_PLAN.md +++ /dev/null @@ -1,97 +0,0 @@ -# Project Cleanup and Organization Plan - -## Files to Remove (Redundant/Outdated) - -### Root Directory -- `FINAL_SESSION_SUMMARY.md` - Outdated, superseded by current status -- `IMPLEMENTATION_COMPLETE.md` - Outdated milestone marker -- `NEXT_STEPS.md` - Outdated, superseded by SYSTEM_REVIEW.md -- `PROGRESS_SUMMARY.md` - Redundant with PROJECT_STATUS.md -- `SESSION_PROGRESS.md` - Outdated session tracking - -### docs/ Directory - -**Progress/Status Documents (Consolidate into PROJECT_STATUS.md):** -- `FRONTEND_BUILD_COMPLETE.md` -- `FRONTEND_BUILD_STATUS.md` -- `IMPLEMENTATION_STATUS.md` -- `INTEGRATION_TESTS_COMPLETE.md` -- `IDP_INTEGRATION_COMPLETE.md` -- `OBSERVABILITY_STATUS.md` -- `PHASE_1_COMPLETE.md` -- `PHASE_2_COMPLETE.md` -- `PHASE_2_PROGRESS.md` -- `PHASE_3_COMPLETE.md` -- `PHASE_3_PROGRESS.md` -- `PHASE_4_COMPLETE.md` -- `PHASE_5_COMPLETE.md` -- `TEST_REMEDIATION_COMPLETE.md` -- `TEST_VALIDATION_SUMMARY.md` -- `TESTING_BASELINE_ESTABLISHED.md` -- `TESTING_REALITY_CHECK.md` -- `TESTING_SETUP_COMPLETE.md` - -**Plan Documents (Consolidate into main docs):** -- `IDP_INTEGRATION_PLAN.md` - Merge into KEYCLOAK_INTEGRATION.md -- `TESTING_IMPLEMENTATION_PLAN.md` - Merge into TESTING_STRATEGY.md -- `UI_UX_ENHANCEMENTS_PLAN.md` - Merge into UX_ENHANCEMENTS.md - -**Duplicate/Redundant:** -- `UX_ENHANCEMENTS_SUMMARY.md` - Redundant with UX_ENHANCEMENTS.md -- `UX_IMPROVEMENTS_SUMMARY.md` - Redundant with UX_ENHANCEMENTS.md -- `UI_ENHANCEMENTS.md` - Merge into UX_ENHANCEMENTS.md - -## Files to Keep and Update - -### Core Documentation -- `README.md` - Main project readme (already updated with "Built by Bob") -- `PROJECT_OVERVIEW.md` - High-level architecture -- `🛡️ AGENTS.md` - Agent guidelines - -### Technical Documentation -- `ARCHITECTURE.md` - System architecture -- `DATABASE.md` - Database schema and migrations -- `DEPLOYMENT.md` - Deployment guide -- `DEVELOPMENT.md` - Development setup -- `SETUP_GUIDE.md` - Quick start guide -- `TROUBLESHOOTING.md` - Common issues - -### Feature Documentation -- `KEYCLOAK_INTEGRATION.md` - IDP integration (update with latest) -- `OPENTELEMETRY_INTEGRATION.md` - Observability -- `TEMPORAL_INTEGRATION.md` - Workflow engine (NEW) -- `VAULT_INTEGRATION.md` - Secrets management (NEW) -- `UX_ENHANCEMENTS.md` - UI/UX features -- `DARK_MODE_IMPLEMENTATION.md` - Dark mode -- `ACCESSIBILITY_AUDIT.md` - Accessibility -- `PERFORMANCE_OPTIMIZATION.md` - Performance -- `BACKGROUND_JOBS.md` - Background processing - -### Testing Documentation -- `TESTING_STRATEGY.md` - Overall testing approach -- `TESTING_PROGRESS.md` - Current test status - -### Frontend Documentation -- `FRONTEND_DEV_MODE.md` - Development mode -- `FRONTEND_MOCK_MODE_SETUP.md` - Mock mode setup - -### Status Documentation -- `PROJECT_STATUS.md` - Consolidated project status (UPDATE) -- `SYSTEM_REVIEW.md` - Gap analysis and roadmap (KEEP) -- `BUILT_WITH_BOB.md` - Bob's contribution narrative - -## New Files to Create - -1. **CHANGELOG.md** - Version history and changes -2. **CONTRIBUTING.md** - Contribution guidelines -3. **SECURITY.md** - Security policy and reporting -4. **.github/workflows/** - CI/CD workflows - -## Actions - -1. Remove redundant files -2. Update PROJECT_STATUS.md with consolidated information -3. Create CHANGELOG.md -4. Create/update CI/CD workflows -5. Update documentation index in docs/README.md -6. Verify all cross-references in documentation \ No newline at end of file diff --git a/CLEANUP_SUMMARY.md b/CLEANUP_SUMMARY.md deleted file mode 100644 index 13b053e..0000000 --- a/CLEANUP_SUMMARY.md +++ /dev/null @@ -1,248 +0,0 @@ -# Project Cleanup and Organization Summary - -**Date**: 2026-01-17 -**Status**: Complete - -## Overview - -Comprehensive project cleanup and organization performed to consolidate documentation, remove redundant files, and establish production-ready CI/CD workflows. - -## Actions Completed - -### 1. Removed Redundant Files ✅ - -#### Root Directory (5 files) -- ✅ `FINAL_SESSION_SUMMARY.md` - Outdated session summary -- ✅ `IMPLEMENTATION_COMPLETE.md` - Outdated milestone marker -- ✅ `NEXT_STEPS.md` - Superseded by SYSTEM_REVIEW.md -- ✅ `PROGRESS_SUMMARY.md` - Redundant with PROJECT_STATUS.md -- ✅ `SESSION_PROGRESS.md` - Outdated session tracking - -#### docs/ Directory (23 files) - -**Progress/Status Documents:** -- ✅ `FRONTEND_BUILD_COMPLETE.md` -- ✅ `FRONTEND_BUILD_STATUS.md` -- ✅ `IMPLEMENTATION_STATUS.md` -- ✅ `INTEGRATION_TESTS_COMPLETE.md` -- ✅ `IDP_INTEGRATION_COMPLETE.md` -- ✅ `OBSERVABILITY_STATUS.md` -- ✅ `PHASE_1-5_COMPLETE.md` (consolidated) -- ✅ `PHASE_2-3_PROGRESS.md` (consolidated) -- ✅ `TEST_REMEDIATION_COMPLETE.md` -- ✅ `TEST_VALIDATION_SUMMARY.md` -- ✅ `TESTING_BASELINE_ESTABLISHED.md` -- ✅ `TESTING_REALITY_CHECK.md` -- ✅ `TESTING_SETUP_COMPLETE.md` - -**Plan Documents:** -- ✅ `IDP_INTEGRATION_PLAN.md` - Information in IDP_INTEGRATION.md -- ✅ `TESTING_IMPLEMENTATION_PLAN.md` - Information in TESTING.md -- ✅ `UI_UX_ENHANCEMENTS_PLAN.md` - Information in UX_ENHANCEMENTS.md - -**Duplicate/Redundant:** -- ✅ `UX_ENHANCEMENTS_SUMMARY.md` -- ✅ `UX_IMPROVEMENTS_SUMMARY.md` -- ✅ `UI_ENHANCEMENTS.md` - -**Total Removed**: 28 files - -### 2. Created New Files ✅ - -#### Root Directory -- ✅ `CHANGELOG.md` (135 lines) - Version history following Keep a Changelog format -- ✅ `CONTRIBUTING.md` (368 lines) - Comprehensive contribution guidelines -- ✅ `SECURITY.md` (382 lines) - Security policy and reporting procedures - -#### CI/CD Workflows -- ✅ `.github/workflows/ci.yml` (310 lines) - Continuous integration pipeline - - Backend linting and testing - - Frontend linting and testing - - Security scanning (Trivy, Gosec) - - Integration tests - - Code coverage reporting - -- ✅ `.github/workflows/release.yml` (302 lines) - Release automation - - Multi-platform binary builds - - Container image builds with Buildah - - SBOM generation - - GitHub releases - - Manifest updates - -#### Documentation -- ✅ `docs/README.md` (283 lines) - Comprehensive documentation index -- ✅ `CLEANUP_PLAN.md` (119 lines) - Cleanup strategy document -- ✅ `CLEANUP_SUMMARY.md` (This file) - Cleanup completion summary - -**Total Created**: 8 files (1,899 lines) - -### 3. Updated Existing Files ✅ - -- ✅ `README.md` - Added "Built by Bob" section -- ✅ `docs/PROJECT_STATUS.md` (445 lines) - Consolidated all project status information - - Updated metrics (15,000+ lines, 1,916+ tests) - - Added all completed components - - Updated completion status (85%) - - Added pending work items - -## Documentation Structure - -### Root Level -``` -s3-web/ -├── README.md # Project overview + Built by Bob -├── CHANGELOG.md # Version history -├── CONTRIBUTING.md # Contribution guidelines -├── SECURITY.md # Security policy -├── CLEANUP_PLAN.md # Cleanup strategy -└── CLEANUP_SUMMARY.md # This file -``` - -### Documentation Directory -``` -docs/ -├── README.md # Documentation index -├── PROJECT_STATUS.md # Consolidated status -├── SYSTEM_REVIEW.md # Gap analysis -├── ARCHITECTURE.md # System architecture -├── DEVELOPMENT.md # Development guide -├── DEPLOYMENT.md # Deployment guide -├── DATABASE.md # Database guide -├── TEMPORAL_INTEGRATION.md # Workflow orchestration -├── VAULT_INTEGRATION.md # Secrets management -├── IDP_INTEGRATION.md # Identity providers -├── OBSERVABILITY.md # Monitoring and tracing -├── UX_ENHANCEMENTS.md # UI/UX features -├── AUTHENTICATION.md # Auth system -├── MULTI_TENANCY.md # Multi-tenant architecture -├── TRANSFERS.md # Transfer system -├── PREVIEW.md # Preview pipeline -├── BREAK_GLASS.md # Break-glass mode -├── OPERATIONS.md # Operations guide -├── MONITORING.md # Monitoring setup -├── TROUBLESHOOTING.md # Troubleshooting guide -└── AGENTS.md # AI agent guide -``` - -### CI/CD -``` -.github/ -└── workflows/ - ├── ci.yml # Continuous integration - └── release.yml # Release automation -``` - -## Key Improvements - -### 1. Documentation Consolidation -- **Before**: 28 redundant progress/status documents -- **After**: Single consolidated PROJECT_STATUS.md -- **Benefit**: Single source of truth for project status - -### 2. Version Management -- **Added**: CHANGELOG.md with semantic versioning -- **Format**: Keep a Changelog standard -- **Benefit**: Clear version history and release notes - -### 3. Contribution Process -- **Added**: CONTRIBUTING.md with detailed guidelines -- **Includes**: Code standards, testing requirements, PR process -- **Benefit**: Clear expectations for contributors - -### 4. Security Policy -- **Added**: SECURITY.md with reporting procedures -- **Includes**: Threat model, security features, best practices -- **Benefit**: Clear security posture and vulnerability reporting - -### 5. CI/CD Automation -- **Added**: Complete CI/CD pipelines -- **Features**: Automated testing, security scanning, releases -- **Benefit**: Automated quality assurance and deployment - -### 6. Documentation Index -- **Updated**: docs/README.md with comprehensive index -- **Features**: Quick navigation, learning paths, status tracking -- **Benefit**: Easy documentation discovery - -## Metrics - -### Files -- **Removed**: 28 redundant files -- **Created**: 8 new files (1,899 lines) -- **Updated**: 2 key files -- **Net Change**: -20 files, +1,899 lines of documentation - -### Documentation Quality -- **Before**: Scattered across 28+ status files -- **After**: Organized in 40+ focused documents -- **Coverage**: Complete project documentation -- **Accessibility**: Clear index and navigation - -### CI/CD -- **Before**: No automated workflows -- **After**: Complete CI/CD pipelines (612 lines) -- **Coverage**: Testing, security, releases -- **Automation**: Fully automated quality gates - -## Remaining Tasks - -### Immediate -- ✅ All cleanup tasks complete - -### Future Enhancements -- [ ] Add more CI/CD workflows (e.g., dependency updates) -- [ ] Create issue templates -- [ ] Add pull request templates -- [ ] Create GitHub Actions for automated documentation updates -- [ ] Add code owners file (CODEOWNERS) - -## Verification Checklist - -- ✅ All redundant files removed -- ✅ New documentation files created -- ✅ CI/CD workflows configured -- ✅ Documentation index updated -- ✅ PROJECT_STATUS.md consolidated -- ✅ CHANGELOG.md created -- ✅ CONTRIBUTING.md created -- ✅ SECURITY.md created -- ✅ Cross-references verified -- ✅ "Built by Bob" section added to README - -## Impact - -### Developer Experience -- **Improved**: Clear contribution guidelines -- **Improved**: Automated testing and quality checks -- **Improved**: Easy documentation navigation -- **Improved**: Clear project status visibility - -### Project Quality -- **Improved**: Automated CI/CD pipelines -- **Improved**: Security scanning and reporting -- **Improved**: Version management and changelog -- **Improved**: Documentation organization - -### Maintenance -- **Reduced**: Documentation sprawl -- **Reduced**: Manual testing burden -- **Reduced**: Release process complexity -- **Improved**: Single source of truth for status - -## Conclusion - -The project cleanup and organization effort has successfully: - -1. **Removed 28 redundant files** that were causing documentation sprawl -2. **Created 8 new files** (1,899 lines) establishing production-ready processes -3. **Consolidated project status** into a single, comprehensive document -4. **Established CI/CD pipelines** for automated quality assurance -5. **Improved documentation structure** with clear navigation and index - -The project now has a clean, organized structure with production-ready CI/CD workflows, comprehensive documentation, and clear contribution guidelines. - ---- - -**Built by IBM Bob** - Demonstrating AI-assisted project organization and documentation - -**Next Steps**: Continue with Phase 1.3 (Backup & DR) and Phase 1.4 (Alerting) \ No newline at end of file diff --git a/COMPILATION_FIXES.md b/COMPILATION_FIXES.md deleted file mode 100644 index c659472..0000000 --- a/COMPILATION_FIXES.md +++ /dev/null @@ -1,142 +0,0 @@ -# Compilation Fixes Summary - -**Date**: 2026-01-18 -**Status**: ✅ Complete - -## Overview - -Fixed critical compilation errors in the codebase following the project cleanup and organization phase. All issues were related to API mismatches and incorrect type usage. - -## Issues Fixed - -### 1. Worker Main - Database Configuration (backend/cmd/worker/main.go) - -**Problem**: -- Used `database.NewPool()` which doesn't exist -- Used `cfg.Database.Username` field which doesn't exist in `DatabaseConfig` -- Passed `*database.DB` directly to worker.Config which expects `*pgxpool.Pool` - -**Solution**: -```go -// Changed from: -db, err := database.NewPool(context.Background(), &database.Config{ - Username: cfg.Database.Username, - // ... -}) -manager := worker.NewManager(&worker.Config{ - Database: db, - // ... -}) - -// To: -db, err := database.New(&database.Config{ - User: cfg.Database.User, // Correct field name - // ... all config fields -}, log) -manager := worker.NewManager(&worker.Config{ - Database: db.Pool(), // Extract underlying pool - // ... -}) -``` - -**Files Modified**: -- `backend/cmd/worker/main.go` (lines 36-51) - -### 2. Vault Client - KV API Changes (backend/pkg/vault/client.go) - -**Problem**: -- Vault Go SDK changed API: `KVv2.Get()` now returns `*KVSecret` instead of `*Secret` -- `KVv2.List()` method doesn't exist - must use `Logical().List()` with "metadata/" prefix -- Code had duplicate/conflicting logic for handling secrets - -**Solution**: - -#### ReadSecret Method (lines 128-151) -```go -// Simplified to handle both KV v1 and v2 correctly -func (c *vaultClient) ReadSecret(ctx context.Context, path string) (map[string]interface{}, error) { - if c.config.KVVersion == "v2" { - kvSecret, err := c.client.KVv2("secret").Get(ctx, path) - if err != nil { - return nil, fmt.Errorf("failed to read secret: %w", err) - } - if kvSecret == nil || kvSecret.Data == nil { - return nil, fmt.Errorf("secret not found: %s", path) - } - return kvSecret.Data, nil // KVSecret.Data is already unwrapped - } - - // KV v1 logic unchanged - secret, err := c.client.Logical().ReadWithContext(ctx, path) - // ... - return secret.Data, nil -} -``` - -#### ListSecrets Method (lines 200-220) -```go -// Fixed to use Logical().List() for both versions -func (c *vaultClient) ListSecrets(ctx context.Context, path string) ([]string, error) { - listPath := path - if c.config.KVVersion == "v2" { - listPath = "metadata/" + path // KV v2 requires metadata prefix - } - - secret, err := c.client.Logical().ListWithContext(ctx, listPath) - // ... rest of logic -} -``` - -**Files Modified**: -- `backend/pkg/vault/client.go` (lines 128-151, 200-220) - -## Verification - -All fixes verified with successful compilation: - -```bash -# Worker binary compiles successfully -go build ./backend/cmd/worker -# Exit code: 0 - -# Vault package compiles successfully -go build ./backend/pkg/vault -# Exit code: 0 -``` - -## Root Causes - -1. **Database API Mismatch**: The worker was written assuming a `NewPool()` function that doesn't exist. The correct function is `New()` which returns a `*DB` wrapper, not a raw pool. - -2. **Config Field Name**: `DatabaseConfig` uses `User` not `Username` - this is consistent with PostgreSQL connection string conventions. - -3. **Vault SDK Update**: The HashiCorp Vault Go SDK updated its KV v2 API to return specialized types (`*KVSecret`) instead of generic `*Secret`, and removed the `List()` method from the KV v2 interface. - -## Impact - -- ✅ Worker service now compiles and can be deployed -- ✅ Vault integration works with latest Vault Go SDK -- ✅ No runtime behavior changes - only API compatibility fixes -- ✅ All existing tests remain valid - -## Related Files - -### Modified -- `backend/cmd/worker/main.go` -- `backend/pkg/vault/client.go` - -### Referenced (No Changes) -- `backend/pkg/database/database.go` - Confirmed API usage -- `backend/pkg/config/config.go` - Confirmed field names -- `backend/internal/worker/manager.go` - Confirmed type requirements - -## Next Steps - -1. ✅ Compilation errors resolved -2. ⏳ Run full test suite to ensure no regressions -3. ⏳ Update integration tests if needed -4. ⏳ Proceed with Phase 1.3 (Backup & DR) - ---- - -**Built with Bob** 🤖 \ No newline at end of file diff --git a/GIT_WORKFLOW_SETUP.md b/GIT_WORKFLOW_SETUP.md deleted file mode 100644 index bfff907..0000000 --- a/GIT_WORKFLOW_SETUP.md +++ /dev/null @@ -1,286 +0,0 @@ -# Git Workflow Setup Complete - -**Date**: 2026-01-18 -**Status**: ✅ Complete - -## Summary - -Proper Git workflow practices have been established for the s3-web project with branch protection rules and comprehensive documentation. - -## Changes Made - -### 1. Branch Protection Rules (via GitHub API) - -Configured protection for the `main` branch: - -```json -{ - "required_pull_request_reviews": { - "dismiss_stale_reviews": true, - "require_code_owner_reviews": true, - "required_approving_review_count": 1 - }, - "required_conversation_resolution": true, - "allow_force_pushes": false, - "allow_deletions": false, - "enforce_admins": false -} -``` - -**Protection Features:** -- ✅ No direct commits to main -- ✅ Pull requests required for all changes -- ✅ Code owner approval required -- ✅ Stale reviews dismissed on new commits -- ✅ All conversations must be resolved -- ✅ Force pushes disabled -- ✅ Branch deletion disabled -- ✅ Repository owner can override when necessary - -### 2. CODEOWNERS File - -Created `.github/CODEOWNERS` defining code ownership: - -``` -# Default owner for everything -* @k8ika0s - -# Specific ownership patterns -/backend/ @k8ika0s -/api/ @k8ika0s -/frontend/ @k8ika0s -/deployments/ @k8ika0s -/.github/ @k8ika0s -/docs/ @k8ika0s -*.md @k8ika0s -``` - -### 3. AGENTS.md Documentation - -Added comprehensive "Git Workflow and Branch Protection" section (270+ lines) covering: - -#### Feature Branch Workflow -- Branch naming conventions (feature/, fix/, docs/, refactor/, chore/) -- Creating feature branches from main -- Never committing directly to main - -#### Commit Message Standards -- Conventional commit format: `(): ` -- Commit types: feat, fix, docs, style, refactor, test, chore, perf, ci -- Atomic commits representing single logical changes -- Detailed commit bodies explaining "why" -- Footer with issue references - -#### Pull Request Requirements -Every PR must include: -1. Clear, descriptive title following commit conventions -2. Detailed description with: - - Summary of changes - - List of modified files with line counts - - Testing performed - - Breaking changes (if any) - - Dependencies added/removed -3. Clean commit history -4. Passing tests -5. Updated documentation -6. Code owner approval - -#### Pull Request Template Example -Provided comprehensive PR description template showing: -- Summary section -- Changes Made with file-by-file breakdown -- Testing Performed checklist -- Breaking Changes section -- Dependencies section -- Checklist -- Related Issues -- Deployment Notes - -#### Review and Merge Process -- Handling review feedback -- Addressing comments with additional commits -- Merge strategies (squash vs rebase) -- Branch cleanup after merge - -#### Emergency Procedures -- Hotfix branch workflow for critical issues -- Fast-track review process -- Post-mortem documentation requirements - -#### Git Configuration -- Recommended Git config for agents -- Commit author setup -- GPG signing (optional) -- Default branch configuration -- Rebase on pull - -#### Workflow Enforcement Rules -**MANDATORY** rules for all agents: -1. ❌ NEVER commit directly to main -2. ✅ ALWAYS create a feature branch -3. ✅ ALWAYS write descriptive commit messages -4. ✅ ALWAYS create detailed pull requests -5. ✅ ALWAYS wait for code owner approval -6. ✅ ALWAYS ensure tests pass before requesting review -7. ✅ ALWAYS update documentation with code changes - -## Verification - -### Branch Protection Status -```bash -$ gh api repos/k8ika0s/s3-web/branches/main/protection | jq '.required_pull_request_reviews' -{ - "url": "https://api.github.com/repos/k8ika0s/s3-web/branches/main/protection/required_pull_request_reviews", - "dismiss_stale_reviews": true, - "require_code_owner_reviews": true, - "require_last_push_approval": false, - "required_approving_review_count": 1 -} -``` - -### CODEOWNERS Validation -```bash -$ cat .github/CODEOWNERS | head -5 -# CODEOWNERS file for s3-web -# -# This file defines code ownership for the repository. -# Code owners are automatically requested for review when someone opens a pull request -# that modifies code that they own. -``` - -## Benefits - -### 1. Code Quality -- All changes reviewed by code owners -- Prevents accidental direct commits to main -- Ensures consistent commit message format -- Maintains clean Git history - -### 2. Collaboration -- Clear ownership and responsibility -- Structured review process -- Documented decision-making -- Traceable changes - -### 3. Safety -- Protected main branch -- No force pushes or deletions -- Conversation resolution required -- Stale reviews dismissed automatically - -### 4. Documentation -- Comprehensive workflow guide in AGENTS.md -- PR template examples -- Commit message examples -- Emergency procedures documented - -## Example Workflow - -### Creating a Feature -```bash -# 1. Create feature branch -git checkout -b feature/add-rate-limiting - -# 2. Make changes and commit -git add backend/pkg/ratelimit/ -git commit -m "feat(ratelimit): add token bucket rate limiter - -Implement token bucket algorithm for rate limiting with: -- Configurable rate and burst size -- Per-user and per-endpoint limits -- Redis-backed distributed state -- Comprehensive unit tests - -Closes #234" - -# 3. Push and create PR -git push origin feature/add-rate-limiting -gh pr create --title "feat: add rate limiting system" \ - --body "Detailed PR description here..." - -# 4. Address review feedback -git add . -git commit -m "fix: address review feedback - -- Add missing error handling -- Improve test coverage -- Update documentation" -git push origin feature/add-rate-limiting - -# 5. Merge after approval -gh pr merge --squash --delete-branch -``` - -## Future Enhancements - -### Potential Additions -- [ ] Required status checks (CI must pass) -- [ ] Signed commits requirement -- [ ] Linear history enforcement -- [ ] PR templates in `.github/PULL_REQUEST_TEMPLATE.md` -- [ ] Issue templates -- [ ] Automated PR labeling -- [ ] Automated changelog generation - -### CI/CD Integration -- [ ] Automated testing on PR creation -- [ ] Automated linting and formatting checks -- [ ] Security scanning on PRs -- [ ] Automated dependency updates -- [ ] Release automation - -## Resources - -### Documentation -- [AGENTS.md](AGENTS.md#git-workflow-and-branch-protection) - Complete workflow guide -- [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines -- [.github/CODEOWNERS](.github/CODEOWNERS) - Code ownership definitions - -### GitHub Documentation -- [Branch Protection Rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) -- [CODEOWNERS](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) -- [Pull Request Reviews](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews) - -### Tools -- `gh` CLI for GitHub operations -- `git` for version control -- GitHub web interface for PR management - -## Troubleshooting - -### Cannot Push to Main -**Error**: `remote: error: GH006: Protected branch update failed` - -**Solution**: This is expected! Create a feature branch instead: -```bash -git checkout -b feature/your-feature-name -git push origin feature/your-feature-name -``` - -### PR Requires Approval -**Error**: PR cannot be merged without approval - -**Solution**: Wait for code owner (@k8ika0s) to review and approve the PR. - -### Stale Review After New Commit -**Issue**: Approval disappeared after pushing new commits - -**Solution**: This is by design. Request re-review after addressing feedback. - -## Conclusion - -The s3-web project now has production-grade Git workflow practices in place: - -✅ Branch protection prevents accidental main branch commits -✅ Code owners ensure quality reviews -✅ Comprehensive documentation guides all contributors -✅ Consistent commit and PR standards -✅ Emergency procedures for critical fixes - -All future development must follow these workflows to maintain code quality and project integrity. - ---- - -**Setup Completed**: 2026-01-18 -**Configured By**: IBM Bob -**Approved By**: @k8ika0s \ No newline at end of file diff --git a/LICENSE_UPDATE.md b/LICENSE_UPDATE.md deleted file mode 100644 index 75bbcda..0000000 --- a/LICENSE_UPDATE.md +++ /dev/null @@ -1,136 +0,0 @@ -# License Update: AGPL-3.0 - -**Date**: 2026-01-18 -**Status**: Complete - -## Summary - -S3-Web has been licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)**. - -## Changes Made - -### 1. License Files -- ✅ **LICENSE**: Added full AGPL-3.0 license text (downloaded from gnu.org) -- ✅ **NOTICE**: Created comprehensive notice file with: - - Copyright information - - Third-party software notices - - Dependency attributions - - IBM Bob acknowledgment - -### 2. Documentation Updates -- ✅ **README.md**: Added license section explaining AGPL-3.0 choice and benefits -- ✅ **CONTRIBUTING.md**: Added comprehensive license section including: - - Contributor License Agreement - - AGPL-3.0 requirements - - License header templates for Go and TypeScript -- ✅ **CHANGELOG.md**: Documented license change in Unreleased section - -## Why AGPL-3.0? - -The AGPL-3.0 license was chosen for S3-Web because: - -1. **Network Service Protection**: AGPL-3.0 extends GPL's copyleft provisions to network services. Since S3-Web is designed to run as a network service, this ensures that users interacting with the software over a network have the same rights as those who receive the software directly. - -2. **Source Code Availability**: Any organization running a modified version of S3-Web as a service must make their modifications available to their users, ensuring the community benefits from improvements. - -3. **Community Growth**: By requiring modifications to be shared, AGPL-3.0 encourages a collaborative ecosystem where improvements benefit everyone. - -4. **Commercial Flexibility**: Organizations can still use S3-Web commercially, but must share their modifications if they provide it as a service to others. - -5. **Strong Copyleft**: Prevents proprietary forks that could fragment the community or create closed-source competitors. - -## License Requirements - -### For Contributors -All contributions must: -- Be licensed under AGPL-3.0 -- Include appropriate license headers in new files -- Maintain existing copyright notices -- Comply with AGPL-3.0 terms - -### For Users -Organizations using S3-Web must: -- Provide source code to users accessing the service over a network -- Include license and copyright notices -- Share modifications under AGPL-3.0 -- Provide installation instructions - -### For Distributors -Anyone distributing S3-Web must: -- Include the LICENSE file -- Include the NOTICE file -- Provide access to complete source code -- Maintain all copyright and license notices - -## License Header Templates - -### Go Files -```go -// Copyright (C) 2026 S3-Web Contributors -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published -// by the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -``` - -### TypeScript/JavaScript Files -```typescript -/* - * Copyright (C) 2026 S3-Web Contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -``` - -## Next Steps - -### Immediate (Optional) -- Add license headers to existing source files -- Update package.json (when created) with license field -- Add license badge to README.md - -### Future -- Consider adding SPDX license identifiers to files -- Create a license compliance checklist for releases -- Document license compatibility with dependencies - -## Resources - -- **AGPL-3.0 Full Text**: https://www.gnu.org/licenses/agpl-3.0.html -- **AGPL-3.0 FAQ**: https://www.gnu.org/licenses/gpl-faq.html#AGPLv3 -- **License Compatibility**: https://www.gnu.org/licenses/license-compatibility.html -- **SPDX License List**: https://spdx.org/licenses/AGPL-3.0-only.html - -## Questions? - -For questions about licensing: -- Review the LICENSE file -- Check the CONTRIBUTING.md license section -- Open a GitHub issue with the "licensing" label -- Contact project maintainers - ---- - -**License Update Completed**: 2026-01-18 -**Updated By**: IBM Bob -**Approved By**: Project Maintainers \ No newline at end of file diff --git a/LINT_FIX_LESSONS.md b/LINT_FIX_LESSONS.md deleted file mode 100644 index 64c104a..0000000 --- a/LINT_FIX_LESSONS.md +++ /dev/null @@ -1,229 +0,0 @@ -# Lessons Learned: Automated Lint Fixes - -## Overview -This document captures lessons learned from attempting to automate golangci-lint error fixes using sed scripts. - -## The Challenge -We had 58 golangci-lint violations (mostly errcheck) that needed fixing across multiple test files. Automated sed scripts seemed like a good approach but created cascading issues. - -## What Went Wrong - -### Issue 1: Context-Insensitive Replacements -**Problem**: Sed scripts don't understand Go syntax or context. - -**Example**: -```bash -# This script... -sed -i 's/err = cache\.Delete/_ = cache.Delete/g' - -# Replaced this valid code... -err = cache.Delete(ctx, key) -require.NoError(t, err) - -# With this broken code... -_ = cache.Delete(ctx, key) -require.NoError(t, err) # err is now undefined! -``` - -### Issue 2: Double Replacements -**Problem**: Running multiple sed scripts on the same files caused double replacements. - -**Example**: -```bash -# First script added _ = -sed -i 's/cache\.Delete/_ = cache.Delete/' -# Result: _ = cache.Delete(ctx, key) - -# Second script tried to fix it -sed -i 's/err = /_ = /' -# Result: err = _ = cache.Delete(ctx, key) # Syntax error! -``` - -### Issue 3: Loop Variable Capture -**Problem**: Sed can't properly handle Go closure patterns. - -**Example**: -```bash -# This replacement... -sed -i 's/go client\.Publish/go _ = client.Publish/' - -# Created invalid syntax... -go _ = client.Publish(subject, data) # Can't use _ = in go statement - -# Should have been... -go func() { _ = client.Publish(subject, data) }() -``` - -### Issue 4: Variable Scope Confusion -**Problem**: Sed doesn't track variable declarations across lines. - -**Example**: -```go -// Original code -err := cb.Execute(ctx, func() error { return nil }) -// ... later in same function ... -err := cb.Execute(ctx, func() error { return nil }) // Redeclaration! - -// Sed can't tell these apart and treats them the same -``` - -## What We Learned - -### 1. Test Assertions Need Error Variables -```go -// ✅ CORRECT - err is checked -err := publisher.PublishEvent(event) -require.NoError(t, err) - -// ❌ WRONG - err is ignored but still checked -_ = publisher.PublishEvent(event) -require.NoError(t, err) // err undefined! -``` - -### 2. Cleanup Operations Can Ignore Errors -```go -// ✅ CORRECT - cleanup errors are non-critical -defer func() { _ = logger.Sync() }() -defer func() { _ = sub.Unsubscribe() }() -``` - -### 3. Loop Iterations Need Proper Handling -```go -// ❌ WRONG - race condition -for i := 0; i < 10; i++ { - go client.Publish(subject, map[string]int{"id": i}) -} - -// ✅ CORRECT - capture loop variable -for i := 0; i < 10; i++ { - go func(id int) { - _ = client.Publish(subject, map[string]int{"id": id}) - }(i) -} -``` - -### 4. Variable Redeclaration vs First Use -```go -// First use in function -err := doSomething() // ✅ Use := - -// Later in same function -err = doSomethingElse() // ✅ Use =, not := - -// In a loop where not used -for i := 0; i < 10; i++ { - _ = doSomething() // ✅ Use _, not err -} -``` - -## Better Approaches - -### 1. Manual Review First -Before automating, manually review a few examples to understand patterns: -- Where is err actually used? -- Is this a test assertion or cleanup? -- Is this in a loop? -- Is err already declared in this scope? - -### 2. Targeted Fixes -Instead of broad sed patterns, use specific line numbers: -```bash -# ✅ GOOD - Specific and safe -sed -i '67s/err = publisher/err := publisher/' file.go - -# ❌ BAD - Too broad, context-insensitive -sed -i 's/err = publisher/err := publisher/g' file.go -``` - -### 3. Incremental Testing -After each sed script: -1. Run `go build` to check syntax -2. Fix any errors before next script -3. Commit working state -4. Repeat - -### 4. Use Go Tools When Possible -```bash -# gofmt catches syntax errors -gofmt -l . - -# go vet catches semantic issues -go vet ./... - -# golangci-lint shows what needs fixing -golangci-lint run -``` - -## The Right Way - -### Step 1: Categorize Errors -```bash -# Find all errcheck violations -golangci-lint run 2>&1 | grep errcheck > errcheck.txt - -# Group by pattern -grep "logger.Sync" errcheck.txt -grep "cache.Delete" errcheck.txt -grep "publisher.Publish" errcheck.txt -``` - -### Step 2: Fix By Category -```bash -# Category 1: Cleanup operations (ignore errors) -find . -name "*.go" -exec sed -i 's/defer logger\.Sync()/defer func() { _ = logger.Sync() }()/' {} \; - -# Category 2: Test assertions (keep err) -# DO THIS MANUALLY - too context-dependent - -# Category 3: Unused in loops (use _) -# DO THIS MANUALLY - need to check scope -``` - -### Step 3: Verify Each Category -```bash -go build ./... -golangci-lint run -``` - -### Step 4: Manual Cleanup -For complex cases (test assertions, variable scope), manual fixes are safer and faster than trying to automate. - -## Statistics - -### Automated Fixes -- **Attempted**: 58 violations -- **Successful**: ~30 (52%) -- **Created new errors**: ~28 (48%) -- **Iterations needed**: 6 -- **Time spent**: ~2 hours - -### If Done Manually -- **Estimated time**: 30-45 minutes -- **Errors created**: 0 -- **Iterations needed**: 1 - -## Conclusion - -**Automated sed scripts for Go code fixes are NOT worth it** unless: -1. The pattern is extremely simple (e.g., adding imports) -2. The change is purely syntactic (e.g., formatting) -3. You have comprehensive tests to catch breakage - -For semantic changes like error handling: -- **Manual fixes are faster and safer** -- **Context matters more than pattern matching** -- **Go's type system catches errors sed creates** - -## Recommendations - -1. **Use golangci-lint's --fix flag** when available -2. **Use gopls code actions** in your editor -3. **Write targeted sed scripts** with specific line numbers -4. **Test incrementally** after each change -5. **When in doubt, fix manually** - ---- - -**Created**: 2026-01-18 -**Author**: IBM Bob -**Context**: PR #1 lint fixes \ No newline at end of file diff --git a/MIGRATION_FIX_SUMMARY.md b/MIGRATION_FIX_SUMMARY.md deleted file mode 100644 index 9a71147..0000000 --- a/MIGRATION_FIX_SUMMARY.md +++ /dev/null @@ -1,260 +0,0 @@ -# Database Migration Conflict Resolution - -**PR #3**: https://github.com/k8ika0s/s3-web/pull/3 -**Branch**: `fix/backend-tests` -**Status**: Open, awaiting CI verification -**Date**: 2026-01-18 -**Commits**: 2 (8225aee, cc0eb97) - -## Problem Statement - -Backend Tests CI was failing with fatal error: -``` -relation "audit_logs" does not exist -``` - -This occurred during database migration execution, preventing all backend tests from running. - -## Root Cause Analysis - -**PRIMARY ISSUE**: Migration file naming convention violation - -The `golang-migrate` library requires strict naming: `{version}_{name}.up.sql` and `{version}_{name}.down.sql` - -Migration 001 files were incorrectly named: -- ❌ `001_initial_schema.sql` (missing `.up` suffix) -- ❌ `001_initial_schema_down.sql` (using `_down` instead of `.down`) - -This caused `golang-migrate` to **skip migration 001 entirely**, so when migration 002 tried to reference tables from 001, they didn't exist. - -**SECONDARY ISSUES**: Migration `002_worker_tables.up.sql` also had conflicts with the base schema in `001_initial_schema.sql`: - -### Issue 1: Duplicate Table Creation -**Location**: `002_worker_tables.up.sql` lines 5-19 -**Problem**: Attempted to create `multipart_uploads` table -**Conflict**: Table already exists in `001_initial_schema.sql` lines 160-175 -**Impact**: Migration would fail if 001 succeeded, or create duplicate if 001 failed - -### Issue 2: Invalid Column Reference -**Location**: `002_worker_tables.up.sql` line 39 -**Problem**: Index referenced `audit_logs.created_at` column -**Conflict**: Column doesn't exist; table uses `timestamp` instead (001_initial_schema.sql:191) -**Impact**: Index creation would fail with "column does not exist" error - -### Issue 3: Non-existent Table Reference -**Location**: `002_worker_tables.up.sql` lines 78-92 -**Problem**: Attempted to add column to `transfers` table -**Conflict**: Table doesn't exist; correct name is `transfer_jobs` -**Impact**: ALTER TABLE would fail with "relation does not exist" error - -### Issue 4: Mismatched Down Migration -**Location**: `002_worker_tables.down.sql` lines 14, 16-21 -**Problem**: Attempted to drop tables/columns not created by migration 002 -**Impact**: Down migration would incorrectly remove schema from migration 001 - -## Solution Implemented - -### Changes to `002_worker_tables.up.sql` - -1. **Removed duplicate multipart_uploads creation** (lines 4-23 deleted) - ```sql - -- Before: CREATE TABLE IF NOT EXISTS multipart_uploads (...) - -- After: -- Note: multipart_uploads table already exists in 001_initial_schema.sql - ``` - -2. **Fixed audit_logs index** (line 39) - ```sql - -- Before: CREATE INDEX ... ON audit_logs(archived, created_at); - -- After: CREATE INDEX ... ON audit_logs(archived, timestamp); - ``` - -3. **Removed invalid transfer_jobs references** (lines 78-92 deleted) - ```sql - -- Before: ALTER TABLE transfers ADD COLUMN completed_at TIMESTAMP; - -- After: -- Note: transfer_jobs table already has completed_at column - ``` - -4. **Updated comments** (lines 95-101) - - Removed comments for tables not created in this migration - - Kept comments only for `metrics_aggregated` and `worker_job_executions` - -### Changes to `002_worker_tables.down.sql` - -1. **Removed multipart_uploads drop** (line 14 deleted) - - Table owned by migration 001, not 002 - -2. **Removed invalid transfers references** (lines 16-20 deleted) - - Table doesn't exist - -3. **Fixed index name** (line 21) - ```sql - -- Before: DROP INDEX IF EXISTS idx_audit_logs_archived_created; - -- After: DROP INDEX IF EXISTS idx_audit_logs_archived_timestamp; - ``` - -## Migration Dependency Map - -``` -001_initial_schema.sql (Base Schema) -├── Creates: locations -├── Creates: users, user_roles, user_sessions -├── Creates: location_access -├── Creates: break_glass_sessions -├── Creates: transfer_jobs (with completed_at) -├── Creates: multipart_uploads -├── Creates: audit_logs (with timestamp column) -├── Creates: object_metadata_cache -└── Creates: storage_usage_snapshots - -002_worker_tables.up.sql (Worker Extensions) -├── Adds: audit_logs.archived column -├── Adds: audit_logs.archived_at column -├── Creates: metrics_aggregated -└── Creates: worker_job_executions -``` - -## Verification Steps - -### Pre-Fix State -```bash -# Migration 001 would succeed -# Migration 002 would fail with: -# - "relation 'locations' does not exist" (if 001 failed) -# - "relation 'multipart_uploads' already exists" (if 001 succeeded) -# - "column 'created_at' does not exist" -# - "relation 'transfers' does not exist" -``` - -### Post-Fix State -```bash -# Migration 001 succeeds - creates all base tables -# Migration 002 succeeds - adds worker-specific tables and columns -# Down migration 002 succeeds - removes only 002 additions -# Down migration 001 succeeds - removes all base tables -``` - -## Testing Performed - -- ✅ Verified `001_initial_schema.sql` creates all referenced tables -- ✅ Verified `002_worker_tables.up.sql` no longer conflicts with 001 -- ✅ Verified column names match actual schema definitions -- ✅ Verified down migrations correctly reverse their respective up migrations -- ✅ Verified no orphaned indexes or constraints - -## Files Modified - -1. `backend/pkg/database/migrations/002_worker_tables.up.sql` (51 lines removed, 6 lines added) -2. `backend/pkg/database/migrations/002_worker_tables.down.sql` (9 lines removed, 1 line added) - -## Commit Details - -**Commit**: 8225aee -**Message**: fix: resolve database migration conflicts - -``` -- Remove duplicate multipart_uploads table creation (already in 001) -- Fix audit_logs index to use 'timestamp' column instead of 'created_at' -- Remove references to non-existent 'transfers' table -- Update down migration to match changes - -The 002 migration was attempting to recreate tables and reference -columns that either already existed in 001_initial_schema.sql or -didn't exist at all, causing migration failures. - -Fixes Backend Tests CI failure -``` - -## Impact Assessment - -### Risk Level: **Low** -- Migrations have never been successfully applied in any environment -- No production data affected -- Changes are purely corrective, not additive - -### Breaking Changes: **None** -- No API changes -- No schema changes (only fixes to migration scripts) -- No data migration required - -### Rollback Plan -If issues arise: -1. Revert PR #3 -2. Migrations will return to broken state -3. Backend Tests will continue to fail -4. No data loss (migrations never succeeded) - -## Next Steps - -1. ✅ PR #3 created and pushed -2. ⏳ Wait for CI to run Backend Tests -3. ⏳ Verify migrations apply successfully -4. ⏳ Request code owner review (@k8ika0s) -5. ⏳ Merge after approval -6. ⏳ Proceed with remaining CI fixes (Frontend Lint, Frontend Tests, etc.) - -## Lessons Learned - -### Migration Best Practices -1. **Never duplicate table creation across migrations** - - Each table should be created in exactly one migration - - Use ALTER TABLE for modifications in subsequent migrations - -2. **Verify column names before referencing** - - Check actual schema definitions - - Don't assume column naming conventions - -3. **Match up/down migrations precisely** - - Down migration should reverse exactly what up migration does - - Don't drop tables/columns created by other migrations - -4. **Use descriptive comments** - - Explain relationships between migrations - - Document why certain operations are skipped - -5. **Test migration order** - - Verify migrations apply in sequence - - Test both up and down migrations - - Ensure idempotency where appropriate - -### Detection Strategy -- Migration conflicts can be detected by: - - **Verify file naming convention first** - most critical! - - Reading migration files in order - - Checking for duplicate CREATE TABLE statements - - Verifying column references against schema - - Testing migrations in isolated database - - Check golang-migrate logs for "no change" or skipped migrations - -### Critical Lesson: File Naming -The most critical issue was **file naming convention**. Even perfect SQL will fail if files aren't named correctly: - -**golang-migrate Requirements:** -``` -{version}_{description}.up.sql # For "up" migrations -{version}_{description}.down.sql # For "down" migrations -``` - -**Common Mistakes:** -- ❌ `001_schema.sql` (missing `.up`) -- ❌ `001_schema_down.sql` (using `_down` instead of `.down`) -- ❌ `001_schema.UP.sql` (wrong case) -- ✅ `001_schema.up.sql` (correct) -- ✅ `001_schema.down.sql` (correct) - -**Why This Matters:** -- Incorrectly named files are **silently skipped** -- No error is thrown - migration just doesn't run -- Subsequent migrations fail with "relation does not exist" -- Very difficult to debug without checking file names - -## Related Documentation - -- `docs/DATABASE.md` - Database architecture and migration guide -- `AGENTS.md` - Git workflow and development guidelines -- `CI_REMEDIATION_SUMMARY.md` - PR #2 lint fixes -- `GIT_WORKFLOW_SETUP.md` - PR #1 workflow setup - ---- - -**Built with Bob** 🤖 -*Systematic problem-solving through careful analysis and precise fixes* \ No newline at end of file diff --git a/PROJECT_OVERVIEW.md b/PROJECT_OVERVIEW.md deleted file mode 100644 index a4ce342..0000000 --- a/PROJECT_OVERVIEW.md +++ /dev/null @@ -1,239 +0,0 @@ -# S3-Web: Multi-Tenant S3 File Management System - -## Project Vision - -A production-grade, web-based, multi-tenant S3 file management and cross-storage transfer system designed for Kubernetes deployment. The system prioritizes trustworthy file management with powerful capabilities hidden behind disciplined UI design, feeling more like a modern desktop file manager than a cloud control plane. - -## Architecture Overview - -### Core Components - -``` -┌─────────────────────────────────────────────────────────────────┐ -│ Frontend (React + TS) │ -│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ -│ │ File Browser │ │ Transfers UI │ │ Admin Panel │ │ -│ └──────────────┘ └──────────────┘ └──────────────┘ │ -└─────────────────────────────────────────────────────────────────┘ - │ gRPC-Web -┌─────────────────────────────────────────────────────────────────┐ -│ API Gateway (gRPC) │ -└─────────────────────────────────────────────────────────────────┘ - │ - ┌─────────────────────┼─────────────────────┐ - │ │ │ -┌───────▼────────┐ ┌─────────▼────────┐ ┌────────▼────────┐ -│ Location Svc │ │ Transfer Svc │ │ Preview Svc │ -│ (S3 Providers) │ │ (Temporal) │ │ (Safe Render) │ -└────────────────┘ └──────────────────┘ └─────────────────┘ - │ │ │ - └─────────────────────┼─────────────────────┘ - │ - ┌─────────────────────┼─────────────────────┐ - │ │ │ -┌───────▼────────┐ ┌─────────▼────────┐ ┌────────▼────────┐ -│ Postgres │ │ NATS JetStream │ │ Temporal │ -│ (Metadata) │ │ (Events) │ │ (Workflows) │ -└────────────────┘ └──────────────────┘ └─────────────────┘ -``` - -### Service Responsibilities - -#### Location Service -- Manages S3-compatible endpoint configurations -- Provider adapter layer for MinIO, Ceph RGW, AWS S3, etc. -- Health checks and capability detection -- Credential management (via Vault abstraction) -- Bucket and object operations - -#### Transfer Service -- Orchestrates uploads, downloads, copies, moves -- Multipart upload management -- Cross-provider transfers with verification -- Pause/resume/cancel operations -- Progress tracking and reporting - -#### Preview Service -- Safe object preview rendering -- MIME validation and content sniffing -- Size-limited, lazy-loaded previews -- Sandboxed rendering for untrusted content -- Thumbnail generation - -#### Auth Service -- OAuth2/OIDC and SAML integration -- RBAC enforcement -- Break-glass mode with audit -- Session management - -#### Audit Service -- Immutable audit log storage -- Query and export capabilities -- Break-glass action tracking - -#### Reporting Service -- Storage usage analytics -- Transfer metrics -- Audit activity summaries -- Exportable reports (CSV/JSON) - -## Technology Stack - -- **Backend**: Go 1.21+ (gRPC-first) -- **Frontend**: React 18+ with TypeScript -- **API**: gRPC with Protocol Buffers -- **Eventing**: NATS 2.10+ with JetStream -- **Workflows**: Temporal -- **Database**: PostgreSQL 15+ -- **Cache**: Redis (optional) -- **Secrets**: Vault (via abstraction layer) -- **Containers**: Podman with Containerfiles -- **Orchestration**: Kubernetes 1.28+ -- **Deployment**: Kustomize, GitOps-ready - -## Security Model - -### Threat Model -- SSRF attacks via malicious S3 endpoints -- CSRF attacks on state-changing operations -- XSS via untrusted object content -- Authentication bypass -- Privilege escalation -- Data exfiltration -- Credential leakage - -### Mitigations -- Strict CORS policies -- CSRF tokens where applicable -- Content Security Policy headers -- Safe URL handling and validation -- Time-bound signed URLs for downloads -- Immutable audit logging -- Least-privilege RBAC -- Secrets never logged or exposed -- Preview content sanitization - -## Data Model - -### Core Entities - -**Location** -- ID, Name, Type (MinIO, Ceph, AWS, etc.) -- Endpoint URL, Region -- Credentials (encrypted, Vault-backed) -- Capabilities (versioning, object-lock, SSE, etc.) -- Health status - -**Bucket** -- Location ID -- Name -- Versioning enabled -- Lifecycle policies -- Access policies - -**Object** -- Bucket ID -- Key (full path) -- Size, ETag, Last Modified -- Content-Type -- Metadata, Tags -- Version ID (if versioned) - -**Transfer Job** -- ID, Type (upload, download, copy, move, sync) -- Source and destination -- State (pending, running, paused, completed, failed) -- Progress (bytes transferred, total bytes) -- Verification (checksum) -- Created, Started, Completed timestamps - -**User** -- ID, Username, Email -- Roles -- Location access grants -- Bucket/prefix restrictions - -**Audit Log** -- ID, Timestamp -- User ID, Action -- Resource (location, bucket, object) -- Result (success, failure) -- Break-glass flag -- Justification (if break-glass) - -## Development Workflow - -### Local Development -1. Start dependencies with Podman Compose -2. Run database migrations -3. Start backend services -4. Start frontend dev server -5. Access at http://localhost:3000 - -### Testing Strategy -- Unit tests for business logic -- Integration tests with local MinIO -- gRPC contract tests -- E2E tests for critical workflows -- Load tests for transfer performance - -### CI/CD Pipeline -1. Lint and format checks -2. Unit and integration tests -3. Build Podman images -4. Push to registry -5. Deploy to staging via GitOps -6. Smoke tests -7. Promote to production - -## Deployment Architecture - -### Kubernetes Resources -- Deployments for stateless services -- StatefulSets for Temporal, NATS, Postgres -- Services for internal communication -- Ingress for external access -- ConfigMaps for configuration -- Secrets for credentials -- PersistentVolumeClaims for data - -### Scaling Strategy -- Horizontal pod autoscaling for API services -- Temporal workers scale independently -- NATS JetStream clustering -- Postgres read replicas for reporting - -## Roadmap - -### Phase 1: Foundation (Current) -- Project structure -- Core protobuf definitions -- Basic backend services -- Provider adapter layer -- Database schema - -### Phase 2: Core Features -- File browsing UI -- Upload/download -- Preview pipeline -- Transfer management - -### Phase 3: Advanced Features -- Cross-provider transfers -- Break-glass mode -- Reporting dashboard -- Advanced operations - -### Phase 4: Production Hardening -- Comprehensive testing -- Performance optimization -- Security audit -- Documentation completion - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines. - -## License - -[To be determined] \ No newline at end of file diff --git a/README.md b/README.md index 76a8cf6..e8c6f7e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A production-grade, web-based file management system for S3-compatible storage w ## Architecture -See [PROJECT_OVERVIEW.md](PROJECT_OVERVIEW.md) for detailed architecture documentation. +See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for detailed architecture documentation. ### Technology Stack @@ -137,7 +137,7 @@ kubectl apply -k deploy/kubernetes/overlays/dev kubectl apply -k deploy/kubernetes/overlays/prod ``` -See [docs/deployment.md](docs/deployment.md) for detailed deployment instructions. +See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for detailed deployment instructions. ## Security @@ -150,7 +150,7 @@ This system implements defense-in-depth security: - Least-privilege RBAC - Secrets management via Vault abstraction -See [docs/security.md](docs/security.md) for the complete security model. +See [SECURITY.md](SECURITY.md) for the complete security model. ## Built by Bob 🤖 diff --git a/STORAGE_CLEANUP_IMPLEMENTATION.md b/STORAGE_CLEANUP_IMPLEMENTATION.md deleted file mode 100644 index edb7b9d..0000000 --- a/STORAGE_CLEANUP_IMPLEMENTATION.md +++ /dev/null @@ -1,373 +0,0 @@ -# Storage Cleanup Feature - Implementation Summary - -## Overview - -This document summarizes the implementation of the Storage Cleanup feature for s3-web, a comprehensive administrative tooling system for discovering and cleaning up orphaned data, partial uploads, corrupt objects, and storage issues across S3-compatible providers. - -## Implementation Status - -### ✅ Completed Components - -#### 1. API Definition (363 lines) -**File**: `api/proto/cleanup/cleanup.proto` - -Complete gRPC service definition with 14 RPCs: -- `ScanOrphanedUploads` - Discover incomplete multipart uploads -- `CleanupOrphanedUploads` - Remove incomplete uploads -- `ScanCorruptObjects` - Find potentially corrupt objects -- `VerifyObjectIntegrity` - Verify individual object checksums -- `ScanOrphanedVersions` - Find old object versions -- `CleanupOldVersions` - Remove old versions -- `ScanEmptyObjects` - Find zero-byte objects -- `GetStorageAnalytics` - Comprehensive storage metrics -- `GetCleanupJobStatus` - Monitor job progress -- `ListCleanupJobs` - List all jobs -- `CancelCleanupJob` - Cancel running job -- `GetProviderDiagnostics` - Provider-specific diagnostics -- `HealthCheck` - Service health - -**Generated Code**: `api/gen/go/cleanup/` (auto-generated from proto) - -#### 2. Provider Cleanup Adapters (1,703 lines) - -**Files**: -- `backend/pkg/s3provider/cleanup_adapter.go` (186 lines) - Interface and types -- `backend/pkg/s3provider/cleanup_minio.go` (565 lines) - MinIO implementation -- `backend/pkg/s3provider/cleanup_ceph.go` (523 lines) - Ceph RGW implementation -- `backend/pkg/s3provider/cleanup_generic.go` (429 lines) - Generic/AWS S3 - -**Capabilities**: -- List and abort orphaned multipart uploads with age filtering -- Storage usage analytics (objects, size, age distribution, storage classes) -- Object integrity verification (ETag-based and deep verification) -- Incomplete object detection (zero-byte, missing ETag) -- Bucket-level metrics (object count, versions, multipart uploads) -- Provider-specific diagnostics and recommendations - -**Provider-Specific Optimizations**: -- **MinIO**: Batch operations, parallel processing, detailed part analysis -- **Ceph RGW**: RADOS awareness, performance considerations, indexing recommendations -- **AWS S3**: Standard SDK optimizations, rate limit respect -- **Generic**: Fallback for any S3-compatible provider - -#### 3. Repository Layer (407 lines) -**File**: `backend/internal/cleanup/repository.go` - -Complete data access layer for cleanup jobs: -- Job CRUD operations (Create, Read, Update, Delete) -- Job listing with comprehensive filters (location, type, status, user, time range) -- Job statistics tracking (items scanned/found/cleaned/failed, bytes freed) -- Pagination support -- PostgreSQL-backed with pgx driver - -**Data Models**: -- `CleanupJob` - Job metadata and status -- `CleanupJobStats` - Detailed statistics -- `JobFilters` - Query filters for listing - -#### 4. Database Schema (62 lines) -**Files**: -- `migrations/000009_create_cleanup_tables.up.sql` -- `migrations/000009_create_cleanup_tables.down.sql` - -**Tables**: -- `cleanup_jobs` - Job information with foreign key to locations -- `cleanup_job_stats` - Job statistics with auto-updating timestamp - -**Features**: -- Proper indexes for query performance -- Foreign key constraints for data integrity -- Trigger for automatic timestamp updates -- Comprehensive comments for documentation -- Cascade delete for cleanup - -#### 5. Documentation (476 lines) -**File**: `docs/STORAGE_CLEANUP.md` - -Comprehensive documentation covering: -- Architecture overview and component descriptions -- Security model (RBAC, break-glass mode, audit trail) -- Provider-specific implementations and optimizations -- Detailed operation guides with gRPC examples -- Best practices and troubleshooting -- API reference -- Future enhancements roadmap - -### ⏳ Remaining Components (To Be Implemented) - -#### 1. Cleanup Service Implementation -**File**: `backend/internal/cleanup/service.go` (estimated ~800 lines) - -gRPC service handlers implementing: -- All 14 RPC methods from protobuf definition -- Integration with provider adapters -- Job creation and management -- Authorization checks (SYSTEM_ADMIN role) -- Break-glass mode validation -- Audit logging integration -- Error handling and validation - -#### 2. gRPC Handler -**File**: `backend/internal/cleanup/grpc_handler.go` (estimated ~400 lines) - -gRPC server implementation: -- Request/response conversion (proto ↔ internal types) -- Context propagation -- Error mapping to gRPC status codes -- Middleware integration (auth, logging, metrics) - -#### 3. Temporal Workflows -**Files**: -- `backend/pkg/temporal/cleanup_workflows.go` (estimated ~500 lines) -- `backend/pkg/temporal/cleanup_activities.go` (estimated ~600 lines) - -Long-running cleanup operations: -- Orphaned upload cleanup workflow -- Old version cleanup workflow -- Corrupt object scan workflow -- Progress tracking and reporting -- Retry logic and error handling -- Pause/resume capability -- Cancellation support - -#### 4. Audit Integration -**File**: `backend/internal/cleanup/audit.go` (estimated ~200 lines) - -Audit logging for all operations: -- Log all cleanup actions immutably -- Include user identity, break-glass status, justification -- Track affected resources (location, bucket, objects) -- Record results (success/failure counts, bytes freed) -- Integration with existing audit service - -#### 5. Authorization Middleware -**File**: `backend/internal/cleanup/authorization.go` (estimated ~150 lines) - -Authorization enforcement: -- Verify SYSTEM_ADMIN role -- Validate break-glass mode for sensitive operations -- Check location access permissions -- Enforce time-bound elevation -- Integration with auth service - -#### 6. Comprehensive Tests - -**Unit Tests** (estimated ~1,500 lines total): -- `backend/internal/cleanup/repository_test.go` - Repository tests -- `backend/internal/cleanup/service_test.go` - Service tests -- `backend/pkg/s3provider/cleanup_adapter_test.go` - Adapter interface tests -- `backend/pkg/s3provider/cleanup_minio_test.go` - MinIO adapter tests -- `backend/pkg/s3provider/cleanup_ceph_test.go` - Ceph adapter tests -- `backend/pkg/s3provider/cleanup_generic_test.go` - Generic adapter tests - -**Integration Tests** (estimated ~800 lines): -- `backend/internal/cleanup/integration_test.go` - End-to-end tests with real database -- Provider adapter tests with MinIO testcontainer - -**Temporal Tests** (estimated ~600 lines): -- `backend/pkg/temporal/cleanup_workflows_test.go` - Workflow tests -- `backend/pkg/temporal/cleanup_activities_test.go` - Activity tests - -#### 7. Frontend Components (Future) - -React components for admin UI: -- Cleanup job dashboard -- Storage analytics visualization -- Job creation wizard -- Job monitoring and control -- Provider diagnostics display - -## Architecture Highlights - -### 1. Provider Abstraction -The `CleanupAdapter` interface provides a clean abstraction layer that: -- Allows provider-specific optimizations while maintaining consistent API -- Supports automatic provider detection and adapter selection -- Enables easy addition of new providers -- Isolates provider-specific logic from service layer - -### 2. Safety-First Design -All destructive operations include: -- **Dry-run mode**: Preview changes before execution -- **Explicit confirmation**: No accidental deletions -- **Comprehensive logging**: Full audit trail -- **Break-glass mode**: Elevated access with justification - -### 3. Scalability -Long-running operations use Temporal workflows for: -- **Reliability**: Survives service restarts -- **Progress tracking**: Real-time status updates -- **Pause/resume**: Operational flexibility -- **Retry logic**: Automatic error recovery - -### 4. Security -Multi-layered security approach: -- **RBAC**: SYSTEM_ADMIN role required -- **Break-glass**: Time-bound elevation for sensitive ops -- **Audit trail**: Immutable logging of all actions -- **Credential isolation**: S3 credentials never exposed to browser - -## Key Design Decisions - -### 1. gRPC-First API -- Protobuf definitions as source of truth -- Type-safe, efficient communication -- Easy client generation for multiple languages -- Built-in streaming support for progress updates - -### 2. Repository Pattern -- Clean separation of data access logic -- Easy to test with mocks -- Database-agnostic interface -- Transaction support for complex operations - -### 3. Provider-Specific Adapters -- Optimizations for MinIO and Ceph RGW as requested -- Generic fallback for unknown providers -- Extensible design for future providers -- Provider capabilities detection - -### 4. Temporal for Long-Running Operations -- Reliable execution across service restarts -- Built-in retry and error handling -- Progress tracking and observability -- Workflow versioning for safe updates - -## Testing Strategy - -### Unit Tests -- Test business logic in isolation -- Mock external dependencies (database, S3, Temporal) -- Table-driven tests for comprehensive coverage -- Focus on edge cases and error conditions - -### Integration Tests -- Test with real database (PostgreSQL testcontainer) -- Test with real S3 (MinIO testcontainer) -- Verify end-to-end workflows -- Test concurrent operations - -### Temporal Tests -- Use Temporal test framework -- Mock activities for workflow tests -- Test retry logic and error handling -- Verify workflow state transitions - -## Performance Considerations - -### 1. Pagination -- All list operations support pagination -- Configurable page sizes -- Continuation tokens for stateless pagination - -### 2. Batch Operations -- Abort multiple uploads in single operation -- Batch delete for old versions -- Configurable concurrency limits - -### 3. Caching -- Provider capabilities cached per location -- Job status cached with TTL -- Storage analytics cached with refresh - -### 4. Rate Limiting -- Respect provider rate limits -- Configurable operation throttling -- Backoff and retry for rate limit errors - -## Deployment Considerations - -### Database Migrations -- Migration 000009 creates cleanup tables -- Idempotent migrations (IF NOT EXISTS) -- Proper indexes for query performance -- Foreign key constraints for data integrity - -### Configuration -Required environment variables: -- Database connection (already configured) -- Temporal connection (already configured) -- Provider credentials (per location) - -### Monitoring -Metrics to track: -- Cleanup job success/failure rates -- Bytes freed per job type -- Job duration and throughput -- Provider API error rates - -### Scaling -- Service is stateless (horizontal scaling) -- Temporal workers can be scaled independently -- Database connection pooling configured -- Provider adapters support concurrent operations - -## Future Enhancements - -### Phase 2 (Planned) -1. **Provider Admin API Integration** - - MinIO admin API for better diagnostics - - Ceph RGW admin API for RADOS operations - - AWS S3 Inventory integration - -2. **Advanced Analytics** - - Cost analysis and optimization - - Trend analysis over time - - Predictive storage growth - -3. **Automated Policies** - - Scheduled cleanup operations - - Policy-based retention rules - - Lifecycle policy integration - -### Phase 3 (Future) -1. **Enhanced Reporting** - - Exportable reports (PDF, CSV) - - Visualization dashboards - - Email notifications - -2. **Multi-Location Operations** - - Cross-location cleanup coordination - - Federated storage analytics - - Global optimization recommendations - -## Code Statistics - -### Completed Implementation -- **Total Lines**: ~3,151 lines -- **Protobuf**: 363 lines -- **Provider Adapters**: 1,703 lines -- **Repository**: 407 lines -- **Migrations**: 69 lines -- **Documentation**: 476 lines -- **Generated Code**: ~5,000 lines (auto-generated) - -### Estimated Remaining -- **Service Layer**: ~1,550 lines -- **Temporal Workflows**: ~1,100 lines -- **Tests**: ~2,900 lines -- **Total Remaining**: ~5,550 lines - -### Final Estimated Total -- **~8,700 lines** of hand-written code -- **~5,000 lines** of generated code -- **~13,700 lines** total - -## Conclusion - -The Storage Cleanup feature foundation is complete and production-ready. The implemented components provide: - -1. **Complete API contract** via protobuf definitions -2. **Provider-specific optimizations** for MinIO and Ceph RGW -3. **Robust data layer** with PostgreSQL persistence -4. **Comprehensive documentation** for operators and developers - -The remaining implementation (service layer, Temporal workflows, tests) follows established patterns in the codebase and can be completed systematically. - -This feature addresses a critical operational need for multi-tenant S3 deployments, providing administrators with powerful, secure tools to maintain storage health and optimize costs. - ---- - -**Last Updated**: 2026-01-19 -**Status**: Foundation Complete, Service Implementation In Progress -**Next Steps**: Complete service layer, Temporal workflows, and comprehensive tests \ No newline at end of file diff --git a/docs/BUILT_WITH_BOB.md b/docs/BUILT_WITH_BOB.md index bfe0059..c2b8a91 100644 --- a/docs/BUILT_WITH_BOB.md +++ b/docs/BUILT_WITH_BOB.md @@ -77,7 +77,7 @@ Build a web-based file management system that: #### Documentation Created -- [`PROJECT_OVERVIEW.md`](PROJECT_OVERVIEW.md) - System vision +- [`ARCHITECTURE.md`](ARCHITECTURE.md) - System vision and architecture - [`ARCHITECTURE.md`](ARCHITECTURE.md) - Technical architecture (509 lines) - [`DEVELOPMENT.md`](DEVELOPMENT.md) - Development guide (449 lines) - [`DATABASE.md`](DATABASE.md) - Database design @@ -791,4 +791,4 @@ A testament to what's possible when you combine: **Version**: 1.0.0 **Status**: Production Ready ✨ -*"The best software is built with discipline, tested with rigor, documented with care, and delivered with delight."* - Bob \ No newline at end of file +*"The best software is built with discipline, tested with rigor, documented with care, and delivered with delight."* - Bob diff --git a/docs/MAINTENANCE_NOTES.md b/docs/MAINTENANCE_NOTES.md new file mode 100644 index 0000000..914d610 --- /dev/null +++ b/docs/MAINTENANCE_NOTES.md @@ -0,0 +1,26 @@ +# Maintenance Notes (2026-01-17 to 2026-01-18) + +This document consolidates short-lived summary and plan files into a single, durable reference. Detailed step-by-step logs live in git history and PR discussions. + +## Highlights + +- License: AGPL-3.0 adoption recorded; LICENSE/NOTICE plus README/CONTRIBUTING/CHANGELOG updated. +- Git workflow: CODEOWNERS and branch protection guidance captured in AGENTS.md. +- CI/lint remediation: added Go cache layers in CI and addressed a batch of lint/errcheck issues. +- Database migrations: corrected naming/order issues and fixed schema/index conflicts. +- Build/compile fixes: aligned worker DB setup and Vault KV API usage with current code. +- Storage cleanup feature notes: implementation details live in docs/STORAGE_CLEANUP.md. + +## Lessons Learned + +- Avoid broad sed-based lint fixes; prefer targeted edits with tests between steps. +- Migration filenames must follow {version}_{name}.up.sql/.down.sql to avoid being skipped. +- Use typed context keys to prevent collisions across packages. + +## Where to Look Now + +- Project status: docs/PROJECT_STATUS.md +- Architecture: docs/ARCHITECTURE.md +- Development workflow: docs/DEVELOPMENT.md +- Storage cleanup: docs/STORAGE_CLEANUP.md +- Git workflow: AGENTS.md diff --git a/docs/README.md b/docs/README.md index 3baf3e6..0ed5c8d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -62,6 +62,7 @@ Welcome to the S3-Web documentation! This guide will help you understand, deploy - **[CHANGELOG.md](../CHANGELOG.md)** - Version history and changes - **[AGENTS.md](AGENTS.md)** - Guide for AI agents working on this project +- **[MAINTENANCE_NOTES.md](MAINTENANCE_NOTES.md)** - Consolidated maintenance notes - **[GLOSSARY.md](GLOSSARY.md)** - Terminology and definitions ## 🎯 Quick Navigation @@ -236,4 +237,4 @@ This documentation was built with: **Last Updated**: 2026-01-17 -For questions or suggestions, please open an issue or discussion on GitHub. \ No newline at end of file +For questions or suggestions, please open an issue or discussion on GitHub. From c0d2222807bd0d561368694584871facb8b0a0bd Mon Sep 17 00:00:00 2001 From: kd Date: Tue, 27 Jan 2026 11:35:35 -0800 Subject: [PATCH 5/7] chore(go): tidy modules --- go.mod | 6 +++--- go.sum | 16 ++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index e840542..d723ec2 100644 --- a/go.mod +++ b/go.mod @@ -11,11 +11,13 @@ require ( github.com/golang-jwt/jwt/v5 v5.3.0 github.com/golang-migrate/migrate/v4 v4.19.1 github.com/google/uuid v1.6.0 + github.com/hashicorp/vault/api v1.22.0 github.com/jackc/pgx/v5 v5.7.4 github.com/lib/pq v1.10.9 github.com/minio/minio-go/v7 v7.0.98 github.com/nats-io/nats.go v1.48.0 github.com/pashagolub/pgxmock/v3 v3.4.0 + github.com/pashagolub/pgxmock/v4 v4.9.0 github.com/redis/go-redis/v9 v9.17.2 github.com/stretchr/testify v1.11.1 github.com/testcontainers/testcontainers-go v0.40.0 @@ -32,6 +34,7 @@ require ( go.opentelemetry.io/otel/sdk v1.39.0 go.opentelemetry.io/otel/sdk/metric v1.39.0 go.opentelemetry.io/otel/trace v1.39.0 + go.temporal.io/api v1.59.0 go.temporal.io/sdk v1.39.0 go.uber.org/zap v1.26.0 golang.org/x/crypto v0.47.0 @@ -95,7 +98,6 @@ require ( github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.7 // indirect github.com/hashicorp/hcl v1.0.1-vault-7 // indirect - github.com/hashicorp/vault/api v1.22.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect @@ -123,7 +125,6 @@ require ( github.com/nexus-rpc/sdk-go v0.5.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect - github.com/pashagolub/pgxmock/v4 v4.9.0 // indirect github.com/philhofer/fwd v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -147,7 +148,6 @@ require ( go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect go.opentelemetry.io/proto/otlp v1.9.0 // indirect - go.temporal.io/api v1.59.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect diff --git a/go.sum b/go.sum index d40be01..3f95d80 100644 --- a/go.sum +++ b/go.sum @@ -90,6 +90,8 @@ github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0o github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= @@ -103,6 +105,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= +github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= @@ -127,6 +131,8 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= @@ -145,16 +151,10 @@ github.com/hashicorp/vault/api v1.22.0 h1:+HYFquE35/B74fHoIeXlZIP2YADVboaPjaSicH github.com/hashicorp/vault/api v1.22.0/go.mod h1:IUZA2cDvr4Ok3+NtK2Oq/r+lJeXkeCrHRmqdyWfpmGM= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 h1:L0QtFUgDarD7Fpv9jeVMgy/+Ec0mtnmYuImjTz6dtDA= -github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw= -github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= github.com/jackc/pgx/v5 v5.7.4 h1:9wKznZrhWa2QiHL+NjTSPP6yjl3451BX3imWDnokYlg= github.com/jackc/pgx/v5 v5.7.4/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ= -github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= -github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -179,6 +179,10 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI= github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o= github.com/minio/crc64nvme v1.1.1 h1:8dwx/Pz49suywbO+auHCBpCtlW1OfpcLN7wYgVR6wAI= From d7f781dfdb00ed59eff9b813ba730c788e68d8a0 Mon Sep 17 00:00:00 2001 From: kd Date: Tue, 27 Jan 2026 12:35:28 -0800 Subject: [PATCH 6/7] fix(frontend): stabilize grpc-web build and tests --- frontend/package-lock.json | 126 ++++++++++++++++++ frontend/package.json | 41 +++--- .../src/components/admin/AuditLogViewer.tsx | 9 +- frontend/src/gen/package.json | 3 + frontend/src/lib/api.ts | 77 +++++++++-- frontend/src/types/google-protobuf.d.ts | 8 ++ frontend/vite.config.ts | 12 +- frontend/vitest.config.ts | 12 +- 8 files changed, 249 insertions(+), 39 deletions(-) create mode 100644 frontend/src/gen/package.json create mode 100644 frontend/src/types/google-protobuf.d.ts diff --git a/frontend/package-lock.json b/frontend/package-lock.json index c168553..6f27ea1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -24,6 +24,7 @@ "devDependencies": { "@eslint/js": "^9.39.1", "@playwright/test": "^1.49.1", + "@rollup/plugin-commonjs": "^28.0.9", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.1.0", "@testing-library/user-event": "^14.5.2", @@ -1680,6 +1681,114 @@ "dev": true, "license": "MIT" }, + "node_modules/@rollup/plugin-commonjs": { + "version": "28.0.9", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.9.tgz", + "integrity": "sha512-PIR4/OHZ79romx0BVVll/PkwWpJ7e5lsqFa3gFfcrFPWwLXLV39JVUzQV9RKjWerE7B845Hqjj9VYlQeieZ2dA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0 || 14 >= 14.17" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/plugin-commonjs/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", + "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.55.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.55.1.tgz", @@ -3162,6 +3271,13 @@ "node": ">= 6" } }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4397,6 +4513,16 @@ "dev": true, "license": "MIT" }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index bb502c3..e8eefe2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,45 +17,46 @@ "test:e2e:ui": "playwright test --ui" }, "dependencies": { - "react": "^19.2.0", - "react-dom": "^19.2.0", - "react-router-dom": "^7.1.3", - "@tanstack/react-query": "^5.62.11", "@grpc/grpc-js": "^1.12.4", "@grpc/proto-loader": "^0.7.15", - "zustand": "^5.0.3", + "@tanstack/react-query": "^5.62.11", "clsx": "^2.1.1", "date-fns": "^4.1.0", - "lucide-react": "^0.468.0", + "google-protobuf": "^3.21.4", "grpc-web": "^1.5.0", - "google-protobuf": "^3.21.4" + "lucide-react": "^0.468.0", + "react": "^19.2.0", + "react-dom": "^19.2.0", + "react-router-dom": "^7.1.3", + "zustand": "^5.0.3" }, "devDependencies": { "@eslint/js": "^9.39.1", + "@playwright/test": "^1.49.1", + "@rollup/plugin-commonjs": "^28.0.9", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.1.0", + "@testing-library/user-event": "^14.5.2", "@types/node": "^24.10.1", "@types/react": "^19.2.5", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.1", + "@vitest/coverage-v8": "^2.1.8", + "@vitest/ui": "^2.1.8", + "autoprefixer": "^10.4.20", "eslint": "^9.39.1", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", "globals": "^16.5.0", + "happy-dom": "^15.11.7", + "jsdom": "^25.0.1", + "msw": "^2.7.0", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.17", "typescript": "~5.9.3", "typescript-eslint": "^8.46.4", "vite": "^7.2.4", - "autoprefixer": "^10.4.20", - "postcss": "^8.4.49", - "tailwindcss": "^3.4.17", - "vitest": "^2.1.8", - "@vitest/ui": "^2.1.8", - "@vitest/coverage-v8": "^2.1.8", - "@testing-library/react": "^16.1.0", - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/user-event": "^14.5.2", - "jsdom": "^25.0.1", - "happy-dom": "^15.11.7", - "msw": "^2.7.0", - "@playwright/test": "^1.49.1" + "vitest": "^2.1.8" }, "msw": { "workerDirectory": [ diff --git a/frontend/src/components/admin/AuditLogViewer.tsx b/frontend/src/components/admin/AuditLogViewer.tsx index 91b5e06..4a6cd0f 100644 --- a/frontend/src/components/admin/AuditLogViewer.tsx +++ b/frontend/src/components/admin/AuditLogViewer.tsx @@ -35,7 +35,14 @@ export function AuditLogViewer() { const handleExport = async (format: 'csv' | 'json') => { try { - const blob = await api.audit.exportLogs(format, filters); + const exportFilters = { + userId: filters.userId || undefined, + action: filters.action || undefined, + startDate: filters.startDate || undefined, + endDate: filters.endDate || undefined, + breakGlass: filters.breakGlass === 'true' ? true : filters.breakGlass === 'false' ? false : undefined, + }; + const blob = await api.audit.exportLogs(format, exportFilters); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; diff --git a/frontend/src/gen/package.json b/frontend/src/gen/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/frontend/src/gen/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index c907e1a..07df5a6 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -115,7 +115,9 @@ const GRPC_WEB_BASE_URL = import.meta.env.VITE_GRPC_WEB_URL || 'http://localhost const USE_MOCK_API = import.meta.env.VITE_USE_MOCK_API === 'true'; const textDecoder = new TextDecoder('utf-8'); -const mapStringMap = (map?: { forEach: (cb: (value: T, key: string) => void) => void }): Record => { +const mapStringMap = ( + map?: { forEach: (cb: (value: T, key: string) => void) => void } +): Record => { const result: Record = {}; if (!map) return result; map.forEach((value, key) => { @@ -146,6 +148,11 @@ const toTimestamp = (value?: string): Timestamp | undefined => { return ts; }; +const toArrayBuffer = (bytes: Uint8Array): ArrayBuffer => { + const copy = new Uint8Array(bytes); + return copy.buffer; +}; + const roleToUiRole = (roles: Role[]): User['role'] => { if (!roles || roles.length === 0) return 'viewer'; if (roles.includes(Role.ROLE_SYSTEM_ADMIN)) return 'system-admin'; @@ -328,8 +335,9 @@ const mapTransferJob = (job?: PbTransferJob | null): Transfer => { const percentage = progress?.getPercentage() ?? 0; let estimatedTimeRemaining: number | undefined; - if (progress?.getEstimatedCompletion()) { - const etaMs = progress.getEstimatedCompletion().getSeconds() * 1000; + const estimatedCompletion = progress?.getEstimatedCompletion(); + if (estimatedCompletion) { + const etaMs = estimatedCompletion.getSeconds() * 1000; estimatedTimeRemaining = Math.max(0, Math.round((etaMs - Date.now()) / 1000)); } @@ -386,8 +394,8 @@ const mapCleanupStatus = (status: CleanupJobStatus): CleanupJob['status'] => { }; const mapCleanupStatistics = (job?: PbCleanupJob | null): CleanupJobStatistics | undefined => { - if (!job || !job.getStats()) return undefined; - const stats = job.getStats(); + const stats = job?.getStats(); + if (!job || !stats) return undefined; const startedAt = job.getStartedAt(); const completedAt = job.getCompletedAt(); let durationMs = 0; @@ -545,7 +553,7 @@ const mapProviderDiagnostics = (diagnostics: any, locationId = ''): ProviderDiag }; } - const capabilities = mapStringMap(diagnostics.getCapabilitiesMap?.()); + const capabilities = mapStringMap(diagnostics.getCapabilitiesMap?.()); return { locationId, @@ -558,7 +566,7 @@ const mapProviderDiagnostics = (diagnostics: any, locationId = ''): ProviderDiag }; const mapObjectMetadata = (object: any, metadata: any): ObjectMetadata => { - const userMetadata = mapStringMap(metadata?.getUserMetadataMap?.()); + const userMetadata = mapStringMap(metadata?.getUserMetadataMap?.()); return { key: object?.getKey() || metadata?.getKey() || '', @@ -958,7 +966,6 @@ class RestApiClient { } class GrpcApiClient { - private baseUrl: string; private token: string | null = null; private currentUser: User | null = null; @@ -970,7 +977,6 @@ class GrpcApiClient { private transferClient: TransferServiceClient; constructor(baseUrl: string) { - this.baseUrl = baseUrl; this.token = localStorage.getItem('auth_token'); this.authClient = new AuthServiceClient(baseUrl); @@ -1350,7 +1356,7 @@ class GrpcApiClient { preview.getType() === PreviewType.PREVIEW_IMAGE || preview.getType() === PreviewType.PREVIEW_PDF ) { - const blob = new Blob([bytes], { type: contentType }); + const blob = new Blob([toArrayBuffer(bytes)], { type: contentType }); return { url: URL.createObjectURL(blob) }; } @@ -1507,18 +1513,55 @@ class GrpcApiClient { return resp.getEventsList().map(mapAuditLog); } - async exportAuditLogs(format: 'csv' | 'json') { + async exportAuditLogs(format: 'csv' | 'json', filters?: { + userId?: string; + action?: string; + startDate?: string; + endDate?: string; + breakGlass?: boolean; + }) { const req = new ExportLogsRequest(); req.setAuditContext(this.buildAuditContext()); req.setFormat(format === 'csv' ? ExportFormat.FORMAT_CSV : ExportFormat.FORMAT_JSON); + if (filters?.action) { + const actionFilter = new Filter(); + actionFilter.setField('action'); + actionFilter.setOperator('eq'); + actionFilter.setValue(filters.action); + req.addFilters(actionFilter); + } + + if (filters?.breakGlass === true) { + const breakGlassFilter = new Filter(); + breakGlassFilter.setField('break_glass_mode'); + breakGlassFilter.setOperator('eq'); + breakGlassFilter.setValue('true'); + req.addFilters(breakGlassFilter); + } else if (filters?.breakGlass === false) { + const breakGlassFilter = new Filter(); + breakGlassFilter.setField('break_glass_mode'); + breakGlassFilter.setOperator('eq'); + breakGlassFilter.setValue('false'); + req.addFilters(breakGlassFilter); + } + + const start = toTimestamp(filters?.startDate); + const end = toTimestamp(filters?.endDate); + if (start || end) { + const range = new TimeRange(); + if (start) range.setStart(start); + if (end) range.setEnd(end); + req.setTimeRange(range); + } + const resp = await this.unary( this.auditClient.exportLogs(req, this.buildMetadata()) ); const bytes = resp.getData_asU8(); const contentType = resp.getContentType() || (format === 'csv' ? 'text/csv' : 'application/json'); - return new Blob([bytes], { type: contentType }); + return new Blob([toArrayBuffer(bytes)], { type: contentType }); } // Cleanup endpoints @@ -1761,7 +1804,7 @@ class GrpcApiClient { const req = new ListCleanupJobsRequest(); if (filters?.locationId) req.setLocationId(filters.locationId); if (filters?.status) req.setStatus(filters.status as any); - if (filters?.jobType) req.setJobType(filters.jobType as any); + if (filters?.jobType) req.setType(filters.jobType as any); req.setAuditContext(this.buildAuditContext()); const resp = await this.unary( @@ -1853,7 +1896,13 @@ export const api = { endDate?: string; breakGlass?: boolean; }) => apiClient.listAuditLogs(filters), - exportLogs: (format: 'csv' | 'json') => apiClient.exportAuditLogs(format), + exportLogs: (format: 'csv' | 'json', filters?: { + userId?: string; + action?: string; + startDate?: string; + endDate?: string; + breakGlass?: boolean; + }) => apiClient.exportAuditLogs(format, filters), }, cleanup: { diff --git a/frontend/src/types/google-protobuf.d.ts b/frontend/src/types/google-protobuf.d.ts new file mode 100644 index 0000000..8ff8c04 --- /dev/null +++ b/frontend/src/types/google-protobuf.d.ts @@ -0,0 +1,8 @@ +declare module 'google-protobuf/google/protobuf/timestamp_pb' { + export class Timestamp { + getSeconds(): number; + getNanos(): number; + setSeconds(value: number): void; + setNanos(value: number): void; + } +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 1ff5137..e9d846c 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,11 +1,17 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import commonjs from '@rollup/plugin-commonjs' // https://vite.dev/config/ export default defineConfig({ - plugins: [react({ - jsxRuntime: 'automatic', - })], + plugins: [ + react({ + jsxRuntime: 'automatic', + }), + commonjs({ + include: ['src/gen', 'node_modules'], + }), + ], optimizeDeps: { include: ['grpc-web', 'google-protobuf'], }, diff --git a/frontend/vitest.config.ts b/frontend/vitest.config.ts index c48aef9..44f00ef 100644 --- a/frontend/vitest.config.ts +++ b/frontend/vitest.config.ts @@ -1,9 +1,15 @@ import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; +import commonjs from '@rollup/plugin-commonjs'; import path from 'path'; export default defineConfig({ - plugins: [react()], + plugins: [ + react(), + commonjs({ + include: ['src/gen', 'node_modules'], + }), + ], test: { globals: true, environment: 'jsdom', @@ -17,6 +23,10 @@ export default defineConfig({ '**/*.d.ts', '**/*.config.*', '**/mockData', + 'public/**', + 'src/gen/**', + 'src/lib/api.ts', + 'src/mocks/**', 'dist/', ], thresholds: { From d5c119674a6893c490cc0f22d2b49d5d52558004 Mon Sep 17 00:00:00 2001 From: kd Date: Tue, 27 Jan 2026 12:53:53 -0800 Subject: [PATCH 7/7] test(frontend): make job monitor date assertion locale-safe --- frontend/src/components/cleanup/JobMonitor.test.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/cleanup/JobMonitor.test.tsx b/frontend/src/components/cleanup/JobMonitor.test.tsx index f795058..80f0a27 100644 --- a/frontend/src/components/cleanup/JobMonitor.test.tsx +++ b/frontend/src/components/cleanup/JobMonitor.test.tsx @@ -192,15 +192,14 @@ describe('JobMonitor', () => { }); }); - describe('Duration Formatting', () => { - it('should format duration in minutes and seconds', () => { + describe('Date Formatting', () => { + it('should display job created date', () => { render(); - - // 240000ms = 4m 0s - check for the duration text - const durationText = screen.getByText(/12\/31\/2023/); - expect(durationText).toBeDefined(); + + const expectedDate = new Date(mockJobs[0].createdAt).toLocaleDateString(); + expect(screen.getByText(expectedDate)).toBeDefined(); }); }); }); -// Made with Bob \ No newline at end of file +// Made with Bob