Esempio n. 1
0
        public Proxy_Secret ToProxy()
        {
            Proxy_Secret result_ = new Proxy_Secret();

            result_.uuid         = uuid ?? "";
            result_.value        = value ?? "";
            result_.other_config = Maps.convert_to_proxy_string_string(other_config);
            return(result_);
        }
Esempio n. 2
0
        public Proxy_Secret ToProxy()
        {
            Proxy_Secret result_ = new Proxy_Secret();

            result_.uuid         = (uuid != null) ? uuid : "";
            result_.value        = (value != null) ? value : "";
            result_.other_config = Maps.convert_to_proxy_string_string(other_config);
            return(result_);
        }
Esempio n. 3
0
        public override string SaveChanges(Session session, string opaqueRef, Secret server)
        {
            if (opaqueRef == null)
            {
                Proxy_Secret p = this.ToProxy();
                return(session.proxy.secret_create(session.uuid, p).parse());
            }
            else
            {
                if (!Helper.AreEqual2(_value, server._value))
                {
                    Secret.set_value(session, opaqueRef, _value);
                }
                if (!Helper.AreEqual2(_other_config, server._other_config))
                {
                    Secret.set_other_config(session, opaqueRef, _other_config);
                }

                return(null);
            }
        }
Esempio n. 4
0
 internal void UpdateFromProxy(Proxy_Secret proxy)
 {
     uuid         = proxy.uuid == null ? null : (string)proxy.uuid;
     value        = proxy.value == null ? null : (string)proxy.value;
     other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a new Secret from a Proxy_Secret.
 /// </summary>
 /// <param name="proxy"></param>
 public Secret(Proxy_Secret proxy)
 {
     this.UpdateFromProxy(proxy);
 }
Esempio n. 6
0
 public Response <string> create(string session, Proxy_Secret secret)
 {
     secret.uuid = secret.value;
     return(createObj("Secret", secret));
 }
Esempio n. 7
0
 /// <summary>
 /// Creates a new Secret from a Proxy_Secret.
 /// </summary>
 /// <param name="proxy"></param>
 public Secret(Proxy_Secret proxy)
 {
     UpdateFrom(proxy);
 }