Exemplo n.º 1
0
        public void MergeFrom(OSPolicyResourceCompliance other)
        {
            if (other == null)
            {
                return;
            }
            if (other.OsPolicyResourceId.Length != 0)
            {
                OsPolicyResourceId = other.OsPolicyResourceId;
            }
            configSteps_.Add(other.configSteps_);
            if (other.State != global::Google.Cloud.OsConfig.V1Alpha.OSPolicyComplianceState.Unspecified)
            {
                State = other.State;
            }
            switch (other.OutputCase)
            {
            case OutputOneofCase.ExecResourceOutput:
                if (ExecResourceOutput == null)
                {
                    ExecResourceOutput = new global::Google.Cloud.OsConfig.V1Alpha.OSPolicyResourceCompliance.Types.ExecResourceOutput();
                }
                ExecResourceOutput.MergeFrom(other.ExecResourceOutput);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemplo n.º 2
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                    break;

                case 10: {
                    OsPolicyResourceId = input.ReadString();
                    break;
                }

                case 18: {
                    configSteps_.AddEntriesFrom(ref input, _repeated_configSteps_codec);
                    break;
                }

                case 24: {
                    State = (global::Google.Cloud.OsConfig.V1Alpha.OSPolicyComplianceState)input.ReadEnum();
                    break;
                }

                case 34: {
                    global::Google.Cloud.OsConfig.V1Alpha.OSPolicyResourceCompliance.Types.ExecResourceOutput subBuilder = new global::Google.Cloud.OsConfig.V1Alpha.OSPolicyResourceCompliance.Types.ExecResourceOutput();
                    if (outputCase_ == OutputOneofCase.ExecResourceOutput)
                    {
                        subBuilder.MergeFrom(ExecResourceOutput);
                    }
                    input.ReadMessage(subBuilder);
                    ExecResourceOutput = subBuilder;
                    break;
                }
                }
            }
        }
Exemplo n.º 3
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    OsPolicyResourceId = input.ReadString();
                    break;
                }

                case 18: {
                    configSteps_.AddEntriesFrom(input, _repeated_configSteps_codec);
                    break;
                }

                case 24: {
                    State = (global::Google.Cloud.OsConfig.V1Alpha.OSPolicyComplianceState)input.ReadEnum();
                    break;
                }

                case 34: {
                    global::Google.Cloud.OsConfig.V1Alpha.OSPolicyResourceCompliance.Types.ExecResourceOutput subBuilder = new global::Google.Cloud.OsConfig.V1Alpha.OSPolicyResourceCompliance.Types.ExecResourceOutput();
                    if (outputCase_ == OutputOneofCase.ExecResourceOutput)
                    {
                        subBuilder.MergeFrom(ExecResourceOutput);
                    }
                    input.ReadMessage(subBuilder);
                    ExecResourceOutput = subBuilder;
                    break;
                }
                }
            }
    #endif
        }