ServiceConfig class
Describes the Service being deployed. Currently Supported : Cloud Run (fully managed). Next tag: 23
- Inheritance
-
- Object
- GeneratedMessage
- ServiceConfig
Constructors
-
ServiceConfig({String? service, int? timeoutSeconds, Map<
String, String> ? environmentVariables, int? maxInstanceCount, String? vpcConnector, ServiceConfig_VpcConnectorEgressSettings? vpcConnectorEgressSettings, ServiceConfig_IngressSettings? ingressSettings, String? uri, String? serviceAccountEmail, int? minInstanceCount, String? availableMemory, bool? allTrafficOnLatestRevision, Iterable<SecretEnvVar> ? secretEnvironmentVariables, String? revision, Iterable<SecretVolume> ? secretVolumes, int? maxInstanceRequestConcurrency, ServiceConfig_SecurityLevel? securityLevel, String? availableCpu}) -
factory
-
ServiceConfig.fromBuffer(List<
int> i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) -
factory
- ServiceConfig.fromJson(String i, [ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
-
factory
Properties
- allTrafficOnLatestRevision ↔ bool
-
Whether 100% of traffic is routed to the latest revision.
On CreateFunction and UpdateFunction, when set to true, the revision being
deployed will serve 100% of traffic, ignoring any traffic split settings,
if any. On GetFunction, true will be returned if the latest revision is
serving 100% of traffic.
getter/setter pair
- availableCpu ↔ String
-
The number of CPUs used in a single container instance.
Default value is calculated from available memory.
Supports the same values as Cloud Run, see
https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements
Example: "1" indicates 1 vCPU
getter/setter pair
- availableMemory ↔ String
-
The amount of memory available for a function.
Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is
supplied the value is interpreted as bytes.
See
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
a full description.
getter/setter pair
-
environmentVariables
→ Map<
String, String> -
Environment variables that shall be available during function execution.
no setter
- eventPlugin → EventPlugin?
-
Subclasses can override this getter to be notified of changes
to protobuf fields.
no setterinherited
- hashCode → int
-
Calculates a hash code based on the contents of the protobuf.
no setterinherited
- info_ → BuilderInfo
-
no setteroverride
- ingressSettings ↔ ServiceConfig_IngressSettings
-
The ingress settings for the function, controlling what traffic can reach
it.
getter/setter pair
- isFrozen → bool
-
Returns
true
if this message is marked read-only. Otherwisefalse
.no setterinherited - maxInstanceCount ↔ int
-
The limit on the maximum number of function instances that may coexist at a
given time.
getter/setter pair
- maxInstanceRequestConcurrency ↔ int
-
Sets the maximum number of concurrent requests that each instance can
receive. Defaults to 1.
getter/setter pair
- minInstanceCount ↔ int
-
The limit on the minimum number of function instances that may coexist at a
given time.
getter/setter pair
- revision ↔ String
-
Output only. The name of service revision.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
secretEnvironmentVariables
→ List<
SecretEnvVar> -
Secret environment variables configuration.
no setter
-
secretVolumes
→ List<
SecretVolume> -
Secret volumes configuration.
no setter
- securityLevel ↔ ServiceConfig_SecurityLevel
-
Security level configure whether the function only accepts https.
This configuration is only applicable to 1st Gen functions with Http
trigger. By default https is optional for 1st Gen functions; 2nd Gen
functions are https ONLY.
getter/setter pair
- service ↔ String
-
Output only. Name of the service associated with a Function.
The format of this field is
projects/{project}/locations/{region}/services/{service}
getter/setter pair - serviceAccountEmail ↔ String
-
The email of the service's service account. If empty, defaults to
{project_number}-compute@developer.gserviceaccount.com
.getter/setter pair - timeoutSeconds ↔ int
-
The function execution timeout. Execution is considered failed and
can be terminated if the function is not completed at the end of the
timeout period. Defaults to 60 seconds.
getter/setter pair
- unknownFields → UnknownFieldSet
-
no setterinherited
- uri ↔ String
-
Output only. URI of the Service deployed.
getter/setter pair
- vpcConnector ↔ String
-
The Serverless VPC Access connector that this cloud function can connect
to. The format of this field is
projects/*/locations/*/connectors/*
.getter/setter pair - vpcConnectorEgressSettings ↔ ServiceConfig_VpcConnectorEgressSettings
-
The egress settings for the connector, controlling what traffic is diverted
through it.
getter/setter pair
Methods
-
addExtension(
Extension extension, Object? value) → void -
Adds an extension field value to a repeated field.
inherited
-
check(
) → void -
inherited
-
clear(
) → void -
Clears all data that was set in this message.
inherited
-
clearAllTrafficOnLatestRevision(
) → void -
clearAvailableCpu(
) → void -
clearAvailableMemory(
) → void -
clearExtension(
Extension extension) → void -
Clears an extension field and also removes the extension.
inherited
-
clearField(
int tagNumber) → void -
Clears the contents of a given field.
inherited
-
clearIngressSettings(
) → void -
clearMaxInstanceCount(
) → void -
clearMaxInstanceRequestConcurrency(
) → void -
clearMinInstanceCount(
) → void -
clearRevision(
) → void -
clearSecurityLevel(
) → void -
clearService(
) → void -
clearServiceAccountEmail(
) → void -
clearTimeoutSeconds(
) → void -
clearUri(
) → void -
clearVpcConnector(
) → void -
clearVpcConnectorEgressSettings(
) → void -
clone(
) → ServiceConfig -
Creates a deep copy of the fields in this message.
(The generated code uses mergeFromMessage.)
override
-
copyWith(
void updates(ServiceConfig)) → ServiceConfig -
Apply
updates
to a copy of this message.override -
createEmptyInstance(
) → ServiceConfig -
Creates an empty instance of the same message type as this.
override
-
createMapField<
K, V> (int tagNumber, MapFieldInfo< K, V> fi) → Map<K, V> -
Creates a Map representing a map field.
inherited
-
createRepeatedField<
T> (int tagNumber, FieldInfo< T> fi) → List<T> -
Creates List implementing a mutable repeated field.
inherited
-
extensionsAreInitialized(
) → bool -
inherited
-
freeze(
) → GeneratedMessage -
Make this message read-only.
inherited
-
getDefaultForField(
int tagNumber) → dynamic -
Returns the default value for the given field.
inherited
-
getExtension(
Extension extension) → dynamic -
Returns the value of
extension
.inherited -
getField(
int tagNumber) → dynamic -
Returns the value of the field associated with
tagNumber
, or the default value if it is not set.inherited -
getFieldOrNull(
int tagNumber) → dynamic -
Returns the value of a field, ignoring any defaults.
inherited
-
getTagNumber(
String fieldName) → int? -
inherited
-
hasAllTrafficOnLatestRevision(
) → bool -
hasAvailableCpu(
) → bool -
hasAvailableMemory(
) → bool -
hasExtension(
Extension extension) → bool -
Returns
true
if a value ofextension
is present.inherited -
hasField(
int tagNumber) → bool -
Whether this message has a field associated with
tagNumber
.inherited -
hasIngressSettings(
) → bool -
hasMaxInstanceCount(
) → bool -
hasMaxInstanceRequestConcurrency(
) → bool -
hasMinInstanceCount(
) → bool -
hasRequiredFields(
) → bool -
Whether the message has required fields.
inherited
-
hasRevision(
) → bool -
hasSecurityLevel(
) → bool -
hasService(
) → bool -
hasServiceAccountEmail(
) → bool -
hasTimeoutSeconds(
) → bool -
hasUri(
) → bool -
hasVpcConnector(
) → bool -
hasVpcConnectorEgressSettings(
) → bool -
isInitialized(
) → bool -
Whether all required fields in the message and embedded messages are set.
inherited
-
mergeFromBuffer(
List< int> input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges serialized protocol buffer data into this message.
inherited
-
mergeFromCodedBufferReader(
CodedBufferReader input, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
inherited
-
mergeFromJson(
String data, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from
data
, a JSON object, encoded as described byGeneratedMessage.writeToJson
.inherited -
mergeFromJsonMap(
Map< String, dynamic> json, [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) → void -
Merges field values from a JSON object represented as a Dart map.
inherited
-
mergeFromMessage(
GeneratedMessage other) → void -
Merges the contents of the
other
into this message.inherited -
mergeFromProto3Json(
Object? json, {TypeRegistry typeRegistry = const TypeRegistry.empty(), bool ignoreUnknownFields = false, bool supportNamesWithUnderscores = true, bool permissiveEnums = false}) → void -
Merges field values from
json
, a JSON object using proto3 encoding.inherited -
mergeUnknownFields(
UnknownFieldSet unknownFieldSet) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setExtension(
Extension extension, Object value) → void -
Sets the value of a non-repeated extension field to
value
.inherited -
setField(
int tagNumber, Object value) → void -
Sets the value of a field by its
tagNumber
.inherited -
toBuilder(
) → GeneratedMessage -
Creates a writable, shallow copy of this message.
inherited
-
toDebugString(
) → String -
Returns a String representation of this message.
inherited
-
toProto3Json(
{TypeRegistry typeRegistry = const TypeRegistry.empty()}) → Object? -
Returns an Object representing Proto3 JSON serialization of
this
.inherited -
toString(
) → String -
Returns a String representation of this message.
inherited
-
writeToBuffer(
) → Uint8List -
inherited
-
writeToCodedBufferWriter(
CodedBufferWriter output) → void -
inherited
-
writeToJson(
) → String -
Returns a JSON string that encodes this message.
inherited
-
writeToJsonMap(
) → Map< String, dynamic> -
Returns the JSON encoding of this message as a Dart Map.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → ServiceConfig -
createRepeated(
) → PbList< ServiceConfig> -
getDefault(
) → ServiceConfig